PreçosGitHubPainel

TRON

wallet/accountpermissionupdate15 créditos

Builds an unsigned transaction that replaces the permissions of an account (multi-signature setup).

Rede: tron

Parâmetros

NomeTipoDescrição
owner_addressstringTransaction initiator address (base58 or hex).
ownerObjectOwner permission: { type: "Owner", permission_name, threshold, keys: [{ address, weight }] }.
activesObject[]Active permissions: array of { type: "Active", id (2 to 9), permission_name, threshold, operations (64 hex characters, bitmap of allowed contract types), keys: [{ address, weight }] }.
witnessObjectWitness permission (super representative accounts only): { type: "Witness", id: 1, permission_name, threshold, keys }. (opcional)
Permission_idnumberPermission ID for multi-signature accounts; defaults to the owner permission (0). (opcional)
visiblebooleantrue = base58 addresses (in the request and the response); false (default) = hex addresses. (opcional)

Retorno

Tipo

Object

Unsigned transaction object (txID, raw_data, raw_data_hex, visible). It is only built, not signed or broadcast; sign it and send it with wallet/broadcasttransaction. On failure an object with an Error string (still HTTP 200). Submit the complete target permission set, not only the changes.

Exemplos de código

curl 'https://holy-burned-sky-tron-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7/wallet/accountpermissionupdate' \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "owner_address": "TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy",
  "owner": {
    "type": "Owner",
    "permission_name": "owner",
    "threshold": 1,
    "keys": [
      {
        "address": "TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy",
        "weight": 1
      }
    ]
  },
  "actives": [
    {
      "type": "Active",
      "id": 2,
      "permission_name": "active",
      "threshold": 1,
      "operations": "7fff1fc0033e0100000000000000000000000000000000000000000000000000",
      "keys": [
        {
          "address": "TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy",
          "weight": 1
        }
      ]
    }
  ],
  "visible": true
}'