Skip to Content

🚧 These packages are still in development and may change rapidly as they are developed.

TypeScriptfetchTransaction

fetchTransaction

Fetching a transaction by ledger version or transaction hash.

Usage

import { AptosJSProClient } from "@aptos-labs/js-pro"; const client = new AptosJSProClient({ /* ... */ }); const transaction = await client.fetchTransaction({ transactionHash: "0x1234567890abcdef", });

Ledger Version

import { AptosJSProClient } from "@aptos-labs/js-pro"; const client = new AptosJSProClient({ /* ... */ }); const transaction = await client.fetchTransaction({ ledgerVersion: 1234567890, });

Parameters

NameTypeDefault
networkNetworkInfo

The network to use for the request. If not set, the network of the AptosJSProClient instance will be used.

Return Type

The FetchTransactionResult is a TransactionResponse from the @aptos-labs/ts-sdk.

NameTypeDefault
typeTransactionResponseType
hashstring
Last updated on