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.

47 lines (46 loc) 1.48 kB
/** * Transaction processing utilities for the GorbchainSDK * * This module contains helper functions for processing and analyzing * blockchain transactions and instructions. */ import type { SimpleInstruction } from '../sdk/types.js'; export interface AccountChange { solTransfers?: any[]; tokenTransfers?: any[]; accountsCreated?: string[]; } /** * Get human-readable description for instruction types */ export declare function getInstructionDescription(type: string, data: any): string; /** * Check if instruction is token-related */ export declare function isTokenRelatedInstruction(type: string): boolean; /** * Check if instruction is NFT-related */ export declare function isNftRelatedInstruction(type: string): boolean; /** * Classify transaction type based on instructions */ export declare function classifyTransactionType(instructions: any[], accountKeys: string[]): { type: string; subtype: string; }; /** * Build simple transaction summary */ export declare function buildSimpleTransactionSummary(simpleInstructions: any[]): { type: string; description: string; }; /** * Extract account changes from raw transaction data */ export declare function extractAccountChanges(rawTransaction: Record<string, unknown>, simpleInstructions: SimpleInstruction[]): AccountChange | undefined; /** * Generate a transaction name based on instructions */ export declare function generateTransactionName(instructions: any[]): string;