@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,240 +0,0 @@
1
- /**
2
- * @module vault
3
- * @description Encrypted memory vault — init, session management, inscribe,
4
- * delegate access, nonce rotation, and close operations.
5
- *
6
- * Vaults provide encrypted, session-scoped memory storage for agents,
7
- * with support for epoch-based pagination and hot-wallet delegation.
8
- *
9
- * @category Modules
10
- * @since v0.1.0
11
- * @packageDocumentation
12
- */
13
- import { type PublicKey, type TransactionSignature } from "@solana/web3.js";
14
- import { BaseModule } from "./base";
15
- import type { MemoryVaultData, SessionLedgerData, EpochPageData, VaultDelegateData, InscribeMemoryArgs, CompactInscribeArgs } from "../types";
16
- /**
17
- * @name VaultModule
18
- * @description Manages encrypted memory vaults for the Synapse Agent Protocol.
19
- * Provides methods to initialise vaults, open/close sessions, inscribe
20
- * encrypted data, manage delegates (hot wallets), rotate nonces, and
21
- * fetch all related account types.
22
- *
23
- * @category Modules
24
- * @since v0.1.0
25
- * @extends BaseModule
26
- *
27
- * @example
28
- * ```ts
29
- * const sap = new SapClient(provider);
30
- * // Initialize a vault
31
- * await sap.vault.initVault([...nonce]);
32
- * // Open a session and inscribe data
33
- * await sap.vault.openSession([...sessionHash]);
34
- * ```
35
- */
36
- export declare class VaultModule extends BaseModule {
37
- /**
38
- * @name deriveVault
39
- * @description Derive the `MemoryVault` PDA for a given agent.
40
- * @param agentPda - The agent account PDA.
41
- * @returns A tuple of `[PublicKey, bump]` for the vault PDA.
42
- * @see {@link deriveVault} from `pda/` module for the underlying derivation.
43
- * @since v0.1.0
44
- */
45
- deriveVault(agentPda: PublicKey): readonly [PublicKey, number];
46
- /**
47
- * @name deriveSession
48
- * @description Derive the `SessionLedger` PDA for a given vault and session hash.
49
- * @param vaultPda - The memory vault PDA.
50
- * @param sessionHash - A unique session identifier (32 bytes).
51
- * @returns A tuple of `[PublicKey, bump]` for the session PDA.
52
- * @see {@link deriveSession} from `pda/` module for the underlying derivation.
53
- * @since v0.1.0
54
- */
55
- deriveSession(vaultPda: PublicKey, sessionHash: Uint8Array): readonly [PublicKey, number];
56
- /**
57
- * @name initVault
58
- * @description Initialize an encrypted memory vault for the caller's agent.
59
- * Creates the `MemoryVault` PDA and sets the initial encryption nonce.
60
- * @param vaultNonce - The initial encryption nonce (byte array).
61
- * @returns {Promise<TransactionSignature>} The transaction signature.
62
- * @since v0.1.0
63
- */
64
- initVault(vaultNonce: number[]): Promise<TransactionSignature>;
65
- /**
66
- * @name openSession
67
- * @description Open a new session within a vault. Creates a `SessionLedger`
68
- * PDA identified by the session hash.
69
- * @param sessionHash - A unique session identifier (byte array).
70
- * @returns {Promise<TransactionSignature>} The transaction signature.
71
- * @since v0.1.0
72
- */
73
- openSession(sessionHash: number[]): Promise<TransactionSignature>;
74
- /**
75
- * @name inscribe
76
- * @description Inscribe encrypted data into the transaction log.
77
- * Account resolution is handled by Anchor via remaining accounts.
78
- * @param args - Inscription parameters (sequence, encrypted data, nonce, content hash, fragments, compression, epoch).
79
- * @returns {Promise<TransactionSignature>} The transaction signature.
80
- * @since v0.1.0
81
- */
82
- inscribe(args: InscribeMemoryArgs): Promise<TransactionSignature>;
83
- /**
84
- * @name inscribeWithAccounts
85
- * @description Full inscribe with explicit session and epoch page PDAs.
86
- * Use this when you need manual control over account resolution.
87
- * @param sessionPda - The session ledger PDA.
88
- * @param epochPagePda - The epoch page PDA for the target epoch.
89
- * @param vaultPda - The memory vault PDA.
90
- * @param args - Inscription parameters.
91
- * @returns {Promise<TransactionSignature>} The transaction signature.
92
- * @since v0.1.0
93
- */
94
- inscribeWithAccounts(sessionPda: PublicKey, epochPagePda: PublicKey, vaultPda: PublicKey, args: InscribeMemoryArgs): Promise<TransactionSignature>;
95
- /**
96
- * @name compactInscribe
97
- * @description Simplified inscription (4 args vs 8) for single-fragment writes.
98
- * @param sessionPda - The session ledger PDA.
99
- * @param vaultPda - The memory vault PDA.
100
- * @param args - Compact inscription parameters (sequence, encrypted data, nonce, content hash).
101
- * @returns {Promise<TransactionSignature>} The transaction signature.
102
- * @since v0.1.0
103
- */
104
- compactInscribe(sessionPda: PublicKey, vaultPda: PublicKey, args: CompactInscribeArgs): Promise<TransactionSignature>;
105
- /**
106
- * @name closeSession
107
- * @description Close a session — no more inscriptions will be allowed.
108
- * @param vaultPda - The memory vault PDA.
109
- * @param sessionPda - The session ledger PDA to close.
110
- * @returns {Promise<TransactionSignature>} The transaction signature.
111
- * @since v0.1.0
112
- */
113
- closeSession(vaultPda: PublicKey, sessionPda: PublicKey): Promise<TransactionSignature>;
114
- /**
115
- * @name closeVault
116
- * @description Close the `MemoryVault` PDA and reclaim rent to the owner wallet.
117
- * @returns {Promise<TransactionSignature>} The transaction signature.
118
- * @since v0.1.0
119
- */
120
- closeVault(): Promise<TransactionSignature>;
121
- /**
122
- * @name closeSessionPda
123
- * @description Close a `SessionLedger` PDA (session must be closed first).
124
- * Reclaims rent to the owner wallet.
125
- * @param vaultPda - The memory vault PDA.
126
- * @param sessionPda - The session ledger PDA to close.
127
- * @returns {Promise<TransactionSignature>} The transaction signature.
128
- * @since v0.1.0
129
- */
130
- closeSessionPda(vaultPda: PublicKey, sessionPda: PublicKey): Promise<TransactionSignature>;
131
- /**
132
- * @name closeEpochPage
133
- * @description Close an `EpochPage` PDA and reclaim rent.
134
- * @param sessionPda - The session ledger PDA that owns this epoch page.
135
- * @param epochIndex - The zero-based epoch index.
136
- * @returns {Promise<TransactionSignature>} The transaction signature.
137
- * @since v0.1.0
138
- */
139
- closeEpochPage(sessionPda: PublicKey, epochIndex: number): Promise<TransactionSignature>;
140
- /**
141
- * @name rotateNonce
142
- * @description Rotate the vault encryption nonce. All future inscriptions
143
- * will use the new nonce.
144
- * @param newNonce - The replacement nonce (byte array).
145
- * @returns {Promise<TransactionSignature>} The transaction signature.
146
- * @since v0.1.0
147
- */
148
- rotateNonce(newNonce: number[]): Promise<TransactionSignature>;
149
- /**
150
- * @name addDelegate
151
- * @description Authorize a delegate (hot wallet) for vault operations.
152
- * Creates a `VaultDelegate` PDA with the specified permissions and expiry.
153
- * @param delegatePubkey - The public key of the delegate wallet to authorize.
154
- * @param permissions - Bitmask of permitted operations.
155
- * @param expiresAt - Unix timestamp when delegation expires.
156
- * @returns {Promise<TransactionSignature>} The transaction signature.
157
- * @since v0.1.0
158
- */
159
- addDelegate(delegatePubkey: PublicKey, permissions: number, expiresAt: number | bigint): Promise<TransactionSignature>;
160
- /**
161
- * @name revokeDelegate
162
- * @description Revoke a delegate’s authorization, closing their `VaultDelegate` PDA.
163
- * @param delegatePubkey - The public key of the delegate wallet to revoke.
164
- * @returns {Promise<TransactionSignature>} The transaction signature.
165
- * @since v0.1.0
166
- */
167
- revokeDelegate(delegatePubkey: PublicKey): Promise<TransactionSignature>;
168
- /**
169
- * @name inscribeDelegated
170
- * @description Inscribe data via an authorized delegate (hot wallet).
171
- * The transaction is signed by the delegate instead of the vault owner.
172
- * @param delegateWallet - The delegate wallet public key.
173
- * @param vaultPda - The memory vault PDA.
174
- * @param sessionPda - The session ledger PDA.
175
- * @param epochPagePda - The epoch page PDA.
176
- * @param args - Inscription parameters.
177
- * @returns {Promise<TransactionSignature>} The transaction signature.
178
- * @since v0.1.0
179
- */
180
- inscribeDelegated(delegateWallet: PublicKey, vaultPda: PublicKey, sessionPda: PublicKey, epochPagePda: PublicKey, args: InscribeMemoryArgs): Promise<TransactionSignature>;
181
- /**
182
- * @name fetchVault
183
- * @description Fetch a deserialized `MemoryVault` account.
184
- * @param agentPda - The agent account PDA.
185
- * @returns {Promise<MemoryVaultData>} The vault account data.
186
- * @throws Will throw if the vault account does not exist.
187
- * @since v0.1.0
188
- */
189
- fetchVault(agentPda: PublicKey): Promise<MemoryVaultData>;
190
- /**
191
- * @name fetchVaultNullable
192
- * @description Fetch a deserialized `MemoryVault` account, or `null`
193
- * if it does not exist on-chain.
194
- * @param agentPda - The agent account PDA.
195
- * @returns {Promise<MemoryVaultData | null>} The vault data or `null`.
196
- * @since v0.1.0
197
- */
198
- fetchVaultNullable(agentPda: PublicKey): Promise<MemoryVaultData | null>;
199
- /**
200
- * @name fetchSession
201
- * @description Fetch a deserialized `SessionLedger` account by vault and session hash.
202
- * @param vaultPda - The memory vault PDA.
203
- * @param sessionHash - The session identifier used during creation.
204
- * @returns {Promise<SessionLedgerData>} The session ledger data.
205
- * @throws Will throw if the session does not exist.
206
- * @since v0.1.0
207
- */
208
- fetchSession(vaultPda: PublicKey, sessionHash: Uint8Array): Promise<SessionLedgerData>;
209
- /**
210
- * @name fetchSessionByPda
211
- * @description Fetch a deserialized `SessionLedger` account by its PDA directly,
212
- * bypassing PDA derivation.
213
- * @param sessionPda - The session ledger PDA.
214
- * @returns {Promise<SessionLedgerData>} The session ledger data.
215
- * @throws Will throw if the session does not exist.
216
- * @since v0.1.0
217
- */
218
- fetchSessionByPda(sessionPda: PublicKey): Promise<SessionLedgerData>;
219
- /**
220
- * @name fetchEpochPage
221
- * @description Fetch a deserialized `EpochPage` account.
222
- * @param sessionPda - The session ledger PDA.
223
- * @param epochIndex - The zero-based epoch index.
224
- * @returns {Promise<EpochPageData>} The epoch page data.
225
- * @throws Will throw if the epoch page does not exist.
226
- * @since v0.1.0
227
- */
228
- fetchEpochPage(sessionPda: PublicKey, epochIndex: number): Promise<EpochPageData>;
229
- /**
230
- * @name fetchDelegate
231
- * @description Fetch a deserialized `VaultDelegate` account.
232
- * @param vaultPda - The memory vault PDA.
233
- * @param delegatePubkey - The delegate wallet public key.
234
- * @returns {Promise<VaultDelegateData>} The delegate account data.
235
- * @throws Will throw if the delegate does not exist.
236
- * @since v0.1.0
237
- */
238
- fetchDelegate(vaultPda: PublicKey, delegatePubkey: PublicKey): Promise<VaultDelegateData>;
239
- }
240
- //# sourceMappingURL=vault.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vault.d.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CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAI1E;;;;;;;;OAQG;IACG,cAAc,CAClB,UAAU,EAAE,SAAS,EACrB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,aAAa,CAAC;IAKzB;;;;;;;;OAQG;IACG,aAAa,CACjB,QAAQ,EAAE,SAAS,EACnB,cAAc,EAAE,SAAS,GACxB,OAAO,CAAC,iBAAiB,CAAC;CAI9B"}
@@ -1,123 +0,0 @@
1
- /**
2
- * @module parser/client
3
- * @description Object-oriented wrapper for transaction parsing.
4
- *
5
- * Binds the Anchor `Program` reference so callers do not need to
6
- * pass it on every call. Designed as a lazy singleton accessible
7
- * from {@link SapClient.parser}.
8
- *
9
- * @category Parser
10
- * @since v0.5.0
11
- *
12
- * @example
13
- * ```ts
14
- * const client = SapClient.from(provider);
15
- *
16
- * // Parse a full transaction
17
- * const parsed = client.parser.parseTransaction(txResponse);
18
- *
19
- * // Quick instruction names
20
- * const names = client.parser.instructionNames(txResponse);
21
- *
22
- * // From pre-built instructions
23
- * const decoded = client.parser.fromInstructions(ixList);
24
- * ```
25
- */
26
- import type { Program } from "@coral-xyz/anchor";
27
- import type { TransactionInstruction, TransactionResponse, VersionedTransactionResponse } from "@solana/web3.js";
28
- import { AddressLookupTableAccount } from "@solana/web3.js";
29
- import type { DecodedSapInstruction, ParsedSapTransaction, ParseFilterOptions } from "./types";
30
- import { type InnerInstructionGroup } from "./inner";
31
- /**
32
- * Stateful transaction parser bound to a specific Anchor `Program`.
33
- *
34
- * Stores the program reference, instruction coder, and program ID
35
- * internally so that repeated parse calls require only the
36
- * transaction data as input.
37
- *
38
- * @name TransactionParser
39
- * @category Parser
40
- * @since v0.5.0
41
- */
42
- export declare class TransactionParser {
43
- private readonly program;
44
- private readonly coder;
45
- private readonly programId;
46
- /**
47
- * Create a new TransactionParser.
48
- *
49
- * @param program - An Anchor `Program` built from the SAP IDL.
50
- */
51
- constructor(program: Program<any>);
52
- /**
53
- * Full parse: instructions + inner calls + events.
54
- *
55
- * @param tx - Raw transaction response from `connection.getTransaction`.
56
- * @param options - Optional filters for instructions, events, and inner calls.
57
- * @param addressLookupTables - Resolved lookup tables for v0 transactions.
58
- * @returns Complete parsed transaction, or `null` if the input is nullish.
59
- *
60
- * @since v0.5.0
61
- */
62
- parseTransaction(tx: TransactionResponse | VersionedTransactionResponse | null | undefined, options?: ParseFilterOptions, addressLookupTables?: AddressLookupTableAccount[]): ParsedSapTransaction | null;
63
- /**
64
- * Parse a batch of transactions.
65
- *
66
- * @param txs - Array of transaction responses (may contain `null` entries).
67
- * @param options - Optional parse filters.
68
- * @param addressLookupTables - Resolved lookup tables for v0 transactions.
69
- * @returns Non-null parsed transactions.
70
- *
71
- * @since v0.5.0
72
- */
73
- parseBatch(txs: (TransactionResponse | VersionedTransactionResponse | null | undefined)[], options?: ParseFilterOptions, addressLookupTables?: AddressLookupTableAccount[]): ParsedSapTransaction[];
74
- /**
75
- * Decode top-level SAP instructions from a transaction response.
76
- *
77
- * @param tx - Raw transaction response.
78
- * @param addressLookupTables - Resolved lookup tables for v0 transactions.
79
- * @returns Decoded SAP instructions.
80
- *
81
- * @since v0.5.0
82
- */
83
- instructionsFromTransaction(tx: TransactionResponse | VersionedTransactionResponse, addressLookupTables?: AddressLookupTableAccount[]): DecodedSapInstruction[];
84
- /**
85
- * Extract only the instruction names from a transaction response.
86
- *
87
- * @param tx - Raw transaction response.
88
- * @param addressLookupTables - Resolved lookup tables for v0 transactions.
89
- * @returns Instruction name strings.
90
- *
91
- * @since v0.5.0
92
- */
93
- instructionNames(tx: TransactionResponse | VersionedTransactionResponse, addressLookupTables?: AddressLookupTableAccount[]): string[];
94
- /**
95
- * Decode SAP instructions from a pre-built instruction array.
96
- *
97
- * @param instructions - The instruction list to decode.
98
- * @returns Decoded SAP instructions.
99
- *
100
- * @since v0.5.0
101
- */
102
- fromInstructions(instructions: TransactionInstruction[]): DecodedSapInstruction[];
103
- /**
104
- * Check if any instruction in the list targets the SAP program.
105
- *
106
- * @param instructions - The instruction array to inspect.
107
- * @returns `true` if at least one instruction targets SAP.
108
- *
109
- * @since v0.5.0
110
- */
111
- isSapTransaction(instructions: TransactionInstruction[]): boolean;
112
- /**
113
- * Decode inner (CPI) instructions from transaction metadata.
114
- *
115
- * @param innerGroups - The `tx.meta.innerInstructions` array.
116
- * @param tx - The transaction response (for account key resolution).
117
- * @returns Decoded inner instructions.
118
- *
119
- * @since v0.5.0
120
- */
121
- decodeInner(innerGroups: InnerInstructionGroup[], tx: TransactionResponse | VersionedTransactionResponse): import("./types").DecodedInnerInstruction[];
122
- }
123
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/parser/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAEV,sBAAsB,EACtB,mBAAmB,EACnB,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,KAAK,EACV,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAIjB,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;;GAUG;AACH,qBAAa,iBAAiB;IAUhB,OAAO,CAAC,QAAQ,CAAC,OAAO;IATpC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAsB;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IAEtC;;;;OAIG;gBAE0B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC;IAKlD;;;;;;;;;OASG;IACH,gBAAgB,CACd,EAAE,EAAE,mBAAmB,GAAG,4BAA4B,GAAG,IAAI,GAAG,SAAS,EACzE,OAAO,CAAC,EAAE,kBAAkB,EAC5B,mBAAmB,CAAC,EAAE,yBAAyB,EAAE,GAChD,oBAAoB,GAAG,IAAI;IAU9B;;;;;;;;;OASG;IACH,UAAU,CACR,GAAG,EAAE,CAAC,mBAAmB,GAAG,4BAA4B,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,EAC9E,OAAO,CAAC,EAAE,kBAAkB,EAC5B,mBAAmB,CAAC,EAAE,yBAAyB,EAAE,GAChD,oBAAoB,EAAE;IAUzB;;;;;;;;OAQG;IACH,2BAA2B,CACzB,EAAE,EAAE,mBAAmB,GAAG,4BAA4B,EACtD,mBAAmB,CAAC,EAAE,yBAAyB,EAAE,GAChD,qBAAqB,EAAE;IAS1B;;;;;;;;OAQG;IACH,gBAAgB,CACd,EAAE,EAAE,mBAAmB,GAAG,4BAA4B,EACtD,mBAAmB,CAAC,EAAE,yBAAyB,EAAE,GAChD,MAAM,EAAE;IAMX;;;;;;;OAOG;IACH,gBAAgB,CACd,YAAY,EAAE,sBAAsB,EAAE,GACrC,qBAAqB,EAAE;IAI1B;;;;;;;OAOG;IACH,gBAAgB,CAAC,YAAY,EAAE,sBAAsB,EAAE,GAAG,OAAO;IAIjE;;;;;;;;OAQG;IACH,WAAW,CACT,WAAW,EAAE,qBAAqB,EAAE,EACpC,EAAE,EAAE,mBAAmB,GAAG,4BAA4B;CAUzD"}
@@ -1,90 +0,0 @@
1
- /**
2
- * @module parser/complete
3
- * @description Full SAP transaction parser: instructions + args + accounts + events.
4
- *
5
- * This is "Case 2 Complete": given a raw transaction response, produce a
6
- * single {@link ParsedSapTransaction} containing every decoded instruction,
7
- * all inner (CPI) calls, and all SAP events extracted from the logs.
8
- *
9
- * Designed for indexer pipelines where the decode step must be pure,
10
- * deterministic, and fully testable without an RPC connection.
11
- *
12
- * @category Parser
13
- * @since v0.5.0
14
- *
15
- * @example
16
- * ```ts
17
- * import { parseSapTransactionComplete } from "@synapse-sap/sdk/parser";
18
- * import { SAP_PROGRAM_ID, SAP_IDL } from "@synapse-sap/sdk";
19
- * import { Program } from "\@coral-xyz/anchor";
20
- *
21
- * const program = new Program(SAP_IDL, provider);
22
- * const tx = await connection.getTransaction(sig, {
23
- * commitment: "confirmed",
24
- * maxSupportedTransactionVersion: 0,
25
- * });
26
- *
27
- * const parsed = parseSapTransactionComplete(tx, program, SAP_PROGRAM_ID);
28
- * console.log(parsed.instructions.map(i => i.name));
29
- * console.log(parsed.events.map(e => e.name));
30
- * ```
31
- */
32
- import { AddressLookupTableAccount, type PublicKey, type TransactionResponse, type VersionedTransactionResponse } from "@solana/web3.js";
33
- import type { Program } from "@coral-xyz/anchor";
34
- import type { ParsedSapTransaction, ParseFilterOptions } from "./types";
35
- /**
36
- * Parse a complete SAP transaction into a unified result.
37
- *
38
- * Combines three stages:
39
- * 1. **Instruction decode** - top-level SAP instructions with args and accounts
40
- * 2. **Inner instruction decode** - CPI calls with full account reconstruction
41
- * 3. **Event extraction** - SAP events decoded from the transaction logs
42
- *
43
- * All three stages are safe: malformed data produces `null` fields
44
- * rather than exceptions. This makes the function suitable for
45
- * batch-processing in indexer workers where a single bad transaction
46
- * must not halt the pipeline.
47
- *
48
- * @param tx - The raw transaction response from `connection.getTransaction`.
49
- * @param program - An Anchor `Program` instance built from the SAP IDL.
50
- * The coder and program ID are extracted automatically.
51
- * @param sapProgramId - The SAP program public key. Passed explicitly so
52
- * callers can target devnet/localnet deployments independently.
53
- * @param options - Optional filters for instructions, events, and inner calls.
54
- * @param addressLookupTables - Resolved lookup table accounts for v0 transactions.
55
- * @returns A fully parsed transaction, or `null` if the input is `null`/`undefined`.
56
- *
57
- * @category Parser
58
- * @since v0.5.0
59
- */
60
- export declare function parseSapTransactionComplete(tx: TransactionResponse | VersionedTransactionResponse | null | undefined, program: Program<any>, sapProgramId: PublicKey, options?: ParseFilterOptions, addressLookupTables?: AddressLookupTableAccount[]): ParsedSapTransaction | null;
61
- /**
62
- * Parse multiple transactions in batch.
63
- *
64
- * Convenience wrapper for indexer pipelines that process pages of
65
- * transactions. Skips `null` entries and failed decodes silently.
66
- *
67
- * @param txs - Array of transaction responses (may contain `null` entries).
68
- * @param program - The Anchor SAP program instance.
69
- * @param sapProgramId - The SAP program public key.
70
- * @param options - Optional parse filters applied to every transaction.
71
- * @param addressLookupTables - Lookup tables for v0 transactions.
72
- * @returns An array of non-null parsed transactions.
73
- *
74
- * @category Parser
75
- * @since v0.5.0
76
- *
77
- * @example
78
- * ```ts
79
- * const signatures = await connection.getSignaturesForAddress(agentPda);
80
- * const txs = await Promise.all(
81
- * signatures.map(s => connection.getTransaction(s.signature, { ... }))
82
- * );
83
- * const parsed = parseSapTransactionBatch(txs, program, SAP_PROGRAM_ID, {
84
- * includeEvents: true,
85
- * includeInner: true,
86
- * });
87
- * ```
88
- */
89
- export declare function parseSapTransactionBatch(txs: (TransactionResponse | VersionedTransactionResponse | null | undefined)[], program: Program<any>, sapProgramId: PublicKey, options?: ParseFilterOptions, addressLookupTables?: AddressLookupTableAccount[]): ParsedSapTransaction[];
90
- //# sourceMappingURL=complete.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"complete.d.ts","sourceRoot":"","sources":["../../../src/parser/complete.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EACL,yBAAyB,EACzB,KAAK,SAAS,EACd,KAAK,mBAAmB,EACxB,KAAK,4BAA4B,EAClC,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAGnB,MAAM,SAAS,CAAC;AAcjB;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,2BAA2B,CACzC,EAAE,EAAE,mBAAmB,GAAG,4BAA4B,GAAG,IAAI,GAAG,SAAS,EAEzE,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EACrB,YAAY,EAAE,SAAS,EACvB,OAAO,CAAC,EAAE,kBAAkB,EAC5B,mBAAmB,CAAC,EAAE,yBAAyB,EAAE,GAChD,oBAAoB,GAAG,IAAI,CAoE7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,wBAAwB,CACtC,GAAG,EAAE,CAAC,mBAAmB,GAAG,4BAA4B,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,EAE9E,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,EACrB,YAAY,EAAE,SAAS,EACvB,OAAO,CAAC,EAAE,kBAAkB,EAC5B,mBAAmB,CAAC,EAAE,yBAAyB,EAAE,GAChD,oBAAoB,EAAE,CAaxB"}
@@ -1,40 +0,0 @@
1
- /**
2
- * @module parser
3
- * @description Transaction parsing utilities for SAP v2.
4
- *
5
- * Provides modular, composable functions for decoding on-chain SAP
6
- * transactions into typed instruction data, argument objects, account
7
- * lists, and protocol events.
8
- *
9
- * Three levels of parsing are available depending on your use case:
10
- *
11
- * | Function | Input | Output |
12
- * |----------|-------|--------|
13
- * | `parseSapInstructionsFromTransaction` | `TransactionResponse` (RPC) | Decoded instructions |
14
- * | `parseSapInstructionsFromList` | `TransactionInstruction[]` | Decoded instructions |
15
- * | `parseSapTransactionComplete` | `TransactionResponse` (RPC) | Instructions + events + inner calls |
16
- *
17
- * All functions are pure and stateless: they accept the Anchor coder
18
- * (or full Program) as a parameter, making them safe for server-side
19
- * indexer workers, edge functions (Node.js runtime), and test suites.
20
- *
21
- * @category Parser
22
- * @since v0.5.0
23
- *
24
- * @example
25
- * ```ts
26
- * import {
27
- * parseSapTransactionComplete,
28
- * parseSapInstructionsFromList,
29
- * containsSapInstruction,
30
- * } from "@synapse-sap/sdk/parser";
31
- * ```
32
- */
33
- export type { DecodedSapInstruction, DecodedInnerInstruction, ParsedSapTransaction, ParseFilterOptions, SapInstructionCoder, } from "./types";
34
- export { parseSapInstructionsFromTransaction, parseSapInstructionNamesFromTransaction, } from "./transaction";
35
- export { parseSapInstructionsFromList, parseSapInstructionNamesFromList, containsSapInstruction, } from "./instructions";
36
- export { parseSapTransactionComplete, parseSapTransactionBatch, } from "./complete";
37
- export { decodeInnerInstructions, filterSapInnerInstructions, extractAccountKeys, } from "./inner";
38
- export type { CompiledInner, InnerInstructionGroup } from "./inner";
39
- export { TransactionParser } from "./client";
40
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/parser/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAGH,YAAY,EACV,qBAAqB,EACrB,uBAAuB,EACvB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,mCAAmC,EACnC,uCAAuC,GACxC,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,4BAA4B,EAC5B,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,kBAAkB,GACnB,MAAM,SAAS,CAAC;AACjB,YAAY,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAGpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
@@ -1,114 +0,0 @@
1
- /**
2
- * @module parser/inner
3
- * @description Decode inner (CPI) instructions from transaction metadata.
4
- *
5
- * When a SAP instruction triggers cross-program invocations, the
6
- * resulting inner instructions appear in `tx.meta.innerInstructions`.
7
- * These are stored in a "compiled" format that references account
8
- * indices rather than full public keys.
9
- *
10
- * This module reconstructs the full account keys from the transaction
11
- * message's account list and decodes any inner calls that target the
12
- * SAP program.
13
- *
14
- * @category Parser
15
- * @since v0.5.0
16
- *
17
- * @example
18
- * ```ts
19
- * import { decodeInnerInstructions } from "@synapse-sap/sdk/parser";
20
- *
21
- * const inner = decodeInnerInstructions(
22
- * tx.meta?.innerInstructions ?? [],
23
- * accountKeys,
24
- * program.coder.instruction,
25
- * SAP_PROGRAM_ID,
26
- * );
27
- * for (const cpi of inner) {
28
- * if (cpi.name) console.log("SAP CPI:", cpi.name);
29
- * }
30
- * ```
31
- */
32
- import { PublicKey } from "@solana/web3.js";
33
- import type { DecodedInnerInstruction, SapInstructionCoder } from "./types";
34
- /**
35
- * Shape of a single compiled inner instruction from `tx.meta.innerInstructions`.
36
- * Mirrors the Solana RPC `CompiledInnerInstruction` format.
37
- *
38
- * @interface CompiledInner
39
- * @category Parser
40
- * @since v0.5.0
41
- */
42
- export interface CompiledInner {
43
- readonly programIdIndex: number;
44
- readonly accounts: number[];
45
- readonly data: string;
46
- }
47
- /**
48
- * Top-level inner instruction group from the transaction metadata.
49
- * Each group corresponds to one outer instruction by `index`.
50
- *
51
- * @interface InnerInstructionGroup
52
- * @category Parser
53
- * @since v0.5.0
54
- */
55
- export interface InnerInstructionGroup {
56
- readonly index: number;
57
- readonly instructions: CompiledInner[];
58
- }
59
- /**
60
- * Decode inner (CPI) instructions from transaction metadata.
61
- *
62
- * Reconstructs full public keys from the compiled account indices
63
- * and attempts to decode each inner instruction that targets the
64
- * SAP program. Non-SAP inner instructions are included in the
65
- * result with `name: null` and `args: null`.
66
- *
67
- * @param innerInstructionGroups - The `tx.meta.innerInstructions` array.
68
- * @param accountKeys - Ordered list of all account public keys from the
69
- * transaction message (`staticAccountKeys` for versioned, or
70
- * `accountKeys` for legacy).
71
- * @param coder - An Anchor instruction coder built from the SAP IDL.
72
- * @param sapProgramId - The SAP program public key.
73
- * @returns An array of decoded inner instructions.
74
- *
75
- * @category Parser
76
- * @since v0.5.0
77
- */
78
- export declare function decodeInnerInstructions(innerInstructionGroups: InnerInstructionGroup[], accountKeys: PublicKey[], coder: SapInstructionCoder, sapProgramId: PublicKey): DecodedInnerInstruction[];
79
- /**
80
- * Filter decoded inner instructions to only those targeting the SAP program.
81
- *
82
- * @param inner - The full inner instruction list from {@link decodeInnerInstructions}.
83
- * @returns Only inner instructions where `name` is not `null`.
84
- *
85
- * @category Parser
86
- * @since v0.5.0
87
- */
88
- export declare function filterSapInnerInstructions(inner: DecodedInnerInstruction[]): DecodedInnerInstruction[];
89
- /**
90
- * Extract the full ordered list of account keys from a transaction
91
- * response, handling both legacy and versioned formats.
92
- *
93
- * For versioned transactions that include loaded addresses (from
94
- * address lookup tables), these are appended after the static keys
95
- * in the order: static, writable loaded, readonly loaded.
96
- *
97
- * @param tx - The raw transaction response from RPC.
98
- * @returns An ordered array of all account public keys.
99
- *
100
- * @category Parser
101
- * @since v0.5.0
102
- */
103
- export declare function extractAccountKeys(tx: {
104
- transaction: {
105
- message: any;
106
- };
107
- meta?: {
108
- loadedAddresses?: {
109
- writable: PublicKey[];
110
- readonly: PublicKey[];
111
- } | null;
112
- } | null;
113
- }): PublicKey[];
114
- //# sourceMappingURL=inner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inner.d.ts","sourceRoot":"","sources":["../../../src/parser/inner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAM5E;;;;;;;GAOG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,YAAY,EAAE,aAAa,EAAE,CAAC;CACxC;AAMD;;;;;;;;;;;;;;;;;;GA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