bitcoin.confの書き方

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
mainnet=1
txindex=1
server=1
rest=1
rpcuser="username"
rpcpassword="password"
rpcport=8332
 
testnet=1
txindex=1
server=1
rest=1
rpcuser="username"
rpcpassword="password"
rpcport=8332

mainnet or testnetの利用
indexを作成して全てのトランザクションIDを参照可能とする
json rpcサーバとしてコマンドを受け付ける
rest インターフェイスを有効にする
json rpcのためのユーザ名、パスワード、rpcポート
※JSON-RPCを利用することで、一般的なHTTPライブラリを使用してbitcoin coreと対話できる

1
2
3
4
5
6
testnet=3
server=1
rpcbind=localhost
rpcport=18332
rpcuser=hoge
rpcpassword=piyo

testnet=3とは現在のバージョン
regtestに接続する場合は regtest=1