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
| Name | Type | Default |
|---|---|---|
network | NetworkInfoThe network to use for the request. If not set, the network of the |
Return Type
The FetchTransactionResult is a TransactionResponse from the @aptos-labs/ts-sdk.
| Name | Type | Default |
|---|---|---|
type | TransactionResponseType | |
hash | string |
Last updated on