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.

17 lines (16 loc) 591 B
// Utility functions for decoding Solana instructions import { createDefaultDecoderRegistry } from '../decoders/defaultRegistry.js'; // Create a default registry for utility functions const defaultRegistry = createDefaultDecoderRegistry(); /** * Try to decode an instruction using the default decoder registry */ export function decodeInstruction(instruction) { return defaultRegistry.decode(instruction); } /** * Decode an array of instructions */ export function decodeInstructions(instructions) { return instructions.map(instruction => defaultRegistry.decode(instruction)); }