updateaccount - Tron

updateaccount. Updates the account name associated with a Tron address.

updateaccount - tron [Value: 20CU]
Updates the account name associated with a Tron address.
Use cases

Use cases

  • Set a human-readable display name for an account once, on-chain
Constraints

Constraints

  • An account name can only be set once and cannot be changed afterward
  • The returned transaction is unsigned and must be broadcast separately
Get started
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl --request POST \
     --url https://lb.drpc.live/tron/{API-KEY}/wallet/updateaccount \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{"account_name": "example", "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g", "visible": true}'
Copy
Response
200
{
  "visible": true,
  "txID": "f3c9aa2b4d122979f92a658be1804560f949a89c8b5d30e15b2d003712d72c92",
  "raw_data": {
    "contract": [{
      "parameter": {
        "value": {
          "account_name": "4d794163636f756e74",
          "owner_address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g"
        },
        "type_url": "type.googleapis.com/protocol.AccountUpdateContract"
      },
      "type": "AccountUpdateContract"
    }],
    "ref_block_bytes": "63c3",
    "ref_block_hash": "0d248c2bc3eb218c",
    "expiration": 1580983653000,
    "timestamp": 1580983593572
  },
  "raw_data_hex": "0a0263c322080d248c2bc3eb218c..."
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersobject
object
account_namestring
[Required] The new account name, UTF-8 encoded (hex if visible is false)
owner_addressstring
[Required] The account address to update
permission_idinteger
Multi-sig permission ID
visibleboolean
When true, addresses/strings are human-readable; when false (default), hex-encoded

Response

200
Updates the account name associated with a Tron address.

Response params

object
visibleboolean
Indicates whether addresses in this transaction are represented in base58 format (true) or hex format (false).
txIDstring
The unique transaction hash (transaction ID), computed as the SHA256 of raw_data.
raw_dataobject
The unsigned transaction body containing the contract instruction and blockchain reference data.
object
contractarray_of_objects
The list of contract instructions to be executed by this transaction.
object
parameterobject
The typed payload describing the specific contract call being made.
object
valueobject
The decoded fields of the contract — here, a request to set an account's display name.
object
account_namestring
The new name to assign to the account, UTF-8 encoded as a hex string.
owner_addressstring
The address of the account whose name is being updated, in hex format.
type_urlstring
The fully qualified protobuf type identifier describing which contract schema `value` should be decoded with.
typestring
The human-readable name of the contract type being executed (here, AccountUpdateContract).
ref_block_bytesstring
The last two bytes of the reference block number, used for transaction expiration and replay protection.
ref_block_hashstring
The last eight bytes of the reference block's hash, paired with ref_block_bytes for replay protection.
expirationinteger
Unix timestamp, in ms, after which this transaction is no longer valid and will be rejected by the network.
timestampinteger
Unix timestamp, in ms, marking when the transaction was created/signed by the client.
raw_data_hexstring
The hex-encoded serialized bytes of raw_data, used as the actual payload to sign and broadcast.