aptos_api_dart 0.2.3 aptos_api_dart: ^0.2.3 copied to clipboard
Aptos API generated with OpenAPI Generator
aptos_api_dart #
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: 0.1.1
- Build package: org.openapitools.codegen.languages.DartDioClientCodegen For more information, please visit https://github.com/aptos-labs/aptos-core
Requirements #
- Dart 2.12.0 or later OR Flutter 1.26.0 or later
- Dio 4.0.0+
Installation & Usage #
pub.dev #
To use the package from pub.dev, please include the following in pubspec.yaml
dependencies:
aptos_api_dart: 0.0.1
Github #
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
Local development #
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
Getting Started #
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 |
try {
final response = await api.getAccount(address);
print(response);
} catch on DioError (e) {
print("Exception when calling AccountsApi->getAccount: $e\n");
}
Documentation for API Endpoints #
All URIs are relative to http://localhost
Class | Method | HTTP request | Description |
---|---|---|---|
AccountsApi | getAccount | GET /accounts/{address} | Get account |
AccountsApi | getAccountModule | GET /accounts/{address}/module/{module_name} | Get module by module id. |
AccountsApi | getAccountModules | GET /accounts/{address}/modules | Get account modules |
AccountsApi | getAccountResource | GET /accounts/{address}/resource/{resource_type} | Get resource by account address and resource type. |
AccountsApi | getAccountResources | GET /accounts/{address}/resources | Get account resources |
EventsApi | getEventsByEventHandle | GET /accounts/{address}/events/{event_handle_struct}/{field_name} | Get events by event handle |
EventsApi | getEventsByEventKey | GET /events/{event_key} | Get events by event key |
GeneralApi | getLedgerInfo | GET / | Ledger information |
GeneralApi | getSpecHtml | GET /spec.html | API document |
GeneralApi | getSpecYaml | GET /openapi.yaml | OpenAPI specification |
StateApi | getAccount | GET /accounts/{address} | Get account |
StateApi | getAccountModule | GET /accounts/{address}/module/{module_name} | Get module by module id. |
StateApi | getAccountModules | GET /accounts/{address}/modules | Get account modules |
StateApi | getAccountResource | GET /accounts/{address}/resource/{resource_type} | Get resource by account address and resource type. |
StateApi | getAccountResources | GET /accounts/{address}/resources | Get account resources |
StateApi | getTableItem | POST /tables/{table_handle}/item | Get table item by handle and key. |
TableApi | getTableItem | POST /tables/{table_handle}/item | Get table item by handle and key. |
TransactionsApi | createSigningMessage | POST /transactions/signing_message | Create transaction signing message |
TransactionsApi | getAccountTransactions | GET /accounts/{address}/transactions | Get account transactions |
TransactionsApi | getTransaction | GET /transactions/{txn_hash_or_version} | Get transaction |
TransactionsApi | getTransactions | GET /transactions | Get transactions |
TransactionsApi | submitTransaction | POST /transactions | Submit transaction |
Documentation For Models #
- Account
- AccountResource
- AccountSignature
- AptosError
- BlockMetadataTransaction
- BlockMetadataTransactionAllOf
- CreateSigningMessage200Response
- DeleteModule
- DeleteResource
- DeleteTableItem
- DirectWriteSet
- Ed25519Signature
- Event
- GenesisTransaction
- GenesisTransactionAllOf
- GetAccount404Response
- GetLedgerInfo400Response
- GetLedgerInfo500Response
- LedgerInfo
- ModuleBundlePayload
- MoveAbility
- MoveFunction
- MoveFunctionGenericTypeParamsInner
- MoveModule
- MoveModuleABI
- MoveScript
- MoveStruct
- MoveStructField
- MoveStructGenericTypeParamsInner
- MultiAgentSignature
- MultiEd25519Signature
- OnChainTransaction
- OnChainTransactionInfo
- PendingTransaction
- PendingTransactionAllOf
- Script
- ScriptFunctionPayload
- ScriptPayload
- ScriptWriteSet
- SubmitTransaction413Response
- SubmitTransaction415Response
- SubmitTransactionRequest
- TableItemDeletion
- TableItemRequest
- TableItemWrite
- Transaction
- TransactionPayload
- TransactionSignature
- UserTransaction
- UserTransactionAllOf
- UserTransactionRequest
- UserTransactionSignature
- WriteModule
- WriteResource
- WriteSet
- WriteSetChange
- WriteSetPayload
- WriteTableItem
Documentation For Authorization #
All endpoints do not require authorization.