AccountPermissionUpdate

Update the account's permission.

This method will use 30 Compute Units.


Parameters

  • owner_address - String - The account address to be modified, converted to a hex string

  • active - JSON object - Active permission

  • owner - JSON object - Owner permission

  • visible - Boolean - Optional. Specifies whether the address is in Base58 format (default: false)

Returns

Transaction - JSON object: Unsigned transaction, please refer to the Transaction chapter for the fields contained in it. Since the transaction type is AccountPermissionUpdateContract, the fields contained in raw_data.contract[0].parameter.value in the transaction are as follows:

Field
Type
Description

owner_address

string

account address

owner

Permission

The owner permission of the account. The fields contained in Permission are as follows: type - int: permission type; permission_name - string: permission name; threshold - int64: threshold; parent_id - int32: currently only 0; operations - string: permission; keys - Key[]: the addresses and weights that jointly own the permission, up to 5 keys are allowed

witness

Permission

Account witness permissions, used by super representative

actives

Permission[]

List of active permissions for the account

// Result
{
  "visible": true,
  "txID": "1e8b4c22f83e9d288d8f54eaaa83f24c6c876e3928fe0875ffa79ad1908b19c9",
  "raw_data": {
    "contract": [
      {
        "parameter": {
          "value": {
            "owner": {
              "keys": [
                {
                  "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
                  "weight": 1
                }
              ],
              "threshold": 1,
              "permission_name": "owner"
            },
            "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
            "actives": [
              {
                "operations": "7fff1fc0037e0000000000000000000000000000000000000000000000000000",
                "keys": [
                  {
                    "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
                    "weight": 1
                  },
                  {
                    "address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1",
                    "weight": 1
                  }
                ],
                "threshold": 2,
                "type": "Active",
                "permission_name": "active0"
              }
            ]
          },
          "type_url": "type.googleapis.com/protocol.AccountPermissionUpdateContract"
        },
        "type": "AccountPermissionUpdateContract"
      }
    ],
    "ref_block_bytes": "5847",
    "ref_block_hash": "d55bfc796348150d",
    "expiration": 1756819287000,
    "timestamp": 1756819227918
  },
  "raw_data_hex": "0a0258472208d55bfc796348150d40d8d7dbd490335aea01082e12e5010a3c747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e4163636f756e745065726d697373696f6e557064617465436f6e747261637412a4010a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e12241a056f776e657220013a190a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e1001226508021a0761637469766530200232207fff1fc0037e00000000000000000000000000000000000000000000000000003a190a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e10013a190a154198927ffb9f554dc4a453c64b2e553a02d6df514b1001708e8ad8d49033"
}
curl https://mainnet.tron.validationcloud.io/v1/<YOUR_API_KEY_HERE>/wallet/accountpermissionupdate \
    -X POST \
    -H "Content-Type: application/json" \
    -d '
{
  "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
  "actives": [
    {
      "type": 2,
      "permission_name": "active0",
      "threshold": 2,
      "operations": "7fff1fc0037e0000000000000000000000000000000000000000000000000000",
      "keys": [
        {
          "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
          "weight": 1
        },
        {
          "address": "TPswDDCAWhJAZGdHPidFg5nEf8TkNToDX1",
          "weight": 1
        }
      ]
    }
  ],
  "owner": {
    "type": 0,
    "permission_name": "owner",
    "threshold": 1,
    "keys": [
      {
        "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g",
        "weight": 1
      }
    ]
  },
  "visible": true
}
'

Last updated

Was this helpful?