3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Macにbitcoindとbitcoin-cliをインストールして、Bitcoinの環境を構築する

Last updated at Posted at 2021-07-05

はじめに

Macにbitcoindとbitcoin-cliをインストールする
ソースはGitHubに公開されている。
masterブランチではなく、最新のtagからソースをpullすることを推奨します。

今回は、v0.21.1が最新バージョンです(2021/6現在)。

  • BitcoinのAPIはJSON-RPCで定義されている。
  • Bitcoin Core RPC
  • RPC API Reference
  • bitcoindは、RPCサーバーとして動作するエンドポイントである。
  • bitcoin-cliはコマンドラインからbitcoindを操作するツールである。

手順

  1. Macのコマンドラインツールをインストールする

    xcode-select --install
    
  2. 依存ライブラリをインストールする

    brew install automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf python qt libevent qrencode
    
  3. gitからソースをpullする

    git clone https://github.com/bitcoin/bitcoin.git -b v0.21.1
    
  4. ビルド・インストールを実行する

    ./autogen.sh
    ./configure
    make -j8
    sudo make install -j8
    

    ※ makeおよびmake installは-j ${コア数 x 2}オプションにてジョブ数の指定ができ、高速化が可能。

  5. バージョンを確認する

    $ bitcoind -version
    Bitcoin Core version v0.21.1
    Copyright (C) 2009-2020 The Bitcoin Core developers
    

参考

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?