@2dan/blockchain 中文文档教程
dd-blockchain
z_fay@163.com
封装主流数字货币RPC接口、公共API接口
utxo、代币余额、发送交易、交易记录等功能
install
npm install dd-blockchain
HD_wallet (助记词钱包生成)
const blockchain = require('dd-blockchain');
const coin = 'eth' | 'btc' | 'ada' | 'ltc' ....
blockchain.HD_wallet.frommnemonic(coin)
signedTx (离线签名)
const {signedTx} = require('dd-blockchain');
signedTx.eth(from,to,amount,decimal,prikey,gasLimit,gasPrice,nonce,contract?)
signedTx.btc(utxo,prikey,fee,changeAddr,...to:[{addr,amount}])
signedTx.ada(utxo,prikey,fee,changeAddr,...to:[{addr,amount}])
signedTx.ltc(utxo,prikey,fee,changeAddr,...to:[{addr,amount}])
signedTx.doge(utxo,prikey,fee,changeAddr,...to:[{addr,amount}])
更多