A handful of helpers that don’t fit the trade/zap categories.
decodeTxnData
Decodes a DZap transaction’s receipt into a readable structure — useful for indexing or debugging. Takes a full transaction receipt object (e.g. from viem’s waitForTransactionReceipt), not just a hash.
calculatePoints
Estimates DZap loyalty points for a completed swap/bridge — used by partners surfacing rewards in their UI.
sendBatchCalls
Bundles multiple write calls into one wallet prompt via EIP-5792 (wallet_sendCalls). Returns null if the connected wallet doesn’t support it.
waitForBatchTransactionReceipt
Companion to sendBatchCalls. Waits until every sub-call in the batch has confirmed, using the id returned above.
Chain helpers
Use these instead of hard-coding addresses or chain IDs — both shift over time. Last modified on July 14, 2026