@veilo/sdk-core 0.5.0 → 0.6.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.
Files changed (236) hide show
  1. package/README.md +237 -19
  2. package/accounts.d.ts +2 -0
  3. package/accounts.js +3 -0
  4. package/cloak.d.ts +2 -0
  5. package/cloak.js +3 -0
  6. package/config.d.ts +2 -0
  7. package/config.js +3 -0
  8. package/dist/cjs/events/index.d.ts +6 -0
  9. package/dist/cjs/events/index.js +22 -0
  10. package/dist/cjs/events/parsing.d.ts +25 -0
  11. package/dist/cjs/events/parsing.js +158 -0
  12. package/dist/cjs/events/position.d.ts +26 -0
  13. package/dist/cjs/events/position.js +53 -0
  14. package/dist/cjs/events/recovery.d.ts +87 -0
  15. package/dist/cjs/events/recovery.js +281 -0
  16. package/dist/cjs/events/scanning.d.ts +35 -0
  17. package/dist/cjs/events/scanning.js +98 -0
  18. package/dist/cjs/events/tree.d.ts +27 -0
  19. package/dist/cjs/events/tree.js +63 -0
  20. package/dist/cjs/events/types.d.ts +39 -0
  21. package/dist/cjs/events/types.js +2 -0
  22. package/dist/cjs/events.d.ts +1 -77
  23. package/dist/cjs/events.js +6 -154
  24. package/dist/cjs/identity/encoding.d.ts +9 -0
  25. package/dist/cjs/identity/encoding.js +85 -0
  26. package/dist/cjs/identity/index.d.ts +4 -0
  27. package/dist/cjs/identity/index.js +20 -0
  28. package/dist/cjs/identity/noteKey.d.ts +33 -0
  29. package/dist/cjs/identity/noteKey.js +97 -0
  30. package/dist/cjs/identity/spending.d.ts +18 -0
  31. package/dist/cjs/identity/spending.js +46 -0
  32. package/dist/cjs/identity/viewKey.d.ts +38 -0
  33. package/dist/cjs/identity/viewKey.js +105 -0
  34. package/dist/cjs/idl/index.d.ts +18 -0
  35. package/dist/cjs/idl/index.js +24 -0
  36. package/dist/cjs/idl/privacy_pool.json +9907 -9907
  37. package/dist/cjs/idl/privacy_pool_legacy.d.ts +5 -0
  38. package/dist/cjs/idl/privacy_pool_legacy.js +3307 -0
  39. package/dist/cjs/idl/privacy_pool_legacy.json +2302 -0
  40. package/dist/cjs/idl/privacy_pool_legacy2.d.ts +5 -0
  41. package/dist/cjs/idl/privacy_pool_legacy2.js +3397 -0
  42. package/dist/cjs/idl/privacy_pool_legacy2.json +2376 -0
  43. package/dist/cjs/index.d.ts +8 -3
  44. package/dist/cjs/index.js +12 -2
  45. package/dist/cjs/notes/amount.d.ts +2 -0
  46. package/dist/cjs/notes/amount.js +21 -0
  47. package/dist/cjs/notes/index.d.ts +3 -0
  48. package/dist/cjs/notes/index.js +3 -0
  49. package/dist/cjs/notes/recovery.d.ts +16 -6
  50. package/dist/cjs/notes/recovery.js +33 -16
  51. package/dist/cjs/notes/selection.d.ts +77 -0
  52. package/dist/cjs/notes/selection.js +193 -0
  53. package/dist/cjs/notes/spent.d.ts +60 -0
  54. package/dist/cjs/notes/spent.js +101 -0
  55. package/dist/cjs/perps/constants.d.ts +16 -0
  56. package/dist/cjs/perps/constants.js +52 -0
  57. package/dist/cjs/perps/index.d.ts +5 -0
  58. package/dist/cjs/perps/index.js +21 -0
  59. package/dist/cjs/perps/keys.d.ts +16 -0
  60. package/dist/cjs/perps/keys.js +43 -0
  61. package/dist/cjs/perps/pdas.d.ts +29 -0
  62. package/dist/cjs/perps/pdas.js +55 -0
  63. package/dist/cjs/perps/relayer.d.ts +9 -0
  64. package/dist/cjs/perps/relayer.js +35 -0
  65. package/dist/cjs/perps/types.d.ts +126 -0
  66. package/dist/cjs/perps/types.js +2 -0
  67. package/dist/cjs/positions/index.d.ts +4 -0
  68. package/dist/cjs/positions/index.js +20 -0
  69. package/dist/cjs/positions/keys.d.ts +29 -0
  70. package/dist/cjs/positions/keys.js +71 -0
  71. package/dist/cjs/positions/pdas.d.ts +15 -0
  72. package/dist/cjs/positions/pdas.js +54 -0
  73. package/dist/cjs/positions/relayer.d.ts +4 -0
  74. package/dist/cjs/positions/relayer.js +15 -0
  75. package/dist/cjs/positions/types.d.ts +97 -0
  76. package/dist/cjs/positions/types.js +2 -0
  77. package/dist/cjs/predictions/client.d.ts +41 -0
  78. package/dist/cjs/predictions/client.js +147 -0
  79. package/dist/cjs/predictions/index.d.ts +5 -0
  80. package/dist/cjs/predictions/index.js +21 -0
  81. package/dist/cjs/predictions/keys.d.ts +14 -0
  82. package/dist/cjs/predictions/keys.js +40 -0
  83. package/dist/cjs/predictions/pdas.d.ts +6 -0
  84. package/dist/cjs/predictions/pdas.js +13 -0
  85. package/dist/cjs/predictions/relayer.d.ts +3 -0
  86. package/dist/cjs/predictions/relayer.js +11 -0
  87. package/dist/cjs/predictions/types.d.ts +178 -0
  88. package/dist/cjs/predictions/types.js +2 -0
  89. package/dist/cjs/program.d.ts +2 -0
  90. package/dist/cjs/program.js +8 -7
  91. package/dist/cjs/prover.d.ts +27 -4
  92. package/dist/cjs/prover.js +107 -48
  93. package/dist/cjs/relayer/api.d.ts +31 -0
  94. package/dist/cjs/relayer/api.js +86 -0
  95. package/dist/cjs/relayer/client.d.ts +29 -17
  96. package/dist/cjs/relayer/client.js +72 -17
  97. package/dist/cjs/relayer/errors.d.ts +1 -1
  98. package/dist/cjs/relayer/errors.js +1 -1
  99. package/dist/cjs/relayer/index.d.ts +4 -1
  100. package/dist/cjs/relayer/index.js +1 -1
  101. package/dist/cjs/relayer/internal-config.d.ts +36 -0
  102. package/dist/cjs/relayer/internal-config.js +9 -0
  103. package/dist/cjs/relayer/internal.d.ts +6 -0
  104. package/dist/cjs/relayer/internal.js +14 -0
  105. package/dist/cjs/relayer/transport.d.ts +4 -2
  106. package/dist/cjs/relayer/transport.js +10 -5
  107. package/dist/cjs/relayer/types.d.ts +9 -10
  108. package/dist/cjs/relayer/types.js +1 -1
  109. package/dist/cjs/shield/owner.js +1 -4
  110. package/dist/esm/events/index.d.ts +6 -0
  111. package/dist/esm/events/index.js +6 -0
  112. package/dist/esm/events/parsing.d.ts +25 -0
  113. package/dist/esm/events/parsing.js +120 -0
  114. package/dist/esm/events/position.d.ts +26 -0
  115. package/dist/esm/events/position.js +48 -0
  116. package/dist/esm/events/recovery.d.ts +87 -0
  117. package/dist/esm/events/recovery.js +237 -0
  118. package/dist/esm/events/scanning.d.ts +35 -0
  119. package/dist/esm/events/scanning.js +92 -0
  120. package/dist/esm/events/tree.d.ts +27 -0
  121. package/dist/esm/events/tree.js +58 -0
  122. package/dist/esm/events/types.d.ts +39 -0
  123. package/dist/esm/events/types.js +1 -0
  124. package/dist/esm/events.d.ts +1 -77
  125. package/dist/esm/events.js +3 -129
  126. package/dist/esm/identity/encoding.d.ts +9 -0
  127. package/dist/esm/identity/encoding.js +75 -0
  128. package/dist/esm/identity/index.d.ts +4 -0
  129. package/dist/esm/identity/index.js +4 -0
  130. package/dist/esm/identity/noteKey.d.ts +33 -0
  131. package/dist/esm/identity/noteKey.js +91 -0
  132. package/dist/esm/identity/spending.d.ts +18 -0
  133. package/dist/esm/identity/spending.js +35 -0
  134. package/dist/esm/identity/viewKey.d.ts +38 -0
  135. package/dist/esm/identity/viewKey.js +96 -0
  136. package/dist/esm/idl/index.d.ts +18 -0
  137. package/dist/esm/idl/index.js +18 -0
  138. package/dist/esm/idl/privacy_pool.json +9907 -9907
  139. package/dist/esm/idl/privacy_pool_legacy.d.ts +5 -0
  140. package/dist/esm/idl/privacy_pool_legacy.js +3305 -0
  141. package/dist/esm/idl/privacy_pool_legacy.json +2302 -0
  142. package/dist/esm/idl/privacy_pool_legacy2.d.ts +5 -0
  143. package/dist/esm/idl/privacy_pool_legacy2.js +3395 -0
  144. package/dist/esm/idl/privacy_pool_legacy2.json +2376 -0
  145. package/dist/esm/index.d.ts +8 -3
  146. package/dist/esm/index.js +8 -3
  147. package/dist/esm/notes/amount.d.ts +2 -0
  148. package/dist/esm/notes/amount.js +18 -0
  149. package/dist/esm/notes/index.d.ts +3 -0
  150. package/dist/esm/notes/index.js +3 -0
  151. package/dist/esm/notes/recovery.d.ts +16 -6
  152. package/dist/esm/notes/recovery.js +33 -16
  153. package/dist/esm/notes/selection.d.ts +77 -0
  154. package/dist/esm/notes/selection.js +188 -0
  155. package/dist/esm/notes/spent.d.ts +60 -0
  156. package/dist/esm/notes/spent.js +96 -0
  157. package/dist/esm/perps/constants.d.ts +16 -0
  158. package/dist/esm/perps/constants.js +48 -0
  159. package/dist/esm/perps/index.d.ts +5 -0
  160. package/dist/esm/perps/index.js +5 -0
  161. package/dist/esm/perps/keys.d.ts +16 -0
  162. package/dist/esm/perps/keys.js +35 -0
  163. package/dist/esm/perps/pdas.d.ts +29 -0
  164. package/dist/esm/perps/pdas.js +47 -0
  165. package/dist/esm/perps/relayer.d.ts +9 -0
  166. package/dist/esm/perps/relayer.js +25 -0
  167. package/dist/esm/perps/types.d.ts +126 -0
  168. package/dist/esm/perps/types.js +1 -0
  169. package/dist/esm/positions/index.d.ts +4 -0
  170. package/dist/esm/positions/index.js +4 -0
  171. package/dist/esm/positions/keys.d.ts +29 -0
  172. package/dist/esm/positions/keys.js +65 -0
  173. package/dist/esm/positions/pdas.d.ts +15 -0
  174. package/dist/esm/positions/pdas.js +44 -0
  175. package/dist/esm/positions/relayer.d.ts +4 -0
  176. package/dist/esm/positions/relayer.js +10 -0
  177. package/dist/esm/positions/types.d.ts +97 -0
  178. package/dist/esm/positions/types.js +1 -0
  179. package/dist/esm/predictions/client.d.ts +41 -0
  180. package/dist/esm/predictions/client.js +141 -0
  181. package/dist/esm/predictions/index.d.ts +5 -0
  182. package/dist/esm/predictions/index.js +5 -0
  183. package/dist/esm/predictions/keys.d.ts +14 -0
  184. package/dist/esm/predictions/keys.js +33 -0
  185. package/dist/esm/predictions/pdas.d.ts +6 -0
  186. package/dist/esm/predictions/pdas.js +10 -0
  187. package/dist/esm/predictions/relayer.d.ts +3 -0
  188. package/dist/esm/predictions/relayer.js +7 -0
  189. package/dist/esm/predictions/types.d.ts +178 -0
  190. package/dist/esm/predictions/types.js +1 -0
  191. package/dist/esm/program.d.ts +2 -0
  192. package/dist/esm/program.js +4 -3
  193. package/dist/esm/prover.d.ts +27 -4
  194. package/dist/esm/prover.js +106 -15
  195. package/dist/esm/relayer/api.d.ts +31 -0
  196. package/dist/esm/relayer/api.js +55 -0
  197. package/dist/esm/relayer/client.d.ts +29 -17
  198. package/dist/esm/relayer/client.js +72 -17
  199. package/dist/esm/relayer/errors.d.ts +1 -1
  200. package/dist/esm/relayer/errors.js +1 -1
  201. package/dist/esm/relayer/index.d.ts +4 -1
  202. package/dist/esm/relayer/index.js +1 -1
  203. package/dist/esm/relayer/internal-config.d.ts +36 -0
  204. package/dist/esm/relayer/internal-config.js +6 -0
  205. package/dist/esm/relayer/internal.d.ts +6 -0
  206. package/dist/esm/relayer/internal.js +10 -0
  207. package/dist/esm/relayer/transport.d.ts +4 -2
  208. package/dist/esm/relayer/transport.js +10 -5
  209. package/dist/esm/relayer/types.d.ts +9 -10
  210. package/dist/esm/relayer/types.js +1 -1
  211. package/dist/esm/shield/owner.js +1 -4
  212. package/identity.d.ts +2 -0
  213. package/identity.js +3 -0
  214. package/idl.d.ts +2 -0
  215. package/idl.js +3 -0
  216. package/notes.d.ts +2 -0
  217. package/notes.js +3 -0
  218. package/package.json +85 -3
  219. package/perps.d.ts +2 -0
  220. package/perps.js +3 -0
  221. package/poseidon.d.ts +2 -0
  222. package/poseidon.js +3 -0
  223. package/positions.d.ts +2 -0
  224. package/positions.js +3 -0
  225. package/predictions.d.ts +2 -0
  226. package/predictions.js +3 -0
  227. package/proof.d.ts +2 -0
  228. package/proof.js +3 -0
  229. package/prover.d.ts +2 -0
  230. package/prover.js +3 -0
  231. package/relayer.d.ts +2 -0
  232. package/relayer.js +3 -0
  233. package/shield.d.ts +2 -0
  234. package/shield.js +3 -0
  235. package/transactions.d.ts +2 -0
  236. package/transactions.js +3 -0
@@ -0,0 +1,3307 @@
1
+ "use strict";
2
+ // AUTO-GENERATED from privacy_pool_legacy.json — do not edit by hand.
3
+ // Regenerate with: npm run gen:idl
4
+ //
5
+ // Shipped as a .ts module rather than a JSON import because Node ESM requires
6
+ // an import attribute (`with { type: "json" }`) that TypeScript cannot emit
7
+ // compatibly for both the CJS and ESM builds.
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ const IDL_JSON = {
10
+ "address": "GYy4kM6GHhpgLCUscuABbzkD2ZbJ2fneYryaZ6Ch7fFU",
11
+ "metadata": {
12
+ "name": "privacy_pool",
13
+ "version": "0.1.0",
14
+ "spec": "0.1.0",
15
+ "description": "Veilo - Privacy Layer on Solana"
16
+ },
17
+ "instructions": [
18
+ {
19
+ "name": "add_merkle_tree",
20
+ "discriminator": [
21
+ 199,
22
+ 97,
23
+ 38,
24
+ 35,
25
+ 140,
26
+ 113,
27
+ 187,
28
+ 30
29
+ ],
30
+ "accounts": [
31
+ {
32
+ "name": "config",
33
+ "writable": true,
34
+ "pda": {
35
+ "seeds": [
36
+ {
37
+ "kind": "const",
38
+ "value": [
39
+ 112,
40
+ 114,
41
+ 105,
42
+ 118,
43
+ 97,
44
+ 99,
45
+ 121,
46
+ 95,
47
+ 99,
48
+ 111,
49
+ 110,
50
+ 102,
51
+ 105,
52
+ 103,
53
+ 95,
54
+ 118,
55
+ 51
56
+ ]
57
+ },
58
+ {
59
+ "kind": "arg",
60
+ "path": "mint_address"
61
+ }
62
+ ]
63
+ }
64
+ },
65
+ {
66
+ "name": "note_tree",
67
+ "writable": true,
68
+ "pda": {
69
+ "seeds": [
70
+ {
71
+ "kind": "const",
72
+ "value": [
73
+ 112,
74
+ 114,
75
+ 105,
76
+ 118,
77
+ 97,
78
+ 99,
79
+ 121,
80
+ 95,
81
+ 110,
82
+ 111,
83
+ 116,
84
+ 101,
85
+ 95,
86
+ 116,
87
+ 114,
88
+ 101,
89
+ 101,
90
+ 95,
91
+ 118,
92
+ 51
93
+ ]
94
+ },
95
+ {
96
+ "kind": "arg",
97
+ "path": "mint_address"
98
+ },
99
+ {
100
+ "kind": "arg",
101
+ "path": "tree_id"
102
+ }
103
+ ]
104
+ }
105
+ },
106
+ {
107
+ "name": "relayer",
108
+ "docs": [
109
+ "Relayer who can add trees (must be registered in config.relayers)"
110
+ ],
111
+ "writable": true,
112
+ "signer": true
113
+ },
114
+ {
115
+ "name": "system_program",
116
+ "address": "11111111111111111111111111111111"
117
+ }
118
+ ],
119
+ "args": [
120
+ {
121
+ "name": "_mint_address",
122
+ "type": "pubkey"
123
+ },
124
+ {
125
+ "name": "tree_id",
126
+ "type": "u16"
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "name": "add_relayer",
132
+ "discriminator": [
133
+ 184,
134
+ 240,
135
+ 94,
136
+ 199,
137
+ 19,
138
+ 71,
139
+ 21,
140
+ 192
141
+ ],
142
+ "accounts": [
143
+ {
144
+ "name": "config",
145
+ "writable": true,
146
+ "pda": {
147
+ "seeds": [
148
+ {
149
+ "kind": "const",
150
+ "value": [
151
+ 112,
152
+ 114,
153
+ 105,
154
+ 118,
155
+ 97,
156
+ 99,
157
+ 121,
158
+ 95,
159
+ 99,
160
+ 111,
161
+ 110,
162
+ 102,
163
+ 105,
164
+ 103,
165
+ 95,
166
+ 118,
167
+ 51
168
+ ]
169
+ },
170
+ {
171
+ "kind": "arg",
172
+ "path": "mint_address"
173
+ }
174
+ ]
175
+ }
176
+ },
177
+ {
178
+ "name": "admin",
179
+ "docs": [
180
+ "has_one = admin ensures this matches config.admin.",
181
+ "When using Squads, the vault PDA signs after multisig approval."
182
+ ],
183
+ "signer": true,
184
+ "relations": [
185
+ "config"
186
+ ]
187
+ }
188
+ ],
189
+ "args": [
190
+ {
191
+ "name": "_mint_address",
192
+ "type": "pubkey"
193
+ },
194
+ {
195
+ "name": "new_relayer",
196
+ "type": "pubkey"
197
+ }
198
+ ]
199
+ },
200
+ {
201
+ "name": "fund_native_source",
202
+ "docs": [
203
+ "Option B: Create executor PDA + WSOL ATA and transfer swap_amount from vault.",
204
+ "Must be invoked as the FIRST instruction in an atomic transaction whose SECOND",
205
+ "instruction is `transact_swap`. Both instructions are sent together so that",
206
+ "failure in `transact_swap` reverts the vault debit atomically.",
207
+ "",
208
+ "Only for native SOL source pools. SPL-source swaps use `transact_swap` directly."
209
+ ],
210
+ "discriminator": [
211
+ 247,
212
+ 142,
213
+ 43,
214
+ 167,
215
+ 56,
216
+ 52,
217
+ 137,
218
+ 118
219
+ ],
220
+ "accounts": [
221
+ {
222
+ "name": "executor",
223
+ "docs": [
224
+ "Executor PDA — created here, validated in the following transact_swap instruction."
225
+ ],
226
+ "writable": true,
227
+ "pda": {
228
+ "seeds": [
229
+ {
230
+ "kind": "const",
231
+ "value": [
232
+ 115,
233
+ 119,
234
+ 97,
235
+ 112,
236
+ 95,
237
+ 101,
238
+ 120,
239
+ 101,
240
+ 99,
241
+ 117,
242
+ 116,
243
+ 111,
244
+ 114
245
+ ]
246
+ },
247
+ {
248
+ "kind": "arg",
249
+ "path": "source_mint"
250
+ },
251
+ {
252
+ "kind": "arg",
253
+ "path": "dest_mint"
254
+ },
255
+ {
256
+ "kind": "arg",
257
+ "path": "input_nullifier_0"
258
+ },
259
+ {
260
+ "kind": "account",
261
+ "path": "relayer"
262
+ }
263
+ ]
264
+ }
265
+ },
266
+ {
267
+ "name": "executor_source_token",
268
+ "docs": [
269
+ "Executor's WSOL ATA — created here, funded with swap_amount from source vault.",
270
+ "This is executor_source_token for the following transact_swap instruction."
271
+ ],
272
+ "writable": true,
273
+ "pda": {
274
+ "seeds": [
275
+ {
276
+ "kind": "account",
277
+ "path": "executor"
278
+ },
279
+ {
280
+ "kind": "const",
281
+ "value": [
282
+ 6,
283
+ 221,
284
+ 246,
285
+ 225,
286
+ 215,
287
+ 101,
288
+ 161,
289
+ 147,
290
+ 217,
291
+ 203,
292
+ 225,
293
+ 70,
294
+ 206,
295
+ 235,
296
+ 121,
297
+ 172,
298
+ 28,
299
+ 180,
300
+ 133,
301
+ 237,
302
+ 95,
303
+ 91,
304
+ 55,
305
+ 145,
306
+ 58,
307
+ 140,
308
+ 245,
309
+ 133,
310
+ 126,
311
+ 255,
312
+ 0,
313
+ 169
314
+ ]
315
+ },
316
+ {
317
+ "kind": "account",
318
+ "path": "source_mint_account"
319
+ }
320
+ ],
321
+ "program": {
322
+ "kind": "const",
323
+ "value": [
324
+ 140,
325
+ 151,
326
+ 37,
327
+ 143,
328
+ 78,
329
+ 36,
330
+ 137,
331
+ 241,
332
+ 187,
333
+ 61,
334
+ 16,
335
+ 41,
336
+ 20,
337
+ 142,
338
+ 13,
339
+ 131,
340
+ 11,
341
+ 90,
342
+ 19,
343
+ 153,
344
+ 218,
345
+ 255,
346
+ 16,
347
+ 132,
348
+ 4,
349
+ 142,
350
+ 123,
351
+ 216,
352
+ 219,
353
+ 233,
354
+ 248,
355
+ 89
356
+ ]
357
+ }
358
+ }
359
+ },
360
+ {
361
+ "name": "source_vault",
362
+ "docs": [
363
+ "Source vault PDA (native SOL pool — program-owned, stores raw lamports)."
364
+ ],
365
+ "writable": true,
366
+ "pda": {
367
+ "seeds": [
368
+ {
369
+ "kind": "const",
370
+ "value": [
371
+ 112,
372
+ 114,
373
+ 105,
374
+ 118,
375
+ 97,
376
+ 99,
377
+ 121,
378
+ 95,
379
+ 118,
380
+ 97,
381
+ 117,
382
+ 108,
383
+ 116,
384
+ 95,
385
+ 118,
386
+ 51
387
+ ]
388
+ },
389
+ {
390
+ "kind": "arg",
391
+ "path": "source_mint"
392
+ }
393
+ ]
394
+ }
395
+ },
396
+ {
397
+ "name": "source_config",
398
+ "docs": [
399
+ "Source pool config — checked for vault_bump and relayer authorisation."
400
+ ],
401
+ "pda": {
402
+ "seeds": [
403
+ {
404
+ "kind": "const",
405
+ "value": [
406
+ 112,
407
+ 114,
408
+ 105,
409
+ 118,
410
+ 97,
411
+ 99,
412
+ 121,
413
+ 95,
414
+ 99,
415
+ 111,
416
+ 110,
417
+ 102,
418
+ 105,
419
+ 103,
420
+ 95,
421
+ 118,
422
+ 51
423
+ ]
424
+ },
425
+ {
426
+ "kind": "arg",
427
+ "path": "source_mint"
428
+ }
429
+ ]
430
+ }
431
+ },
432
+ {
433
+ "name": "source_mint_account",
434
+ "docs": [
435
+ "WSOL mint (So111…1112) — required for executor_source_token ATA constraint.",
436
+ "Must equal effective_mint(source_mint), i.e., source_mint must be native SOL."
437
+ ]
438
+ },
439
+ {
440
+ "name": "relayer",
441
+ "docs": [
442
+ "Relayer — pays rent for created accounts, must be whitelisted in source pool."
443
+ ],
444
+ "writable": true,
445
+ "signer": true
446
+ },
447
+ {
448
+ "name": "instructions_sysvar",
449
+ "docs": [
450
+ "with a `transact_swap` call in the same transaction, preventing standalone",
451
+ "vault-drain calls with arbitrary nullifiers."
452
+ ],
453
+ "address": "Sysvar1nstructions1111111111111111111111111"
454
+ },
455
+ {
456
+ "name": "token_program",
457
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
458
+ },
459
+ {
460
+ "name": "system_program",
461
+ "address": "11111111111111111111111111111111"
462
+ },
463
+ {
464
+ "name": "associated_token_program",
465
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
466
+ }
467
+ ],
468
+ "args": [
469
+ {
470
+ "name": "source_mint",
471
+ "type": "pubkey"
472
+ },
473
+ {
474
+ "name": "dest_mint",
475
+ "type": "pubkey"
476
+ },
477
+ {
478
+ "name": "input_nullifier_0",
479
+ "type": {
480
+ "array": [
481
+ "u8",
482
+ 32
483
+ ]
484
+ }
485
+ },
486
+ {
487
+ "name": "swap_amount",
488
+ "type": "u64"
489
+ }
490
+ ]
491
+ },
492
+ {
493
+ "name": "initialize",
494
+ "discriminator": [
495
+ 175,
496
+ 175,
497
+ 109,
498
+ 31,
499
+ 13,
500
+ 152,
501
+ 155,
502
+ 237
503
+ ],
504
+ "accounts": [
505
+ {
506
+ "name": "config",
507
+ "writable": true,
508
+ "pda": {
509
+ "seeds": [
510
+ {
511
+ "kind": "const",
512
+ "value": [
513
+ 112,
514
+ 114,
515
+ 105,
516
+ 118,
517
+ 97,
518
+ 99,
519
+ 121,
520
+ 95,
521
+ 99,
522
+ 111,
523
+ 110,
524
+ 102,
525
+ 105,
526
+ 103,
527
+ 95,
528
+ 118,
529
+ 51
530
+ ]
531
+ },
532
+ {
533
+ "kind": "arg",
534
+ "path": "mint_address"
535
+ }
536
+ ]
537
+ }
538
+ },
539
+ {
540
+ "name": "vault",
541
+ "writable": true,
542
+ "pda": {
543
+ "seeds": [
544
+ {
545
+ "kind": "const",
546
+ "value": [
547
+ 112,
548
+ 114,
549
+ 105,
550
+ 118,
551
+ 97,
552
+ 99,
553
+ 121,
554
+ 95,
555
+ 118,
556
+ 97,
557
+ 117,
558
+ 108,
559
+ 116,
560
+ 95,
561
+ 118,
562
+ 51
563
+ ]
564
+ },
565
+ {
566
+ "kind": "arg",
567
+ "path": "mint_address"
568
+ }
569
+ ]
570
+ }
571
+ },
572
+ {
573
+ "name": "note_tree",
574
+ "docs": [
575
+ "Initial tree (tree_id = 0)"
576
+ ],
577
+ "writable": true,
578
+ "pda": {
579
+ "seeds": [
580
+ {
581
+ "kind": "const",
582
+ "value": [
583
+ 112,
584
+ 114,
585
+ 105,
586
+ 118,
587
+ 97,
588
+ 99,
589
+ 121,
590
+ 95,
591
+ 110,
592
+ 111,
593
+ 116,
594
+ 101,
595
+ 95,
596
+ 116,
597
+ 114,
598
+ 101,
599
+ 101,
600
+ 95,
601
+ 118,
602
+ 51
603
+ ]
604
+ },
605
+ {
606
+ "kind": "arg",
607
+ "path": "mint_address"
608
+ },
609
+ {
610
+ "kind": "const",
611
+ "value": [
612
+ 0,
613
+ 0
614
+ ]
615
+ }
616
+ ]
617
+ }
618
+ },
619
+ {
620
+ "name": "nullifiers",
621
+ "writable": true,
622
+ "pda": {
623
+ "seeds": [
624
+ {
625
+ "kind": "const",
626
+ "value": [
627
+ 112,
628
+ 114,
629
+ 105,
630
+ 118,
631
+ 97,
632
+ 99,
633
+ 121,
634
+ 95,
635
+ 110,
636
+ 117,
637
+ 108,
638
+ 108,
639
+ 105,
640
+ 102,
641
+ 105,
642
+ 101,
643
+ 114,
644
+ 115,
645
+ 95,
646
+ 118,
647
+ 51
648
+ ]
649
+ },
650
+ {
651
+ "kind": "arg",
652
+ "path": "mint_address"
653
+ }
654
+ ]
655
+ }
656
+ },
657
+ {
658
+ "name": "admin",
659
+ "docs": [
660
+ "When using Squads multisig, this should be the vault PDA.",
661
+ "Squads will sign this account after multisig approval."
662
+ ],
663
+ "signer": true
664
+ },
665
+ {
666
+ "name": "payer",
667
+ "docs": [
668
+ "Transaction fee payer (can be anyone, separate from admin authority)"
669
+ ],
670
+ "writable": true,
671
+ "signer": true
672
+ },
673
+ {
674
+ "name": "system_program",
675
+ "address": "11111111111111111111111111111111"
676
+ }
677
+ ],
678
+ "args": [
679
+ {
680
+ "name": "fee_bps",
681
+ "type": "u16"
682
+ },
683
+ {
684
+ "name": "mint_address",
685
+ "type": "pubkey"
686
+ },
687
+ {
688
+ "name": "min_deposit_amount",
689
+ "type": {
690
+ "option": "u64"
691
+ }
692
+ },
693
+ {
694
+ "name": "max_deposit_amount",
695
+ "type": {
696
+ "option": "u64"
697
+ }
698
+ },
699
+ {
700
+ "name": "min_withdraw_amount",
701
+ "type": {
702
+ "option": "u64"
703
+ }
704
+ },
705
+ {
706
+ "name": "max_withdraw_amount",
707
+ "type": {
708
+ "option": "u64"
709
+ }
710
+ }
711
+ ]
712
+ },
713
+ {
714
+ "name": "initialize_global_config",
715
+ "discriminator": [
716
+ 113,
717
+ 216,
718
+ 122,
719
+ 131,
720
+ 225,
721
+ 209,
722
+ 22,
723
+ 55
724
+ ],
725
+ "accounts": [
726
+ {
727
+ "name": "global_config",
728
+ "writable": true,
729
+ "pda": {
730
+ "seeds": [
731
+ {
732
+ "kind": "const",
733
+ "value": [
734
+ 103,
735
+ 108,
736
+ 111,
737
+ 98,
738
+ 97,
739
+ 108,
740
+ 95,
741
+ 99,
742
+ 111,
743
+ 110,
744
+ 102,
745
+ 105,
746
+ 103,
747
+ 95,
748
+ 118,
749
+ 49
750
+ ]
751
+ }
752
+ ]
753
+ }
754
+ },
755
+ {
756
+ "name": "admin",
757
+ "docs": [
758
+ "When using Squads multisig, this should be the vault PDA."
759
+ ],
760
+ "signer": true
761
+ },
762
+ {
763
+ "name": "payer",
764
+ "docs": [
765
+ "Transaction fee payer (can be anyone, separate from admin authority)"
766
+ ],
767
+ "writable": true,
768
+ "signer": true
769
+ },
770
+ {
771
+ "name": "system_program",
772
+ "address": "11111111111111111111111111111111"
773
+ }
774
+ ],
775
+ "args": []
776
+ },
777
+ {
778
+ "name": "transact",
779
+ "docs": [
780
+ "Unified UTXO transaction instruction",
781
+ "Circuit equation: sumIns + publicAmount = sumOuts",
782
+ "Handles deposits (publicAmount > 0), withdrawals (publicAmount < 0), and transfers (publicAmount = 0)",
783
+ "",
784
+ "Cross-tree transactions:",
785
+ "- input_tree_id: Tree containing input notes (for root validation)",
786
+ "- output_tree_id: Tree for new output commitments",
787
+ "- Can be the same tree or different trees",
788
+ "- Allows withdrawals even when input tree is full (outputs go to new tree)"
789
+ ],
790
+ "discriminator": [
791
+ 217,
792
+ 149,
793
+ 130,
794
+ 143,
795
+ 221,
796
+ 52,
797
+ 252,
798
+ 119
799
+ ],
800
+ "accounts": [
801
+ {
802
+ "name": "config",
803
+ "writable": true,
804
+ "pda": {
805
+ "seeds": [
806
+ {
807
+ "kind": "const",
808
+ "value": [
809
+ 112,
810
+ 114,
811
+ 105,
812
+ 118,
813
+ 97,
814
+ 99,
815
+ 121,
816
+ 95,
817
+ 99,
818
+ 111,
819
+ 110,
820
+ 102,
821
+ 105,
822
+ 103,
823
+ 95,
824
+ 118,
825
+ 51
826
+ ]
827
+ },
828
+ {
829
+ "kind": "arg",
830
+ "path": "mint_address"
831
+ }
832
+ ]
833
+ }
834
+ },
835
+ {
836
+ "name": "global_config",
837
+ "pda": {
838
+ "seeds": [
839
+ {
840
+ "kind": "const",
841
+ "value": [
842
+ 103,
843
+ 108,
844
+ 111,
845
+ 98,
846
+ 97,
847
+ 108,
848
+ 95,
849
+ 99,
850
+ 111,
851
+ 110,
852
+ 102,
853
+ 105,
854
+ 103,
855
+ 95,
856
+ 118,
857
+ 49
858
+ ]
859
+ }
860
+ ]
861
+ }
862
+ },
863
+ {
864
+ "name": "vault",
865
+ "writable": true,
866
+ "pda": {
867
+ "seeds": [
868
+ {
869
+ "kind": "const",
870
+ "value": [
871
+ 112,
872
+ 114,
873
+ 105,
874
+ 118,
875
+ 97,
876
+ 99,
877
+ 121,
878
+ 95,
879
+ 118,
880
+ 97,
881
+ 117,
882
+ 108,
883
+ 116,
884
+ 95,
885
+ 118,
886
+ 51
887
+ ]
888
+ },
889
+ {
890
+ "kind": "arg",
891
+ "path": "mint_address"
892
+ }
893
+ ]
894
+ }
895
+ },
896
+ {
897
+ "name": "input_tree",
898
+ "docs": [
899
+ "Input tree - where input notes came from (for root validation)"
900
+ ],
901
+ "writable": true,
902
+ "pda": {
903
+ "seeds": [
904
+ {
905
+ "kind": "const",
906
+ "value": [
907
+ 112,
908
+ 114,
909
+ 105,
910
+ 118,
911
+ 97,
912
+ 99,
913
+ 121,
914
+ 95,
915
+ 110,
916
+ 111,
917
+ 116,
918
+ 101,
919
+ 95,
920
+ 116,
921
+ 114,
922
+ 101,
923
+ 101,
924
+ 95,
925
+ 118,
926
+ 51
927
+ ]
928
+ },
929
+ {
930
+ "kind": "arg",
931
+ "path": "mint_address"
932
+ },
933
+ {
934
+ "kind": "arg",
935
+ "path": "input_tree_id"
936
+ }
937
+ ]
938
+ }
939
+ },
940
+ {
941
+ "name": "output_tree",
942
+ "docs": [
943
+ "Output tree - where new output commitments will be inserted"
944
+ ],
945
+ "writable": true,
946
+ "pda": {
947
+ "seeds": [
948
+ {
949
+ "kind": "const",
950
+ "value": [
951
+ 112,
952
+ 114,
953
+ 105,
954
+ 118,
955
+ 97,
956
+ 99,
957
+ 121,
958
+ 95,
959
+ 110,
960
+ 111,
961
+ 116,
962
+ 101,
963
+ 95,
964
+ 116,
965
+ 114,
966
+ 101,
967
+ 101,
968
+ 95,
969
+ 118,
970
+ 51
971
+ ]
972
+ },
973
+ {
974
+ "kind": "arg",
975
+ "path": "mint_address"
976
+ },
977
+ {
978
+ "kind": "arg",
979
+ "path": "output_tree_id"
980
+ }
981
+ ]
982
+ }
983
+ },
984
+ {
985
+ "name": "nullifiers",
986
+ "writable": true,
987
+ "pda": {
988
+ "seeds": [
989
+ {
990
+ "kind": "const",
991
+ "value": [
992
+ 112,
993
+ 114,
994
+ 105,
995
+ 118,
996
+ 97,
997
+ 99,
998
+ 121,
999
+ 95,
1000
+ 110,
1001
+ 117,
1002
+ 108,
1003
+ 108,
1004
+ 105,
1005
+ 102,
1006
+ 105,
1007
+ 101,
1008
+ 114,
1009
+ 115,
1010
+ 95,
1011
+ 118,
1012
+ 51
1013
+ ]
1014
+ },
1015
+ {
1016
+ "kind": "arg",
1017
+ "path": "mint_address"
1018
+ }
1019
+ ]
1020
+ }
1021
+ },
1022
+ {
1023
+ "name": "nullifier_marker_0",
1024
+ "docs": [
1025
+ "First nullifier marker (must not exist for withdrawals - ensures nullifier is fresh)",
1026
+ "For deposits (public_amount > 0), this should be the zero nullifier marker (reusable)",
1027
+ "NOTE: Nullifier markers are global (no tree_id) to prevent cross-tree double-spend"
1028
+ ],
1029
+ "writable": true,
1030
+ "pda": {
1031
+ "seeds": [
1032
+ {
1033
+ "kind": "const",
1034
+ "value": [
1035
+ 110,
1036
+ 117,
1037
+ 108,
1038
+ 108,
1039
+ 105,
1040
+ 102,
1041
+ 105,
1042
+ 101,
1043
+ 114,
1044
+ 95,
1045
+ 118,
1046
+ 51
1047
+ ]
1048
+ },
1049
+ {
1050
+ "kind": "arg",
1051
+ "path": "mint_address"
1052
+ },
1053
+ {
1054
+ "kind": "arg",
1055
+ "path": "input_nullifier_0"
1056
+ }
1057
+ ]
1058
+ }
1059
+ },
1060
+ {
1061
+ "name": "nullifier_marker_1",
1062
+ "docs": [
1063
+ "Second nullifier marker (must not exist for withdrawals - ensures nullifier is fresh)",
1064
+ "For deposits (public_amount > 0), this should be the zero nullifier marker (reusable)",
1065
+ "NOTE: Nullifier markers are global (no tree_id) to prevent cross-tree double-spend"
1066
+ ],
1067
+ "writable": true,
1068
+ "pda": {
1069
+ "seeds": [
1070
+ {
1071
+ "kind": "const",
1072
+ "value": [
1073
+ 110,
1074
+ 117,
1075
+ 108,
1076
+ 108,
1077
+ 105,
1078
+ 102,
1079
+ 105,
1080
+ 101,
1081
+ 114,
1082
+ 95,
1083
+ 118,
1084
+ 51
1085
+ ]
1086
+ },
1087
+ {
1088
+ "kind": "arg",
1089
+ "path": "mint_address"
1090
+ },
1091
+ {
1092
+ "kind": "arg",
1093
+ "path": "input_nullifier_1"
1094
+ }
1095
+ ]
1096
+ }
1097
+ },
1098
+ {
1099
+ "name": "relayer",
1100
+ "docs": [
1101
+ "Relayer who submits transaction (pays rent, receives fee)"
1102
+ ],
1103
+ "writable": true,
1104
+ "signer": true
1105
+ },
1106
+ {
1107
+ "name": "recipient",
1108
+ "docs": [
1109
+ "Recipient (receives withdrawal amount if public_amount > 0)"
1110
+ ],
1111
+ "writable": true
1112
+ },
1113
+ {
1114
+ "name": "vault_token_account",
1115
+ "docs": [
1116
+ "Vault's token account (ATA for mint_address)"
1117
+ ],
1118
+ "writable": true
1119
+ },
1120
+ {
1121
+ "name": "user_token_account",
1122
+ "docs": [
1123
+ "User's token account (for deposits)"
1124
+ ],
1125
+ "writable": true
1126
+ },
1127
+ {
1128
+ "name": "recipient_token_account",
1129
+ "docs": [
1130
+ "Recipient's token account (for withdrawals)"
1131
+ ],
1132
+ "writable": true
1133
+ },
1134
+ {
1135
+ "name": "relayer_token_account",
1136
+ "docs": [
1137
+ "Relayer's token account (for fees)"
1138
+ ],
1139
+ "writable": true
1140
+ },
1141
+ {
1142
+ "name": "token_program",
1143
+ "docs": [
1144
+ "SPL Token program"
1145
+ ]
1146
+ },
1147
+ {
1148
+ "name": "system_program",
1149
+ "address": "11111111111111111111111111111111"
1150
+ }
1151
+ ],
1152
+ "args": [
1153
+ {
1154
+ "name": "root",
1155
+ "type": {
1156
+ "array": [
1157
+ "u8",
1158
+ 32
1159
+ ]
1160
+ }
1161
+ },
1162
+ {
1163
+ "name": "input_tree_id",
1164
+ "type": "u16"
1165
+ },
1166
+ {
1167
+ "name": "output_tree_id",
1168
+ "type": "u16"
1169
+ },
1170
+ {
1171
+ "name": "public_amount",
1172
+ "type": "i64"
1173
+ },
1174
+ {
1175
+ "name": "ext_data_hash",
1176
+ "type": {
1177
+ "array": [
1178
+ "u8",
1179
+ 32
1180
+ ]
1181
+ }
1182
+ },
1183
+ {
1184
+ "name": "mint_address",
1185
+ "type": "pubkey"
1186
+ },
1187
+ {
1188
+ "name": "input_nullifier_0",
1189
+ "type": {
1190
+ "array": [
1191
+ "u8",
1192
+ 32
1193
+ ]
1194
+ }
1195
+ },
1196
+ {
1197
+ "name": "input_nullifier_1",
1198
+ "type": {
1199
+ "array": [
1200
+ "u8",
1201
+ 32
1202
+ ]
1203
+ }
1204
+ },
1205
+ {
1206
+ "name": "output_commitment_0",
1207
+ "type": {
1208
+ "array": [
1209
+ "u8",
1210
+ 32
1211
+ ]
1212
+ }
1213
+ },
1214
+ {
1215
+ "name": "output_commitment_1",
1216
+ "type": {
1217
+ "array": [
1218
+ "u8",
1219
+ 32
1220
+ ]
1221
+ }
1222
+ },
1223
+ {
1224
+ "name": "deadline",
1225
+ "type": "i64"
1226
+ },
1227
+ {
1228
+ "name": "ext_data",
1229
+ "type": {
1230
+ "defined": {
1231
+ "name": "ExtData"
1232
+ }
1233
+ }
1234
+ },
1235
+ {
1236
+ "name": "proof",
1237
+ "type": {
1238
+ "defined": {
1239
+ "name": "TransactionProof"
1240
+ }
1241
+ }
1242
+ }
1243
+ ]
1244
+ },
1245
+ {
1246
+ "name": "transact_swap",
1247
+ "docs": [
1248
+ "Atomic cross-pool private swap",
1249
+ "Consumes notes from source pool, swaps via Raydium CPMM (no Serum), creates notes in dest pool",
1250
+ "All in one transaction - see swap.rs for implementation details"
1251
+ ],
1252
+ "discriminator": [
1253
+ 36,
1254
+ 133,
1255
+ 230,
1256
+ 184,
1257
+ 198,
1258
+ 10,
1259
+ 202,
1260
+ 249
1261
+ ],
1262
+ "accounts": [
1263
+ {
1264
+ "name": "source_config",
1265
+ "writable": true,
1266
+ "pda": {
1267
+ "seeds": [
1268
+ {
1269
+ "kind": "const",
1270
+ "value": [
1271
+ 112,
1272
+ 114,
1273
+ 105,
1274
+ 118,
1275
+ 97,
1276
+ 99,
1277
+ 121,
1278
+ 95,
1279
+ 99,
1280
+ 111,
1281
+ 110,
1282
+ 102,
1283
+ 105,
1284
+ 103,
1285
+ 95,
1286
+ 118,
1287
+ 51
1288
+ ]
1289
+ },
1290
+ {
1291
+ "kind": "arg",
1292
+ "path": "source_mint"
1293
+ }
1294
+ ]
1295
+ }
1296
+ },
1297
+ {
1298
+ "name": "global_config",
1299
+ "pda": {
1300
+ "seeds": [
1301
+ {
1302
+ "kind": "const",
1303
+ "value": [
1304
+ 103,
1305
+ 108,
1306
+ 111,
1307
+ 98,
1308
+ 97,
1309
+ 108,
1310
+ 95,
1311
+ 99,
1312
+ 111,
1313
+ 110,
1314
+ 102,
1315
+ 105,
1316
+ 103,
1317
+ 95,
1318
+ 118,
1319
+ 49
1320
+ ]
1321
+ }
1322
+ ]
1323
+ }
1324
+ },
1325
+ {
1326
+ "name": "source_vault",
1327
+ "writable": true,
1328
+ "pda": {
1329
+ "seeds": [
1330
+ {
1331
+ "kind": "const",
1332
+ "value": [
1333
+ 112,
1334
+ 114,
1335
+ 105,
1336
+ 118,
1337
+ 97,
1338
+ 99,
1339
+ 121,
1340
+ 95,
1341
+ 118,
1342
+ 97,
1343
+ 117,
1344
+ 108,
1345
+ 116,
1346
+ 95,
1347
+ 118,
1348
+ 51
1349
+ ]
1350
+ },
1351
+ {
1352
+ "kind": "arg",
1353
+ "path": "source_mint"
1354
+ }
1355
+ ]
1356
+ }
1357
+ },
1358
+ {
1359
+ "name": "source_tree",
1360
+ "docs": [
1361
+ "Source tree - where input notes came from"
1362
+ ],
1363
+ "writable": true,
1364
+ "pda": {
1365
+ "seeds": [
1366
+ {
1367
+ "kind": "const",
1368
+ "value": [
1369
+ 112,
1370
+ 114,
1371
+ 105,
1372
+ 118,
1373
+ 97,
1374
+ 99,
1375
+ 121,
1376
+ 95,
1377
+ 110,
1378
+ 111,
1379
+ 116,
1380
+ 101,
1381
+ 95,
1382
+ 116,
1383
+ 114,
1384
+ 101,
1385
+ 101,
1386
+ 95,
1387
+ 118,
1388
+ 51
1389
+ ]
1390
+ },
1391
+ {
1392
+ "kind": "arg",
1393
+ "path": "source_mint"
1394
+ },
1395
+ {
1396
+ "kind": "arg",
1397
+ "path": "source_tree_id"
1398
+ }
1399
+ ]
1400
+ }
1401
+ },
1402
+ {
1403
+ "name": "source_nullifiers",
1404
+ "writable": true,
1405
+ "pda": {
1406
+ "seeds": [
1407
+ {
1408
+ "kind": "const",
1409
+ "value": [
1410
+ 112,
1411
+ 114,
1412
+ 105,
1413
+ 118,
1414
+ 97,
1415
+ 99,
1416
+ 121,
1417
+ 95,
1418
+ 110,
1419
+ 117,
1420
+ 108,
1421
+ 108,
1422
+ 105,
1423
+ 102,
1424
+ 105,
1425
+ 101,
1426
+ 114,
1427
+ 115,
1428
+ 95,
1429
+ 118,
1430
+ 51
1431
+ ]
1432
+ },
1433
+ {
1434
+ "kind": "arg",
1435
+ "path": "source_mint"
1436
+ }
1437
+ ]
1438
+ }
1439
+ },
1440
+ {
1441
+ "name": "source_nullifier_marker_0",
1442
+ "docs": [
1443
+ "First nullifier marker for source pool",
1444
+ "NOTE: Nullifier markers are global (no tree_id) to prevent cross-tree double-spend"
1445
+ ],
1446
+ "writable": true,
1447
+ "pda": {
1448
+ "seeds": [
1449
+ {
1450
+ "kind": "const",
1451
+ "value": [
1452
+ 110,
1453
+ 117,
1454
+ 108,
1455
+ 108,
1456
+ 105,
1457
+ 102,
1458
+ 105,
1459
+ 101,
1460
+ 114,
1461
+ 95,
1462
+ 118,
1463
+ 51
1464
+ ]
1465
+ },
1466
+ {
1467
+ "kind": "arg",
1468
+ "path": "source_mint"
1469
+ },
1470
+ {
1471
+ "kind": "arg",
1472
+ "path": "input_nullifier_0"
1473
+ }
1474
+ ]
1475
+ }
1476
+ },
1477
+ {
1478
+ "name": "source_nullifier_marker_1",
1479
+ "docs": [
1480
+ "Second nullifier marker for source pool",
1481
+ "NOTE: Nullifier markers are global (no tree_id) to prevent cross-tree double-spend"
1482
+ ],
1483
+ "writable": true,
1484
+ "pda": {
1485
+ "seeds": [
1486
+ {
1487
+ "kind": "const",
1488
+ "value": [
1489
+ 110,
1490
+ 117,
1491
+ 108,
1492
+ 108,
1493
+ 105,
1494
+ 102,
1495
+ 105,
1496
+ 101,
1497
+ 114,
1498
+ 95,
1499
+ 118,
1500
+ 51
1501
+ ]
1502
+ },
1503
+ {
1504
+ "kind": "arg",
1505
+ "path": "source_mint"
1506
+ },
1507
+ {
1508
+ "kind": "arg",
1509
+ "path": "input_nullifier_1"
1510
+ }
1511
+ ]
1512
+ }
1513
+ },
1514
+ {
1515
+ "name": "source_vault_token_account",
1516
+ "docs": [
1517
+ "Source vault's token account",
1518
+ "For native SOL pools (mint_address == Pubkey::default), this may be unused — pass any mut account.",
1519
+ "For SPL pools, must be the canonical ATA of the source vault for the source mint."
1520
+ ],
1521
+ "writable": true
1522
+ },
1523
+ {
1524
+ "name": "source_mint_account",
1525
+ "docs": [
1526
+ "Source token mint — for native SOL pools, pass the WSOL (NATIVE_MINT) account.",
1527
+ "Must match effective_mint(source_mint) so executor ATAs are created with WSOL."
1528
+ ]
1529
+ },
1530
+ {
1531
+ "name": "dest_config",
1532
+ "writable": true,
1533
+ "pda": {
1534
+ "seeds": [
1535
+ {
1536
+ "kind": "const",
1537
+ "value": [
1538
+ 112,
1539
+ 114,
1540
+ 105,
1541
+ 118,
1542
+ 97,
1543
+ 99,
1544
+ 121,
1545
+ 95,
1546
+ 99,
1547
+ 111,
1548
+ 110,
1549
+ 102,
1550
+ 105,
1551
+ 103,
1552
+ 95,
1553
+ 118,
1554
+ 51
1555
+ ]
1556
+ },
1557
+ {
1558
+ "kind": "arg",
1559
+ "path": "dest_mint"
1560
+ }
1561
+ ]
1562
+ }
1563
+ },
1564
+ {
1565
+ "name": "dest_vault",
1566
+ "writable": true,
1567
+ "pda": {
1568
+ "seeds": [
1569
+ {
1570
+ "kind": "const",
1571
+ "value": [
1572
+ 112,
1573
+ 114,
1574
+ 105,
1575
+ 118,
1576
+ 97,
1577
+ 99,
1578
+ 121,
1579
+ 95,
1580
+ 118,
1581
+ 97,
1582
+ 117,
1583
+ 108,
1584
+ 116,
1585
+ 95,
1586
+ 118,
1587
+ 51
1588
+ ]
1589
+ },
1590
+ {
1591
+ "kind": "arg",
1592
+ "path": "dest_mint"
1593
+ }
1594
+ ]
1595
+ }
1596
+ },
1597
+ {
1598
+ "name": "dest_tree",
1599
+ "docs": [
1600
+ "Destination tree - where output commitments will be inserted"
1601
+ ],
1602
+ "writable": true,
1603
+ "pda": {
1604
+ "seeds": [
1605
+ {
1606
+ "kind": "const",
1607
+ "value": [
1608
+ 112,
1609
+ 114,
1610
+ 105,
1611
+ 118,
1612
+ 97,
1613
+ 99,
1614
+ 121,
1615
+ 95,
1616
+ 110,
1617
+ 111,
1618
+ 116,
1619
+ 101,
1620
+ 95,
1621
+ 116,
1622
+ 114,
1623
+ 101,
1624
+ 101,
1625
+ 95,
1626
+ 118,
1627
+ 51
1628
+ ]
1629
+ },
1630
+ {
1631
+ "kind": "arg",
1632
+ "path": "dest_mint"
1633
+ },
1634
+ {
1635
+ "kind": "arg",
1636
+ "path": "dest_tree_id"
1637
+ }
1638
+ ]
1639
+ }
1640
+ },
1641
+ {
1642
+ "name": "dest_vault_token_account",
1643
+ "docs": [
1644
+ "Destination vault's token account",
1645
+ "For native SOL pools (mint_address == Pubkey::default), may be unused — pass any mut account.",
1646
+ "For SPL pools, must be the canonical ATA of the dest vault for the dest mint."
1647
+ ],
1648
+ "writable": true
1649
+ },
1650
+ {
1651
+ "name": "dest_mint_account",
1652
+ "docs": [
1653
+ "Destination token mint — for native SOL pools, pass the WSOL (NATIVE_MINT) account.",
1654
+ "Must match effective_mint(dest_mint) so executor ATAs are created with WSOL."
1655
+ ]
1656
+ },
1657
+ {
1658
+ "name": "executor",
1659
+ "docs": [
1660
+ "Executor PDA - holds tokens during swap",
1661
+ "Seeds include source_mint, dest_mint, nullifier, AND relayer key to prevent front-running DoS",
1662
+ "Uses init_if_needed: for native SOL swaps the executor is pre-created by fund_native_source."
1663
+ ],
1664
+ "writable": true,
1665
+ "pda": {
1666
+ "seeds": [
1667
+ {
1668
+ "kind": "const",
1669
+ "value": [
1670
+ 115,
1671
+ 119,
1672
+ 97,
1673
+ 112,
1674
+ 95,
1675
+ 101,
1676
+ 120,
1677
+ 101,
1678
+ 99,
1679
+ 117,
1680
+ 116,
1681
+ 111,
1682
+ 114
1683
+ ]
1684
+ },
1685
+ {
1686
+ "kind": "arg",
1687
+ "path": "source_mint"
1688
+ },
1689
+ {
1690
+ "kind": "arg",
1691
+ "path": "dest_mint"
1692
+ },
1693
+ {
1694
+ "kind": "arg",
1695
+ "path": "input_nullifier_0"
1696
+ },
1697
+ {
1698
+ "kind": "account",
1699
+ "path": "relayer"
1700
+ }
1701
+ ]
1702
+ }
1703
+ },
1704
+ {
1705
+ "name": "executor_source_token",
1706
+ "docs": [
1707
+ "Executor's source token account (receives from source vault)",
1708
+ "Uses init_if_needed: pre-created by fund_native_source for native SOL swaps."
1709
+ ],
1710
+ "writable": true,
1711
+ "pda": {
1712
+ "seeds": [
1713
+ {
1714
+ "kind": "account",
1715
+ "path": "executor"
1716
+ },
1717
+ {
1718
+ "kind": "const",
1719
+ "value": [
1720
+ 6,
1721
+ 221,
1722
+ 246,
1723
+ 225,
1724
+ 215,
1725
+ 101,
1726
+ 161,
1727
+ 147,
1728
+ 217,
1729
+ 203,
1730
+ 225,
1731
+ 70,
1732
+ 206,
1733
+ 235,
1734
+ 121,
1735
+ 172,
1736
+ 28,
1737
+ 180,
1738
+ 133,
1739
+ 237,
1740
+ 95,
1741
+ 91,
1742
+ 55,
1743
+ 145,
1744
+ 58,
1745
+ 140,
1746
+ 245,
1747
+ 133,
1748
+ 126,
1749
+ 255,
1750
+ 0,
1751
+ 169
1752
+ ]
1753
+ },
1754
+ {
1755
+ "kind": "account",
1756
+ "path": "source_mint_account"
1757
+ }
1758
+ ],
1759
+ "program": {
1760
+ "kind": "const",
1761
+ "value": [
1762
+ 140,
1763
+ 151,
1764
+ 37,
1765
+ 143,
1766
+ 78,
1767
+ 36,
1768
+ 137,
1769
+ 241,
1770
+ 187,
1771
+ 61,
1772
+ 16,
1773
+ 41,
1774
+ 20,
1775
+ 142,
1776
+ 13,
1777
+ 131,
1778
+ 11,
1779
+ 90,
1780
+ 19,
1781
+ 153,
1782
+ 218,
1783
+ 255,
1784
+ 16,
1785
+ 132,
1786
+ 4,
1787
+ 142,
1788
+ 123,
1789
+ 216,
1790
+ 219,
1791
+ 233,
1792
+ 248,
1793
+ 89
1794
+ ]
1795
+ }
1796
+ }
1797
+ },
1798
+ {
1799
+ "name": "executor_dest_token",
1800
+ "docs": [
1801
+ "Executor's destination token account (receives swapped tokens)"
1802
+ ],
1803
+ "writable": true,
1804
+ "pda": {
1805
+ "seeds": [
1806
+ {
1807
+ "kind": "account",
1808
+ "path": "executor"
1809
+ },
1810
+ {
1811
+ "kind": "const",
1812
+ "value": [
1813
+ 6,
1814
+ 221,
1815
+ 246,
1816
+ 225,
1817
+ 215,
1818
+ 101,
1819
+ 161,
1820
+ 147,
1821
+ 217,
1822
+ 203,
1823
+ 225,
1824
+ 70,
1825
+ 206,
1826
+ 235,
1827
+ 121,
1828
+ 172,
1829
+ 28,
1830
+ 180,
1831
+ 133,
1832
+ 237,
1833
+ 95,
1834
+ 91,
1835
+ 55,
1836
+ 145,
1837
+ 58,
1838
+ 140,
1839
+ 245,
1840
+ 133,
1841
+ 126,
1842
+ 255,
1843
+ 0,
1844
+ 169
1845
+ ]
1846
+ },
1847
+ {
1848
+ "kind": "account",
1849
+ "path": "dest_mint_account"
1850
+ }
1851
+ ],
1852
+ "program": {
1853
+ "kind": "const",
1854
+ "value": [
1855
+ 140,
1856
+ 151,
1857
+ 37,
1858
+ 143,
1859
+ 78,
1860
+ 36,
1861
+ 137,
1862
+ 241,
1863
+ 187,
1864
+ 61,
1865
+ 16,
1866
+ 41,
1867
+ 20,
1868
+ 142,
1869
+ 13,
1870
+ 131,
1871
+ 11,
1872
+ 90,
1873
+ 19,
1874
+ 153,
1875
+ 218,
1876
+ 255,
1877
+ 16,
1878
+ 132,
1879
+ 4,
1880
+ 142,
1881
+ 123,
1882
+ 216,
1883
+ 219,
1884
+ 233,
1885
+ 248,
1886
+ 89
1887
+ ]
1888
+ }
1889
+ }
1890
+ },
1891
+ {
1892
+ "name": "relayer",
1893
+ "docs": [
1894
+ "Relayer who submits transaction (pays rent, receives fee)"
1895
+ ],
1896
+ "writable": true,
1897
+ "signer": true
1898
+ },
1899
+ {
1900
+ "name": "relayer_token_account",
1901
+ "docs": [
1902
+ "Relayer's token account for fees (dest token)"
1903
+ ],
1904
+ "writable": true
1905
+ },
1906
+ {
1907
+ "name": "swap_program",
1908
+ "docs": [
1909
+ "Raydium Swap program (CPMM or AMM)"
1910
+ ]
1911
+ },
1912
+ {
1913
+ "name": "jupiter_event_authority",
1914
+ "docs": [
1915
+ "Jupiter Event Authority (required for Jupiter V6 swaps)"
1916
+ ]
1917
+ },
1918
+ {
1919
+ "name": "token_program",
1920
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1921
+ },
1922
+ {
1923
+ "name": "system_program",
1924
+ "address": "11111111111111111111111111111111"
1925
+ },
1926
+ {
1927
+ "name": "associated_token_program",
1928
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1929
+ }
1930
+ ],
1931
+ "args": [
1932
+ {
1933
+ "name": "source_tree_id",
1934
+ "type": "u16"
1935
+ },
1936
+ {
1937
+ "name": "source_mint",
1938
+ "type": "pubkey"
1939
+ },
1940
+ {
1941
+ "name": "input_nullifier_0",
1942
+ "type": {
1943
+ "array": [
1944
+ "u8",
1945
+ 32
1946
+ ]
1947
+ }
1948
+ },
1949
+ {
1950
+ "name": "input_nullifier_1",
1951
+ "type": {
1952
+ "array": [
1953
+ "u8",
1954
+ 32
1955
+ ]
1956
+ }
1957
+ },
1958
+ {
1959
+ "name": "dest_tree_id",
1960
+ "type": "u16"
1961
+ },
1962
+ {
1963
+ "name": "dest_mint",
1964
+ "type": "pubkey"
1965
+ },
1966
+ {
1967
+ "name": "proof",
1968
+ "type": {
1969
+ "defined": {
1970
+ "name": "SwapProof"
1971
+ }
1972
+ }
1973
+ },
1974
+ {
1975
+ "name": "source_root",
1976
+ "type": {
1977
+ "array": [
1978
+ "u8",
1979
+ 32
1980
+ ]
1981
+ }
1982
+ },
1983
+ {
1984
+ "name": "output_commitment_0",
1985
+ "type": {
1986
+ "array": [
1987
+ "u8",
1988
+ 32
1989
+ ]
1990
+ }
1991
+ },
1992
+ {
1993
+ "name": "output_commitment_1",
1994
+ "type": {
1995
+ "array": [
1996
+ "u8",
1997
+ 32
1998
+ ]
1999
+ }
2000
+ },
2001
+ {
2002
+ "name": "swap_params",
2003
+ "type": {
2004
+ "defined": {
2005
+ "name": "SwapParams"
2006
+ }
2007
+ }
2008
+ },
2009
+ {
2010
+ "name": "swap_amount",
2011
+ "type": "u64"
2012
+ },
2013
+ {
2014
+ "name": "swap_data",
2015
+ "type": "bytes"
2016
+ },
2017
+ {
2018
+ "name": "ext_data",
2019
+ "type": {
2020
+ "defined": {
2021
+ "name": "ExtData"
2022
+ }
2023
+ }
2024
+ }
2025
+ ]
2026
+ },
2027
+ {
2028
+ "name": "update_global_config",
2029
+ "discriminator": [
2030
+ 164,
2031
+ 84,
2032
+ 130,
2033
+ 189,
2034
+ 111,
2035
+ 58,
2036
+ 250,
2037
+ 200
2038
+ ],
2039
+ "accounts": [
2040
+ {
2041
+ "name": "global_config",
2042
+ "writable": true,
2043
+ "pda": {
2044
+ "seeds": [
2045
+ {
2046
+ "kind": "const",
2047
+ "value": [
2048
+ 103,
2049
+ 108,
2050
+ 111,
2051
+ 98,
2052
+ 97,
2053
+ 108,
2054
+ 95,
2055
+ 99,
2056
+ 111,
2057
+ 110,
2058
+ 102,
2059
+ 105,
2060
+ 103,
2061
+ 95,
2062
+ 118,
2063
+ 49
2064
+ ]
2065
+ }
2066
+ ]
2067
+ }
2068
+ },
2069
+ {
2070
+ "name": "admin",
2071
+ "docs": [
2072
+ "has_one = admin ensures this matches global_config.admin."
2073
+ ],
2074
+ "signer": true,
2075
+ "relations": [
2076
+ "global_config"
2077
+ ]
2078
+ }
2079
+ ],
2080
+ "args": []
2081
+ },
2082
+ {
2083
+ "name": "update_pool_config",
2084
+ "discriminator": [
2085
+ 68,
2086
+ 236,
2087
+ 203,
2088
+ 122,
2089
+ 179,
2090
+ 62,
2091
+ 234,
2092
+ 252
2093
+ ],
2094
+ "accounts": [
2095
+ {
2096
+ "name": "config",
2097
+ "writable": true,
2098
+ "pda": {
2099
+ "seeds": [
2100
+ {
2101
+ "kind": "const",
2102
+ "value": [
2103
+ 112,
2104
+ 114,
2105
+ 105,
2106
+ 118,
2107
+ 97,
2108
+ 99,
2109
+ 121,
2110
+ 95,
2111
+ 99,
2112
+ 111,
2113
+ 110,
2114
+ 102,
2115
+ 105,
2116
+ 103,
2117
+ 95,
2118
+ 118,
2119
+ 51
2120
+ ]
2121
+ },
2122
+ {
2123
+ "kind": "arg",
2124
+ "path": "mint_address"
2125
+ }
2126
+ ]
2127
+ }
2128
+ },
2129
+ {
2130
+ "name": "admin",
2131
+ "signer": true,
2132
+ "relations": [
2133
+ "config"
2134
+ ]
2135
+ }
2136
+ ],
2137
+ "args": [
2138
+ {
2139
+ "name": "_mint_address",
2140
+ "type": "pubkey"
2141
+ },
2142
+ {
2143
+ "name": "min_deposit_amount",
2144
+ "type": {
2145
+ "option": "u64"
2146
+ }
2147
+ },
2148
+ {
2149
+ "name": "max_deposit_amount",
2150
+ "type": {
2151
+ "option": "u64"
2152
+ }
2153
+ },
2154
+ {
2155
+ "name": "min_withdraw_amount",
2156
+ "type": {
2157
+ "option": "u64"
2158
+ }
2159
+ },
2160
+ {
2161
+ "name": "max_withdraw_amount",
2162
+ "type": {
2163
+ "option": "u64"
2164
+ }
2165
+ },
2166
+ {
2167
+ "name": "fee_bps",
2168
+ "type": {
2169
+ "option": "u16"
2170
+ }
2171
+ },
2172
+ {
2173
+ "name": "min_withdrawal_fee",
2174
+ "type": {
2175
+ "option": "u64"
2176
+ }
2177
+ },
2178
+ {
2179
+ "name": "fee_error_margin_bps",
2180
+ "type": {
2181
+ "option": "u16"
2182
+ }
2183
+ },
2184
+ {
2185
+ "name": "min_swap_fee",
2186
+ "type": {
2187
+ "option": "u64"
2188
+ }
2189
+ },
2190
+ {
2191
+ "name": "swap_fee_bps",
2192
+ "type": {
2193
+ "option": "u16"
2194
+ }
2195
+ }
2196
+ ]
2197
+ }
2198
+ ],
2199
+ "accounts": [
2200
+ {
2201
+ "name": "GlobalConfig",
2202
+ "discriminator": [
2203
+ 149,
2204
+ 8,
2205
+ 156,
2206
+ 202,
2207
+ 160,
2208
+ 252,
2209
+ 176,
2210
+ 217
2211
+ ]
2212
+ },
2213
+ {
2214
+ "name": "MerkleTreeAccount",
2215
+ "discriminator": [
2216
+ 147,
2217
+ 200,
2218
+ 34,
2219
+ 248,
2220
+ 131,
2221
+ 187,
2222
+ 248,
2223
+ 253
2224
+ ]
2225
+ },
2226
+ {
2227
+ "name": "NullifierMarker",
2228
+ "discriminator": [
2229
+ 160,
2230
+ 124,
2231
+ 83,
2232
+ 42,
2233
+ 185,
2234
+ 14,
2235
+ 141,
2236
+ 101
2237
+ ]
2238
+ },
2239
+ {
2240
+ "name": "NullifierSet",
2241
+ "discriminator": [
2242
+ 251,
2243
+ 219,
2244
+ 17,
2245
+ 100,
2246
+ 208,
2247
+ 102,
2248
+ 127,
2249
+ 25
2250
+ ]
2251
+ },
2252
+ {
2253
+ "name": "PrivacyConfig",
2254
+ "discriminator": [
2255
+ 165,
2256
+ 149,
2257
+ 218,
2258
+ 209,
2259
+ 148,
2260
+ 237,
2261
+ 242,
2262
+ 159
2263
+ ]
2264
+ },
2265
+ {
2266
+ "name": "SwapExecutor",
2267
+ "discriminator": [
2268
+ 28,
2269
+ 237,
2270
+ 82,
2271
+ 118,
2272
+ 158,
2273
+ 162,
2274
+ 39,
2275
+ 225
2276
+ ]
2277
+ },
2278
+ {
2279
+ "name": "Vault",
2280
+ "discriminator": [
2281
+ 211,
2282
+ 8,
2283
+ 232,
2284
+ 43,
2285
+ 2,
2286
+ 152,
2287
+ 117,
2288
+ 119
2289
+ ]
2290
+ }
2291
+ ],
2292
+ "events": [
2293
+ {
2294
+ "name": "CommitmentEvent",
2295
+ "discriminator": [
2296
+ 89,
2297
+ 205,
2298
+ 140,
2299
+ 111,
2300
+ 36,
2301
+ 129,
2302
+ 217,
2303
+ 125
2304
+ ]
2305
+ },
2306
+ {
2307
+ "name": "NullifierSpent",
2308
+ "discriminator": [
2309
+ 166,
2310
+ 111,
2311
+ 130,
2312
+ 54,
2313
+ 212,
2314
+ 115,
2315
+ 152,
2316
+ 215
2317
+ ]
2318
+ },
2319
+ {
2320
+ "name": "SwapExecutedEvent",
2321
+ "discriminator": [
2322
+ 183,
2323
+ 28,
2324
+ 219,
2325
+ 210,
2326
+ 164,
2327
+ 184,
2328
+ 62,
2329
+ 12
2330
+ ]
2331
+ }
2332
+ ],
2333
+ "errors": [
2334
+ {
2335
+ "code": 6000,
2336
+ "name": "Paused",
2337
+ "msg": "Pool is paused"
2338
+ },
2339
+ {
2340
+ "code": 6001,
2341
+ "name": "NoDenoms",
2342
+ "msg": "No denominations configured"
2343
+ },
2344
+ {
2345
+ "code": 6002,
2346
+ "name": "TooManyDenoms",
2347
+ "msg": "Too many denominations"
2348
+ },
2349
+ {
2350
+ "code": 6003,
2351
+ "name": "BadDenomIndex",
2352
+ "msg": "Bad denomination index"
2353
+ },
2354
+ {
2355
+ "code": 6004,
2356
+ "name": "MathOverflow",
2357
+ "msg": "Math overflow"
2358
+ },
2359
+ {
2360
+ "code": 6005,
2361
+ "name": "NullifierAlreadyUsed",
2362
+ "msg": "Nullifier already used"
2363
+ },
2364
+ {
2365
+ "code": 6006,
2366
+ "name": "NullifierTableFull",
2367
+ "msg": "Nullifier table is full"
2368
+ },
2369
+ {
2370
+ "code": 6007,
2371
+ "name": "UnknownRoot",
2372
+ "msg": "Unknown root"
2373
+ },
2374
+ {
2375
+ "code": 6008,
2376
+ "name": "RelayerNotAllowed",
2377
+ "msg": "Relayer not allowed"
2378
+ },
2379
+ {
2380
+ "code": 6009,
2381
+ "name": "InsufficientVaultBalance",
2382
+ "msg": "Vault balance too low"
2383
+ },
2384
+ {
2385
+ "code": 6010,
2386
+ "name": "TooManyRelayers",
2387
+ "msg": "Too many relayers"
2388
+ },
2389
+ {
2390
+ "code": 6011,
2391
+ "name": "InvalidProof",
2392
+ "msg": "Invalid proof encoding"
2393
+ },
2394
+ {
2395
+ "code": 6012,
2396
+ "name": "VerifyFailed",
2397
+ "msg": "Groth16 verification failed"
2398
+ },
2399
+ {
2400
+ "code": 6013,
2401
+ "name": "MerkleTreeFull",
2402
+ "msg": "Merkle tree is full - use a different tree_id or add a new tree with add_merkle_tree"
2403
+ },
2404
+ {
2405
+ "code": 6014,
2406
+ "name": "MerkleHashFailed",
2407
+ "msg": "Merkle hash failed"
2408
+ },
2409
+ {
2410
+ "code": 6015,
2411
+ "name": "InvalidExtData",
2412
+ "msg": "Invalid external data hash"
2413
+ },
2414
+ {
2415
+ "code": 6016,
2416
+ "name": "RecipientMismatch",
2417
+ "msg": "Recipient mismatch"
2418
+ },
2419
+ {
2420
+ "code": 6017,
2421
+ "name": "InvalidMintAddress",
2422
+ "msg": "Invalid mint address"
2423
+ },
2424
+ {
2425
+ "code": 6018,
2426
+ "name": "ExcessiveFee",
2427
+ "msg": "Excessive fee"
2428
+ },
2429
+ {
2430
+ "code": 6019,
2431
+ "name": "InsufficientFee",
2432
+ "msg": "Fee below minimum required for withdrawal"
2433
+ },
2434
+ {
2435
+ "code": 6020,
2436
+ "name": "ArithmeticOverflow",
2437
+ "msg": "Arithmetic overflow/underflow occurred"
2438
+ },
2439
+ {
2440
+ "code": 6021,
2441
+ "name": "InsufficientFundsForWithdrawal",
2442
+ "msg": "Insufficient funds for withdrawal (including rent exemption)"
2443
+ },
2444
+ {
2445
+ "code": 6022,
2446
+ "name": "InsufficientFundsForFee",
2447
+ "msg": "Insufficient funds for fee payment"
2448
+ },
2449
+ {
2450
+ "code": 6023,
2451
+ "name": "InvalidPublicAmount",
2452
+ "msg": "Invalid public amount data"
2453
+ },
2454
+ {
2455
+ "code": 6024,
2456
+ "name": "InvalidFeeAmount",
2457
+ "msg": "Invalid fee amount"
2458
+ },
2459
+ {
2460
+ "code": 6025,
2461
+ "name": "DuplicateNullifiers",
2462
+ "msg": "Duplicate nullifiers detected"
2463
+ },
2464
+ {
2465
+ "code": 6026,
2466
+ "name": "DuplicateCommitments",
2467
+ "msg": "Duplicate output commitments detected"
2468
+ },
2469
+ {
2470
+ "code": 6027,
2471
+ "name": "MissingTokenAccount",
2472
+ "msg": "Token account required for SPL token operations"
2473
+ },
2474
+ {
2475
+ "code": 6028,
2476
+ "name": "MissingTokenProgram",
2477
+ "msg": "Token program required for SPL token operations"
2478
+ },
2479
+ {
2480
+ "code": 6029,
2481
+ "name": "InvalidTokenAuthority",
2482
+ "msg": "Invalid token account authority"
2483
+ },
2484
+ {
2485
+ "code": 6030,
2486
+ "name": "RelayerMismatch",
2487
+ "msg": "Relayer account does not match ext_data.relayer"
2488
+ },
2489
+ {
2490
+ "code": 6031,
2491
+ "name": "RelayerTokenAccountMismatch",
2492
+ "msg": "Relayer token account not owned by ext_data.relayer"
2493
+ },
2494
+ {
2495
+ "code": 6032,
2496
+ "name": "RecipientTokenAccountMismatch",
2497
+ "msg": "Recipient token account not owned by ext_data.recipient"
2498
+ },
2499
+ {
2500
+ "code": 6033,
2501
+ "name": "DepositorTokenAccountMismatch",
2502
+ "msg": "Depositor token account not owned/delegated to relayer"
2503
+ },
2504
+ {
2505
+ "code": 6034,
2506
+ "name": "InvalidPrivateTransferFee",
2507
+ "msg": "Private transfer (public_amount == 0) must have fee == 0 and refund == 0"
2508
+ },
2509
+ {
2510
+ "code": 6035,
2511
+ "name": "DepositBelowMinimum",
2512
+ "msg": "Deposit amount below pool minimum"
2513
+ },
2514
+ {
2515
+ "code": 6036,
2516
+ "name": "DepositLimitExceeded",
2517
+ "msg": "Deposit amount exceeds pool maximum"
2518
+ },
2519
+ {
2520
+ "code": 6037,
2521
+ "name": "WithdrawalBelowMinimum",
2522
+ "msg": "Withdrawal amount below pool minimum"
2523
+ },
2524
+ {
2525
+ "code": 6038,
2526
+ "name": "WithdrawalLimitExceeded",
2527
+ "msg": "Withdrawal amount exceeds pool maximum"
2528
+ },
2529
+ {
2530
+ "code": 6039,
2531
+ "name": "InvalidPoolConfigRange",
2532
+ "msg": "Invalid PoolConfig range (min > max)"
2533
+ },
2534
+ {
2535
+ "code": 6040,
2536
+ "name": "ExcessiveFeeBps",
2537
+ "msg": "Fee basis points exceeds maximum (100 = 1%)"
2538
+ },
2539
+ {
2540
+ "code": 6041,
2541
+ "name": "ExcessiveFeeMargin",
2542
+ "msg": "Fee error margin exceeds maximum (5000 = 50%)"
2543
+ },
2544
+ {
2545
+ "code": 6042,
2546
+ "name": "UnauthorizedAdmin",
2547
+ "msg": "Only authorized admin can initialize"
2548
+ },
2549
+ {
2550
+ "code": 6043,
2551
+ "name": "Unauthorized",
2552
+ "msg": "Unauthorized: only admin or relayers can perform this action"
2553
+ },
2554
+ {
2555
+ "code": 6044,
2556
+ "name": "InvalidTreeId",
2557
+ "msg": "Invalid tree_id (tree does not exist or exceeds num_trees)"
2558
+ },
2559
+ {
2560
+ "code": 6045,
2561
+ "name": "TooManyTrees",
2562
+ "msg": "Maximum number of Merkle trees reached for this pool"
2563
+ },
2564
+ {
2565
+ "code": 6046,
2566
+ "name": "InvalidNullifiersForDeposit",
2567
+ "msg": "Deposits must use zero nullifiers (no notes consumed)"
2568
+ },
2569
+ {
2570
+ "code": 6047,
2571
+ "name": "ZeroNullifier",
2572
+ "msg": "Nullifier cannot be zero for withdrawals/transfers"
2573
+ },
2574
+ {
2575
+ "code": 6048,
2576
+ "name": "ZeroCommitment",
2577
+ "msg": "Output commitment cannot be zero"
2578
+ },
2579
+ {
2580
+ "code": 6049,
2581
+ "name": "InvalidTokenAccountOwner",
2582
+ "msg": "Token account must be owned by SPL Token Program"
2583
+ },
2584
+ {
2585
+ "code": 6050,
2586
+ "name": "VaultTokenAccountNotATA",
2587
+ "msg": "Vault token account must be the canonical Associated Token Account"
2588
+ },
2589
+ {
2590
+ "code": 6051,
2591
+ "name": "WithdrawalTooSmallForMinFee",
2592
+ "msg": "Withdrawal amount too small: max fee based on fee_bps would be less than min_withdrawal_fee"
2593
+ },
2594
+ {
2595
+ "code": 6052,
2596
+ "name": "InvalidNullifierMarkerForDeposit",
2597
+ "msg": "Nullifier marker account does not correspond to zero nullifier for deposits"
2598
+ },
2599
+ {
2600
+ "code": 6053,
2601
+ "name": "InsufficientDelegation",
2602
+ "msg": "Token account delegation amount insufficient for deposit"
2603
+ },
2604
+ {
2605
+ "code": 6054,
2606
+ "name": "InvalidSwapProgram",
2607
+ "msg": "Invalid swap program: must be Raydium CPMM or AMM"
2608
+ },
2609
+ {
2610
+ "code": 6055,
2611
+ "name": "InvalidRemainingAccounts",
2612
+ "msg": "Invalid remaining accounts: wrong count or ownership"
2613
+ },
2614
+ {
2615
+ "code": 6056,
2616
+ "name": "JupiterInsufficientAccounts",
2617
+ "msg": "Jupiter swap requires additional routing accounts"
2618
+ },
2619
+ {
2620
+ "code": 6057,
2621
+ "name": "JupiterInvalidInstruction",
2622
+ "msg": "Jupiter instruction data invalid or unsupported version"
2623
+ },
2624
+ {
2625
+ "code": 6058,
2626
+ "name": "InvalidSwapParams",
2627
+ "msg": "Swap params mints do not match instruction mints"
2628
+ },
2629
+ {
2630
+ "code": 6059,
2631
+ "name": "MissingTransactSwapInstruction",
2632
+ "msg": "fund_native_source must be immediately followed by transact_swap in the same transaction"
2633
+ },
2634
+ {
2635
+ "code": 6060,
2636
+ "name": "DeadlineExpired",
2637
+ "msg": "Transaction deadline has expired"
2638
+ }
2639
+ ],
2640
+ "types": [
2641
+ {
2642
+ "name": "CommitmentEvent",
2643
+ "type": {
2644
+ "kind": "struct",
2645
+ "fields": [
2646
+ {
2647
+ "name": "commitment",
2648
+ "type": {
2649
+ "array": [
2650
+ "u8",
2651
+ 32
2652
+ ]
2653
+ }
2654
+ },
2655
+ {
2656
+ "name": "leaf_index",
2657
+ "type": "u64"
2658
+ },
2659
+ {
2660
+ "name": "new_root",
2661
+ "type": {
2662
+ "array": [
2663
+ "u8",
2664
+ 32
2665
+ ]
2666
+ }
2667
+ },
2668
+ {
2669
+ "name": "timestamp",
2670
+ "type": "i64"
2671
+ },
2672
+ {
2673
+ "name": "mint_address",
2674
+ "type": "pubkey"
2675
+ },
2676
+ {
2677
+ "name": "tree_id",
2678
+ "type": "u16"
2679
+ }
2680
+ ]
2681
+ }
2682
+ },
2683
+ {
2684
+ "name": "ExtData",
2685
+ "docs": [
2686
+ "External data that gets hashed into ext_data_hash",
2687
+ "These are public parameters that affect financial flows"
2688
+ ],
2689
+ "type": {
2690
+ "kind": "struct",
2691
+ "fields": [
2692
+ {
2693
+ "name": "recipient",
2694
+ "docs": [
2695
+ "Who receives withdrawal"
2696
+ ],
2697
+ "type": "pubkey"
2698
+ },
2699
+ {
2700
+ "name": "relayer",
2701
+ "docs": [
2702
+ "Who submits tx (gets fee)"
2703
+ ],
2704
+ "type": "pubkey"
2705
+ },
2706
+ {
2707
+ "name": "fee",
2708
+ "docs": [
2709
+ "Fee to relayer in lamports"
2710
+ ],
2711
+ "type": "u64"
2712
+ },
2713
+ {
2714
+ "name": "refund",
2715
+ "docs": [
2716
+ "Refund to user in lamports"
2717
+ ],
2718
+ "type": "u64"
2719
+ }
2720
+ ]
2721
+ }
2722
+ },
2723
+ {
2724
+ "name": "GlobalConfig",
2725
+ "type": {
2726
+ "kind": "struct",
2727
+ "fields": [
2728
+ {
2729
+ "name": "bump",
2730
+ "docs": [
2731
+ "PDA bump"
2732
+ ],
2733
+ "type": "u8"
2734
+ },
2735
+ {
2736
+ "name": "admin",
2737
+ "docs": [
2738
+ "Admin who can configure global settings"
2739
+ ],
2740
+ "type": "pubkey"
2741
+ }
2742
+ ]
2743
+ }
2744
+ },
2745
+ {
2746
+ "name": "MerkleTreeAccount",
2747
+ "docs": [
2748
+ "Layout tests verify 9107 bytes total with 1-byte alignment. Breaking this corrupts all accounts."
2749
+ ],
2750
+ "serialization": "bytemuckunsafe",
2751
+ "repr": {
2752
+ "kind": "rust",
2753
+ "packed": true
2754
+ },
2755
+ "type": {
2756
+ "kind": "struct",
2757
+ "fields": [
2758
+ {
2759
+ "name": "authority",
2760
+ "docs": [
2761
+ "Authority allowed to manage the tree (config admin)"
2762
+ ],
2763
+ "type": "pubkey"
2764
+ },
2765
+ {
2766
+ "name": "height",
2767
+ "docs": [
2768
+ "Tree height (number of levels)"
2769
+ ],
2770
+ "type": "u8"
2771
+ },
2772
+ {
2773
+ "name": "root_history_size",
2774
+ "docs": [
2775
+ "How many roots we track"
2776
+ ],
2777
+ "type": "u16"
2778
+ },
2779
+ {
2780
+ "name": "next_index",
2781
+ "docs": [
2782
+ "Next leaf index"
2783
+ ],
2784
+ "type": "u64"
2785
+ },
2786
+ {
2787
+ "name": "root_index",
2788
+ "docs": [
2789
+ "Index into root_history for the current root"
2790
+ ],
2791
+ "type": "u64"
2792
+ },
2793
+ {
2794
+ "name": "root",
2795
+ "docs": [
2796
+ "Current root"
2797
+ ],
2798
+ "type": {
2799
+ "array": [
2800
+ "u8",
2801
+ 32
2802
+ ]
2803
+ }
2804
+ },
2805
+ {
2806
+ "name": "subtrees",
2807
+ "docs": [
2808
+ "Cached subtree values for each level"
2809
+ ],
2810
+ "type": {
2811
+ "array": [
2812
+ {
2813
+ "array": [
2814
+ "u8",
2815
+ 32
2816
+ ]
2817
+ },
2818
+ 22
2819
+ ]
2820
+ }
2821
+ },
2822
+ {
2823
+ "name": "root_history",
2824
+ "docs": [
2825
+ "Circular buffer of recent roots"
2826
+ ],
2827
+ "type": {
2828
+ "array": [
2829
+ {
2830
+ "array": [
2831
+ "u8",
2832
+ 32
2833
+ ]
2834
+ },
2835
+ 256
2836
+ ]
2837
+ }
2838
+ }
2839
+ ]
2840
+ }
2841
+ },
2842
+ {
2843
+ "name": "NullifierMarker",
2844
+ "docs": [
2845
+ "Per-nullifier PDA marker (created when nullifier is spent).",
2846
+ "The nullifier itself is encoded in the PDA seeds; metadata is emitted via events."
2847
+ ],
2848
+ "type": {
2849
+ "kind": "struct",
2850
+ "fields": [
2851
+ {
2852
+ "name": "is_spent",
2853
+ "type": "bool"
2854
+ },
2855
+ {
2856
+ "name": "bump",
2857
+ "type": "u8"
2858
+ }
2859
+ ]
2860
+ }
2861
+ },
2862
+ {
2863
+ "name": "NullifierSet",
2864
+ "docs": [
2865
+ "Nullifier set metadata (actual nullifiers stored as individual PDAs)."
2866
+ ],
2867
+ "type": {
2868
+ "kind": "struct",
2869
+ "fields": [
2870
+ {
2871
+ "name": "bump",
2872
+ "type": "u8"
2873
+ },
2874
+ {
2875
+ "name": "count",
2876
+ "type": "u32"
2877
+ }
2878
+ ]
2879
+ }
2880
+ },
2881
+ {
2882
+ "name": "NullifierSpent",
2883
+ "type": {
2884
+ "kind": "struct",
2885
+ "fields": [
2886
+ {
2887
+ "name": "nullifier",
2888
+ "type": {
2889
+ "array": [
2890
+ "u8",
2891
+ 32
2892
+ ]
2893
+ }
2894
+ },
2895
+ {
2896
+ "name": "timestamp",
2897
+ "type": "i64"
2898
+ },
2899
+ {
2900
+ "name": "mint_address",
2901
+ "type": "pubkey"
2902
+ },
2903
+ {
2904
+ "name": "tree_id",
2905
+ "type": "u16"
2906
+ }
2907
+ ]
2908
+ }
2909
+ },
2910
+ {
2911
+ "name": "PrivacyConfig",
2912
+ "type": {
2913
+ "kind": "struct",
2914
+ "fields": [
2915
+ {
2916
+ "name": "bump",
2917
+ "docs": [
2918
+ "PDA bump for this config"
2919
+ ],
2920
+ "type": "u8"
2921
+ },
2922
+ {
2923
+ "name": "vault_bump",
2924
+ "docs": [
2925
+ "PDA bump for vault"
2926
+ ],
2927
+ "type": "u8"
2928
+ },
2929
+ {
2930
+ "name": "admin",
2931
+ "docs": [
2932
+ "Admin who can configure pool and relayers"
2933
+ ],
2934
+ "type": "pubkey"
2935
+ },
2936
+ {
2937
+ "name": "fee_bps",
2938
+ "docs": [
2939
+ "Fee in basis points (0–10_000) for withdrawals"
2940
+ ],
2941
+ "type": "u16"
2942
+ },
2943
+ {
2944
+ "name": "min_withdrawal_fee",
2945
+ "docs": [
2946
+ "Minimum fee for withdrawals (in lamports) to ensure relayer compensation"
2947
+ ],
2948
+ "type": "u64"
2949
+ },
2950
+ {
2951
+ "name": "fee_error_margin_bps",
2952
+ "docs": [
2953
+ "Fee error margin in basis points (e.g., 500 = 5%)",
2954
+ "Allows fee variance to prevent timing attacks where identical fees",
2955
+ "could correlate deposits/withdrawals"
2956
+ ],
2957
+ "type": "u16"
2958
+ },
2959
+ {
2960
+ "name": "total_tvl",
2961
+ "docs": [
2962
+ "Total value locked (all deposits combined)"
2963
+ ],
2964
+ "type": "u64"
2965
+ },
2966
+ {
2967
+ "name": "mint_address",
2968
+ "docs": [
2969
+ "Token mint address (for now: SOL, future: multi-token support)"
2970
+ ],
2971
+ "type": "pubkey"
2972
+ },
2973
+ {
2974
+ "name": "min_deposit_amount",
2975
+ "docs": [
2976
+ "Minimum amount allowed per deposit (in lamports/token units)"
2977
+ ],
2978
+ "type": "u64"
2979
+ },
2980
+ {
2981
+ "name": "max_deposit_amount",
2982
+ "docs": [
2983
+ "Maximum amount allowed per deposit (in lamports/token units)"
2984
+ ],
2985
+ "type": "u64"
2986
+ },
2987
+ {
2988
+ "name": "min_withdraw_amount",
2989
+ "docs": [
2990
+ "Minimum amount allowed per withdrawal (in lamports/token units)"
2991
+ ],
2992
+ "type": "u64"
2993
+ },
2994
+ {
2995
+ "name": "max_withdraw_amount",
2996
+ "docs": [
2997
+ "Maximum amount allowed per withdrawal (in lamports/token units)"
2998
+ ],
2999
+ "type": "u64"
3000
+ },
3001
+ {
3002
+ "name": "num_relayers",
3003
+ "docs": [
3004
+ "Relayer registry"
3005
+ ],
3006
+ "type": "u8"
3007
+ },
3008
+ {
3009
+ "name": "relayers",
3010
+ "type": {
3011
+ "array": [
3012
+ "pubkey",
3013
+ 16
3014
+ ]
3015
+ }
3016
+ },
3017
+ {
3018
+ "name": "num_trees",
3019
+ "docs": [
3020
+ "Multi-tree support: number of active Merkle trees"
3021
+ ],
3022
+ "type": "u16"
3023
+ },
3024
+ {
3025
+ "name": "next_tree_index",
3026
+ "docs": [
3027
+ "Suggested tree index for next deposit (round-robin)"
3028
+ ],
3029
+ "type": "u16"
3030
+ },
3031
+ {
3032
+ "name": "min_swap_fee",
3033
+ "docs": [
3034
+ "Minimum swap fee in destination token units (e.g., 100000 = 0.1 USDC)",
3035
+ "Ensures relayer compensation for swap transactions"
3036
+ ],
3037
+ "type": "u64"
3038
+ },
3039
+ {
3040
+ "name": "swap_fee_bps",
3041
+ "docs": [
3042
+ "Swap fee in basis points (0-10_000) of swap output amount",
3043
+ "Used with min_swap_fee: actual fee must be >= max(min_swap_fee, output * swap_fee_bps / 10000)"
3044
+ ],
3045
+ "type": "u16"
3046
+ }
3047
+ ]
3048
+ }
3049
+ },
3050
+ {
3051
+ "name": "SwapExecutedEvent",
3052
+ "type": {
3053
+ "kind": "struct",
3054
+ "fields": [
3055
+ {
3056
+ "name": "source_mint",
3057
+ "type": "pubkey"
3058
+ },
3059
+ {
3060
+ "name": "dest_mint",
3061
+ "type": "pubkey"
3062
+ },
3063
+ {
3064
+ "name": "source_tree_id",
3065
+ "type": "u16"
3066
+ },
3067
+ {
3068
+ "name": "dest_tree_id",
3069
+ "type": "u16"
3070
+ },
3071
+ {
3072
+ "name": "nullifiers",
3073
+ "type": {
3074
+ "array": [
3075
+ {
3076
+ "array": [
3077
+ "u8",
3078
+ 32
3079
+ ]
3080
+ },
3081
+ 2
3082
+ ]
3083
+ }
3084
+ },
3085
+ {
3086
+ "name": "commitments",
3087
+ "type": {
3088
+ "array": [
3089
+ {
3090
+ "array": [
3091
+ "u8",
3092
+ 32
3093
+ ]
3094
+ },
3095
+ 2
3096
+ ]
3097
+ }
3098
+ },
3099
+ {
3100
+ "name": "timestamp",
3101
+ "type": "i64"
3102
+ }
3103
+ ]
3104
+ }
3105
+ },
3106
+ {
3107
+ "name": "SwapExecutor",
3108
+ "docs": [
3109
+ "Ephemeral PDA that holds tokens during swap, created and closed atomically"
3110
+ ],
3111
+ "type": {
3112
+ "kind": "struct",
3113
+ "fields": [
3114
+ {
3115
+ "name": "source_mint",
3116
+ "type": "pubkey"
3117
+ },
3118
+ {
3119
+ "name": "dest_mint",
3120
+ "type": "pubkey"
3121
+ },
3122
+ {
3123
+ "name": "nullifier",
3124
+ "type": {
3125
+ "array": [
3126
+ "u8",
3127
+ 32
3128
+ ]
3129
+ }
3130
+ },
3131
+ {
3132
+ "name": "bump",
3133
+ "type": "u8"
3134
+ },
3135
+ {
3136
+ "name": "swap_amount",
3137
+ "docs": [
3138
+ "Swap amount stored by fund_native_source for validation in transact_swap.",
3139
+ "Zero when executor was created directly in transact_swap (relayer-float path)."
3140
+ ],
3141
+ "type": "u64"
3142
+ },
3143
+ {
3144
+ "name": "is_prefunded",
3145
+ "docs": [
3146
+ "1 when executor was pre-funded by fund_native_source (vault already debited).",
3147
+ "0 for the single-instruction relayer-float path (backward compatible)."
3148
+ ],
3149
+ "type": "u8"
3150
+ },
3151
+ {
3152
+ "name": "relayer",
3153
+ "docs": [
3154
+ "Relayer who created this executor — only they may call reclaim_stale_executor."
3155
+ ],
3156
+ "type": "pubkey"
3157
+ }
3158
+ ]
3159
+ }
3160
+ },
3161
+ {
3162
+ "name": "SwapParams",
3163
+ "docs": [
3164
+ "Swap parameters committed to in the ZK proof"
3165
+ ],
3166
+ "type": {
3167
+ "kind": "struct",
3168
+ "fields": [
3169
+ {
3170
+ "name": "min_amount_out",
3171
+ "type": "u64"
3172
+ },
3173
+ {
3174
+ "name": "deadline",
3175
+ "type": "i64"
3176
+ },
3177
+ {
3178
+ "name": "source_mint",
3179
+ "type": "pubkey"
3180
+ },
3181
+ {
3182
+ "name": "dest_mint",
3183
+ "type": "pubkey"
3184
+ },
3185
+ {
3186
+ "name": "dest_amount",
3187
+ "docs": [
3188
+ "Amount of destination tokens the user commits to receiving.",
3189
+ "Included in swapParamsHash — cryptographically binds the ZK circuit's",
3190
+ "destAmount to the on-chain vault deposit, preventing an attacker from",
3191
+ "encoding an inflated destination note while receiving a tiny swap output."
3192
+ ],
3193
+ "type": "u64"
3194
+ },
3195
+ {
3196
+ "name": "swap_data_hash",
3197
+ "docs": [
3198
+ "SHA-256 hash of the raw swap instruction data (swap_data).",
3199
+ "Binds the exact DEX instruction bytes into the ZK proof so the relayer",
3200
+ "cannot substitute different swap_data (e.g. 0% slippage) after the user",
3201
+ "has generated their proof. Set to [0u8;32] for CPMM/AMM swaps, which",
3202
+ "already enforce dex_min_out by direct instruction decoding."
3203
+ ],
3204
+ "type": {
3205
+ "array": [
3206
+ "u8",
3207
+ 32
3208
+ ]
3209
+ }
3210
+ }
3211
+ ]
3212
+ }
3213
+ },
3214
+ {
3215
+ "name": "SwapProof",
3216
+ "docs": [
3217
+ "Proof for swap transaction circuit (2-in-2-out cross-pool UTXO model)"
3218
+ ],
3219
+ "type": {
3220
+ "kind": "struct",
3221
+ "fields": [
3222
+ {
3223
+ "name": "proof_a",
3224
+ "type": {
3225
+ "array": [
3226
+ "u8",
3227
+ 64
3228
+ ]
3229
+ }
3230
+ },
3231
+ {
3232
+ "name": "proof_b",
3233
+ "type": {
3234
+ "array": [
3235
+ "u8",
3236
+ 128
3237
+ ]
3238
+ }
3239
+ },
3240
+ {
3241
+ "name": "proof_c",
3242
+ "type": {
3243
+ "array": [
3244
+ "u8",
3245
+ 64
3246
+ ]
3247
+ }
3248
+ }
3249
+ ]
3250
+ }
3251
+ },
3252
+ {
3253
+ "name": "TransactionProof",
3254
+ "docs": [
3255
+ "Proof for new UTXO transaction circuit (same structure, different VK)"
3256
+ ],
3257
+ "type": {
3258
+ "kind": "struct",
3259
+ "fields": [
3260
+ {
3261
+ "name": "proof_a",
3262
+ "type": {
3263
+ "array": [
3264
+ "u8",
3265
+ 64
3266
+ ]
3267
+ }
3268
+ },
3269
+ {
3270
+ "name": "proof_b",
3271
+ "type": {
3272
+ "array": [
3273
+ "u8",
3274
+ 128
3275
+ ]
3276
+ }
3277
+ },
3278
+ {
3279
+ "name": "proof_c",
3280
+ "type": {
3281
+ "array": [
3282
+ "u8",
3283
+ 64
3284
+ ]
3285
+ }
3286
+ }
3287
+ ]
3288
+ }
3289
+ },
3290
+ {
3291
+ "name": "Vault",
3292
+ "type": {
3293
+ "kind": "struct",
3294
+ "fields": [
3295
+ {
3296
+ "name": "bump",
3297
+ "docs": [
3298
+ "PDA bump for this vault"
3299
+ ],
3300
+ "type": "u8"
3301
+ }
3302
+ ]
3303
+ }
3304
+ }
3305
+ ]
3306
+ };
3307
+ exports.default = IDL_JSON;