本篇内容主要讲解“openssl如何创建或修改账户权限”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“openssl如何创建或修改账户权限”吧!
命令格式:$ cleos set account permission ${permission} ${account} ${permission_json} ${account_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
第二个示例修改相同的帐户权限,但删除上一个示例中的密钥集,并将@test帐户的活动权限授予另一个帐户。
$ cleos set account permission test active '{"threshold" : 1, "keys" : [], "accounts" : [{"permission":{"actor":"sandwich","permission":"active"},"weight":1},{"permission":{"actor":"acc1","permission":"active"},"weight":50}]}' owner
第三个示例演示如何设置multisig的权限
$ cleos set account permission test active '{"threshold" : 100, "keys" : [{"permission":{"key":"EOS8X7Mp7apQWtL6T2sfSZzBcQNUqZB7tARFEm9gA9Tn9nbMdsvBB","permission":"active"},"weight":25}], "accounts" : [{"permission":{"actor":"@sandwich","permission":"active"},"weight":75}]}' owner
此命令中使用的JSON对象实际上由两种不同类型的对象组成 权限JSON对象...
{ "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*/ }
...其中包括一个或多个权限对象
/*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*/ }
到此,相信大家对“openssl如何创建或修改账户权限”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。