QubicTypeScript

getTransactionByHash

Fetches a single historical transaction by its 60-character hex hash.

Signature

archive.getTransactionByHash(hash, opts?): Promise<Result<QueryTransaction, QubicRpcError>>

Purpose

Look up a specific transaction to inspect its sender, recipient, amount, and tick.

const result = await archive.getTransactionByHash(
  "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"
)
if (!result.ok) throw result.error

const tx = result.value
console.log(tx.sourceId, "->", tx.destId, tx.amount)

Parameters

NameTypeDescription
hashstring60-character hex transaction hash
optsRequestOptionsOptional per-request overrides (signal, fetch)

Returns

Result<QueryTransaction, QubicRpcError> — the matching transaction.

FieldTypeDescription
sourceIdstringSender identity
destIdstringRecipient identity
amountstringTransfer amount (string; parse as BigInt if needed)
tickNumbernumberTick the transaction was included in
inputTypenumberContract function selector, or 0 for a QU transfer
inputHexstringRaw payload as hex

On this page