Class: AWS.ManagedBlockchainQuery
- Inherits:
-
AWS.Service
- Object
- AWS.Service
- AWS.ManagedBlockchainQuery
- 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 Summary collapse
-
new AWS.ManagedBlockchainQuery(options = {}) ⇒ Object
constructor
Constructs a service object.
Property Summary collapse
-
endpoint ⇒ AWS.Endpoint
readwrite
An Endpoint object representing the endpoint URL for service requests.
Properties inherited from AWS.Service
Method Summary collapse
-
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:- The Bitcoin blockchain networks do not support this operation.
- 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:
-
Lists all token balances owned by an address (either a contract address or a wallet address).
-
Lists all token balances for all tokens created by a contract.
-
Lists all token balances for a given token.
Note: You must always specify the network property of thetokenFilter
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.
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
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:- The Bitcoin blockchain networks do not support this operation.
- Metadata is currently only available for some
ERC-20
contracts. Metadata will be available for additional contracts in the future.
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:
-
Lists all token balances owned by an address (either a contract address or a wallet address).
-
Lists all token balances for all tokens created by a contract.
-
Lists all token balances for a given token.
Note: You must always specify the network property of thetokenFilter
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.
- getAssetContract(params = {}, callback) ⇒ AWS.Request