Readonly
httpEstimate gas price Gives an estimate of the gas unit price required to get a transaction on chain in a reasonable amount of time. The gas unit price is the amount that each transaction commits to pay for each unit of gas consumed in executing the transaction. The estimate is based on recent history: it gives the minimum gas that would have been required to get into recent blocks, for blocks that were full. (When blocks are not full, the estimate will match the minimum gas unit price.)
The estimation is given in three values: de-prioritized (low), regular, and prioritized (aggressive). Using a more aggressive value increases the likelihood that the transaction will make it into the next block; more aggressive values are computed with a larger history and higher percentile statistics. More details are in AIP-34.
GasEstimation
ApiError
Get account transactions Retrieves on-chain committed transactions from an account. If the start version is too far in the past, a 410 will be returned.
If no start version is given, it will start at version 0.
To retrieve a pending transaction, use /transactions/by_hash.
Transaction
ApiError
Address of account with or without a 0x
prefix
Optional
start: stringAccount sequence number to start list of transactions
If not provided, defaults to showing the latest transactions
Optional
limit: numberMax number of transactions to retrieve.
If not provided, defaults to default page size
Get transaction by hash Look up a transaction by its hash. This is the same hash that is returned by the API when submitting a transaction (see PendingTransaction).
When given a transaction hash, the server first looks for the transaction in storage (on-chain, committed). If no on-chain transaction is found, it looks the transaction up by hash in the mempool (pending, not yet committed).
To create a transaction hash by yourself, do the following:
SHA3-256
to the hash message bytes.0x
prefix.Transaction
ApiError
Hash of transaction to retrieve
Get transaction by version Retrieves a transaction by a given version. If the version has been pruned, a 410 will be returned.
Transaction
ApiError
Version of transaction to retrieve
Get transactions Retrieve on-chain committed transactions. The page size and start ledger version can be provided to get a specific sequence of transactions.
If the version has been pruned, then a 410 will be returned.
To retrieve a pending transaction, use /transactions/by_hash.
Transaction
ApiError
Optional
start: stringLedger version to start list of transactions
If not provided, defaults to showing the latest transactions
Optional
limit: numberMax number of transactions to retrieve.
If not provided, defaults to default page size
Simulate transaction The output of the transaction will have the exact transaction outputs and events that running an actual signed transaction would have. However, it will not have the associated state hashes, as they are not updated in storage. This can be used to estimate the maximum gas units for a submitted transaction.
To use this, you must:
To use this endpoint with BCS, you must submit a SignedTransaction encoded as BCS. See SignedTransaction in types/src/transaction/mod.rs.
UserTransaction
ApiError
Optional
estimateMaxGasAmount: booleanIf set to true, the max gas value in the transaction will be ignored and the maximum possible gas will be used
Optional
estimateGasUnitPrice: booleanIf set to true, the gas unit price in the transaction will be ignored and the estimated value will be used
Optional
estimatePrioritizedGasUnitPrice: booleanIf set to true, the transaction will use a higher price than the original estimate.
Submit batch transactions This allows you to submit multiple transactions. The response has three outcomes:
To submit a transaction as JSON, you must submit a SubmitTransactionRequest. To build this request, do the following:
To submit a transaction as BCS, you must submit a SignedTransaction
encoded as BCS. See SignedTransaction in types/src/transaction/mod.rs.
Make sure to use the application/x.aptos.signed_transaction+bcs
Content-Type.
TransactionsBatchSubmissionResult
ApiError
Submit transaction This endpoint accepts transaction submissions in two formats.
To submit a transaction as JSON, you must submit a SubmitTransactionRequest. To build this request, do the following:
To submit a transaction as BCS, you must submit a SignedTransaction
encoded as BCS. See SignedTransaction in types/src/transaction/mod.rs.
Make sure to use the application/x.aptos.signed_transaction+bcs
Content-Type.
PendingTransaction
ApiError
Generated using TypeDoc
Encode submission This endpoint accepts an EncodeSubmissionRequest, which internally is a UserTransactionRequestInner (and optionally secondary signers) encoded as JSON, validates the request format, and then returns that request encoded in BCS. The client can then use this to create a transaction signature to be used in a SubmitTransactionRequest, which it then passes to the /transactions POST endpoint.
To be clear, this endpoint makes it possible to submit transaction requests to the API from languages that do not have library support for BCS. If you are using an SDK that has BCS support, such as the official Rust, TypeScript, or Python SDKs, you do not need to use this endpoint.
To sign a message using the response from this endpoint:
Returns
HexEncodedBytes
Throws
ApiError