Retrieves token transactions from the network with flexible filtering options for the IssuerSparkWallet.
Method Signature
async function queryTokenTransactions({
ownerPublicKeys,
issuerPublicKeys,
tokenTransactionHashes,
tokenIdentifiers,
outputIds,
}: {
ownerPublicKeys?: string[];
issuerPublicKeys?: string[];
tokenTransactionHashes?: string[];
tokenIdentifiers?: string[];
outputIds?: string[];
}): Promise<TokenTransactionWithStatus[]>;
Parameters
Array of owner public keys to filter by
Array of issuer public keys to filter by
Array of token transaction hashes to filter by
Array of Bech32m token identifiers to filter by
Array of output IDs to filter by
Returns
transactions
TokenTransactionWithStatus[]
required
Array of token transactions with status
Example
// Query all transactions for your token
const allTransactions = await issuerWallet.queryTokenTransactions({
issuerPublicKeys: [await issuerWallet.getIdentityPublicKey()]
});
// Query specific token transactions
const tokenTransactions = await issuerWallet.queryTokenTransactions({
tokenIdentifiers: ["btkn1..."]
});
// Query transactions for specific owners
const ownerTransactions = await issuerWallet.queryTokenTransactions({
ownerPublicKeys: ["pubkey1", "pubkey2"]
});