On-chain Operations
Stake a Resource
Stake an asset from a vault to obtain a chain resource, such as staking TRX on TRON for energy or bandwidth.
Request example
Response example
POST
/api/external/transactions/
Use staking for chain-level protocol actions. These transactions can have chain-specific data requirements and may require approval before broadcast.
Request body
The SDK accepts
chain and serializes it as blockChain. It injects category: "STAKE".Response
Returns the new Transaction. Itsstatus is the lifecycle source of truth.
Transaction ID. Use it with Retrieve Transaction to track status.
Lifecycle status. Track it until
COMPLETED, FAILED, or DECLINED. See TransactionStatus.See TransactionType.
For example
TRANSFER or CONTRACT_CALL. See TransactionCategory.Where the funds come from. Which fields are present depends on
type. See TransferPartyData.Approve the transaction
New transactions returnstatus: "PENDING" and wait for approval. Get the approval message for the transaction id, sign it with your API user’s key, then submit the approval. See Approvals.
With the SDK, call approveChangeRequest({ entityId: transaction.id, action: "approve" }) after this call.
Request example
Response example