#version #aptos #language #restful #interact #api-version #applications

aptos-client-icp

The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain

1 unstable release

0.0.1 Oct 29, 2024

#20 in #aptos


Used in aptos-sdk-icp

MIT license

325KB
5.5K SLoC

Rust API client for aptos-client on Internet Computer

The Aptos Node API is a RESTful API for client applications to interact with the Aptos blockchain.

For more information, please visit https://github.com/aptos-labs/aptos-core

Overview

This API client was generated by the OpenAPI Generator project. By using the openapi-spec from a remote server, you can easily generate an API client.

  • API version: 1.2.0
  • Package version: 1.2.0
  • Generator version: 7.9.0
  • Build package: org.openapitools.codegen.languages.RustClientCodegen

Installation

Put the package under your project folder in a directory named aptos-client-icp and add the following to Cargo.toml under [dependencies]:

aptos-client-icp = { path = "./aptos-client-icp" }

Documentation for API Endpoints

All URIs are relative to /v1

Class Method HTTP request Description
AccountsApi get_account GET /accounts/{address} Get account
AccountsApi get_account_module GET /accounts/{address}/module/{module_name} Get account module
AccountsApi get_account_modules GET /accounts/{address}/modules Get account modules
AccountsApi get_account_resource GET /accounts/{address}/resource/{resource_type} Get account resource
AccountsApi get_account_resources GET /accounts/{address}/resources Get account resources
BlocksApi get_block_by_height GET /blocks/by_height/{block_height} Get blocks by height
BlocksApi get_block_by_version GET /blocks/by_version/{version} Get blocks by version
EventsApi get_events_by_creation_number GET /accounts/{address}/events/{creation_number} Get events by creation number
EventsApi get_events_by_event_handle GET /accounts/{address}/events/{event_handle}/{field_name} Get events by event handle
GeneralApi get_ledger_info GET / Get ledger info
GeneralApi healthy GET /-/healthy Check basic node health
GeneralApi info GET /info Show some basic info of the node.
GeneralApi spec GET /spec Show OpenAPI explorer
TablesApi get_raw_table_item POST /tables/{table_handle}/raw_item Get raw table item
TablesApi get_table_item POST /tables/{table_handle}/item Get table item
TransactionsApi encode_submission POST /transactions/encode_submission Encode submission
TransactionsApi estimate_gas_price GET /estimate_gas_price Estimate gas price
TransactionsApi get_account_transactions GET /accounts/{address}/transactions Get account transactions
TransactionsApi get_transaction_by_hash GET /transactions/by_hash/{txn_hash} Get transaction by hash
TransactionsApi get_transaction_by_version GET /transactions/by_version/{txn_version} Get transaction by version
TransactionsApi get_transactions GET /transactions Get transactions
TransactionsApi simulate_transaction POST /transactions/simulate Simulate transaction
TransactionsApi submit_batch_transactions POST /transactions/batch Submit batch transactions
TransactionsApi submit_transaction POST /transactions Submit transaction
TransactionsApi wait_transaction_by_hash GET /transactions/wait_by_hash/{txn_hash} Wait for transaction by hash
ViewApi view POST /view Execute view function of a module

Documentation For Models

To get access to the crate's generated documentation, use:

cargo doc --open

Author

Dependencies

~4–14MB
~128K SLoC