jsonRpc.history_get_key_accounts()
history_get_key_accounts()
方法返回指定公钥关联的账号,它是对RPC接口
/v1/history/get_key_accounts
的封装。
函数原型
history_get_key_accounts(public_key: string): Promise<any>
参数
- public_key:要查询的公钥
返回值
history_get_key_accounts()
方法返回一个Promise对象,其解析值为RPC响应结果对象。
示例代码
(async ()=>{
let ret = await rpc.history_get_key_accounts('EOS8ACNVuxt2Esb86M1qDJ4Umeh6tH8Vyin12GdwJsw3pj8USxqVs')
console.log(ret)
})()