比特币钱包默认是不开启JSONRPC接口的,要在比特币区块文件夹下新建bitcoin.conf这个文件,并写入以下内容

  server=1
  rpcuser=xxmm
  rpcpassword=123456

 接口的交互数据格式是JSON格式,比如这个是生成一个新的比特币地址 {"method":"getnewaddress","params":["地址标签"],"id":1},返回结果是{"result":"1N4tzYrEDExqGuNgjPiumNkUQ9Ar6q6UL6","error":null,"id":1},1N4tzYrEDExqGuNgjPiumNkUQ9Ar6q6UL6这个即为新生成的比特币地址。

用GO写一个连接比特币JSONRPC接口的程序

关于比特币JSONRPC的其它接口说明可以看下这里 https://blog.csdn.net/u013695144/article/details/37498785 ,我这里整理了一份用GO写的DEMO : github.com/it234/bitcoinJSONRPC,不知道园子里搞数字货币、区块链、交易所的朋友多不多~

 

相关文章:

  • 2021-04-18
  • 2021-09-15
  • 2022-12-23
  • 2021-07-07
  • 2021-06-21
  • 2021-11-16
  • 2021-10-25
猜你喜欢
  • 2022-12-23
  • 2022-02-12
  • 2022-12-23
  • 2021-09-03
  • 2022-12-23
  • 2021-06-09
相关资源
相似解决方案