aptos_api_dart 0.5.2 aptos_api_dart: ^0.5.2 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.2.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 |
final String ledgerVersion = ledgerVersion_example; // String |
try {
final response = await api.getAccount(address, ledgerVersion);
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 | getAccountModules | GET /accounts/{address}/modules | Get account modules |
AccountsApi | getAccountResources | GET /accounts/{address}/resources | Get account resources |
EventsApi | getEventsByEventHandle | GET /accounts/{address}/events/{event_handle}/{field_name} | Get events by event handle |
EventsApi | getEventsByEventKey | GET /events/{event_key} | Get events by event key |
GeneralApi | getLedgerInfo | GET / | Get ledger info |
GeneralApi | openapi | GET /spec | Show OpenAPI explorer |
TransactionsApi | encodeSubmission | POST /transactions/encode_submission | Encode submission |
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 | submitTransaction | POST /transactions | Submit transaction |
Documentation For Models #
- AccountData
- AccountSignature
- AptosError
- AptosErrorCode
- BlockMetadataTransaction
- DeleteModule
- DeleteResource
- DeleteTableItem
- DirectWriteSet
- Ed25519Signature
- EncodeSubmissionRequest
- Event
- GenesisPayload
- GenesisTransaction
- IndexResponse
- ModuleBundlePayload
- MoveFunction
- MoveFunctionGenericTypeParam
- MoveFunctionVisibility
- MoveModule
- MoveModuleBytecode
- MoveModuleId
- MoveResource
- MoveScriptBytecode
- MoveStruct
- MoveStructField
- MoveStructGenericTypeParam
- MoveStructTag
- MultiAgentSignature
- MultiEd25519Signature
- PendingTransaction
- RoleType
- ScriptFunctionId
- ScriptFunctionPayload
- ScriptPayload
- ScriptWriteSet
- StateCheckpointTransaction
- SubmitTransactionRequest
- Transaction
- TransactionPayload
- TransactionSignature
- UserTransaction
- WriteModule
- WriteResource
- WriteSet
- WriteSetChange
- WriteSetPayload
- WriteTableItem
Documentation For Authorization #
All endpoints do not require authorization.