aptos_api_dart 1.2.1

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:

Requirements

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 | 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");
}

Documentation for API Endpoints

All URIs are relative to https://raw.githubusercontent.com/v1

ClassMethodHTTP requestDescription
AccountsApigetAccountGET /accounts/{address}Get account
AccountsApigetAccountModuleGET /accounts/{address}/module/{module_name}Get account module
AccountsApigetAccountModulesGET /accounts/{address}/modulesGet account modules
AccountsApigetAccountResourceGET /accounts/{address}/resource/{resource_type}Get account resource
AccountsApigetAccountResourcesGET /accounts/{address}/resourcesGet account resources
BlocksApigetBlockByHeightGET /blocks/by_height/{block_height}Get blocks by height
BlocksApigetBlockByVersionGET /blocks/by_version/{version}Get blocks by version
EventsApigetEventsByCreationNumberGET /accounts/{address}/events/{creation_number}Get events by creation number
EventsApigetEventsByEventHandleGET /accounts/{address}/events/{event_handle}/{field_name}Get events by event handle
GeneralApigetLedgerInfoGET /Get ledger info
GeneralApihealthyGET /-/healthyCheck basic node health
GeneralApispecGET /specShow OpenAPI explorer
TablesApigetRawTableItemPOST /tables/{table_handle}/raw_itemGet raw table item
TablesApigetTableItemPOST /tables/{table_handle}/itemGet table item
TransactionsApiencodeSubmissionPOST /transactions/encode_submissionEncode submission
TransactionsApiestimateGasPriceGET /estimate_gas_priceEstimate gas price
TransactionsApigetAccountTransactionsGET /accounts/{address}/transactionsGet account transactions
TransactionsApigetTransactionByHashGET /transactions/by_hash/{txn_hash}Get transaction by hash
TransactionsApigetTransactionByVersionGET /transactions/by_version/{txn_version}Get transaction by version
TransactionsApigetTransactionsGET /transactionsGet transactions
TransactionsApisimulateTransactionPOST /transactions/simulateSimulate transaction
TransactionsApisubmitBatchTransactionsPOST /transactions/batchSubmit batch transactions
TransactionsApisubmitTransactionPOST /transactionsSubmit transaction
ViewApiviewPOST /viewExecute view function of a module

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author