Update Account Permission
Updates the permissions of an account, setting multi-signature permissions with a set signature threshold. Useful for creating a safely shared account.
Payload Parameters
Required | Parameter | Type | Description |
---|---|---|---|
permissions | Array of AccPermission Object | Set sender account's name |
AccPermission structure
Required | Parameter | Type | Description |
---|---|---|---|
type |
| 0: Owner, 1: User | |
permissionName |
| Permission identifier | |
threshold |
| Minimum sign amount to permit transaction | |
operations |
| See Operations | |
signers | AccKey object array | Defines the weight of the accounts' votes |
AccKey structure
Required | Parameter | Type | Description |
---|---|---|---|
address |
| Target address | |
weight |
| Target address' vote weight |
Operations
The operations
property defines which operations the account should be able to do.
The value that this property receives is a hexadecimal string, where each bit represents a contract.
Ex:
"01af" is the hexadecimal to 000110101111.
The 1's represent the contracts it should be able to do (following this table)
This account will be able to do contracts of type 0, 1, 2, 3, 5, 7, 8 (Transfer, Create Asset, Create Validator, Config Validator, Unfreeze, Undelegate, Withdraw).
Relevant Link: binary to hex calculator
After getting the hexadecimal string, you need to invert the byte order, for proper processing in the blockchain. you can use either of the following JS code to do so:
Both return the same "af01" which is the correct value for said operations.
Last updated