searchTransactions
Search for transactions by their ids.
import { Engine } from "thirdweb"; const transactions = await Engine.searchTransactions({ client, filters: [ { field: "id", values: ["1", "2", "3"], }, ],});console.log(transactions);
import { Engine } from "thirdweb"; const transactions = await Engine.searchTransactions({ client, filters: [ { field: "chainId", values: ["1", "137"], }, ],});console.log(transactions);
import { Engine } from "thirdweb"; const transactions = await Engine.searchTransactions({ client, filters: [ { field: "from", values: ["0x1234567890123456789012345678901234567890"], }, ],});console.log(transactions);
import { Engine } from "thirdweb"; const transactions = await Engine.searchTransactions({ client, filters: [ { filters: [ { field: "from", values: ["0x1234567890123456789012345678901234567890"], }, { field: "chainId", values: ["8453"], }, ], operation: "AND", }, ], pageSize: 100, page: 0,});console.log(transactions);
function searchTransactions(): Promise<{ pagination: { limit: number; page: number; totalCount: number }; transactions: Array<{ batchIndex: number; cancelledAt: null | string; chainId: string; clientId: string; confirmedAt: null | string; confirmedAtBlockNumber: null | string; createdAt: string; enrichedData: | null | string | number | boolean | Array<unknown> | {}; errorMessage: null | string; executionParams: | null | string | number | boolean | Array<unknown> | {}; executionResult: | null | string | number | boolean | Array<unknown> | {}; from: null | string; id: string; transactionHash: null | string; transactionParams: | null | string | number | boolean | Array<unknown> | {}; }>;}>;
The arguments for the search.
let args: { filters?: Array<TransactionsFilterValue | TransactionsFilterNested>; page?: number; pageSize?: number;};
let returnType: Promise<{ pagination: { limit: number; page: number; totalCount: number }; transactions: Array<{ batchIndex: number; cancelledAt: null | string; chainId: string; clientId: string; confirmedAt: null | string; confirmedAtBlockNumber: null | string; createdAt: string; enrichedData: | null | string | number | boolean | Array<unknown> | {}; errorMessage: null | string; executionParams: | null | string | number | boolean | Array<unknown> | {}; executionResult: | null | string | number | boolean | Array<unknown> | {}; from: null | string; id: string; transactionHash: null | string; transactionParams: | null | string | number | boolean | Array<unknown> | {}; }>;}>;