mvs-rpc
v1.0.1
Published
## 如何获取 ``` npm install --save mvs-rpc
Downloads
5
Readme
元界钱包rpc调用库
如何获取
npm install --save mvs-rpc
如何使用
const Mvs = require('mvs-client');
const client = new Mvs('http://localhost:8820/rpc');
client.height().then(val => console.log(val));
使用await
const res = await client.callMethod('fetch-balance', ['MUiW2CViWLQBg2TQDsRt1Pcj7KyrdqFPj7']);
console.log(res)
API
callMethod(name, args)
name
mvsd命令名称args
参数列表
client.callMethod('fetch-header', ['-t', 500657])
便捷方法
- heightHeader(num)
- hashHeader(hash)
- seed
- balance(address)
- height()
- history(address)
- tx(hash)
- txIndex(hash)
- utxo(satoshi, address)
- block(hash)
- transaction(hash)
- addressAsset(hash)