UNPKG

@gorbchain-xyz/chaindecode

Version:

GorbchainSDK V1.3+ - Complete Solana development toolkit with advanced cryptography, messaging, and collaboration features. Build secure applications with blockchain, DeFi, and end-to-end encryption.

10 lines (9 loc) 402 B
// Utility to ensure fallback decoders are registered for unknown types export function ensureFallbackDecoders(instructions, registry) { instructions.forEach((ix, _i) => { const type = ix.type; if (!(registry).decoders.has(type)) { registry.register(type, (ix) => (Object.assign(Object.assign({}, ix), { decoded: 'Raw', programId: ix.programId }))); } }); }