Skip to main content

Usage

const transaction = await sdk.getTransaction("0x...", bearerToken);

Parameters

ParameterTypeRequiredDescription
hashOrIdstringYesTransaction hash (0x...) or internal database ID
bearerTokenstringNoJWT token. Falls back to apiSecretKey if not provided

Return Value

Returns a Promise<Transaction> with the full transaction record including id, transactionHash, status, senderAddress, destinationAddress, amount, token, and timestamps.

Example

// Fetch by transaction hash
const tx = await sdk.getTransaction(
  "0x04abc...def",
  bearerToken,
);
console.log(tx.status, tx.amount, tx.token);

// Fetch by internal ID
const tx2 = await sdk.getTransaction("tx-123", bearerToken);