aptos/aptos library

Classes

AptosAccount<PUBLICKEY extends AptosAccountPublicKey, AUTHENTICATOR extends AptosAccountAuthenticator, SIGNATURE extends AptosSignature>
Abstract class representing an Aptos account with public key, authenticator, and signature.
AptosAccountAuthenticator
Base class for Aptos account authenticators, representing different authentication types.
AptosAccountAuthenticatorEd25519
Authenticator for Aptos accounts using the Ed25519 signature scheme.
AptosAccountAuthenticatorMultiEd25519
Class representing an Aptos account authenticator for MultiEd25519 signature.
AptosAccountAuthenticatorMultiKey
Class representing a MultiKey account authenticator for Aptos.
AptosAccountAuthenticatorNoAccountAuthenticator
Class representing an account authenticator with no specific account authenticator.
AptosAccountAuthenticatorSingleKey
Class representing a SingleKey account authenticator for Aptos.
AptosAccountConst
AptosAccountPublicKey
Abstract class representing an Aptos account public key with BCS serialization.
AptosAddress
AptosAnySignature
Abstract class representing any type of Aptos signature.
AptosAnyTransaction
AptosApiAccountData
AptosApiAccountSignature
AptosApiAccountSignatureAbstractionSignature
AptosApiAccountSignatureEd25519Signature
AptosApiAccountSignatureMultiEd25519Signature
AptosApiAccountSignatureMultiKeySignature
AptosApiAccountSignatureNoAccountSignature
AptosApiAccountSingleKeySignature
AptosApiBlock
AptosApiBlockEndInfo
AptosApiBlockEpilogueTransaction
AptosApiBlockMetadataTransaction
AptosApiDecodeTableData
AptosApiDeleteTableData
AptosApiEvent
AptosApiEventGuid
AptosApiGasEstimation
AptosApiGenesisTransaction
AptosApiIndexedSignature
AptosApiLedgerInfo
AptosApiMethod
AptosApiMoveFunction
AptosApiMoveFunctionGenericTypeParams
AptosApiMoveModule
AptosApiMoveModuleByteCode
AptosApiMoveResource
AptosApiMoveScruptByteCode
AptosApiMoveStrictField
AptosApiMoveStrunct
AptosApiPendingTransaction
AptosApiPublicKey
AptosApiSignature
AptosApiStateCheckpointTransaction
AptosApiTransaction
AptosApiTransactionEd25519Signature
AptosApiTransactionFeePayerSignature
AptosApiTransactionMultiAgentSignature
AptosApiTransactionMultiEd25519Signature
AptosApiTransactionNoAccountSignature
AptosApiTransactionPayload
AptosApiTransactionPayloadEntryFunction
AptosApiTransactionPayloadMultisig
AptosApiTransactionPayloadScript
AptosApiTransactionSecp256k1EcdsaSignature
AptosApiTransactionSignature
AptosApiTransactionSingleSenderSignature
AptosApiUserTransaction
AptosApiValidatorTransaction
AptosApiWriteSetChange
AptosApiWriteSetChangeDeleteModule
AptosApiWriteSetChangeDeleteResource
AptosApiWriteSetChangeDeleteTableItem
AptosApiWriteSetChangeWriteModule
AptosApiWriteSetChangeWriteResource
AptosApiWriteSetChangeWriteTableItem
AptosAuthenticationKeyScheme
Abstract class defining a contract for authentication key schemes
AptosBasePrivateKey<PUBLICKEY extends AptosCryptoPublicKey<IPublicKey>, SIGNATURE extends AptosAnySignature>
Abstract class for representing the private key of an Aptos account. The private key is used for signing messages and generating a public key.
AptosChainId
AptosConstants
AptosCryptoPublicKey<PUBLICKEY extends IPublicKey>
Abstract class for representing a crypto public key in Aptos, extending from AptosPublicKey and adding cryptographic verification capabilities.
AptosCryptoUtils
AptosEd25519Account
Aptos account implementation using the Ed25519 signing scheme.
AptosEd25519AccountPublicKey
AptosEd25519AnySignature
Represents an Ed25519 Any signature for Aptos account authentication.
AptosED25519PrivateKey
AptosED25519PublicKey
AptosEd25519Signature
Represents an Ed25519 signature for Aptos account authentication.
AptosEntryFunctionArguments<T>
Abstract class for representing Aptos Entry Function arguments. Inherits from MoveType with the generic type T.
AptosFunctionEntryArgumentUtils
Utility class for parsing and handling Aptos function entry arguments
AptosGraphQLApiAggregate
AptosGraphQLAptosName
AptosGraphQLCollectionOwnershipV2View
AptosGraphQLCollectionOwnershipV2ViewCollection
AptosGraphQLCollectionV2
AptosGraphQLCollectionV2CdnAssetUris
AptosGraphQLDelegatedStakingActivity
AptosGraphQLEvent
AptosGraphQLFungibleAssetActivity
AptosGraphQLFungibleAssetBalance
AptosGraphQLFungibleAssetMetadata
AptosGraphQLNumActiveDelegatorPerPool
AptosGraphQLObject
AptosGraphQLPaginatedVariablesParams
AptosGraphQLPaginatedWithOrderVariablesParams
AptosGraphQLProcessorStatus
AptosGraphqlQueriesConst
AptosGraphQLRequest<RESULT, RESPONSE>
AptosGraphQLRequestChainId
AptosGraphQLRequestGetAccountCoinsCount
AptosGraphQLRequestGetAccountCoinsData
AptosGraphQLRequestGetAccountCollectionsWithOwnedTokens
AptosGraphQLRequestGetAccountOwnedTokens
AptosGraphQLRequestGetAccountOwnedTokensByTokenData
AptosGraphQLRequestGetAccountOwnedTokensFromCollection
AptosGraphQLRequestGetAccountTokensCount
AptosGraphQLRequestGetAccountTransactionsCount
AptosGraphQLRequestGetChainTopUserTransactions
AptosGraphQLRequestGetCollectionData
AptosGraphQLRequestGetCurrentFungibleAssetBalances
AptosGraphQLRequestGetCurrentTokenData
AptosGraphQLRequestGetCurrentTokenOwnership
AptosGraphQLRequestGetDelegatedStakingActivities
AptosGraphQLRequestGetEvents
AptosGraphQLRequestGetFungibleAssetActivities
AptosGraphQLRequestGetFungibleAssetMetadata
AptosGraphQLRequestGetNames
AptosGraphQLRequestGetNumberOfDelegators
AptosGraphQLRequestGetObjectData
AptosGraphQLRequestGetProcessorStatus
AptosGraphQLRequestGetTableItemsData
AptosGraphQLRequestGetTableItemsMetadata
AptosGraphQLRequestGetTokenActivity
AptosGraphQLTableItem
AptosGraphQLTableMetadata
AptosGraphQLTokenActivity
AptosGraphQLTokenCollection
AptosGraphQLTokenData
AptosGraphQLTokenOwnershipV2
AptosGraphQLTokenOwnershipV2TokenData
AptosGraphQLTokenOwnershipV2TokenDataCollection
AptosGraphQlWhereCondition
AptosGraphQLWhereConditionVariablesParams
AptosGraphQLWhereConditionWithOrderVariablesParams
AptosModuleId
AptosMultiAgentTransaction
AptosMultiEd25519Account
Aptos account implementation for multi-signature Ed25519 accounts.
AptosMultiEd25519AccountPublicKey
AptosMultiEd25519Signature
Vector of the multi-key signatures along with a 32bit u8; 4 bitmap required to map signatures with their corresponding public keys.
AptosMultiKeyAccount
AptosMultiKeyAccountPublicKey
AptosMultiKeySignature
Class representing a MultiKey signature for Aptos.
AptosMultisig
AptosMultisigTransactionPayload
AptosMultisigTransactionPayloadEntryFunction
AptosPostRequest<RESULT, RESPONSE>
AptosProvider
AptosPublicKey
AptosQuickApi
A high-level API class that provides quick access to core Aptos functionalities, including account management, transaction signing, and transaction handling.
AptosRawTransaction
RawTransaction is the portion of a transaction that a client signs.
AptosRawTransactionWithData
AptosRawTransactionWithDataFeePayer
AptosRawTransactionWithDataMultiAgent
AptosRequest<RESULT, RESPONSE>
AptosRequestCheckBasicNodeHealth
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_secs aptos documation
AptosRequestDetails
AptosRequestEncodeSubmission
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
AptosRequestEstimateGasPrice
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
AptosRequestExecuteViewFunctionOfaModule<T>
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
AptosRequestGetAccount
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
AptosRequestGetAccountAssetResources
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
AptosRequestGetAccountModule
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
AptosRequestGetAccountModules
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
AptosRequestGetAccountResource
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
AptosRequestGetAccountResources
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
AptosRequestGetAccountTransactions
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
AptosRequestGetBlocksByHeight
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
AptosRequestGetBlocksByVersion
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
AptosRequestGetEventsByCreationNumber
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
AptosRequestGetEventsByEventHandle
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
AptosRequestGetLedgerInfo
Get the latest ledger information, including data such as chain ID,role type, ledger versions, epoch, etc. aptos documation
AptosRequestGetRawTableItem
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
AptosRequestGetTableItem
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
AptosRequestGetTransactionByHash
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:
AptosRequestGetTransactionByVersion
Retrieves a transaction by a given version. If the version has beenpruned, a 410 will be returned. aptos documation
AptosRequestGetTransactions
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
AptosRequestShowSomeBasicInfoOfTheNode
Show some basic info of the node. aptos documation
AptosRequestSimulateTransaction
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:
AptosRequestSubmitTransaction
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:
AptosRequestWaitForTransactionByHash
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
AptosScript
AptosScriptArguments<T>
Abstract class for representing Aptos Script arguments. Inherits from MoveType with the generic type T. Contains a method to convert to MoveArgument.
AptosSecp256k1AnySignature
Represents a Secp256k1 Any signature for Aptos account authentication.
AptosSecp256k1PrivateKey
AptosSecp256k1PublicKey
AptosSignature
AptosSignedTransaction
AptosSimpleTransaction
AptosSingleKeyAccount
AptosSingleKeyAccountPublicKey
AptosStructTag
AptosTransactionArgumentBytes
AptosTransactionAuthenticator
AptosTransactionAuthenticatorEd25519
AptosTransactionAuthenticatorFeePayer
AptosTransactionAuthenticatorMultiAgent
AptosTransactionAuthenticatorMultiEd25519
AptosTransactionAuthenticatorSignleSender
AptosTransactionEntryFunction
AptosTransactionPayload
AptosTransactionPayloadEntryFunction
AptosTransactionPayloadMultisig
AptosTransactionPayloadScript
Call a Move script.
AptosTransferParams
Represents the parameters required for an Aptos token transfer.
AptosTypeTag
AptosTypeTagAddress
AptosTypeTagBoolean
AptosTypeTagGeneric
AptosTypeTagNumeric
AptosTypeTagReference
AptosTypeTagSigner
AptosTypeTagStruct
AptosTypeTagVector
BcsSerialization
Abstract class for handling BCS (Binary Canonical Serialization) serialization logic.
BcsVariantDecodeResult
Class to represent the result of decoding a BCS variant.
BcsVariantSerialization
Abstract class to handle serialization for BCS variants (similar to enums).
ExecuteViewFunctionOfAModuleRequestParams
MoveAddress
Represents a Move address argument type. The bytes should be 32 bytes, and data is encoded without length.
MoveArgument<T>
MoveBool
Represents a Move bool argument type (boolean value).
MoveOption<CODEC extends MoveType>
Represents a Move Option argument type (optional type).
MoveSerialized
Represents a Move serialized argument type. This is used for Move transaction script arguments, similar to MoveU8Vector,
MoveString
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.
MoveType<T>
Abstract base class for Move types, extends BcsSerialization. This class holds a value of type T and provides layout structure serialization.
MoveU128
Represents a Move u128 argument type (128-bit unsigned integer). this class provides encoding for integers to little-endian byte format.
MoveU16
Represents a Move u16 argument type (16-bit unsigned integer). this class provides encoding for integers to little-endian byte format.
MoveU256
Represents a Move u256 argument type (256-bit unsigned integer). this class provides encoding for integers to little-endian byte format.
MoveU32
Represents a Move u32 argument type (32-bit unsigned integer). this class provides encoding for integers to little-endian byte format.
MoveU64
Represents a Move u64 argument type (64-bit unsigned integer). this class provides encoding for integers to little-endian byte format.
MoveU8
Represents a Move u8 argument type (8-bit unsigned integer). this class provides encoding for integers to little-endian byte format.
MoveU8Vector
Represents a Move u8Vector argument type (a vector of u8 values). The data is encoded in BCS format, with the length encoded as LEB128.
MoveUtils
MoveVector<MOVE extends MoveType>
Represents a Move vector argument type (a list of MoveType values). The length of the vector is encoded as LEB128.
RotationProofChallenge
SuiCallArguments<T>
Abstract class for representing Sui call arguments. Inherits from MoveType with the generic type T.
TableItemRequestParams

Enums

AptoApiAccountSignatureType
AptoApiPublicKeyType
AptoApiSignatureType
AptoApiTransactionSignatureType
AptoApiTransactionType
AptosAccountAuthenticators
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)).
AptosAnySignatures
Enum representing different types of signatures supported by Aptos.
AptosApiMoveAbility
AptosApiMoveFunctionVisibilty
AptosApiRoleType
AptosApiTransactionPayloadTye
AptosApiWriteSetChangeType
AptosEd25519AddressScheme
Enum representing the address schemes
AptosKeyAlgorithm
AptosMultisigTransactionPayloads
AptosRawTransactionType
AptosRequestType
AptosSigningScheme
Enum representing the different signing schemes.
AptosTransactionAuthenticators
AptosTransactionPayloads
Different kinds of transactions.
AptosTypeTags
BcsSerializableType
Enum to define the serialization type: either an object or a variant (like an enum in other languages).
MoveArgumentType
Enum representing different Move argument types with associated values.

Typedefs

AptosServiceResponse<T> = BaseServiceResponse<T>

Exceptions / Errors

BcsSerializationException
Custom exception for errors related to the Move codec.
DartAptosPluginException
A custom exception for handling errors related to the Aptos plugin.