@vtx-labs/solana-explain 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +328 -0
- package/dist/cli/index.d.ts +14 -0
- package/dist/cli/index.js +3317 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.js +3130 -0
- package/dist/index.js.map +1 -0
- package/dist/programs.d.ts +42 -0
- package/dist/programs.js +919 -0
- package/dist/programs.js.map +1 -0
- package/dist/render.d.ts +59 -0
- package/dist/render.js +300 -0
- package/dist/render.js.map +1 -0
- package/dist/types-MSKEy1VA.d.ts +482 -0
- package/package.json +83 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { K as KnownProgramInfo, P as ProgramDecoder, q as ProgramRegistry, j as CompiledInstructionView, D as DecodeOutput, k as DecodedInstruction, l as DecoderEffect, v as WarningCode } from './types-MSKEy1VA.js';
|
|
2
|
+
export { p as ProgramKind } from './types-MSKEy1VA.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Program ID → friendly name/kind map.
|
|
6
|
+
*
|
|
7
|
+
* Used both by the bundled decoders (for their own IDs) and by best-effort
|
|
8
|
+
* recognition (name-only) for programs we don't byte-decode.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
declare const KNOWN_PROGRAMS: Readonly<Record<string, KnownProgramInfo>>;
|
|
12
|
+
/** Look up a known program's info, or `undefined`. */
|
|
13
|
+
declare function knownProgram(programId: string): KnownProgramInfo | undefined;
|
|
14
|
+
|
|
15
|
+
/** Bundled byte-level decoders (precise semantics). */
|
|
16
|
+
declare const BUNDLED_DECODERS: ProgramDecoder[];
|
|
17
|
+
/**
|
|
18
|
+
* Create a registry. By default it includes the bundled byte-level decoders
|
|
19
|
+
* plus name-only recognizers; pass `decoders` to merge overrides on top.
|
|
20
|
+
*/
|
|
21
|
+
declare function createRegistry(decoders?: ProgramDecoder[]): ProgramRegistry;
|
|
22
|
+
/** The default registry (bundled decoders + recognizers). */
|
|
23
|
+
declare const defaultRegistry: ProgramRegistry;
|
|
24
|
+
/**
|
|
25
|
+
* Pure: decode one instruction against the registry. Returns `{ decoded:false }`
|
|
26
|
+
* (never throws) for unrecognized programs.
|
|
27
|
+
*/
|
|
28
|
+
declare function decodeInstruction(ix: CompiledInstructionView, registry?: ProgramRegistry,
|
|
29
|
+
/**
|
|
30
|
+
* Optional pre-computed decode output. When the caller has already run the
|
|
31
|
+
* decoder (see {@link decodeInstructionRaw}), passing it here avoids decoding
|
|
32
|
+
* the instruction a second time across the whole CPI tree.
|
|
33
|
+
*/
|
|
34
|
+
precomputed?: DecodeOutput): DecodedInstruction;
|
|
35
|
+
/** Internal helper to retain the structured effects for correlation. */
|
|
36
|
+
declare function decodeInstructionRaw(ix: CompiledInstructionView, registry?: ProgramRegistry): {
|
|
37
|
+
decoded: DecodedInstruction;
|
|
38
|
+
effects: DecoderEffect[];
|
|
39
|
+
warningCode?: WarningCode;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export { BUNDLED_DECODERS, CompiledInstructionView, DecodeOutput, DecoderEffect, KNOWN_PROGRAMS, KnownProgramInfo, ProgramDecoder, ProgramRegistry, createRegistry, decodeInstruction, decodeInstructionRaw, defaultRegistry, knownProgram };
|