AWS.ManagedBlockchainQuery — AWS SDK for JavaScript (original) (raw)

We recommend that you migrate to AWS SDK for JavaScript v3. For dates, additional details, and information on how to migrate, please refer to the linked announcement.

Inherits:

AWS.Service

Identifier:

managedblockchainquery

API Version:

2023-05-04

Defined in:

(unknown)

Overview

Constructs a service interface object. Each API operation is exposed as a function on service.

Service Description

Amazon Managed Blockchain (AMB) Query provides you with convenient access to multi-blockchain network data, which makes it easier for you to extract contextual data related to blockchain activity. You can use AMB Query to read data from public blockchain networks, such as Bitcoin Mainnet and Ethereum Mainnet. You can also get information such as the current and historical balances of addresses, or you can get a list of blockchain transactions for a given time period. Additionally, you can get details of a given transaction, such as transaction events, which you can further analyze or use in business logic for your applications.

Sending a Request Using ManagedBlockchainQuery

var managedblockchainquery = new AWS.ManagedBlockchainQuery();
managedblockchainquery.batchGetTokenBalance(params, function (err, data) {
  if (err) console.log(err, err.stack); // an error occurred
  else     console.log(data);           // successful response
});

Locking the API Version

In order to ensure that the ManagedBlockchainQuery object uses this specific API, you can construct the object by passing the apiVersion option to the constructor:

var managedblockchainquery = new AWS.ManagedBlockchainQuery({apiVersion: '2023-05-04'});

You can also set the API version globally in AWS.config.apiVersions using the managedblockchainquery service identifier:

AWS.config.apiVersions = {
  managedblockchainquery: '2023-05-04',
  // other service API versions
};

var managedblockchainquery = new AWS.ManagedBlockchainQuery();

Constructor Summarycollapse

Property Summarycollapse

Properties inherited from AWS.Service

apiVersions

Method Summarycollapse

Methods inherited from AWS.Service

makeRequest, makeUnauthenticatedRequest, setupRequestListeners, defineService

Constructor Details

new AWS.ManagedBlockchainQuery(options = {}) ⇒ Object

Constructs a service object. This object has one method for each API operation.

Property Details

endpointAWS.Endpoint

Returns an Endpoint object representing the endpoint URL for service requests.

Method Details

batchGetTokenBalance(params = {}, callback) ⇒ AWS.Request

Gets the token balance for a batch of tokens by using the BatchGetTokenBalance action for every token in the request.

Note: Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported.

getAssetContract(params = {}, callback) ⇒ AWS.Request

Gets the information about a specific contract deployed on the blockchain.

Note:

getTokenBalance(params = {}, callback) ⇒ AWS.Request

Gets the balance of a specific token, including native tokens, for a given address (wallet or contract) on the blockchain.

Note: Only the native tokens BTC and ETH, and the ERC-20, ERC-721, and ERC 1155 token standards are supported.

getTransaction(params = {}, callback) ⇒ AWS.Request

Gets the details of a transaction.

Note: This action will return transaction details for all transactions that are confirmed on the blockchain, even if they have not reached finality.

listAssetContracts(params = {}, callback) ⇒ AWS.Request

Lists all the contracts for a given contract type deployed by an address (either a contract address or a wallet address).

The Bitcoin blockchain networks do not support this operation.

listFilteredTransactionEvents(params = {}, callback) ⇒ AWS.Request

Lists all the transaction events for an address on the blockchain.

Note: This operation is only supported on the Bitcoin networks.

listTokenBalances(params = {}, callback) ⇒ AWS.Request

This action returns the following for a given blockchain network:

Note: You must always specify the network property of the tokenFilter when using this operation.

listTransactionEvents(params = {}, callback) ⇒ AWS.Request

Lists all the transaction events for a transaction

Note: This action will return transaction details for all transactions that are confirmed on the blockchain, even if they have not reached finality.

listTransactions(params = {}, callback) ⇒ AWS.Request

Lists all the transaction events for a transaction.

waitFor(state, params = {}, callback) ⇒ AWS.Request

Waits for a given ManagedBlockchainQuery resource. The final callback or'complete' event will be fired only when the resource is either in its final state or the waiter has timed out and stopped polling for the final state.