The response for a committed transaction, discriminated by txn_type.
txn_type
Only the user and automated variants carry header, payload and authenticator. Narrow on txn_type (or check "header" in txn) before reading them:
header
payload
authenticator
"header" in txn
import { TransactionType, type CommittedTransactionResponse } from "supra-ts-sdk";function printSender(txn: CommittedTransactionResponse): void { if (txn.txn_type === TransactionType.User || txn.txn_type === TransactionType.Auto) { console.log(txn.header.sender.Move); }} Copy
import { TransactionType, type CommittedTransactionResponse } from "supra-ts-sdk";function printSender(txn: CommittedTransactionResponse): void { if (txn.txn_type === TransactionType.User || txn.txn_type === TransactionType.Auto) { console.log(txn.header.sender.Move); }}
The response for a committed transaction, discriminated by
txn_type.Only the user and automated variants carry
header,payloadandauthenticator. Narrow ontxn_type(or check"header" in txn) before reading them: