import { type Builder, type Slice, Cell } from '@ton/core'; import { type WithLogger, NetworkType } from '../types.ts'; /** * Attempts to parse hex string as TON BOC (Bag of Cells) format * Falls back to storing raw bytes as cell data if BOC parsing fails * Used for parsing message data, extra data, and other hex-encoded fields */ export declare const tryParseCell: (hex: string) => Cell; /** * Extracts the 32-bit magic tag from a BOC-encoded cell * Magic tags identify the type of TON structures (e.g., extra args types) * Used for type detection and validation when decoding CCIP extra args * Returns tag as 0x-prefixed hex string for easy comparison */ export declare function extractMagicTag(cell: string | Cell): string; /** * TODO: duplicate from https://github.com/smartcontractkit/chainlink-ton/blob/main/contracts/src/utils/types.ts */ export declare function asSnakedCell(array: T[], builderFn: (item: T) => Builder): Cell; /** * TODO: duplicate from https://github.com/smartcontractkit/chainlink-ton/blob/main/contracts/src/utils/types.ts */ export declare function fromSnakeData(data: Cell, readerFn: (cs: Slice) => T): T[]; /** * TODO: duplicate from https://github.com/smartcontractkit/chainlink-ton/blob/main/contracts/src/utils/types.ts */ export declare function isEmpty(slice: Slice): boolean; /** * Parses Jetton content cell to extract metadata. * Supports onchain (0x00), offchain (0x01), and semichain (0x02) formats per TEP-64. */ export declare function parseJettonContent(contentCell: Cell, rateLimitedFetch: typeof fetch, logger?: { debug?: (...args: unknown[]) => void; }): Promise<{ symbol: string; decimals: number; }>; /** * Looks up a transaction by raw hash using the TonCenter V3 API. * * This is necessary because TON's V4 API requires (address, lt, hash) for lookups, * but users typically only have the raw transaction hash from explorers. * TonCenter V3 provides an index that allows hash-only lookups. * * @param hash - Raw 64-char hex transaction hash * @param networkType - Network type (mainnet or testnet) * @param fetch - Rate-limited fetch function * @param logger - Logger instance * @returns Transaction identifier components needed for V4 API lookup */ export declare function lookupTxByRawHash(hash: string, networkType: NetworkType, fetch?: typeof globalThis.fetch, { logger }?: WithLogger): Promise<{ account: string; lt: string; hash: string; }>; /** * Calculates the 4B (32bits, int4) crc32 of a given string */ export declare function crc32(str: string): string; //# sourceMappingURL=utils.d.ts.map