The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain.
This Dart package is automatically generated by the OpenAPI Generator project:
- API version: 1.2.0
- Build package: org.openapitools.codegen.languages.DartDioClientCodegen For more information, please visit https://github.com/aptos-labs/aptos-core
- Dart 2.15.0+ or Flutter 2.8.0+
- Dio 5.0.0+ (https://pub.dev/packages/dio)
To use the package from pub.dev, please include the following in pubspec.yaml
dependencies:
aptos_api_dart: 0.0.1
If this Dart package is published to Github, please include the following in pubspec.yaml
dependencies:
aptos_api_dart:
git:
url: https://github.com/GIT_USER_ID/GIT_REPO_ID.git
#ref: main
To use the package from your local drive, please include the following in pubspec.yaml
dependencies:
aptos_api_dart:
path: /path/to/aptos_api_dart
Please follow the installation procedure and then run the following:
import 'package:aptos_api_dart/aptos_api_dart.dart';
final api = AptosApiDart().getAccountsApi();
final String address = address_example; // String | Address of account with or without a `0x` prefix
final String ledgerVersion = ledgerVersion_example; // String | Ledger version to get state of account If not provided, it will be the latest version
try {
final response = await api.getAccount(address, ledgerVersion);
print(response);
} catch on DioError (e) {
print("Exception when calling AccountsApi->getAccount: $e\n");
}
All URIs are relative to https://raw.githubusercontent.com/v1
Class | Method | HTTP request | Description |
---|---|---|---|
AccountsApi | getAccount | GET /accounts/{address} | Get account |
AccountsApi | getAccountModule | GET /accounts/{address}/module/{module_name} | Get account module |
AccountsApi | getAccountModules | GET /accounts/{address}/modules | Get account modules |
AccountsApi | getAccountResource | GET /accounts/{address}/resource/{resource_type} | Get account resource |
AccountsApi | getAccountResources | GET /accounts/{address}/resources | Get account resources |
BlocksApi | getBlockByHeight | GET /blocks/by_height/{block_height} | Get blocks by height |
BlocksApi | getBlockByVersion | GET /blocks/by_version/{version} | Get blocks by version |
EventsApi | getEventsByCreationNumber | GET /accounts/{address}/events/{creation_number} | Get events by creation number |
EventsApi | getEventsByEventHandle | GET /accounts/{address}/events/{event_handle}/{field_name} | Get events by event handle |
GeneralApi | getLedgerInfo | GET / | Get ledger info |
GeneralApi | healthy | GET /-/healthy | Check basic node health |
GeneralApi | spec | GET /spec | Show OpenAPI explorer |
TablesApi | getRawTableItem | POST /tables/{table_handle}/raw_item | Get raw table item |
TablesApi | getTableItem | POST /tables/{table_handle}/item | Get table item |
TransactionsApi | encodeSubmission | POST /transactions/encode_submission | Encode submission |
TransactionsApi | estimateGasPrice | GET /estimate_gas_price | Estimate gas price |
TransactionsApi | getAccountTransactions | GET /accounts/{address}/transactions | Get account transactions |
TransactionsApi | getTransactionByHash | GET /transactions/by_hash/{txn_hash} | Get transaction by hash |
TransactionsApi | getTransactionByVersion | GET /transactions/by_version/{txn_version} | Get transaction by version |
TransactionsApi | getTransactions | GET /transactions | Get transactions |
TransactionsApi | simulateTransaction | POST /transactions/simulate | Simulate transaction |
TransactionsApi | submitBatchTransactions | POST /transactions/batch | Submit batch transactions |
TransactionsApi | submitTransaction | POST /transactions | Submit transaction |
ViewApi | view | POST /view | Execute view function of a module |
- AccountData
- AccountSignature
- AccountSignatureEd25519Signature
- AccountSignatureEd25519SignatureAllOf
- AccountSignatureMultiEd25519Signature
- AccountSignatureMultiEd25519SignatureAllOf
- AptosError
- AptosErrorCode
- Block
- BlockMetadataTransaction
- DecodedTableData
- DeleteModule
- DeleteResource
- DeleteTableItem
- DeletedTableData
- DirectWriteSet
- Ed25519Signature
- EncodeSubmissionRequest
- EntryFunctionPayload
- Event
- EventGuid
- FeePayerSignature
- FeePayerSignatureFeePayerSigner
- GasEstimation
- GenesisPayload
- GenesisPayloadWriteSetPayload
- GenesisPayloadWriteSetPayloadAllOf
- GenesisTransaction
- HealthCheckSuccess
- IndexResponse
- ModuleBundlePayload
- MoveFunction
- MoveFunctionGenericTypeParam
- MoveFunctionVisibility
- MoveModule
- MoveModuleBytecode
- MoveResource
- MoveScriptBytecode
- MoveStruct
- MoveStructField
- MoveStructGenericTypeParam
- MoveValue
- MultiAgentSignature
- MultiEd25519Signature
- MultisigPayload
- MultisigTransactionPayload
- PendingTransaction
- RawTableItemRequest
- RoleType
- ScriptPayload
- ScriptWriteSet
- StateCheckpointTransaction
- SubmitTransactionRequest
- TableItemRequest
- Transaction
- TransactionBlockMetadataTransaction
- TransactionBlockMetadataTransactionAllOf
- TransactionGenesisTransaction
- TransactionGenesisTransactionAllOf
- TransactionPayload
- TransactionPayloadEntryFunctionPayload
- TransactionPayloadEntryFunctionPayloadAllOf
- TransactionPayloadModuleBundlePayload
- TransactionPayloadModuleBundlePayloadAllOf
- TransactionPayloadMultisigPayload
- TransactionPayloadMultisigPayloadAllOf
- TransactionPayloadScriptPayload
- TransactionPayloadScriptPayloadAllOf
- TransactionPendingTransaction
- TransactionPendingTransactionAllOf
- TransactionSignature
- TransactionSignatureEd25519Signature
- TransactionSignatureFeePayerSignature
- TransactionSignatureFeePayerSignatureAllOf
- TransactionSignatureMultiAgentSignature
- TransactionSignatureMultiAgentSignatureAllOf
- TransactionSignatureMultiEd25519Signature
- TransactionStateCheckpointTransaction
- TransactionStateCheckpointTransactionAllOf
- TransactionUserTransaction
- TransactionUserTransactionAllOf
- TransactionsBatchSingleSubmissionFailure
- TransactionsBatchSubmissionResult
- UserTransaction
- VersionedEvent
- ViewRequest
- WriteModule
- WriteResource
- WriteSet
- WriteSetChange
- WriteSetChangeDeleteModule
- WriteSetChangeDeleteModuleAllOf
- WriteSetChangeDeleteResource
- WriteSetChangeDeleteResourceAllOf
- WriteSetChangeDeleteTableItem
- WriteSetChangeDeleteTableItemAllOf
- WriteSetChangeWriteModule
- WriteSetChangeWriteModuleAllOf
- WriteSetChangeWriteResource
- WriteSetChangeWriteResourceAllOf
- WriteSetChangeWriteTableItem
- WriteSetChangeWriteTableItemAllOf
- WriteSetDirectWriteSet
- WriteSetDirectWriteSetAllOf
- WriteSetPayload
- WriteSetScriptWriteSet
- WriteSetScriptWriteSetAllOf
- WriteTableItem
Endpoints do not require authorization.