使用exchange.IO()函数调用以太坊RPC方法。
- 查询钱包中ETH余额
exchange.IO("api", "eth", "eth_getBalance", owner, "latest") // owner为具体的钱包地址
exchange.IO("api", "eth", "send", toAddress, toAmount) // toAddress为接收ETH的钱包地址,toAmount为转账数量
exchange.IO("api", "eth", "eth_gasPrice")
exchange.IO("api", "eth", "eth_estimateGas", data)