@oobe-protocol-labs/synapse-sap-sdk 0.15.0 → 0.15.1

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.
Files changed (151) hide show
  1. package/dist/cjs/client.js +1 -1
  2. package/dist/cjs/client.js.map +1 -1
  3. package/dist/esm/client.js +1 -1
  4. package/dist/esm/client.js.map +1 -1
  5. package/package.json +1 -1
  6. package/dist/esm/instructions/memory.d.ts +0 -8
  7. package/dist/esm/instructions/memory.d.ts.map +0 -1
  8. package/dist/esm/instructions/memory.js +0 -234
  9. package/dist/esm/instructions/memory.js.map +0 -1
  10. package/dist/types/constants/addresses.d.ts +0 -117
  11. package/dist/types/constants/addresses.d.ts.map +0 -1
  12. package/dist/types/constants/index.d.ts +0 -31
  13. package/dist/types/constants/index.d.ts.map +0 -1
  14. package/dist/types/constants/limits.d.ts +0 -149
  15. package/dist/types/constants/limits.d.ts.map +0 -1
  16. package/dist/types/constants/network.d.ts +0 -81
  17. package/dist/types/constants/network.d.ts.map +0 -1
  18. package/dist/types/constants/payments.d.ts +0 -121
  19. package/dist/types/constants/payments.d.ts.map +0 -1
  20. package/dist/types/constants/programs.d.ts +0 -69
  21. package/dist/types/constants/programs.d.ts.map +0 -1
  22. package/dist/types/constants/seeds.d.ts +0 -82
  23. package/dist/types/constants/seeds.d.ts.map +0 -1
  24. package/dist/types/core/client.d.ts +0 -467
  25. package/dist/types/core/client.d.ts.map +0 -1
  26. package/dist/types/core/connection.d.ts +0 -305
  27. package/dist/types/core/connection.d.ts.map +0 -1
  28. package/dist/types/core/index.d.ts +0 -20
  29. package/dist/types/core/index.d.ts.map +0 -1
  30. package/dist/types/errors/index.d.ts +0 -335
  31. package/dist/types/errors/index.d.ts.map +0 -1
  32. package/dist/types/events/geyser.d.ts +0 -150
  33. package/dist/types/events/geyser.d.ts.map +0 -1
  34. package/dist/types/events/index.d.ts +0 -248
  35. package/dist/types/events/index.d.ts.map +0 -1
  36. package/dist/types/idl/index.d.ts +0 -70
  37. package/dist/types/idl/index.d.ts.map +0 -1
  38. package/dist/types/index.d.ts +0 -86
  39. package/dist/types/index.d.ts.map +0 -1
  40. package/dist/types/modules/agent.d.ts +0 -156
  41. package/dist/types/modules/agent.d.ts.map +0 -1
  42. package/dist/types/modules/attestation.d.ts +0 -96
  43. package/dist/types/modules/attestation.d.ts.map +0 -1
  44. package/dist/types/modules/base.d.ts +0 -215
  45. package/dist/types/modules/base.d.ts.map +0 -1
  46. package/dist/types/modules/escrow-v2.d.ts +0 -285
  47. package/dist/types/modules/escrow-v2.d.ts.map +0 -1
  48. package/dist/types/modules/feedback.d.ts +0 -105
  49. package/dist/types/modules/feedback.d.ts.map +0 -1
  50. package/dist/types/modules/index.d.ts +0 -27
  51. package/dist/types/modules/index.d.ts.map +0 -1
  52. package/dist/types/modules/indexing.d.ts +0 -200
  53. package/dist/types/modules/indexing.d.ts.map +0 -1
  54. package/dist/types/modules/ledger.d.ts +0 -150
  55. package/dist/types/modules/ledger.d.ts.map +0 -1
  56. package/dist/types/modules/receipt.d.ts +0 -91
  57. package/dist/types/modules/receipt.d.ts.map +0 -1
  58. package/dist/types/modules/staking.d.ts +0 -51
  59. package/dist/types/modules/staking.d.ts.map +0 -1
  60. package/dist/types/modules/subscription.d.ts +0 -33
  61. package/dist/types/modules/subscription.d.ts.map +0 -1
  62. package/dist/types/modules/tools.d.ts +0 -172
  63. package/dist/types/modules/tools.d.ts.map +0 -1
  64. package/dist/types/modules/vault.d.ts +0 -240
  65. package/dist/types/modules/vault.d.ts.map +0 -1
  66. package/dist/types/parser/client.d.ts +0 -123
  67. package/dist/types/parser/client.d.ts.map +0 -1
  68. package/dist/types/parser/complete.d.ts +0 -90
  69. package/dist/types/parser/complete.d.ts.map +0 -1
  70. package/dist/types/parser/index.d.ts +0 -40
  71. package/dist/types/parser/index.d.ts.map +0 -1
  72. package/dist/types/parser/inner.d.ts +0 -114
  73. package/dist/types/parser/inner.d.ts.map +0 -1
  74. package/dist/types/parser/instructions.d.ts +0 -76
  75. package/dist/types/parser/instructions.d.ts.map +0 -1
  76. package/dist/types/parser/transaction.d.ts +0 -77
  77. package/dist/types/parser/transaction.d.ts.map +0 -1
  78. package/dist/types/parser/types.d.ts +0 -154
  79. package/dist/types/parser/types.d.ts.map +0 -1
  80. package/dist/types/pda/index.d.ts +0 -527
  81. package/dist/types/pda/index.d.ts.map +0 -1
  82. package/dist/types/plugin/index.d.ts +0 -171
  83. package/dist/types/plugin/index.d.ts.map +0 -1
  84. package/dist/types/plugin/protocols.d.ts +0 -152
  85. package/dist/types/plugin/protocols.d.ts.map +0 -1
  86. package/dist/types/plugin/schemas.d.ts +0 -829
  87. package/dist/types/plugin/schemas.d.ts.map +0 -1
  88. package/dist/types/postgres/adapter.d.ts +0 -355
  89. package/dist/types/postgres/adapter.d.ts.map +0 -1
  90. package/dist/types/postgres/index.d.ts +0 -24
  91. package/dist/types/postgres/index.d.ts.map +0 -1
  92. package/dist/types/postgres/serializers.d.ts +0 -30
  93. package/dist/types/postgres/serializers.d.ts.map +0 -1
  94. package/dist/types/postgres/sync.d.ts +0 -156
  95. package/dist/types/postgres/sync.d.ts.map +0 -1
  96. package/dist/types/postgres/types.d.ts +0 -167
  97. package/dist/types/postgres/types.d.ts.map +0 -1
  98. package/dist/types/registries/builder.d.ts +0 -333
  99. package/dist/types/registries/builder.d.ts.map +0 -1
  100. package/dist/types/registries/discovery.d.ts +0 -333
  101. package/dist/types/registries/discovery.d.ts.map +0 -1
  102. package/dist/types/registries/fairscale.d.ts +0 -680
  103. package/dist/types/registries/fairscale.d.ts.map +0 -1
  104. package/dist/types/registries/index.d.ts +0 -52
  105. package/dist/types/registries/index.d.ts.map +0 -1
  106. package/dist/types/registries/metaplex-bridge.d.ts +0 -488
  107. package/dist/types/registries/metaplex-bridge.d.ts.map +0 -1
  108. package/dist/types/registries/session.d.ts +0 -317
  109. package/dist/types/registries/session.d.ts.map +0 -1
  110. package/dist/types/registries/x402.d.ts +0 -523
  111. package/dist/types/registries/x402.d.ts.map +0 -1
  112. package/dist/types/types/accounts.d.ts +0 -817
  113. package/dist/types/types/accounts.d.ts.map +0 -1
  114. package/dist/types/types/common.d.ts +0 -166
  115. package/dist/types/types/common.d.ts.map +0 -1
  116. package/dist/types/types/endpoint.d.ts +0 -161
  117. package/dist/types/types/endpoint.d.ts.map +0 -1
  118. package/dist/types/types/enums.d.ts +0 -353
  119. package/dist/types/types/enums.d.ts.map +0 -1
  120. package/dist/types/types/index.d.ts +0 -29
  121. package/dist/types/types/index.d.ts.map +0 -1
  122. package/dist/types/types/instructions.d.ts +0 -400
  123. package/dist/types/types/instructions.d.ts.map +0 -1
  124. package/dist/types/utils/anchor-errors.d.ts +0 -61
  125. package/dist/types/utils/anchor-errors.d.ts.map +0 -1
  126. package/dist/types/utils/endpoint-validator.d.ts +0 -110
  127. package/dist/types/utils/endpoint-validator.d.ts.map +0 -1
  128. package/dist/types/utils/escrow-validation.d.ts +0 -145
  129. package/dist/types/utils/escrow-validation.d.ts.map +0 -1
  130. package/dist/types/utils/hash.d.ts +0 -75
  131. package/dist/types/utils/hash.d.ts.map +0 -1
  132. package/dist/types/utils/index.d.ts +0 -36
  133. package/dist/types/utils/index.d.ts.map +0 -1
  134. package/dist/types/utils/merchant-validator.d.ts +0 -176
  135. package/dist/types/utils/merchant-validator.d.ts.map +0 -1
  136. package/dist/types/utils/network-normalizer.d.ts +0 -120
  137. package/dist/types/utils/network-normalizer.d.ts.map +0 -1
  138. package/dist/types/utils/priority-fee.d.ts +0 -205
  139. package/dist/types/utils/priority-fee.d.ts.map +0 -1
  140. package/dist/types/utils/rpc-strategy.d.ts +0 -179
  141. package/dist/types/utils/rpc-strategy.d.ts.map +0 -1
  142. package/dist/types/utils/schemas.d.ts +0 -351
  143. package/dist/types/utils/schemas.d.ts.map +0 -1
  144. package/dist/types/utils/serialization.d.ts +0 -69
  145. package/dist/types/utils/serialization.d.ts.map +0 -1
  146. package/dist/types/utils/validation.d.ts +0 -29
  147. package/dist/types/utils/validation.d.ts.map +0 -1
  148. package/dist/types/utils/volume-curve.d.ts +0 -60
  149. package/dist/types/utils/volume-curve.d.ts.map +0 -1
  150. package/dist/types/utils/x402-direct.d.ts +0 -114
  151. package/dist/types/utils/x402-direct.d.ts.map +0 -1
@@ -1,76 +0,0 @@
1
- /**
2
- * @module parser/instructions
3
- * @description Decode SAP instruction names from a pre-built `TransactionInstruction[]`.
4
- *
5
- * This is "Case 2B": you already have the decompiled instruction list
6
- * (for example, from a UI that constructs instructions before sending)
7
- * and want to identify which ones target the SAP program.
8
- *
9
- * @category Parser
10
- * @since v0.5.0
11
- *
12
- * @example
13
- * ```ts
14
- * import { parseSapInstructionsFromList } from "@synapse-sap/sdk/parser";
15
- * import { SAP_PROGRAM_ID } from "@synapse-sap/sdk";
16
- *
17
- * const decoded = parseSapInstructionsFromList(
18
- * instructions,
19
- * program.coder.instruction,
20
- * SAP_PROGRAM_ID,
21
- * );
22
- * for (const ix of decoded) {
23
- * console.log(ix.name, ix.args);
24
- * }
25
- * ```
26
- */
27
- import type { PublicKey, TransactionInstruction } from "@solana/web3.js";
28
- import type { DecodedSapInstruction, SapInstructionCoder } from "./types";
29
- /**
30
- * Decode an array of `TransactionInstruction` and return only the
31
- * SAP instructions with their decoded names and arguments.
32
- *
33
- * Non-SAP instructions (system, token, other programs) are silently
34
- * skipped. Instructions whose data cannot be decoded against the IDL
35
- * are still included with `name: "unknown"` and `args: null` so that
36
- * consumers can detect IDL mismatches or unsupported instruction
37
- * variants.
38
- *
39
- * @param instructions - The instruction array to inspect.
40
- * @param coder - An Anchor instruction coder built from the SAP IDL.
41
- * @param sapProgramId - The SAP program public key to filter by.
42
- * @returns An array of decoded SAP instructions.
43
- *
44
- * @category Parser
45
- * @since v0.5.0
46
- */
47
- export declare function parseSapInstructionsFromList(instructions: TransactionInstruction[], coder: SapInstructionCoder, sapProgramId: PublicKey): DecodedSapInstruction[];
48
- /**
49
- * Return only the instruction names for SAP instructions in the list.
50
- *
51
- * Convenience wrapper over {@link parseSapInstructionsFromList} for
52
- * callers that only need the string names.
53
- *
54
- * @param instructions - The instruction array to inspect.
55
- * @param coder - An Anchor instruction coder for the SAP IDL.
56
- * @param sapProgramId - The SAP program public key.
57
- * @returns An array of instruction name strings.
58
- *
59
- * @category Parser
60
- * @since v0.5.0
61
- */
62
- export declare function parseSapInstructionNamesFromList(instructions: TransactionInstruction[], coder: SapInstructionCoder, sapProgramId: PublicKey): string[];
63
- /**
64
- * Check whether any instruction in the list targets the SAP program.
65
- *
66
- * Useful as a fast pre-filter before committing to a full decode pass.
67
- *
68
- * @param instructions - The instruction array to inspect.
69
- * @param sapProgramId - The SAP program public key.
70
- * @returns `true` if at least one instruction targets the SAP program.
71
- *
72
- * @category Parser
73
- * @since v0.5.0
74
- */
75
- export declare function containsSapInstruction(instructions: TransactionInstruction[], sapProgramId: PublicKey): boolean;
76
- //# sourceMappingURL=instructions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["../../../src/parser/instructions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAM1E;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,sBAAsB,EAAE,EACtC,KAAK,EAAE,mBAAmB,EAC1B,YAAY,EAAE,SAAS,GACtB,qBAAqB,EAAE,CAgBzB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,gCAAgC,CAC9C,YAAY,EAAE,sBAAsB,EAAE,EACtC,KAAK,EAAE,mBAAmB,EAC1B,YAAY,EAAE,SAAS,GACtB,MAAM,EAAE,CAIV;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,sBAAsB,EAAE,EACtC,YAAY,EAAE,SAAS,GACtB,OAAO,CAET"}
@@ -1,77 +0,0 @@
1
- /**
2
- * @module parser/transaction
3
- * @description Decode SAP instruction names from a raw `TransactionResponse`.
4
- *
5
- * This is "Case 2A": you have a transaction response object obtained
6
- * from `connection.getTransaction(signature, ...)` and need to extract
7
- * the SAP instruction names, arguments, and account keys.
8
- *
9
- * The function handles both legacy and versioned (v0) transactions
10
- * by decompiling the message into `TransactionInstruction[]` and then
11
- * filtering for instructions whose `programId` matches the SAP program.
12
- *
13
- * @category Parser
14
- * @since v0.5.0
15
- *
16
- * @example
17
- * ```ts
18
- * import { parseSapInstructionsFromTransaction } from "@synapse-sap/sdk/parser";
19
- * import { SAP_PROGRAM_ID } from "@synapse-sap/sdk";
20
- *
21
- * const tx = await connection.getTransaction(sig, {
22
- * commitment: "confirmed",
23
- * maxSupportedTransactionVersion: 0,
24
- * });
25
- * if (!tx) throw new Error("Transaction not found");
26
- *
27
- * const decoded = parseSapInstructionsFromTransaction(
28
- * tx,
29
- * program.coder.instruction,
30
- * SAP_PROGRAM_ID,
31
- * );
32
- * for (const ix of decoded) {
33
- * console.log(ix.name, ix.args);
34
- * }
35
- * ```
36
- */
37
- import { AddressLookupTableAccount, type PublicKey, type VersionedTransactionResponse, type TransactionResponse } from "@solana/web3.js";
38
- import type { DecodedSapInstruction, SapInstructionCoder } from "./types";
39
- /**
40
- * Extract and decode SAP instructions from a transaction response.
41
- *
42
- * Supports both legacy (`TransactionResponse`) and versioned
43
- * (`VersionedTransactionResponse`) formats. For versioned
44
- * transactions that use address lookup tables, pass the resolved
45
- * lookup table accounts so that `TransactionMessage.decompile`
46
- * can reconstruct the full account list.
47
- *
48
- * @param tx - The transaction response from `connection.getTransaction`.
49
- * @param coder - An Anchor instruction coder built from the SAP IDL.
50
- * @param sapProgramId - The SAP program public key to filter by.
51
- * @param addressLookupTables - Resolved lookup table accounts for v0 transactions.
52
- * Required when the transaction uses address lookup tables; omit for legacy txs.
53
- * @returns An array of decoded SAP instructions found in the transaction.
54
- *
55
- * @throws {Error} When the transaction message cannot be decompiled.
56
- *
57
- * @category Parser
58
- * @since v0.5.0
59
- */
60
- export declare function parseSapInstructionsFromTransaction(tx: TransactionResponse | VersionedTransactionResponse, coder: SapInstructionCoder, sapProgramId: PublicKey, addressLookupTables?: AddressLookupTableAccount[]): DecodedSapInstruction[];
61
- /**
62
- * Extract only the SAP instruction names from a transaction response.
63
- *
64
- * Lighter-weight alternative to {@link parseSapInstructionsFromTransaction}
65
- * when you only need the instruction names without decoded arguments.
66
- *
67
- * @param tx - The transaction response.
68
- * @param coder - An Anchor instruction coder built from the SAP IDL.
69
- * @param sapProgramId - The SAP program public key.
70
- * @param addressLookupTables - Resolved lookup table accounts for v0 transactions.
71
- * @returns An array of instruction name strings.
72
- *
73
- * @category Parser
74
- * @since v0.5.0
75
- */
76
- export declare function parseSapInstructionNamesFromTransaction(tx: TransactionResponse | VersionedTransactionResponse, coder: SapInstructionCoder, sapProgramId: PublicKey, addressLookupTables?: AddressLookupTableAccount[]): string[];
77
- //# sourceMappingURL=transaction.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../../src/parser/transaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AAEH,OAAO,EAEL,yBAAyB,EACzB,KAAK,SAAS,EAEd,KAAK,4BAA4B,EACjC,KAAK,mBAAmB,EACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAM1E;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,mCAAmC,CACjD,EAAE,EAAE,mBAAmB,GAAG,4BAA4B,EACtD,KAAK,EAAE,mBAAmB,EAC1B,YAAY,EAAE,SAAS,EACvB,mBAAmB,CAAC,EAAE,yBAAyB,EAAE,GAChD,qBAAqB,EAAE,CAGzB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uCAAuC,CACrD,EAAE,EAAE,mBAAmB,GAAG,4BAA4B,EACtD,KAAK,EAAE,mBAAmB,EAC1B,YAAY,EAAE,SAAS,EACvB,mBAAmB,CAAC,EAAE,yBAAyB,EAAE,GAChD,MAAM,EAAE,CAOV"}
@@ -1,154 +0,0 @@
1
- /**
2
- * @module parser/types
3
- * @description Type definitions for SAP v2 transaction parsing.
4
- *
5
- * Provides strongly-typed interfaces for decoded instruction data,
6
- * account metadata, inner (CPI) instructions, and the full parsed
7
- * transaction result used by indexers and explorers.
8
- *
9
- * @category Parser
10
- * @since v0.5.0
11
- */
12
- import type { PublicKey, TransactionInstruction } from "@solana/web3.js";
13
- import type { ParsedEvent, SapEventName } from "../events";
14
- /**
15
- * A single SAP instruction decoded from on-chain transaction data.
16
- *
17
- * Contains the human-readable instruction name (as declared in the
18
- * Anchor IDL), the decoded argument object, the ordered list of
19
- * account keys, and the raw instruction for advanced consumers.
20
- *
21
- * @interface DecodedSapInstruction
22
- * @category Parser
23
- * @since v0.5.0
24
- */
25
- export interface DecodedSapInstruction {
26
- /** Instruction name matching the Anchor IDL method (e.g. `"registerAgent"`). */
27
- readonly name: string;
28
- /**
29
- * Decoded arguments object. Keys match the Anchor IDL argument names.
30
- * Returns `null` when decoding fails (e.g. IDL mismatch).
31
- */
32
- readonly args: Record<string, any> | null;
33
- /** Ordered list of account public keys passed to the instruction. */
34
- readonly accounts: PublicKey[];
35
- /** The original `TransactionInstruction`, useful for re-simulation or forwarding. */
36
- readonly raw: TransactionInstruction;
37
- }
38
- /**
39
- * An inner instruction produced by cross-program invocation (CPI)
40
- * within a SAP transaction.
41
- *
42
- * Inner instructions are indexed by the outer instruction position
43
- * that triggered them. Each entry includes the decoded SAP name
44
- * when the inner call targets the SAP program, or `null` otherwise.
45
- *
46
- * @interface DecodedInnerInstruction
47
- * @category Parser
48
- * @since v0.5.0
49
- */
50
- export interface DecodedInnerInstruction {
51
- /** Zero-based index of the outer instruction that triggered this CPI call. */
52
- readonly outerIndex: number;
53
- /** Zero-based position within the inner instruction set of the parent. */
54
- readonly innerIndex: number;
55
- /** SAP instruction name if the CPI targets the SAP program, `null` otherwise. */
56
- readonly name: string | null;
57
- /** Decoded arguments when the CPI targets SAP and decoding succeeds. */
58
- readonly args: Record<string, any> | null;
59
- /** Ordered account keys for this inner instruction. */
60
- readonly accounts: PublicKey[];
61
- /** The program that was invoked by this inner call. */
62
- readonly programId: PublicKey;
63
- }
64
- /**
65
- * Full parse result for a single SAP transaction.
66
- *
67
- * Combines top-level instruction decoding, inner instruction
68
- * analysis, and event extraction into one unified structure
69
- * suitable for indexing, analytics dashboards, and protocol
70
- * explorers.
71
- *
72
- * @interface ParsedSapTransaction
73
- * @category Parser
74
- * @since v0.5.0
75
- *
76
- * @example
77
- * ```ts
78
- * const result = parseSapTransactionComplete(tx, program, SAP_PROGRAM_ID);
79
- * for (const ix of result.instructions) {
80
- * console.log(ix.name, ix.args);
81
- * }
82
- * for (const event of result.events) {
83
- * console.log(event.name, event.data);
84
- * }
85
- * ```
86
- */
87
- export interface ParsedSapTransaction {
88
- /** Transaction signature (base-58), extracted from the response when available. */
89
- readonly signature: string | null;
90
- /** Slot at which the transaction was confirmed. */
91
- readonly slot: number | null;
92
- /** Block timestamp (unix seconds) or `null` if unavailable. */
93
- readonly blockTime: number | null;
94
- /** Whether the transaction succeeded (`true`) or failed. */
95
- readonly success: boolean;
96
- /** Top-level SAP instructions found in the transaction. */
97
- readonly instructions: DecodedSapInstruction[];
98
- /** All inner (CPI) instructions, including non-SAP programs. */
99
- readonly innerInstructions: DecodedInnerInstruction[];
100
- /** Decoded SAP events extracted from the transaction logs. */
101
- readonly events: ParsedEvent[];
102
- /** Raw log lines from the transaction, for additional debugging. */
103
- readonly logs: string[];
104
- }
105
- /**
106
- * Options for filtering parsed instruction results.
107
- *
108
- * @interface ParseFilterOptions
109
- * @category Parser
110
- * @since v0.5.0
111
- */
112
- export interface ParseFilterOptions {
113
- /**
114
- * When `true`, include inner (CPI) instructions in the parse
115
- * result. Defaults to `false` because inner instruction
116
- * reconstruction requires additional account-table lookups.
117
- */
118
- readonly includeInner?: boolean;
119
- /**
120
- * When `true`, decode and attach SAP events from the
121
- * transaction logs. Defaults to `true`.
122
- */
123
- readonly includeEvents?: boolean;
124
- /**
125
- * Restrict the result to instructions matching one of these
126
- * names. When `undefined` or empty, all SAP instructions are
127
- * returned.
128
- */
129
- readonly instructionFilter?: string[];
130
- /**
131
- * Restrict events to those matching one of these names.
132
- * When `undefined` or empty, all events are returned.
133
- */
134
- readonly eventFilter?: SapEventName[];
135
- }
136
- /**
137
- * Minimal interface for the Anchor instruction coder.
138
- *
139
- * Extracted so that parser functions can accept either a full
140
- * `Program` instance or a standalone coder/IDL pair without
141
- * requiring a live RPC connection.
142
- *
143
- * @interface SapInstructionCoder
144
- * @category Parser
145
- * @since v0.5.0
146
- */
147
- export interface SapInstructionCoder {
148
- /** Decode raw instruction data into a name and typed argument object. */
149
- decode(data: Buffer | Uint8Array, encoding?: string): {
150
- name: string;
151
- data: Record<string, any>;
152
- } | null;
153
- }
154
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/parser/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAM3D;;;;;;;;;;GAUG;AACH,MAAM,WAAW,qBAAqB;IACpC,gFAAgF;IAChF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB;;;OAGG;IAEH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IAC1C,qEAAqE;IACrE,Q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