Function: buildPurchaseCreditTokenMsg()
Build the MsgTransferTokens for purchasing N credit-token units from a scaled tier. The chain handles the rate math via the approval's scalingBalances — we…
buildPurchaseCreditTokenMsg(
creator,collectionId,tier,units):PurchaseCreditTokenMsg
Defined in: packages/bitbadgesjs-sdk/src/core/credit-tokens.ts:156
Build the MsgTransferTokens for purchasing N credit-token units from a
scaled tier. The chain handles the rate math via the approval's
scalingBalances — we just set the balances to
mintAmount × multiplier and prioritize the approval.
For legacy (per-tier) approvals, pass tier.isScaled === false and we
fall back to the precalculate-from-approval flow (one tx per unit).
Caller can repeat the same msg N times for N units.
Parameters
creator
string
collectionId
string
tier
units
bigint