View Source Aptos.RestClient (Aptos v0.1.0)

JSON endpoints to read data from the network

Link to this section Summary

Functions

Retrieves estimated gas price from node.

Retrieves all account modules' bytecode for a given account

Retrieves all account resources for a given account.

Retrieves on-chain committed transactions from an account.

Retrieves on-chain committed transactions.

Fetches the authentication key and the sequence number for an account address.

Retrieves an individual module from a given account.

Retrieves an individual resource from a given account.

Fetches a block by its height.

Fetches a block by a version in the block.

Looks up a transaction by its hash.

Retrieves a transaction by a given version.

Link to this section Functions

@spec estimate_gas_price() :: Aptos.Client.Result.from_tesla()

Retrieves estimated gas price from node.

Link to this function

list_account_modules(address)

View Source
@spec list_account_modules(binary()) :: Aptos.Client.Result.from_tesla()

Retrieves all account modules' bytecode for a given account

Available options are:

  • {:ledger_version, pos_integer()}
  • {:limit, pos_integer()}
  • {:start, String.t()}
Link to this function

list_account_resources(address, opts \\ [])

View Source
@spec list_account_resources(
  binary(),
  keyword()
) :: Aptos.Client.Result.from_tesla()

Retrieves all account resources for a given account.

Available options are:

  • {:ledger_version, pos_integer()}
  • {:limit, pos_integer()}
  • {:start, String.t()}
Link to this function

list_account_tx(address, opts \\ [])

View Source
@spec list_account_tx(
  binary(),
  keyword()
) :: Aptos.Client.Result.from_tesla()

Retrieves on-chain committed transactions from an account.

Available options are:

  • {:limit, pos_integer()}
  • {:start, pos_integer()}
Link to this function

list_events_by_creation_number(address, creation_number, opts \\ [])

View Source
@spec list_events_by_creation_number(binary(), pos_integer(), keyword()) ::
  Aptos.Client.Result.from_tesla()

Fetches events by creation number.

Available options are:

  • {:limit, pos_integer()}
  • {:start, pos_integer()}
Link to this function

list_events_by_handle(address, handle, field, opts \\ [])

View Source
@spec list_events_by_handle(binary(), String.t(), String.t(), keyword()) ::
  Aptos.Client.Result.from_tesla()

Fetches events by event handle.

Available options are:

  • {:limit, pos_integer()}
  • {:start, pos_integer()}
@spec list_tx(keyword()) :: Aptos.Client.Result.from_tesla()

Retrieves on-chain committed transactions.

Available options are:

  • {:limit, pos_integer()}
  • {:start, pos_integer()}
Link to this function

show_account(address, opts \\ [])

View Source
@spec show_account(
  binary(),
  keyword()
) :: Aptos.Client.Result.from_tesla()

Fetches the authentication key and the sequence number for an account address.

Available options are:

  • {:ledger_version, pos_integer()}
Link to this function

show_account_module(address, module_name)

View Source
@spec show_account_module(binary(), String.t()) :: Aptos.Client.Result.from_tesla()

Retrieves an individual module from a given account.

Available options are:

  • {:ledger_version, pos_integer()}
Link to this function

show_account_resource(address, resource, opts \\ [])

View Source
@spec show_account_resource(binary(), String.t(), keyword()) ::
  Aptos.Client.Result.from_tesla()

Retrieves an individual resource from a given account.

Available options are:

  • {:ledger_version, pos_integer()}
Link to this function

show_block_by_height(height, opts \\ [])

View Source
@spec show_block_by_height(
  non_neg_integer(),
  keyword()
) :: Aptos.Client.Result.from_tesla()

Fetches a block by its height.

Link to this function

show_block_by_version(version, opts \\ [])

View Source
@spec show_block_by_version(
  non_neg_integer(),
  keyword()
) :: Aptos.Client.Result.from_tesla()

Fetches a block by a version in the block.

Link to this function

show_table_item(handle, key, key_type, value_type, opts \\ [])

View Source

Retrieves a table item.

Available options are:

  • {:ledger_version, pos_integer()}
Link to this function

show_tx_by_hash(tx_hash)

View Source
@spec show_tx_by_hash(String.t()) :: Aptos.Client.Result.from_tesla()

Looks up a transaction by its hash.

Link to this function

show_tx_by_version(version_number)

View Source
@spec show_tx_by_version(pos_integer()) :: Aptos.Client.Result.from_tesla()

Retrieves a transaction by a given version.