EOS 权限
Posted tekkaman
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了EOS 权限相关的知识,希望对你有一定的参考价值。
【EOS权限】
1、查看权限
cleos get account $(Account_Name)
2、使用 cleos set account permission 命令来修改权限
可以看到,owner、active 这种东西叫做 permission,这其中具体的内容叫做 authority。如下例:
$ cleos set account permission test active ‘{ "threshold" : 1, "keys" : [ { "permission":{ "key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB", "permission":"active" }, "weight":1 } ], "accounts" : [ { "permission":{ "actor":"acc2", "permission":"active" }, "weight":50 } ] }‘ owner
3、权限规则实际如下:
{ "threshold" : 100, /*An integer that defines cumulative signature weight required for authorization*/ "keys" : [], /*An array made up of individual permissions defined with an EOS PUBLIC KEY*/ "accounts" : [] /*An array made up of individual permissions defined with an EOS ACCOUNT*/ }
keys、accounts下结构相同,都拥有permission、weight字段
/*Set Permission with Key*/ { "permission" : { "key" : "EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB", "permission" : "active" }, weight : 25 /*Set the weight of a signature from this permission*/ } /*Set Permission with Account*/ { "permission" : { "actor" : "sandwich", "permission" : "active" }, weight : 75 /*Set the weight of a signature from this permission*/ }
参考:
1、https://my.oschina.net/u/3837977/blog/1915826
以上是关于EOS 权限的主要内容,如果未能解决你的问题,请参考以下文章