Polluxchain
  1. Accounts
Polluxchain
  • Background
  • API key
    • Rate Limits
    • Security Settings
  • Full Node HTTP API
    • Address Utilities
      • ValidateAddress
    • Transactions
      • BroadcastTransaction
      • BroadcastHex
      • CreateTransaction
    • Accounts
      • CreateAccount
        POST
      • GetAccount
        POST
      • UpdateAccount
        POST
      • AccountPermissionUpdate
        POST
      • GetAccountBalance
        POST
    • Account Resources
      • GetAccountResource
      • GetAccountNet
      • FreezeBalance
      • UnfreezeBalanceV2
      • CancelAllUnfreezeV2
      • DelegateResource
      • UnDelegateResource
      • WithdrawExpireUnfreeze
      • GetAvailableUnfreezeCount
      • GetCanWithdrawUnfreezeAmount
      • GetCanDelegatedMaxSize
      • GetDelegatedResourceV2
      • GetDelegatedResourceAccountIndexV2
    • Query The Network
      • GetBlock
      • GetBlockByNum
      • GetBlockById
      • GetBlockByLatestNum
      • GetBlockByLimitNext
      • GetNowBlock
      • GetTransactionById
      • GetTransactionInfoById
      • GetTransactionInfoByBlockNum
      • ListNodes
      • GetNodeInfo
      • GetChainParameters
      • GetBlockBalance
      • GetEnergyPrices
      • GetBandwidthPrices
      • GetBurnTRX
      • GetApprovedList
    • Smart Contract
      • GetContract
      • GetContractInfo
      • TriggerSmartContract
      • TriggerConstantContract
      • DeployContract
      • UpdateSetting
      • UpdateEnergyLimit
      • ClearAbi
      • EstimateEnergy
    • Voting & SRs
      • ListWitnesses
      • CreateWitness
      • UpdateWitness
      • GetBrokerage
      • UpdateBrokerage
      • VoteWitnessAccount
      • GetReward
      • WithdrawBalance
      • GetNextMaintenanceTime
    • Proposals
      • ListProposals
      • GetProposalById
      • ProposalCreate
      • ProposalApprove
      • ProposalDelete
    • Pending pool
      • GetTransactionListFromPending
      • GetTransactionFromPending
      • GetPendingSize
  • Full Node Solidity HTTP API
    • Transactions
      • GetTransactionById
      • GetTransactionInfoById
      • GetTransactionInfoByBlockNum
      • GetTransactionCountByBlockNum
    • Blocks
      • GetBlock
      • GetNowBlock
      • GetBlockByNum
      • GetBlockById
      • GetBlockByLatestNum
      • GetBlockByLimitNext
    • Account Resources
      • GetAccount
      • GetDelegatedResource
      • GetDelegatedResourceAccountIndex
      • GetCanDelegatedMaxSize
      • GetCanWithdrawUnfreezeAmount
      • GetDelegatedResourceAccountIndexV2
      • GetAvailableUnfreezeCount
    • Node & Chain
      • GetNodeInfo
      • GetBurnPOX
    • Smart Contracts
      • TriggerConstantContract
      • EstimateEnergy
    • Voting & SRs
      • ListWitnesses
      • GetReward
      • GetBrokerage
  • Full Node JSON-RPC API
    • Overview
    • buildTransaction
    • eth
      • eth_accounts
      • eth_blockNumber
      • eth_call
      • eth_chainId
      • eth_coinbase
      • eth_estimateGas
      • eth_gasPrice
      • eth_getBalance
      • eth_getBlockByHash
      • eth_getBlockByNumber
      • eth_getBlockTransactionCountByHash
      • eth_getBlockTransactionCountByNumber
      • eth_getCode
      • eth_getStorageAt
      • eth_getTransactionByBlockHashAndIndex
      • eth_getTransactionByBlockNumberAndIndex
      • eth_getTransactionByHash
      • eth_getTransactionReceipt
      • eth_getWork
      • eth_protocolVersion
      • eth_syncing
      • eth_newFilter
      • eth_newBlockFilter
      • eth_getFilterChanges
      • eth_getFilterLogs
      • eth_uninstallFilter
      • eth_getLogs
    • net
      • net_listening
      • net_peerCount
      • net_version
    • web3
      • web3_clientVersion
      • web3_sha3
  • PolluxWeb
    • address
    • createAccount
    • createRandom
    • fromAscii
    • fromDecimal
    • fromMnemonic
    • fromUtf8
    • getEventByTransactionID
    • getEventResult
    • isAddress
    • isConnected
    • setHeader
    • setDefaultBlock
    • setPrivateKey
    • setAddress
    • sha3
    • toAscii
    • toBigNumber
    • toDecimal
    • toHex
    • toRAM
    • toUtf8
    • BigNumber
    • polluxweb.trx
      • getAccount
      • getAccountResources
      • getApprovedList
      • getAvailableUnfreezeCount
      • getBalance
      • getBandwidth
      • getBlock
      • getBlockByHash
      • getBlockByNumber
      • getBlockRange
      • getBlockTransactionCount
      • getBrokerage
      • getCanDelegatedMaxSize
      • getCanWithdrawUnfreezeAmount
      • getChainParameters
      • getConfirmedTransaction
      • getContract
      • getCurrentBlock
      • getDelegatedResourceV2
      • getDelegatedResourceAccountIndexV2
      • getExchangeByID
      • getNodeInfo
      • getReward
      • getTokenByID
      • getTokenFromID
      • getTokenListByName
      • getTokensIssuedByAddress
      • getTransaction
      • getTransactionFromBlock
      • getTransactionInfo
      • getUnconfirmedBalance
      • getUnconfirmedBrokerage
      • getUnconfirmedReward
      • listExchanges
      • listExchangesPaginated
      • listNodes
      • listProposals
      • listSuperRepresentatives
      • listTokens
      • sendRawTransaction
      • sendHexTransaction
      • sendToken
      • sendTransaction
      • sign
      • signMessageV1
      • signMessageV2
      • timeUntilNextVoteCycle
      • multiSign
      • verifyMessage
      • verifyMessageV2
      • _signTypedData
      • verifyTypedData
    • polluxweb.transactionBuilder
      • addUpdateData
      • applyForSR
      • cancelUnfreezeBalanceV2
      • createAccount
      • createAsset
      • createProposal
      • createSmartContract
      • createToken
      • delegateResource
      • deleteProposal
      • estimateEnergy
      • extendExpiration
      • freezeBalance
      • freezeBalanceV2
      • injectExchangeTokens
      • purchaseAsset
      • purchaseToken
      • sendAsset
      • sendToken
      • sendTrx
      • tradeExchangeTokens
      • triggerConfirmedConstantContract
      • triggerConstantContract
      • triggerSmartContract
      • undelegateResource
      • unfreezeBalance
      • unfreezeBalanceV2
      • updateSetting
      • updateAccountPermissions
      • updateAsset
      • updateBrokerage
      • updateEnergyLimit
      • updateToken
      • vote
      • voteProposal
      • withdrawBlockRewards
      • withdrawExchangeTokens
      • withdrawExpireUnfreeze
    • poxweb.contract
      • polluxweb.contract.new
      • polluxweb.contract()
      • method.call()
      • method.send()
    • polluxweb.utils
      • transaction.txJsonToPb
      • transaction.txPbToTxID
      • message.hashMessage
  • Pollux CLI
    • Pollux CLI
  1. Accounts

AccountPermissionUpdate

POST
/wallet/accountpermissionupdate
Update the account's permission.
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:
FieldTypeDescription
owner_addressstringaccount address
ownerPermissionThe 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
witnessPermissionAccount witness permissions
activesPermission[]List of active permissions for the account

Request

Body Params application/json
object {0}
Example
{
  "owner_address": "PJAnjvL467LtS32AMmDWetNaP1AjNZddnx",
  "actives": [
    {
      "type": 2,
      "permission_name": "active0",
      "threshold": 2,
      "operations": "7fff1fc0037e0000000000000000000000000000000000000000000000000000",
      "keys": [
        {
          "address": "PJAnjvL467LtS32AMmDWetNaP1AjNZddnx",
          "weight": 1
        },
        {
          "address": "PJAnjvL467LtS32AMmDWetNaP1AjNZddnx",
          "weight": 1
        }
      ]
    }
  ],
  "owner": {
    "type": 0,
    "permission_name": "owner",
    "threshold": 1,
    "keys": [
      {
        "address": "PJAnjvL467LtS32AMmDWetNaP1AjNZddnx",
        "weight": 1
      }
    ]
  },
  "visible": true
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/wallet/accountpermissionupdate' \
--header 'Content-Type: application/json' \
--data-raw '{
  "owner_address": "PJAnjvL467LtS32AMmDWetNaP1AjNZddnx",
  "actives": [
    {
      "type": 2,
      "permission_name": "active0",
      "threshold": 2,
      "operations": "7fff1fc0037e0000000000000000000000000000000000000000000000000000",
      "keys": [
        {
          "address": "PJAnjvL467LtS32AMmDWetNaP1AjNZddnx",
          "weight": 1
        },
        {
          "address": "PJAnjvL467LtS32AMmDWetNaP1AjNZddnx",
          "weight": 1
        }
      ]
    }
  ],
  "owner": {
    "type": 0,
    "permission_name": "owner",
    "threshold": 1,
    "keys": [
      {
        "address": "PJAnjvL467LtS32AMmDWetNaP1AjNZddnx",
        "weight": 1
      }
    ]
  },
  "visible": true
}'

Responses

🟢200Success
application/json
Body
object {0}
Examples
{
    "visible": true,
    "txID": "e386dda23b280ddaa4674e54aece5ee6b7f5f12ff467b5208e08f9ada143761f",
    "raw_data": {
        "contract": [
            {
                "parameter": {
                    "value": {
                        "owner": {
                            "keys": [
                                {
                                    "address": "PJAnjvL467LtS32AMmDWetNaP1AjNZddnx",
                                    "weight": 1
                                }
                            ],
                            "threshold": 1,
                            "permission_name": "owner"
                        },
                        "owner_address": "PJAnjvL467LtS32AMmDWetNaP1AjNZddnx",
                        "actives": [
                            {
                                "operations": "7fff1fc0037e0000000000000000000000000000000000000000000000000000",
                                "keys": [
                                    {
                                        "address": "PJAnjvL467LtS32AMmDWetNaP1AjNZddnx",
                                        "weight": 1
                                    },
                                    {
                                        "address": "PJAnjvL467LtS32AMmDWetNaP1AjNZddnx",
                                        "weight": 1
                                    }
                                ],
                                "threshold": 2,
                                "type": "Active",
                                "permission_name": "active0"
                            }
                        ]
                    },
                    "type_url": "type.googleapis.com/protocol.AccountPermissionUpdateContract"
                },
                "type": "AccountPermissionUpdateContract"
            }
        ],
        "ref_block_bytes": "aac7",
        "ref_block_hash": "f1b64763e0c45f6c",
        "expiration": 1736427966000,
        "timestamp": 1736427906154
    },
    "raw_data_hex": "0a02aac72208f1b64763e0c45f6c40b09cb0d9c4325aea01082e12e5010a3c747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e4163636f756e745065726d697373696f6e557064617465436f6e747261637412a4010a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e12241a056f776e657220013a190a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e1001226508021a0761637469766530200232207fff1fc0037e00000000000000000000000000000000000000000000000000003a190a1541fd49eda0f23ff7ec1d03b52c3a45991c24cd440e10013a190a154198927ffb9f554dc4a453c64b2e553a02d6df514b100170eac8acd9c432"
}
Previous
UpdateAccount
Next
GetAccountBalance
Built with