您好,登錄后才能下訂單哦!
本篇內容主要講解“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進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。