get_controlled_accounts

2019-05-14 15:56:00

功能:获得控制的账户
参数:controlling_account

测试

curl --request POST  --url https://api.eoslaomao.com/v1/history/get_controlled_accounts  --data '{"controlling_account":"eosio"}'

返回

{"controlled_accounts":["decentwitter","eoshappyvote","eosio.bpay","eosio.forum","eosio.lost","eosio.msig","eosio.names","eosio.ram","eosio.ramfee","eosio.regram","eosio.rex","eosio.saving","eosio.stake","eosio.token","eosio.unregd","eosio.vpay","eosio.wrap","eoslocktoken","eosvrmarkets","eosvrrewards","eosvrtokenss","evdadvancer1","evdadvancers","evdpopulariz","evradvancer1","evradvancers","evrportraits","freewithdraw","frogfrogcoin","gm2dimrqgige","nvoyiooiyovn","ssssssss1115","stoponnopots","testtodelete","toohottohoot","unusedaccnts"]}

查询其中任意一个账号

cleos -u https://api.eoslaomao.com get account unusedaccnts

返回账号信息如下

permissions:
     owner     1:    1 eosio@active
     active     1:    1 eosio@active
     modify     1:    1 eosio.prods@prod.minor

再次查询交集账号eosio.prods

curl --request POST  --url https://api.eoslaomao.com/v1/history/get_controlled_accounts  --data '{"controlling_account":"eosio.prods"}'

返回账号信息如下

{"controlled_accounts":["chaingame123","eos3dio12345","eosdayeosday","eosio","paranthropus","studcontract","unusedaccnts"]}

其中也包含了unusedaccnts

结论

所以get_controlled_accounts返回的是已经将权限(含部分)移交给查询账号的所有账户。

备注

nodeos时需要启用history_api_plugin插件,并且设置filter-on选项

当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »