πŸ”Transaction Interpreter

interpretTransaction generates a human-readable markdown explanation of a raw MsgUniversalUpdateCollection transaction body β€” the transaction-level counterpart to interpretCollection.

Usage

import { interpretTransaction } from 'bitbadgesjs-sdk';

// New collection creation
const explanation = interpretTransaction(txBody);

// Update β€” only describes changed fields
const explanation = interpretTransaction(txBody, true, ['updateCollectionApprovals', 'updatePermissions']);

// Multi-message β€” also explains bundled MsgTransferTokens
const explanation = interpretTransaction(txBody, false, [], messages);

Parameters

Parameter
Type
Default
Description

txBody

Record<string, any>

β€”

Raw value from MsgUniversalUpdateCollection

isUpdate

boolean

false

Scope output to only changed fields

activeUpdateFlags

string[]

[]

Which fields are being updated (e.g. updateCollectionApprovals)

messages

any[]

β€”

Full messages array to explain bundled transfers

vs interpretCollection

Aspect

interpretCollection

interpretTransaction

Input

Hydrated BitBadgesCollection from API

Raw MsgUniversalUpdateCollection JSON value

When

Explaining an existing on-chain collection

Reviewing a transaction before/after signing

Claims

Includes claim plugin details

No claim data (not in the transaction)

Last updated