A high-level API class that provides quick access to core Aptos functionalities,
including account management, transaction signing, and transaction handling.
By default this endpoint just checks that it can get the latest ledger info and then returns 200.
If the duration_secs param is provided, this endpoint will return a 200 if the following condition is true: server_latest_ledger_info_timestamp >= server_current_time_timestamp - duration_secsaptos documation
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.
aptos documation
Gives an estimate of the gas unit price required to get a transaction on chain in areasonable amount of time.
The gas unit price is the amount that each transaction commits topay for each unit of gas consumed in
executing the transaction. The estimate is based onrecent history: it gives the minimum gas
that would have been required to get into recentblocks, for blocks that were full.
(When blocks are not full, the estimate will match theminimum 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 transactionwill make it into the next block;
more aggressive values are computed with a larger historyand higher percentile statistics.
More details are in AIP-34.
aptos documation
Execute the Move function with the given parameters and return its execution result.
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
aptos documation
Return the authentication key and the sequence number for an account\naddress.
Optionally, a ledger version can be specified. If the ledger\nversion is not
specified in the request, the latest ledger version is used
aptos documation
Retrieves all account resources for a given account and a specific ledger version.
If the ledger version is not specified in the request, the latest ledger version is used
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
aptos documation
Retrieves an individual module from a given account and at a specific ledger version.
If theledger version is not specified in the request, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
aptos documation
Retrieves all account modules' bytecode for a given account at a specific ledger version.
If the ledger version is not specified in the request, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
aptos documation
Retrieves an individual resource from a given account and at a specific ledger version.
If theledger version is not specified in the request, the latest ledger version is used.
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
aptos documation
Retrieves all account resources for a given account and a specific ledger version.
If the ledger version is not specified in the request, the latest ledger version is used
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
aptos documation
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.
aptos documation
This endpoint allows you to get the transactions in a blockand the corresponding
block information.Transactions are limited by max default transactions size.
If not all transactionsare present, the user will need to query for the rest
of the transactions via theget transactions API.If the block is pruned, it will return a 410
aptos documation
This endpoint allows you to get the transactions in a blockand the
corresponding block information given a version in the block.
Transactions are limited by max default transactions size.
If not all transactionsare present, the user will need to query for the rest of
the transactions via theget transactions API.If the block has been pruned, it will return a 410
aptos documation
AptosGraphQLEvent types are globally identifiable by an account address andmonotonically increasing creationNumber,
one per event type emittedto the given account. This API returns events corresponding to thatthat event type.
aptos documation
This API uses the given account address, eventHandle, and fieldNameto build a key that
can globally identify an event types. It then uses thiskey to return events emitted to
the given account matching that event type.
aptos documation
Get a table item at a specific ledger version from the table identified by {table_handle}in
the path and the "key" (RawTableItemRequest) provided in the request body.The get_raw_table_item
requires only a serialized key comparing to the full move type informationcomparing
to the get_table_item api, and can only return the query in the bcs format.
The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
aptos documation
Get a table item at a specific ledger version from the table identified by {table_handle} in the path and the
"key" (TableItemRequest) provided in the request body.This is a POST endpoint because the "key"
for requesting a specifictable item (TableItemRequest) could be quite complex, as each of its
fields could themselves be composed of other structs. This makes itimpractical to express using query params,
meaning GET isn't an option.The Aptos nodes prune account state history, via a configurable time window.
If the requested ledger version has been pruned, the server responds with a 410.
aptos documation
Look up a transaction by its hash. This is the same hash that is returnedby
the API when submitting a transaction (see PendingTransaction).
When given a transaction hash, the server first looks for the transactionin storage (on-chain, committed).
If no on-chain transaction is found, itlooks the transaction up by hash in the mempool
(pending, not yet committed).To create a transaction hash by yourself, do the following:
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.
aptos documation
The output of the transaction will have the exact transaction outputs and events that runningan actual signed
transaction would have. However, it will not have the associated statehashes,
as they are not updated in storage. This can be used to estimate
the maximum gasunits for a submitted transaction.To use this, you must:
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:
Same as /transactions/by_hash, but will wait for a pending transaction to be committed.
To be used as a longpoll optimization by clients, to reduce latency caused by polling.
The "long" poll is generally a second orless but dictated by the server;
the client must deal with the result as if the request was a normal/transactions/by_hash request, e.g.,
by retrying if the transaction is pending.
aptos documation
Represents a Move string argument type (a UTF-8 encoded string).
The data is encoded to UTF-8, and then the bytes are encoded as BCS with the length encoded as LEB128.
An AccountAuthenticator is an abstraction of a signature scheme. It must know:
(1) How to check its signature against a message and public key
(2) How to convert its public key into an AuthenticationKeyPreimage structured as
(public_key | signature_scheme_id).
Each on-chain Account must store an AuthenticationKey (computed via a sha3 hash of (public key bytes | scheme as u8)).