@lightprotocol/compressed-token 0.17.1 → 0.17.2-alpha.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.
- package/dist/cjs/browser/index.cjs +1 -2834
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/node/index.cjs +1 -2834
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/types/index.d.ts +1839 -1840
- package/package.json +23 -19
- package/dist/es/browser/index.js +0 -2810
- package/dist/es/browser/index.js.map +0 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -1,1800 +1,14 @@
|
|
|
1
|
-
import { CompressedProof, ParsedTokenAccount,
|
|
1
|
+
import { PackedMerkleContext, CompressedProof, ParsedTokenAccount, InputTokenDataWithContext as InputTokenDataWithContext$1, Rpc } from '@lightprotocol/stateless.js';
|
|
2
2
|
import { PublicKey, AccountMeta, TransactionInstruction, Connection, Signer, ConfirmOptions, TransactionSignature, Keypair } from '@solana/web3.js';
|
|
3
|
-
import
|
|
3
|
+
import BN from 'bn.js';
|
|
4
|
+
import * as buffer_layout from 'buffer-layout';
|
|
5
|
+
import { Buffer as Buffer$1 } from 'buffer';
|
|
4
6
|
|
|
5
|
-
type
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{
|
|
10
|
-
name: 'createTokenPool';
|
|
11
|
-
docs: [
|
|
12
|
-
'This instruction creates a token pool for a given mint. Every spl mint',
|
|
13
|
-
'can have one token pool. When a token is compressed the tokens are',
|
|
14
|
-
'transferrred to the token pool, and their compressed equivalent is',
|
|
15
|
-
'minted into a Merkle tree.'
|
|
16
|
-
];
|
|
17
|
-
accounts: [
|
|
18
|
-
{
|
|
19
|
-
name: 'feePayer';
|
|
20
|
-
isMut: true;
|
|
21
|
-
isSigner: true;
|
|
22
|
-
docs: ['UNCHECKED: only pays fees.'];
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
name: 'tokenPoolPda';
|
|
26
|
-
isMut: true;
|
|
27
|
-
isSigner: false;
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: 'systemProgram';
|
|
31
|
-
isMut: false;
|
|
32
|
-
isSigner: false;
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'mint';
|
|
36
|
-
isMut: true;
|
|
37
|
-
isSigner: false;
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
name: 'tokenProgram';
|
|
41
|
-
isMut: false;
|
|
42
|
-
isSigner: false;
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
name: 'cpiAuthorityPda';
|
|
46
|
-
isMut: false;
|
|
47
|
-
isSigner: false;
|
|
48
|
-
}
|
|
49
|
-
];
|
|
50
|
-
args: [];
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: 'mintTo';
|
|
54
|
-
docs: [
|
|
55
|
-
'Mints tokens from an spl token mint to a list of compressed accounts.',
|
|
56
|
-
'Minted tokens are transferred to a pool account owned by the compressed',
|
|
57
|
-
'token program. The instruction creates one compressed output account for',
|
|
58
|
-
'every amount and pubkey input pair. A constant amount of lamports can be',
|
|
59
|
-
'transferred to each output account to enable. A use case to add lamports',
|
|
60
|
-
'to a compressed token account is to prevent spam. This is the only way',
|
|
61
|
-
'to add lamports to a compressed token account.'
|
|
62
|
-
];
|
|
63
|
-
accounts: [
|
|
64
|
-
{
|
|
65
|
-
name: 'feePayer';
|
|
66
|
-
isMut: true;
|
|
67
|
-
isSigner: true;
|
|
68
|
-
docs: ['UNCHECKED: only pays fees.'];
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: 'authority';
|
|
72
|
-
isMut: false;
|
|
73
|
-
isSigner: true;
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
name: 'cpiAuthorityPda';
|
|
77
|
-
isMut: false;
|
|
78
|
-
isSigner: false;
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
name: 'mint';
|
|
82
|
-
isMut: true;
|
|
83
|
-
isSigner: false;
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: 'tokenPoolPda';
|
|
87
|
-
isMut: true;
|
|
88
|
-
isSigner: false;
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name: 'tokenProgram';
|
|
92
|
-
isMut: false;
|
|
93
|
-
isSigner: false;
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
name: 'lightSystemProgram';
|
|
97
|
-
isMut: false;
|
|
98
|
-
isSigner: false;
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
name: 'registeredProgramPda';
|
|
102
|
-
isMut: false;
|
|
103
|
-
isSigner: false;
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
name: 'noopProgram';
|
|
107
|
-
isMut: false;
|
|
108
|
-
isSigner: false;
|
|
109
|
-
docs: ['programs'];
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
name: 'accountCompressionAuthority';
|
|
113
|
-
isMut: false;
|
|
114
|
-
isSigner: false;
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
name: 'accountCompressionProgram';
|
|
118
|
-
isMut: false;
|
|
119
|
-
isSigner: false;
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
name: 'merkleTree';
|
|
123
|
-
isMut: true;
|
|
124
|
-
isSigner: false;
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
name: 'selfProgram';
|
|
128
|
-
isMut: false;
|
|
129
|
-
isSigner: false;
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
name: 'systemProgram';
|
|
133
|
-
isMut: false;
|
|
134
|
-
isSigner: false;
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
name: 'solPoolPda';
|
|
138
|
-
isMut: true;
|
|
139
|
-
isSigner: false;
|
|
140
|
-
isOptional: true;
|
|
141
|
-
}
|
|
142
|
-
];
|
|
143
|
-
args: [
|
|
144
|
-
{
|
|
145
|
-
name: 'publicKeys';
|
|
146
|
-
type: {
|
|
147
|
-
vec: 'publicKey';
|
|
148
|
-
};
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
name: 'amounts';
|
|
152
|
-
type: {
|
|
153
|
-
vec: 'u64';
|
|
154
|
-
};
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
name: 'lamports';
|
|
158
|
-
type: {
|
|
159
|
-
option: 'u64';
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
];
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
name: 'compressSplTokenAccount';
|
|
166
|
-
docs: [
|
|
167
|
-
'Compresses the balance of an spl token account sub an optional remaining',
|
|
168
|
-
'amount. This instruction does not close the spl token account. To close',
|
|
169
|
-
'the account bundle a close spl account instruction in your transaction.'
|
|
170
|
-
];
|
|
171
|
-
accounts: [
|
|
172
|
-
{
|
|
173
|
-
name: 'feePayer';
|
|
174
|
-
isMut: true;
|
|
175
|
-
isSigner: true;
|
|
176
|
-
docs: ['UNCHECKED: only pays fees.'];
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
name: 'authority';
|
|
180
|
-
isMut: false;
|
|
181
|
-
isSigner: true;
|
|
182
|
-
docs: [
|
|
183
|
-
'Authority is verified through proof since both owner and delegate',
|
|
184
|
-
'are included in the token data hash, which is a public input to the',
|
|
185
|
-
'validity proof.'
|
|
186
|
-
];
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
name: 'cpiAuthorityPda';
|
|
190
|
-
isMut: false;
|
|
191
|
-
isSigner: false;
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
name: 'lightSystemProgram';
|
|
195
|
-
isMut: false;
|
|
196
|
-
isSigner: false;
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
name: 'registeredProgramPda';
|
|
200
|
-
isMut: false;
|
|
201
|
-
isSigner: false;
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
name: 'noopProgram';
|
|
205
|
-
isMut: false;
|
|
206
|
-
isSigner: false;
|
|
207
|
-
},
|
|
208
|
-
{
|
|
209
|
-
name: 'accountCompressionAuthority';
|
|
210
|
-
isMut: false;
|
|
211
|
-
isSigner: false;
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
name: 'accountCompressionProgram';
|
|
215
|
-
isMut: false;
|
|
216
|
-
isSigner: false;
|
|
217
|
-
},
|
|
218
|
-
{
|
|
219
|
-
name: 'selfProgram';
|
|
220
|
-
isMut: false;
|
|
221
|
-
isSigner: false;
|
|
222
|
-
docs: ['this program is the signer of the cpi.'];
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
name: 'tokenPoolPda';
|
|
226
|
-
isMut: true;
|
|
227
|
-
isSigner: false;
|
|
228
|
-
isOptional: true;
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
name: 'compressOrDecompressTokenAccount';
|
|
232
|
-
isMut: true;
|
|
233
|
-
isSigner: false;
|
|
234
|
-
isOptional: true;
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
name: 'tokenProgram';
|
|
238
|
-
isMut: false;
|
|
239
|
-
isSigner: false;
|
|
240
|
-
isOptional: true;
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
name: 'systemProgram';
|
|
244
|
-
isMut: false;
|
|
245
|
-
isSigner: false;
|
|
246
|
-
}
|
|
247
|
-
];
|
|
248
|
-
args: [
|
|
249
|
-
{
|
|
250
|
-
name: 'owner';
|
|
251
|
-
type: 'publicKey';
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
name: 'remainingAmount';
|
|
255
|
-
type: {
|
|
256
|
-
option: 'u64';
|
|
257
|
-
};
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
name: 'cpiContext';
|
|
261
|
-
type: {
|
|
262
|
-
option: {
|
|
263
|
-
defined: 'CompressedCpiContext';
|
|
264
|
-
};
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
];
|
|
268
|
-
},
|
|
269
|
-
{
|
|
270
|
-
name: 'transfer';
|
|
271
|
-
docs: [
|
|
272
|
-
'Transfers compressed tokens from one account to another. All accounts',
|
|
273
|
-
'must be of the same mint. Additional spl tokens can be compressed or',
|
|
274
|
-
'decompressed. In one transaction only compression or decompression is',
|
|
275
|
-
'possible. Lamports can be transferred alongside tokens. If output token',
|
|
276
|
-
'accounts specify less lamports than inputs the remaining lamports are',
|
|
277
|
-
'transferred to an output compressed account. Signer must be owner or',
|
|
278
|
-
'delegate. If a delegated token account is transferred the delegate is',
|
|
279
|
-
'not preserved.'
|
|
280
|
-
];
|
|
281
|
-
accounts: [
|
|
282
|
-
{
|
|
283
|
-
name: 'feePayer';
|
|
284
|
-
isMut: true;
|
|
285
|
-
isSigner: true;
|
|
286
|
-
docs: ['UNCHECKED: only pays fees.'];
|
|
287
|
-
},
|
|
288
|
-
{
|
|
289
|
-
name: 'authority';
|
|
290
|
-
isMut: false;
|
|
291
|
-
isSigner: true;
|
|
292
|
-
docs: [
|
|
293
|
-
'Authority is verified through proof since both owner and delegate',
|
|
294
|
-
'are included in the token data hash, which is a public input to the',
|
|
295
|
-
'validity proof.'
|
|
296
|
-
];
|
|
297
|
-
},
|
|
298
|
-
{
|
|
299
|
-
name: 'cpiAuthorityPda';
|
|
300
|
-
isMut: false;
|
|
301
|
-
isSigner: false;
|
|
302
|
-
},
|
|
303
|
-
{
|
|
304
|
-
name: 'lightSystemProgram';
|
|
305
|
-
isMut: false;
|
|
306
|
-
isSigner: false;
|
|
307
|
-
},
|
|
308
|
-
{
|
|
309
|
-
name: 'registeredProgramPda';
|
|
310
|
-
isMut: false;
|
|
311
|
-
isSigner: false;
|
|
312
|
-
},
|
|
313
|
-
{
|
|
314
|
-
name: 'noopProgram';
|
|
315
|
-
isMut: false;
|
|
316
|
-
isSigner: false;
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
name: 'accountCompressionAuthority';
|
|
320
|
-
isMut: false;
|
|
321
|
-
isSigner: false;
|
|
322
|
-
},
|
|
323
|
-
{
|
|
324
|
-
name: 'accountCompressionProgram';
|
|
325
|
-
isMut: false;
|
|
326
|
-
isSigner: false;
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
name: 'selfProgram';
|
|
330
|
-
isMut: false;
|
|
331
|
-
isSigner: false;
|
|
332
|
-
docs: ['this program is the signer of the cpi.'];
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
name: 'tokenPoolPda';
|
|
336
|
-
isMut: true;
|
|
337
|
-
isSigner: false;
|
|
338
|
-
isOptional: true;
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
name: 'compressOrDecompressTokenAccount';
|
|
342
|
-
isMut: true;
|
|
343
|
-
isSigner: false;
|
|
344
|
-
isOptional: true;
|
|
345
|
-
},
|
|
346
|
-
{
|
|
347
|
-
name: 'tokenProgram';
|
|
348
|
-
isMut: false;
|
|
349
|
-
isSigner: false;
|
|
350
|
-
isOptional: true;
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
name: 'systemProgram';
|
|
354
|
-
isMut: false;
|
|
355
|
-
isSigner: false;
|
|
356
|
-
}
|
|
357
|
-
];
|
|
358
|
-
args: [
|
|
359
|
-
{
|
|
360
|
-
name: 'inputs';
|
|
361
|
-
type: 'bytes';
|
|
362
|
-
}
|
|
363
|
-
];
|
|
364
|
-
},
|
|
365
|
-
{
|
|
366
|
-
name: 'approve';
|
|
367
|
-
docs: [
|
|
368
|
-
'Delegates an amount to a delegate. A compressed token account is either',
|
|
369
|
-
'completely delegated or not. Prior delegates are not preserved. Cannot',
|
|
370
|
-
'be called by a delegate.',
|
|
371
|
-
'The instruction creates two output accounts:',
|
|
372
|
-
'1. one account with delegated amount',
|
|
373
|
-
'2. one account with remaining(change) amount'
|
|
374
|
-
];
|
|
375
|
-
accounts: [
|
|
376
|
-
{
|
|
377
|
-
name: 'feePayer';
|
|
378
|
-
isMut: true;
|
|
379
|
-
isSigner: true;
|
|
380
|
-
docs: ['UNCHECKED: only pays fees.'];
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
name: 'authority';
|
|
384
|
-
isMut: false;
|
|
385
|
-
isSigner: true;
|
|
386
|
-
docs: [
|
|
387
|
-
'Authority is verified through proof since both owner and delegate',
|
|
388
|
-
'are included in the token data hash, which is a public input to the',
|
|
389
|
-
'validity proof.'
|
|
390
|
-
];
|
|
391
|
-
},
|
|
392
|
-
{
|
|
393
|
-
name: 'cpiAuthorityPda';
|
|
394
|
-
isMut: false;
|
|
395
|
-
isSigner: false;
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
name: 'lightSystemProgram';
|
|
399
|
-
isMut: false;
|
|
400
|
-
isSigner: false;
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
name: 'registeredProgramPda';
|
|
404
|
-
isMut: false;
|
|
405
|
-
isSigner: false;
|
|
406
|
-
},
|
|
407
|
-
{
|
|
408
|
-
name: 'noopProgram';
|
|
409
|
-
isMut: false;
|
|
410
|
-
isSigner: false;
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
name: 'accountCompressionAuthority';
|
|
414
|
-
isMut: false;
|
|
415
|
-
isSigner: false;
|
|
416
|
-
},
|
|
417
|
-
{
|
|
418
|
-
name: 'accountCompressionProgram';
|
|
419
|
-
isMut: false;
|
|
420
|
-
isSigner: false;
|
|
421
|
-
},
|
|
422
|
-
{
|
|
423
|
-
name: 'selfProgram';
|
|
424
|
-
isMut: false;
|
|
425
|
-
isSigner: false;
|
|
426
|
-
docs: ['this program is the signer of the cpi.'];
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
name: 'systemProgram';
|
|
430
|
-
isMut: false;
|
|
431
|
-
isSigner: false;
|
|
432
|
-
}
|
|
433
|
-
];
|
|
434
|
-
args: [
|
|
435
|
-
{
|
|
436
|
-
name: 'inputs';
|
|
437
|
-
type: 'bytes';
|
|
438
|
-
}
|
|
439
|
-
];
|
|
440
|
-
},
|
|
441
|
-
{
|
|
442
|
-
name: 'revoke';
|
|
443
|
-
docs: [
|
|
444
|
-
'Revokes a delegation. The instruction merges all inputs into one output',
|
|
445
|
-
'account. Cannot be called by a delegate. Delegates are not preserved.'
|
|
446
|
-
];
|
|
447
|
-
accounts: [
|
|
448
|
-
{
|
|
449
|
-
name: 'feePayer';
|
|
450
|
-
isMut: true;
|
|
451
|
-
isSigner: true;
|
|
452
|
-
docs: ['UNCHECKED: only pays fees.'];
|
|
453
|
-
},
|
|
454
|
-
{
|
|
455
|
-
name: 'authority';
|
|
456
|
-
isMut: false;
|
|
457
|
-
isSigner: true;
|
|
458
|
-
docs: [
|
|
459
|
-
'Authority is verified through proof since both owner and delegate',
|
|
460
|
-
'are included in the token data hash, which is a public input to the',
|
|
461
|
-
'validity proof.'
|
|
462
|
-
];
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
name: 'cpiAuthorityPda';
|
|
466
|
-
isMut: false;
|
|
467
|
-
isSigner: false;
|
|
468
|
-
},
|
|
469
|
-
{
|
|
470
|
-
name: 'lightSystemProgram';
|
|
471
|
-
isMut: false;
|
|
472
|
-
isSigner: false;
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
name: 'registeredProgramPda';
|
|
476
|
-
isMut: false;
|
|
477
|
-
isSigner: false;
|
|
478
|
-
},
|
|
479
|
-
{
|
|
480
|
-
name: 'noopProgram';
|
|
481
|
-
isMut: false;
|
|
482
|
-
isSigner: false;
|
|
483
|
-
},
|
|
484
|
-
{
|
|
485
|
-
name: 'accountCompressionAuthority';
|
|
486
|
-
isMut: false;
|
|
487
|
-
isSigner: false;
|
|
488
|
-
},
|
|
489
|
-
{
|
|
490
|
-
name: 'accountCompressionProgram';
|
|
491
|
-
isMut: false;
|
|
492
|
-
isSigner: false;
|
|
493
|
-
},
|
|
494
|
-
{
|
|
495
|
-
name: 'selfProgram';
|
|
496
|
-
isMut: false;
|
|
497
|
-
isSigner: false;
|
|
498
|
-
docs: ['this program is the signer of the cpi.'];
|
|
499
|
-
},
|
|
500
|
-
{
|
|
501
|
-
name: 'systemProgram';
|
|
502
|
-
isMut: false;
|
|
503
|
-
isSigner: false;
|
|
504
|
-
}
|
|
505
|
-
];
|
|
506
|
-
args: [
|
|
507
|
-
{
|
|
508
|
-
name: 'inputs';
|
|
509
|
-
type: 'bytes';
|
|
510
|
-
}
|
|
511
|
-
];
|
|
512
|
-
},
|
|
513
|
-
{
|
|
514
|
-
name: 'freeze';
|
|
515
|
-
docs: [
|
|
516
|
-
'Freezes compressed token accounts. Inputs must not be frozen. Creates as',
|
|
517
|
-
'many outputs as inputs. Balances and delegates are preserved.'
|
|
518
|
-
];
|
|
519
|
-
accounts: [
|
|
520
|
-
{
|
|
521
|
-
name: 'feePayer';
|
|
522
|
-
isMut: true;
|
|
523
|
-
isSigner: true;
|
|
524
|
-
docs: ['UNCHECKED: only pays fees.'];
|
|
525
|
-
},
|
|
526
|
-
{
|
|
527
|
-
name: 'authority';
|
|
528
|
-
isMut: false;
|
|
529
|
-
isSigner: true;
|
|
530
|
-
},
|
|
531
|
-
{
|
|
532
|
-
name: 'cpiAuthorityPda';
|
|
533
|
-
isMut: false;
|
|
534
|
-
isSigner: false;
|
|
535
|
-
},
|
|
536
|
-
{
|
|
537
|
-
name: 'lightSystemProgram';
|
|
538
|
-
isMut: false;
|
|
539
|
-
isSigner: false;
|
|
540
|
-
},
|
|
541
|
-
{
|
|
542
|
-
name: 'registeredProgramPda';
|
|
543
|
-
isMut: false;
|
|
544
|
-
isSigner: false;
|
|
545
|
-
},
|
|
546
|
-
{
|
|
547
|
-
name: 'noopProgram';
|
|
548
|
-
isMut: false;
|
|
549
|
-
isSigner: false;
|
|
550
|
-
},
|
|
551
|
-
{
|
|
552
|
-
name: 'accountCompressionAuthority';
|
|
553
|
-
isMut: false;
|
|
554
|
-
isSigner: false;
|
|
555
|
-
},
|
|
556
|
-
{
|
|
557
|
-
name: 'accountCompressionProgram';
|
|
558
|
-
isMut: false;
|
|
559
|
-
isSigner: false;
|
|
560
|
-
},
|
|
561
|
-
{
|
|
562
|
-
name: 'selfProgram';
|
|
563
|
-
isMut: false;
|
|
564
|
-
isSigner: false;
|
|
565
|
-
docs: ['that this program is the signer of the cpi.'];
|
|
566
|
-
},
|
|
567
|
-
{
|
|
568
|
-
name: 'systemProgram';
|
|
569
|
-
isMut: false;
|
|
570
|
-
isSigner: false;
|
|
571
|
-
},
|
|
572
|
-
{
|
|
573
|
-
name: 'mint';
|
|
574
|
-
isMut: false;
|
|
575
|
-
isSigner: false;
|
|
576
|
-
}
|
|
577
|
-
];
|
|
578
|
-
args: [
|
|
579
|
-
{
|
|
580
|
-
name: 'inputs';
|
|
581
|
-
type: 'bytes';
|
|
582
|
-
}
|
|
583
|
-
];
|
|
584
|
-
},
|
|
585
|
-
{
|
|
586
|
-
name: 'thaw';
|
|
587
|
-
docs: [
|
|
588
|
-
'Thaws frozen compressed token accounts. Inputs must be frozen. Creates',
|
|
589
|
-
'as many outputs as inputs. Balances and delegates are preserved.'
|
|
590
|
-
];
|
|
591
|
-
accounts: [
|
|
592
|
-
{
|
|
593
|
-
name: 'feePayer';
|
|
594
|
-
isMut: true;
|
|
595
|
-
isSigner: true;
|
|
596
|
-
docs: ['UNCHECKED: only pays fees.'];
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
name: 'authority';
|
|
600
|
-
isMut: false;
|
|
601
|
-
isSigner: true;
|
|
602
|
-
},
|
|
603
|
-
{
|
|
604
|
-
name: 'cpiAuthorityPda';
|
|
605
|
-
isMut: false;
|
|
606
|
-
isSigner: false;
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
name: 'lightSystemProgram';
|
|
610
|
-
isMut: false;
|
|
611
|
-
isSigner: false;
|
|
612
|
-
},
|
|
613
|
-
{
|
|
614
|
-
name: 'registeredProgramPda';
|
|
615
|
-
isMut: false;
|
|
616
|
-
isSigner: false;
|
|
617
|
-
},
|
|
618
|
-
{
|
|
619
|
-
name: 'noopProgram';
|
|
620
|
-
isMut: false;
|
|
621
|
-
isSigner: false;
|
|
622
|
-
},
|
|
623
|
-
{
|
|
624
|
-
name: 'accountCompressionAuthority';
|
|
625
|
-
isMut: false;
|
|
626
|
-
isSigner: false;
|
|
627
|
-
},
|
|
628
|
-
{
|
|
629
|
-
name: 'accountCompressionProgram';
|
|
630
|
-
isMut: false;
|
|
631
|
-
isSigner: false;
|
|
632
|
-
},
|
|
633
|
-
{
|
|
634
|
-
name: 'selfProgram';
|
|
635
|
-
isMut: false;
|
|
636
|
-
isSigner: false;
|
|
637
|
-
docs: ['that this program is the signer of the cpi.'];
|
|
638
|
-
},
|
|
639
|
-
{
|
|
640
|
-
name: 'systemProgram';
|
|
641
|
-
isMut: false;
|
|
642
|
-
isSigner: false;
|
|
643
|
-
},
|
|
644
|
-
{
|
|
645
|
-
name: 'mint';
|
|
646
|
-
isMut: false;
|
|
647
|
-
isSigner: false;
|
|
648
|
-
}
|
|
649
|
-
];
|
|
650
|
-
args: [
|
|
651
|
-
{
|
|
652
|
-
name: 'inputs';
|
|
653
|
-
type: 'bytes';
|
|
654
|
-
}
|
|
655
|
-
];
|
|
656
|
-
},
|
|
657
|
-
{
|
|
658
|
-
name: 'burn';
|
|
659
|
-
docs: [
|
|
660
|
-
'Burns compressed tokens and spl tokens from the pool account. Delegates',
|
|
661
|
-
'can burn tokens. The output compressed token account remains delegated.',
|
|
662
|
-
'Creates one output compressed token account.'
|
|
663
|
-
];
|
|
664
|
-
accounts: [
|
|
665
|
-
{
|
|
666
|
-
name: 'feePayer';
|
|
667
|
-
isMut: true;
|
|
668
|
-
isSigner: true;
|
|
669
|
-
docs: ['UNCHECKED: only pays fees.'];
|
|
670
|
-
},
|
|
671
|
-
{
|
|
672
|
-
name: 'authority';
|
|
673
|
-
isMut: false;
|
|
674
|
-
isSigner: true;
|
|
675
|
-
docs: [
|
|
676
|
-
'Authority is verified through proof since both owner and delegate',
|
|
677
|
-
'are included in the token data hash, which is a public input to the',
|
|
678
|
-
'validity proof.'
|
|
679
|
-
];
|
|
680
|
-
},
|
|
681
|
-
{
|
|
682
|
-
name: 'cpiAuthorityPda';
|
|
683
|
-
isMut: false;
|
|
684
|
-
isSigner: false;
|
|
685
|
-
},
|
|
686
|
-
{
|
|
687
|
-
name: 'mint';
|
|
688
|
-
isMut: true;
|
|
689
|
-
isSigner: false;
|
|
690
|
-
},
|
|
691
|
-
{
|
|
692
|
-
name: 'tokenPoolPda';
|
|
693
|
-
isMut: true;
|
|
694
|
-
isSigner: false;
|
|
695
|
-
},
|
|
696
|
-
{
|
|
697
|
-
name: 'tokenProgram';
|
|
698
|
-
isMut: false;
|
|
699
|
-
isSigner: false;
|
|
700
|
-
},
|
|
701
|
-
{
|
|
702
|
-
name: 'lightSystemProgram';
|
|
703
|
-
isMut: false;
|
|
704
|
-
isSigner: false;
|
|
705
|
-
},
|
|
706
|
-
{
|
|
707
|
-
name: 'registeredProgramPda';
|
|
708
|
-
isMut: false;
|
|
709
|
-
isSigner: false;
|
|
710
|
-
},
|
|
711
|
-
{
|
|
712
|
-
name: 'noopProgram';
|
|
713
|
-
isMut: false;
|
|
714
|
-
isSigner: false;
|
|
715
|
-
},
|
|
716
|
-
{
|
|
717
|
-
name: 'accountCompressionAuthority';
|
|
718
|
-
isMut: false;
|
|
719
|
-
isSigner: false;
|
|
720
|
-
},
|
|
721
|
-
{
|
|
722
|
-
name: 'accountCompressionProgram';
|
|
723
|
-
isMut: false;
|
|
724
|
-
isSigner: false;
|
|
725
|
-
},
|
|
726
|
-
{
|
|
727
|
-
name: 'selfProgram';
|
|
728
|
-
isMut: false;
|
|
729
|
-
isSigner: false;
|
|
730
|
-
},
|
|
731
|
-
{
|
|
732
|
-
name: 'systemProgram';
|
|
733
|
-
isMut: false;
|
|
734
|
-
isSigner: false;
|
|
735
|
-
}
|
|
736
|
-
];
|
|
737
|
-
args: [
|
|
738
|
-
{
|
|
739
|
-
name: 'inputs';
|
|
740
|
-
type: 'bytes';
|
|
741
|
-
}
|
|
742
|
-
];
|
|
743
|
-
},
|
|
744
|
-
{
|
|
745
|
-
name: 'stubIdlBuild';
|
|
746
|
-
docs: [
|
|
747
|
-
'This function is a stub to allow Anchor to include the input types in',
|
|
748
|
-
'the IDL. It should not be included in production builds nor be called in',
|
|
749
|
-
'practice.'
|
|
750
|
-
];
|
|
751
|
-
accounts: [
|
|
752
|
-
{
|
|
753
|
-
name: 'feePayer';
|
|
754
|
-
isMut: true;
|
|
755
|
-
isSigner: true;
|
|
756
|
-
docs: ['UNCHECKED: only pays fees.'];
|
|
757
|
-
},
|
|
758
|
-
{
|
|
759
|
-
name: 'authority';
|
|
760
|
-
isMut: false;
|
|
761
|
-
isSigner: true;
|
|
762
|
-
docs: [
|
|
763
|
-
'Authority is verified through proof since both owner and delegate',
|
|
764
|
-
'are included in the token data hash, which is a public input to the',
|
|
765
|
-
'validity proof.'
|
|
766
|
-
];
|
|
767
|
-
},
|
|
768
|
-
{
|
|
769
|
-
name: 'cpiAuthorityPda';
|
|
770
|
-
isMut: false;
|
|
771
|
-
isSigner: false;
|
|
772
|
-
},
|
|
773
|
-
{
|
|
774
|
-
name: 'lightSystemProgram';
|
|
775
|
-
isMut: false;
|
|
776
|
-
isSigner: false;
|
|
777
|
-
},
|
|
778
|
-
{
|
|
779
|
-
name: 'registeredProgramPda';
|
|
780
|
-
isMut: false;
|
|
781
|
-
isSigner: false;
|
|
782
|
-
},
|
|
783
|
-
{
|
|
784
|
-
name: 'noopProgram';
|
|
785
|
-
isMut: false;
|
|
786
|
-
isSigner: false;
|
|
787
|
-
},
|
|
788
|
-
{
|
|
789
|
-
name: 'accountCompressionAuthority';
|
|
790
|
-
isMut: false;
|
|
791
|
-
isSigner: false;
|
|
792
|
-
},
|
|
793
|
-
{
|
|
794
|
-
name: 'accountCompressionProgram';
|
|
795
|
-
isMut: false;
|
|
796
|
-
isSigner: false;
|
|
797
|
-
},
|
|
798
|
-
{
|
|
799
|
-
name: 'selfProgram';
|
|
800
|
-
isMut: false;
|
|
801
|
-
isSigner: false;
|
|
802
|
-
docs: ['this program is the signer of the cpi.'];
|
|
803
|
-
},
|
|
804
|
-
{
|
|
805
|
-
name: 'tokenPoolPda';
|
|
806
|
-
isMut: true;
|
|
807
|
-
isSigner: false;
|
|
808
|
-
isOptional: true;
|
|
809
|
-
},
|
|
810
|
-
{
|
|
811
|
-
name: 'compressOrDecompressTokenAccount';
|
|
812
|
-
isMut: true;
|
|
813
|
-
isSigner: false;
|
|
814
|
-
isOptional: true;
|
|
815
|
-
},
|
|
816
|
-
{
|
|
817
|
-
name: 'tokenProgram';
|
|
818
|
-
isMut: false;
|
|
819
|
-
isSigner: false;
|
|
820
|
-
isOptional: true;
|
|
821
|
-
},
|
|
822
|
-
{
|
|
823
|
-
name: 'systemProgram';
|
|
824
|
-
isMut: false;
|
|
825
|
-
isSigner: false;
|
|
826
|
-
}
|
|
827
|
-
];
|
|
828
|
-
args: [
|
|
829
|
-
{
|
|
830
|
-
name: 'inputs1';
|
|
831
|
-
type: {
|
|
832
|
-
defined: 'CompressedTokenInstructionDataTransfer';
|
|
833
|
-
};
|
|
834
|
-
},
|
|
835
|
-
{
|
|
836
|
-
name: 'inputs2';
|
|
837
|
-
type: {
|
|
838
|
-
defined: 'TokenData';
|
|
839
|
-
};
|
|
840
|
-
}
|
|
841
|
-
];
|
|
842
|
-
}
|
|
843
|
-
];
|
|
844
|
-
types: [
|
|
845
|
-
{
|
|
846
|
-
name: 'AccessMetadata';
|
|
847
|
-
type: {
|
|
848
|
-
kind: 'struct';
|
|
849
|
-
fields: [
|
|
850
|
-
{
|
|
851
|
-
name: 'owner';
|
|
852
|
-
docs: ['Owner of the Merkle tree.'];
|
|
853
|
-
type: 'publicKey';
|
|
854
|
-
},
|
|
855
|
-
{
|
|
856
|
-
name: 'programOwner';
|
|
857
|
-
docs: [
|
|
858
|
-
'Program owner of the Merkle tree. This will be used for program owned Merkle trees.'
|
|
859
|
-
];
|
|
860
|
-
type: 'publicKey';
|
|
861
|
-
},
|
|
862
|
-
{
|
|
863
|
-
name: 'forester';
|
|
864
|
-
docs: [
|
|
865
|
-
'Optional privileged forester pubkey, can be set for custom Merkle trees',
|
|
866
|
-
'without a network fee. Merkle trees without network fees are not',
|
|
867
|
-
'forested by light foresters. The variable is not used in the account',
|
|
868
|
-
'compression program but the registry program. The registry program',
|
|
869
|
-
'implements access control to prevent contention during forester. The',
|
|
870
|
-
'forester pubkey specified in this struct can bypass contention checks.'
|
|
871
|
-
];
|
|
872
|
-
type: 'publicKey';
|
|
873
|
-
}
|
|
874
|
-
];
|
|
875
|
-
};
|
|
876
|
-
},
|
|
877
|
-
{
|
|
878
|
-
name: 'AccountState';
|
|
879
|
-
type: {
|
|
880
|
-
kind: 'enum';
|
|
881
|
-
variants: [
|
|
882
|
-
{
|
|
883
|
-
name: 'Initialized';
|
|
884
|
-
},
|
|
885
|
-
{
|
|
886
|
-
name: 'Frozen';
|
|
887
|
-
}
|
|
888
|
-
];
|
|
889
|
-
};
|
|
890
|
-
},
|
|
891
|
-
{
|
|
892
|
-
name: 'CompressedAccount';
|
|
893
|
-
type: {
|
|
894
|
-
kind: 'struct';
|
|
895
|
-
fields: [
|
|
896
|
-
{
|
|
897
|
-
name: 'owner';
|
|
898
|
-
type: 'publicKey';
|
|
899
|
-
},
|
|
900
|
-
{
|
|
901
|
-
name: 'lamports';
|
|
902
|
-
type: 'u64';
|
|
903
|
-
},
|
|
904
|
-
{
|
|
905
|
-
name: 'address';
|
|
906
|
-
type: {
|
|
907
|
-
option: {
|
|
908
|
-
array: ['u8', 32];
|
|
909
|
-
};
|
|
910
|
-
};
|
|
911
|
-
},
|
|
912
|
-
{
|
|
913
|
-
name: 'data';
|
|
914
|
-
type: {
|
|
915
|
-
option: {
|
|
916
|
-
defined: 'CompressedAccountData';
|
|
917
|
-
};
|
|
918
|
-
};
|
|
919
|
-
}
|
|
920
|
-
];
|
|
921
|
-
};
|
|
922
|
-
},
|
|
923
|
-
{
|
|
924
|
-
name: 'CompressedAccountData';
|
|
925
|
-
type: {
|
|
926
|
-
kind: 'struct';
|
|
927
|
-
fields: [
|
|
928
|
-
{
|
|
929
|
-
name: 'discriminator';
|
|
930
|
-
type: {
|
|
931
|
-
array: ['u8', 8];
|
|
932
|
-
};
|
|
933
|
-
},
|
|
934
|
-
{
|
|
935
|
-
name: 'data';
|
|
936
|
-
type: 'bytes';
|
|
937
|
-
},
|
|
938
|
-
{
|
|
939
|
-
name: 'dataHash';
|
|
940
|
-
type: {
|
|
941
|
-
array: ['u8', 32];
|
|
942
|
-
};
|
|
943
|
-
}
|
|
944
|
-
];
|
|
945
|
-
};
|
|
946
|
-
},
|
|
947
|
-
{
|
|
948
|
-
name: 'CompressedCpiContext';
|
|
949
|
-
type: {
|
|
950
|
-
kind: 'struct';
|
|
951
|
-
fields: [
|
|
952
|
-
{
|
|
953
|
-
name: 'setContext';
|
|
954
|
-
docs: [
|
|
955
|
-
'Is set by the program that is invoking the CPI to signal that is should',
|
|
956
|
-
'set the cpi context.'
|
|
957
|
-
];
|
|
958
|
-
type: 'bool';
|
|
959
|
-
},
|
|
960
|
-
{
|
|
961
|
-
name: 'firstSetContext';
|
|
962
|
-
docs: [
|
|
963
|
-
'Is set to wipe the cpi context since someone could have set it before',
|
|
964
|
-
'with unrelated data.'
|
|
965
|
-
];
|
|
966
|
-
type: 'bool';
|
|
967
|
-
},
|
|
968
|
-
{
|
|
969
|
-
name: 'cpiContextAccountIndex';
|
|
970
|
-
docs: [
|
|
971
|
-
'Index of cpi context account in remaining accounts.'
|
|
972
|
-
];
|
|
973
|
-
type: 'u8';
|
|
974
|
-
}
|
|
975
|
-
];
|
|
976
|
-
};
|
|
977
|
-
},
|
|
978
|
-
{
|
|
979
|
-
name: 'CompressedProof';
|
|
980
|
-
type: {
|
|
981
|
-
kind: 'struct';
|
|
982
|
-
fields: [
|
|
983
|
-
{
|
|
984
|
-
name: 'a';
|
|
985
|
-
type: {
|
|
986
|
-
array: ['u8', 32];
|
|
987
|
-
};
|
|
988
|
-
},
|
|
989
|
-
{
|
|
990
|
-
name: 'b';
|
|
991
|
-
type: {
|
|
992
|
-
array: ['u8', 64];
|
|
993
|
-
};
|
|
994
|
-
},
|
|
995
|
-
{
|
|
996
|
-
name: 'c';
|
|
997
|
-
type: {
|
|
998
|
-
array: ['u8', 32];
|
|
999
|
-
};
|
|
1000
|
-
}
|
|
1001
|
-
];
|
|
1002
|
-
};
|
|
1003
|
-
},
|
|
1004
|
-
{
|
|
1005
|
-
name: 'CompressedTokenInstructionDataTransfer';
|
|
1006
|
-
type: {
|
|
1007
|
-
kind: 'struct';
|
|
1008
|
-
fields: [
|
|
1009
|
-
{
|
|
1010
|
-
name: 'proof';
|
|
1011
|
-
type: {
|
|
1012
|
-
option: {
|
|
1013
|
-
defined: 'CompressedProof';
|
|
1014
|
-
};
|
|
1015
|
-
};
|
|
1016
|
-
},
|
|
1017
|
-
{
|
|
1018
|
-
name: 'mint';
|
|
1019
|
-
type: 'publicKey';
|
|
1020
|
-
},
|
|
1021
|
-
{
|
|
1022
|
-
name: 'delegatedTransfer';
|
|
1023
|
-
docs: [
|
|
1024
|
-
'Is required if the signer is delegate,',
|
|
1025
|
-
'-> delegate is authority account,',
|
|
1026
|
-
'owner = Some(owner) is the owner of the token account.'
|
|
1027
|
-
];
|
|
1028
|
-
type: {
|
|
1029
|
-
option: {
|
|
1030
|
-
defined: 'DelegatedTransfer';
|
|
1031
|
-
};
|
|
1032
|
-
};
|
|
1033
|
-
},
|
|
1034
|
-
{
|
|
1035
|
-
name: 'inputTokenDataWithContext';
|
|
1036
|
-
type: {
|
|
1037
|
-
vec: {
|
|
1038
|
-
defined: 'InputTokenDataWithContext';
|
|
1039
|
-
};
|
|
1040
|
-
};
|
|
1041
|
-
},
|
|
1042
|
-
{
|
|
1043
|
-
name: 'outputCompressedAccounts';
|
|
1044
|
-
type: {
|
|
1045
|
-
vec: {
|
|
1046
|
-
defined: 'PackedTokenTransferOutputData';
|
|
1047
|
-
};
|
|
1048
|
-
};
|
|
1049
|
-
},
|
|
1050
|
-
{
|
|
1051
|
-
name: 'isCompress';
|
|
1052
|
-
type: 'bool';
|
|
1053
|
-
},
|
|
1054
|
-
{
|
|
1055
|
-
name: 'compressOrDecompressAmount';
|
|
1056
|
-
type: {
|
|
1057
|
-
option: 'u64';
|
|
1058
|
-
};
|
|
1059
|
-
},
|
|
1060
|
-
{
|
|
1061
|
-
name: 'cpiContext';
|
|
1062
|
-
type: {
|
|
1063
|
-
option: {
|
|
1064
|
-
defined: 'CompressedCpiContext';
|
|
1065
|
-
};
|
|
1066
|
-
};
|
|
1067
|
-
},
|
|
1068
|
-
{
|
|
1069
|
-
name: 'lamportsChangeAccountMerkleTreeIndex';
|
|
1070
|
-
type: {
|
|
1071
|
-
option: 'u8';
|
|
1072
|
-
};
|
|
1073
|
-
}
|
|
1074
|
-
];
|
|
1075
|
-
};
|
|
1076
|
-
},
|
|
1077
|
-
{
|
|
1078
|
-
name: 'DelegatedTransfer';
|
|
1079
|
-
docs: [
|
|
1080
|
-
'Struct to provide the owner when the delegate is signer of the transaction.'
|
|
1081
|
-
];
|
|
1082
|
-
type: {
|
|
1083
|
-
kind: 'struct';
|
|
1084
|
-
fields: [
|
|
1085
|
-
{
|
|
1086
|
-
name: 'owner';
|
|
1087
|
-
type: 'publicKey';
|
|
1088
|
-
},
|
|
1089
|
-
{
|
|
1090
|
-
name: 'delegateChangeAccountIndex';
|
|
1091
|
-
docs: [
|
|
1092
|
-
'Index of change compressed account in output compressed accounts. In',
|
|
1093
|
-
"case that the delegate didn't spend the complete delegated compressed",
|
|
1094
|
-
'account balance the change compressed account will be delegated to her',
|
|
1095
|
-
'as well.'
|
|
1096
|
-
];
|
|
1097
|
-
type: {
|
|
1098
|
-
option: 'u8';
|
|
1099
|
-
};
|
|
1100
|
-
}
|
|
1101
|
-
];
|
|
1102
|
-
};
|
|
1103
|
-
},
|
|
1104
|
-
{
|
|
1105
|
-
name: 'InputTokenDataWithContext';
|
|
1106
|
-
type: {
|
|
1107
|
-
kind: 'struct';
|
|
1108
|
-
fields: [
|
|
1109
|
-
{
|
|
1110
|
-
name: 'amount';
|
|
1111
|
-
type: 'u64';
|
|
1112
|
-
},
|
|
1113
|
-
{
|
|
1114
|
-
name: 'delegateIndex';
|
|
1115
|
-
type: {
|
|
1116
|
-
option: 'u8';
|
|
1117
|
-
};
|
|
1118
|
-
},
|
|
1119
|
-
{
|
|
1120
|
-
name: 'merkleContext';
|
|
1121
|
-
type: {
|
|
1122
|
-
defined: 'PackedMerkleContext';
|
|
1123
|
-
};
|
|
1124
|
-
},
|
|
1125
|
-
{
|
|
1126
|
-
name: 'rootIndex';
|
|
1127
|
-
type: 'u16';
|
|
1128
|
-
},
|
|
1129
|
-
{
|
|
1130
|
-
name: 'lamports';
|
|
1131
|
-
type: {
|
|
1132
|
-
option: 'u64';
|
|
1133
|
-
};
|
|
1134
|
-
},
|
|
1135
|
-
{
|
|
1136
|
-
name: 'tlv';
|
|
1137
|
-
docs: [
|
|
1138
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
1139
|
-
];
|
|
1140
|
-
type: {
|
|
1141
|
-
option: 'bytes';
|
|
1142
|
-
};
|
|
1143
|
-
}
|
|
1144
|
-
];
|
|
1145
|
-
};
|
|
1146
|
-
},
|
|
1147
|
-
{
|
|
1148
|
-
name: 'InstructionDataInvoke';
|
|
1149
|
-
type: {
|
|
1150
|
-
kind: 'struct';
|
|
1151
|
-
fields: [
|
|
1152
|
-
{
|
|
1153
|
-
name: 'proof';
|
|
1154
|
-
type: {
|
|
1155
|
-
option: {
|
|
1156
|
-
defined: 'CompressedProof';
|
|
1157
|
-
};
|
|
1158
|
-
};
|
|
1159
|
-
},
|
|
1160
|
-
{
|
|
1161
|
-
name: 'inputCompressedAccountsWithMerkleContext';
|
|
1162
|
-
type: {
|
|
1163
|
-
vec: {
|
|
1164
|
-
defined: 'PackedCompressedAccountWithMerkleContext';
|
|
1165
|
-
};
|
|
1166
|
-
};
|
|
1167
|
-
},
|
|
1168
|
-
{
|
|
1169
|
-
name: 'outputCompressedAccounts';
|
|
1170
|
-
type: {
|
|
1171
|
-
vec: {
|
|
1172
|
-
defined: 'OutputCompressedAccountWithPackedContext';
|
|
1173
|
-
};
|
|
1174
|
-
};
|
|
1175
|
-
},
|
|
1176
|
-
{
|
|
1177
|
-
name: 'relayFee';
|
|
1178
|
-
type: {
|
|
1179
|
-
option: 'u64';
|
|
1180
|
-
};
|
|
1181
|
-
},
|
|
1182
|
-
{
|
|
1183
|
-
name: 'newAddressParams';
|
|
1184
|
-
type: {
|
|
1185
|
-
vec: {
|
|
1186
|
-
defined: 'NewAddressParamsPacked';
|
|
1187
|
-
};
|
|
1188
|
-
};
|
|
1189
|
-
},
|
|
1190
|
-
{
|
|
1191
|
-
name: 'compressOrDecompressLamports';
|
|
1192
|
-
type: {
|
|
1193
|
-
option: 'u64';
|
|
1194
|
-
};
|
|
1195
|
-
},
|
|
1196
|
-
{
|
|
1197
|
-
name: 'isCompress';
|
|
1198
|
-
type: 'bool';
|
|
1199
|
-
}
|
|
1200
|
-
];
|
|
1201
|
-
};
|
|
1202
|
-
},
|
|
1203
|
-
{
|
|
1204
|
-
name: 'InstructionDataInvokeCpi';
|
|
1205
|
-
type: {
|
|
1206
|
-
kind: 'struct';
|
|
1207
|
-
fields: [
|
|
1208
|
-
{
|
|
1209
|
-
name: 'proof';
|
|
1210
|
-
type: {
|
|
1211
|
-
option: {
|
|
1212
|
-
defined: 'CompressedProof';
|
|
1213
|
-
};
|
|
1214
|
-
};
|
|
1215
|
-
},
|
|
1216
|
-
{
|
|
1217
|
-
name: 'newAddressParams';
|
|
1218
|
-
type: {
|
|
1219
|
-
vec: {
|
|
1220
|
-
defined: 'NewAddressParamsPacked';
|
|
1221
|
-
};
|
|
1222
|
-
};
|
|
1223
|
-
},
|
|
1224
|
-
{
|
|
1225
|
-
name: 'inputCompressedAccountsWithMerkleContext';
|
|
1226
|
-
type: {
|
|
1227
|
-
vec: {
|
|
1228
|
-
defined: 'PackedCompressedAccountWithMerkleContext';
|
|
1229
|
-
};
|
|
1230
|
-
};
|
|
1231
|
-
},
|
|
1232
|
-
{
|
|
1233
|
-
name: 'outputCompressedAccounts';
|
|
1234
|
-
type: {
|
|
1235
|
-
vec: {
|
|
1236
|
-
defined: 'OutputCompressedAccountWithPackedContext';
|
|
1237
|
-
};
|
|
1238
|
-
};
|
|
1239
|
-
},
|
|
1240
|
-
{
|
|
1241
|
-
name: 'relayFee';
|
|
1242
|
-
type: {
|
|
1243
|
-
option: 'u64';
|
|
1244
|
-
};
|
|
1245
|
-
},
|
|
1246
|
-
{
|
|
1247
|
-
name: 'compressOrDecompressLamports';
|
|
1248
|
-
type: {
|
|
1249
|
-
option: 'u64';
|
|
1250
|
-
};
|
|
1251
|
-
},
|
|
1252
|
-
{
|
|
1253
|
-
name: 'isCompress';
|
|
1254
|
-
type: 'bool';
|
|
1255
|
-
},
|
|
1256
|
-
{
|
|
1257
|
-
name: 'cpiContext';
|
|
1258
|
-
type: {
|
|
1259
|
-
option: {
|
|
1260
|
-
defined: 'CompressedCpiContext';
|
|
1261
|
-
};
|
|
1262
|
-
};
|
|
1263
|
-
}
|
|
1264
|
-
];
|
|
1265
|
-
};
|
|
1266
|
-
},
|
|
1267
|
-
{
|
|
1268
|
-
name: 'MerkleTreeMetadata';
|
|
1269
|
-
type: {
|
|
1270
|
-
kind: 'struct';
|
|
1271
|
-
fields: [
|
|
1272
|
-
{
|
|
1273
|
-
name: 'accessMetadata';
|
|
1274
|
-
type: {
|
|
1275
|
-
defined: 'AccessMetadata';
|
|
1276
|
-
};
|
|
1277
|
-
},
|
|
1278
|
-
{
|
|
1279
|
-
name: 'rolloverMetadata';
|
|
1280
|
-
type: {
|
|
1281
|
-
defined: 'RolloverMetadata';
|
|
1282
|
-
};
|
|
1283
|
-
},
|
|
1284
|
-
{
|
|
1285
|
-
name: 'associatedQueue';
|
|
1286
|
-
type: 'publicKey';
|
|
1287
|
-
},
|
|
1288
|
-
{
|
|
1289
|
-
name: 'nextMerkleTree';
|
|
1290
|
-
type: 'publicKey';
|
|
1291
|
-
}
|
|
1292
|
-
];
|
|
1293
|
-
};
|
|
1294
|
-
},
|
|
1295
|
-
{
|
|
1296
|
-
name: 'MerkleTreeSequenceNumber';
|
|
1297
|
-
type: {
|
|
1298
|
-
kind: 'struct';
|
|
1299
|
-
fields: [
|
|
1300
|
-
{
|
|
1301
|
-
name: 'pubkey';
|
|
1302
|
-
type: 'publicKey';
|
|
1303
|
-
},
|
|
1304
|
-
{
|
|
1305
|
-
name: 'seq';
|
|
1306
|
-
type: 'u64';
|
|
1307
|
-
}
|
|
1308
|
-
];
|
|
1309
|
-
};
|
|
1310
|
-
},
|
|
1311
|
-
{
|
|
1312
|
-
name: 'NewAddressParamsPacked';
|
|
1313
|
-
type: {
|
|
1314
|
-
kind: 'struct';
|
|
1315
|
-
fields: [
|
|
1316
|
-
{
|
|
1317
|
-
name: 'seed';
|
|
1318
|
-
type: {
|
|
1319
|
-
array: ['u8', 32];
|
|
1320
|
-
};
|
|
1321
|
-
},
|
|
1322
|
-
{
|
|
1323
|
-
name: 'addressQueueAccountIndex';
|
|
1324
|
-
type: 'u8';
|
|
1325
|
-
},
|
|
1326
|
-
{
|
|
1327
|
-
name: 'addressMerkleTreeAccountIndex';
|
|
1328
|
-
type: 'u8';
|
|
1329
|
-
},
|
|
1330
|
-
{
|
|
1331
|
-
name: 'addressMerkleTreeRootIndex';
|
|
1332
|
-
type: 'u16';
|
|
1333
|
-
}
|
|
1334
|
-
];
|
|
1335
|
-
};
|
|
1336
|
-
},
|
|
1337
|
-
{
|
|
1338
|
-
name: 'OutputCompressedAccountWithPackedContext';
|
|
1339
|
-
type: {
|
|
1340
|
-
kind: 'struct';
|
|
1341
|
-
fields: [
|
|
1342
|
-
{
|
|
1343
|
-
name: 'compressedAccount';
|
|
1344
|
-
type: {
|
|
1345
|
-
defined: 'CompressedAccount';
|
|
1346
|
-
};
|
|
1347
|
-
},
|
|
1348
|
-
{
|
|
1349
|
-
name: 'merkleTreeIndex';
|
|
1350
|
-
type: 'u8';
|
|
1351
|
-
}
|
|
1352
|
-
];
|
|
1353
|
-
};
|
|
1354
|
-
},
|
|
1355
|
-
{
|
|
1356
|
-
name: 'PackedCompressedAccountWithMerkleContext';
|
|
1357
|
-
type: {
|
|
1358
|
-
kind: 'struct';
|
|
1359
|
-
fields: [
|
|
1360
|
-
{
|
|
1361
|
-
name: 'compressedAccount';
|
|
1362
|
-
type: {
|
|
1363
|
-
defined: 'CompressedAccount';
|
|
1364
|
-
};
|
|
1365
|
-
},
|
|
1366
|
-
{
|
|
1367
|
-
name: 'merkleContext';
|
|
1368
|
-
type: {
|
|
1369
|
-
defined: 'PackedMerkleContext';
|
|
1370
|
-
};
|
|
1371
|
-
},
|
|
1372
|
-
{
|
|
1373
|
-
name: 'rootIndex';
|
|
1374
|
-
docs: [
|
|
1375
|
-
'Index of root used in inclusion validity proof.'
|
|
1376
|
-
];
|
|
1377
|
-
type: 'u16';
|
|
1378
|
-
},
|
|
1379
|
-
{
|
|
1380
|
-
name: 'readOnly';
|
|
1381
|
-
docs: [
|
|
1382
|
-
'Placeholder to mark accounts read-only unimplemented set to false.'
|
|
1383
|
-
];
|
|
1384
|
-
type: 'bool';
|
|
1385
|
-
}
|
|
1386
|
-
];
|
|
1387
|
-
};
|
|
1388
|
-
},
|
|
1389
|
-
{
|
|
1390
|
-
name: 'PackedMerkleContext';
|
|
1391
|
-
type: {
|
|
1392
|
-
kind: 'struct';
|
|
1393
|
-
fields: [
|
|
1394
|
-
{
|
|
1395
|
-
name: 'merkleTreePubkeyIndex';
|
|
1396
|
-
type: 'u8';
|
|
1397
|
-
},
|
|
1398
|
-
{
|
|
1399
|
-
name: 'nullifierQueuePubkeyIndex';
|
|
1400
|
-
type: 'u8';
|
|
1401
|
-
},
|
|
1402
|
-
{
|
|
1403
|
-
name: 'leafIndex';
|
|
1404
|
-
type: 'u32';
|
|
1405
|
-
},
|
|
1406
|
-
{
|
|
1407
|
-
name: 'queueIndex';
|
|
1408
|
-
docs: [
|
|
1409
|
-
'Index of leaf in queue. Placeholder of batched Merkle tree updates',
|
|
1410
|
-
'currently unimplemented.'
|
|
1411
|
-
];
|
|
1412
|
-
type: {
|
|
1413
|
-
option: {
|
|
1414
|
-
defined: 'QueueIndex';
|
|
1415
|
-
};
|
|
1416
|
-
};
|
|
1417
|
-
}
|
|
1418
|
-
];
|
|
1419
|
-
};
|
|
1420
|
-
},
|
|
1421
|
-
{
|
|
1422
|
-
name: 'PackedTokenTransferOutputData';
|
|
1423
|
-
type: {
|
|
1424
|
-
kind: 'struct';
|
|
1425
|
-
fields: [
|
|
1426
|
-
{
|
|
1427
|
-
name: 'owner';
|
|
1428
|
-
type: 'publicKey';
|
|
1429
|
-
},
|
|
1430
|
-
{
|
|
1431
|
-
name: 'amount';
|
|
1432
|
-
type: 'u64';
|
|
1433
|
-
},
|
|
1434
|
-
{
|
|
1435
|
-
name: 'lamports';
|
|
1436
|
-
type: {
|
|
1437
|
-
option: 'u64';
|
|
1438
|
-
};
|
|
1439
|
-
},
|
|
1440
|
-
{
|
|
1441
|
-
name: 'merkleTreeIndex';
|
|
1442
|
-
type: 'u8';
|
|
1443
|
-
},
|
|
1444
|
-
{
|
|
1445
|
-
name: 'tlv';
|
|
1446
|
-
docs: [
|
|
1447
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
1448
|
-
];
|
|
1449
|
-
type: {
|
|
1450
|
-
option: 'bytes';
|
|
1451
|
-
};
|
|
1452
|
-
}
|
|
1453
|
-
];
|
|
1454
|
-
};
|
|
1455
|
-
},
|
|
1456
|
-
{
|
|
1457
|
-
name: 'PublicTransactionEvent';
|
|
1458
|
-
type: {
|
|
1459
|
-
kind: 'struct';
|
|
1460
|
-
fields: [
|
|
1461
|
-
{
|
|
1462
|
-
name: 'inputCompressedAccountHashes';
|
|
1463
|
-
type: {
|
|
1464
|
-
vec: {
|
|
1465
|
-
array: ['u8', 32];
|
|
1466
|
-
};
|
|
1467
|
-
};
|
|
1468
|
-
},
|
|
1469
|
-
{
|
|
1470
|
-
name: 'outputCompressedAccountHashes';
|
|
1471
|
-
type: {
|
|
1472
|
-
vec: {
|
|
1473
|
-
array: ['u8', 32];
|
|
1474
|
-
};
|
|
1475
|
-
};
|
|
1476
|
-
},
|
|
1477
|
-
{
|
|
1478
|
-
name: 'outputCompressedAccounts';
|
|
1479
|
-
type: {
|
|
1480
|
-
vec: {
|
|
1481
|
-
defined: 'OutputCompressedAccountWithPackedContext';
|
|
1482
|
-
};
|
|
1483
|
-
};
|
|
1484
|
-
},
|
|
1485
|
-
{
|
|
1486
|
-
name: 'outputLeafIndices';
|
|
1487
|
-
type: {
|
|
1488
|
-
vec: 'u32';
|
|
1489
|
-
};
|
|
1490
|
-
},
|
|
1491
|
-
{
|
|
1492
|
-
name: 'sequenceNumbers';
|
|
1493
|
-
type: {
|
|
1494
|
-
vec: {
|
|
1495
|
-
defined: 'MerkleTreeSequenceNumber';
|
|
1496
|
-
};
|
|
1497
|
-
};
|
|
1498
|
-
},
|
|
1499
|
-
{
|
|
1500
|
-
name: 'relayFee';
|
|
1501
|
-
type: {
|
|
1502
|
-
option: 'u64';
|
|
1503
|
-
};
|
|
1504
|
-
},
|
|
1505
|
-
{
|
|
1506
|
-
name: 'isCompress';
|
|
1507
|
-
type: 'bool';
|
|
1508
|
-
},
|
|
1509
|
-
{
|
|
1510
|
-
name: 'compressOrDecompressLamports';
|
|
1511
|
-
type: {
|
|
1512
|
-
option: 'u64';
|
|
1513
|
-
};
|
|
1514
|
-
},
|
|
1515
|
-
{
|
|
1516
|
-
name: 'pubkeyArray';
|
|
1517
|
-
type: {
|
|
1518
|
-
vec: 'publicKey';
|
|
1519
|
-
};
|
|
1520
|
-
},
|
|
1521
|
-
{
|
|
1522
|
-
name: 'message';
|
|
1523
|
-
type: {
|
|
1524
|
-
option: 'bytes';
|
|
1525
|
-
};
|
|
1526
|
-
}
|
|
1527
|
-
];
|
|
1528
|
-
};
|
|
1529
|
-
},
|
|
1530
|
-
{
|
|
1531
|
-
name: 'QueueIndex';
|
|
1532
|
-
type: {
|
|
1533
|
-
kind: 'struct';
|
|
1534
|
-
fields: [
|
|
1535
|
-
{
|
|
1536
|
-
name: 'queueId';
|
|
1537
|
-
docs: ['Id of queue in queue account.'];
|
|
1538
|
-
type: 'u8';
|
|
1539
|
-
},
|
|
1540
|
-
{
|
|
1541
|
-
name: 'index';
|
|
1542
|
-
docs: ['Index of compressed account hash in queue.'];
|
|
1543
|
-
type: 'u16';
|
|
1544
|
-
}
|
|
1545
|
-
];
|
|
1546
|
-
};
|
|
1547
|
-
},
|
|
1548
|
-
{
|
|
1549
|
-
name: 'RolloverMetadata';
|
|
1550
|
-
type: {
|
|
1551
|
-
kind: 'struct';
|
|
1552
|
-
fields: [
|
|
1553
|
-
{
|
|
1554
|
-
name: 'index';
|
|
1555
|
-
docs: ['Unique index.'];
|
|
1556
|
-
type: 'u64';
|
|
1557
|
-
},
|
|
1558
|
-
{
|
|
1559
|
-
name: 'rolloverFee';
|
|
1560
|
-
docs: [
|
|
1561
|
-
'This fee is used for rent for the next account.',
|
|
1562
|
-
'It accumulates in the account so that once the corresponding Merkle tree account is full it can be rolled over'
|
|
1563
|
-
];
|
|
1564
|
-
type: 'u64';
|
|
1565
|
-
},
|
|
1566
|
-
{
|
|
1567
|
-
name: 'rolloverThreshold';
|
|
1568
|
-
docs: [
|
|
1569
|
-
'The threshold in percentage points when the account should be rolled over (95 corresponds to 95% filled).'
|
|
1570
|
-
];
|
|
1571
|
-
type: 'u64';
|
|
1572
|
-
},
|
|
1573
|
-
{
|
|
1574
|
-
name: 'networkFee';
|
|
1575
|
-
docs: ['Tip for maintaining the account.'];
|
|
1576
|
-
type: 'u64';
|
|
1577
|
-
},
|
|
1578
|
-
{
|
|
1579
|
-
name: 'rolledoverSlot';
|
|
1580
|
-
docs: [
|
|
1581
|
-
'The slot when the account was rolled over, a rolled over account should not be written to.'
|
|
1582
|
-
];
|
|
1583
|
-
type: 'u64';
|
|
1584
|
-
},
|
|
1585
|
-
{
|
|
1586
|
-
name: 'closeThreshold';
|
|
1587
|
-
docs: [
|
|
1588
|
-
'If current slot is greater than rolledover_slot + close_threshold and',
|
|
1589
|
-
"the account is empty it can be closed. No 'close' functionality has been",
|
|
1590
|
-
'implemented yet.'
|
|
1591
|
-
];
|
|
1592
|
-
type: 'u64';
|
|
1593
|
-
},
|
|
1594
|
-
{
|
|
1595
|
-
name: 'additionalBytes';
|
|
1596
|
-
docs: [
|
|
1597
|
-
'Placeholder for bytes of additional accounts which are tied to the',
|
|
1598
|
-
'Merkle trees operation and need to be rolled over as well.'
|
|
1599
|
-
];
|
|
1600
|
-
type: 'u64';
|
|
1601
|
-
}
|
|
1602
|
-
];
|
|
1603
|
-
};
|
|
1604
|
-
},
|
|
1605
|
-
{
|
|
1606
|
-
name: 'TokenData';
|
|
1607
|
-
type: {
|
|
1608
|
-
kind: 'struct';
|
|
1609
|
-
fields: [
|
|
1610
|
-
{
|
|
1611
|
-
name: 'mint';
|
|
1612
|
-
docs: ['The mint associated with this account'];
|
|
1613
|
-
type: 'publicKey';
|
|
1614
|
-
},
|
|
1615
|
-
{
|
|
1616
|
-
name: 'owner';
|
|
1617
|
-
docs: ['The owner of this account.'];
|
|
1618
|
-
type: 'publicKey';
|
|
1619
|
-
},
|
|
1620
|
-
{
|
|
1621
|
-
name: 'amount';
|
|
1622
|
-
docs: ['The amount of tokens this account holds.'];
|
|
1623
|
-
type: 'u64';
|
|
1624
|
-
},
|
|
1625
|
-
{
|
|
1626
|
-
name: 'delegate';
|
|
1627
|
-
docs: [
|
|
1628
|
-
'If `delegate` is `Some` then `delegated_amount` represents',
|
|
1629
|
-
'the amount authorized by the delegate'
|
|
1630
|
-
];
|
|
1631
|
-
type: {
|
|
1632
|
-
option: 'publicKey';
|
|
1633
|
-
};
|
|
1634
|
-
},
|
|
1635
|
-
{
|
|
1636
|
-
name: 'state';
|
|
1637
|
-
docs: ["The account's state"];
|
|
1638
|
-
type: {
|
|
1639
|
-
defined: 'AccountState';
|
|
1640
|
-
};
|
|
1641
|
-
},
|
|
1642
|
-
{
|
|
1643
|
-
name: 'tlv';
|
|
1644
|
-
docs: [
|
|
1645
|
-
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
1646
|
-
];
|
|
1647
|
-
type: {
|
|
1648
|
-
option: 'bytes';
|
|
1649
|
-
};
|
|
1650
|
-
}
|
|
1651
|
-
];
|
|
1652
|
-
};
|
|
1653
|
-
}
|
|
1654
|
-
];
|
|
1655
|
-
errors: [
|
|
1656
|
-
{
|
|
1657
|
-
code: 6000;
|
|
1658
|
-
name: 'PublicKeyAmountMissmatch';
|
|
1659
|
-
msg: 'public keys and amounts must be of same length';
|
|
1660
|
-
},
|
|
1661
|
-
{
|
|
1662
|
-
code: 6001;
|
|
1663
|
-
name: 'ComputeInputSumFailed';
|
|
1664
|
-
msg: 'ComputeInputSumFailed';
|
|
1665
|
-
},
|
|
1666
|
-
{
|
|
1667
|
-
code: 6002;
|
|
1668
|
-
name: 'ComputeOutputSumFailed';
|
|
1669
|
-
msg: 'ComputeOutputSumFailed';
|
|
1670
|
-
},
|
|
1671
|
-
{
|
|
1672
|
-
code: 6003;
|
|
1673
|
-
name: 'ComputeCompressSumFailed';
|
|
1674
|
-
msg: 'ComputeCompressSumFailed';
|
|
1675
|
-
},
|
|
1676
|
-
{
|
|
1677
|
-
code: 6004;
|
|
1678
|
-
name: 'ComputeDecompressSumFailed';
|
|
1679
|
-
msg: 'ComputeDecompressSumFailed';
|
|
1680
|
-
},
|
|
1681
|
-
{
|
|
1682
|
-
code: 6005;
|
|
1683
|
-
name: 'SumCheckFailed';
|
|
1684
|
-
msg: 'SumCheckFailed';
|
|
1685
|
-
},
|
|
1686
|
-
{
|
|
1687
|
-
code: 6006;
|
|
1688
|
-
name: 'DecompressRecipientUndefinedForDecompress';
|
|
1689
|
-
msg: 'DecompressRecipientUndefinedForDecompress';
|
|
1690
|
-
},
|
|
1691
|
-
{
|
|
1692
|
-
code: 6007;
|
|
1693
|
-
name: 'CompressedPdaUndefinedForDecompress';
|
|
1694
|
-
msg: 'CompressedPdaUndefinedForDecompress';
|
|
1695
|
-
},
|
|
1696
|
-
{
|
|
1697
|
-
code: 6008;
|
|
1698
|
-
name: 'DeCompressAmountUndefinedForDecompress';
|
|
1699
|
-
msg: 'DeCompressAmountUndefinedForDecompress';
|
|
1700
|
-
},
|
|
1701
|
-
{
|
|
1702
|
-
code: 6009;
|
|
1703
|
-
name: 'CompressedPdaUndefinedForCompress';
|
|
1704
|
-
msg: 'CompressedPdaUndefinedForCompress';
|
|
1705
|
-
},
|
|
1706
|
-
{
|
|
1707
|
-
code: 6010;
|
|
1708
|
-
name: 'DeCompressAmountUndefinedForCompress';
|
|
1709
|
-
msg: 'DeCompressAmountUndefinedForCompress';
|
|
1710
|
-
},
|
|
1711
|
-
{
|
|
1712
|
-
code: 6011;
|
|
1713
|
-
name: 'DelegateSignerCheckFailed';
|
|
1714
|
-
msg: 'DelegateSignerCheckFailed';
|
|
1715
|
-
},
|
|
1716
|
-
{
|
|
1717
|
-
code: 6012;
|
|
1718
|
-
name: 'MintTooLarge';
|
|
1719
|
-
msg: 'Minted amount greater than u64::MAX';
|
|
1720
|
-
},
|
|
1721
|
-
{
|
|
1722
|
-
code: 6013;
|
|
1723
|
-
name: 'SplTokenSupplyMismatch';
|
|
1724
|
-
msg: 'SplTokenSupplyMismatch';
|
|
1725
|
-
},
|
|
1726
|
-
{
|
|
1727
|
-
code: 6014;
|
|
1728
|
-
name: 'HeapMemoryCheckFailed';
|
|
1729
|
-
msg: 'HeapMemoryCheckFailed';
|
|
1730
|
-
},
|
|
1731
|
-
{
|
|
1732
|
-
code: 6015;
|
|
1733
|
-
name: 'InstructionNotCallable';
|
|
1734
|
-
msg: 'The instruction is not callable';
|
|
1735
|
-
},
|
|
1736
|
-
{
|
|
1737
|
-
code: 6016;
|
|
1738
|
-
name: 'ArithmeticUnderflow';
|
|
1739
|
-
msg: 'ArithmeticUnderflow';
|
|
1740
|
-
},
|
|
1741
|
-
{
|
|
1742
|
-
code: 6017;
|
|
1743
|
-
name: 'HashToFieldError';
|
|
1744
|
-
msg: 'HashToFieldError';
|
|
1745
|
-
},
|
|
1746
|
-
{
|
|
1747
|
-
code: 6018;
|
|
1748
|
-
name: 'InvalidAuthorityMint';
|
|
1749
|
-
msg: 'Expected the authority to be also a mint authority';
|
|
1750
|
-
},
|
|
1751
|
-
{
|
|
1752
|
-
code: 6019;
|
|
1753
|
-
name: 'InvalidFreezeAuthority';
|
|
1754
|
-
msg: 'Provided authority is not the freeze authority';
|
|
1755
|
-
},
|
|
1756
|
-
{
|
|
1757
|
-
code: 6020;
|
|
1758
|
-
name: 'InvalidDelegateIndex';
|
|
1759
|
-
},
|
|
1760
|
-
{
|
|
1761
|
-
code: 6021;
|
|
1762
|
-
name: 'TokenPoolPdaUndefined';
|
|
1763
|
-
},
|
|
1764
|
-
{
|
|
1765
|
-
code: 6022;
|
|
1766
|
-
name: 'IsTokenPoolPda';
|
|
1767
|
-
msg: 'Compress or decompress recipient is the same account as the token pool pda.';
|
|
1768
|
-
},
|
|
1769
|
-
{
|
|
1770
|
-
code: 6023;
|
|
1771
|
-
name: 'InvalidTokenPoolPda';
|
|
1772
|
-
},
|
|
1773
|
-
{
|
|
1774
|
-
code: 6024;
|
|
1775
|
-
name: 'NoInputTokenAccountsProvided';
|
|
1776
|
-
},
|
|
1777
|
-
{
|
|
1778
|
-
code: 6025;
|
|
1779
|
-
name: 'NoInputsProvided';
|
|
1780
|
-
},
|
|
1781
|
-
{
|
|
1782
|
-
code: 6026;
|
|
1783
|
-
name: 'MintHasNoFreezeAuthority';
|
|
1784
|
-
},
|
|
1785
|
-
{
|
|
1786
|
-
code: 6027;
|
|
1787
|
-
name: 'MintWithInvalidExtension';
|
|
1788
|
-
},
|
|
1789
|
-
{
|
|
1790
|
-
code: 6028;
|
|
1791
|
-
name: 'InsufficientTokenAccountBalance';
|
|
1792
|
-
msg: 'The token account balance is less than the remaining amount.';
|
|
1793
|
-
}
|
|
1794
|
-
];
|
|
7
|
+
type CompressedCpiContext = {
|
|
8
|
+
setContext: boolean;
|
|
9
|
+
firstSetContext: boolean;
|
|
10
|
+
cpiContextAccountIndex: number;
|
|
1795
11
|
};
|
|
1796
|
-
declare const IDL: LightCompressedToken;
|
|
1797
|
-
|
|
1798
12
|
type TokenTransferOutputData = {
|
|
1799
13
|
/**
|
|
1800
14
|
* The owner of the output token account
|
|
@@ -1836,44 +50,32 @@ type PackedTokenTransferOutputData = {
|
|
|
1836
50
|
tlv: Buffer | null;
|
|
1837
51
|
};
|
|
1838
52
|
type InputTokenDataWithContext = {
|
|
1839
|
-
/**
|
|
1840
|
-
* The amount of tokens to transfer
|
|
1841
|
-
*/
|
|
1842
53
|
amount: BN;
|
|
1843
|
-
/**
|
|
1844
|
-
* Optional: The index of the delegate in remaining accounts
|
|
1845
|
-
*/
|
|
1846
54
|
delegateIndex: number | null;
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
*/
|
|
1850
|
-
merkleTreePubkeyIndex: number;
|
|
1851
|
-
/**
|
|
1852
|
-
* The index of the nullifier queue address in remaining accounts
|
|
1853
|
-
*/
|
|
1854
|
-
nullifierQueuePubkeyIndex: number;
|
|
1855
|
-
/**
|
|
1856
|
-
* The index of the leaf in the merkle tree
|
|
1857
|
-
*/
|
|
1858
|
-
leafIndex: number;
|
|
1859
|
-
/**
|
|
1860
|
-
* Lamports in the input token account.
|
|
1861
|
-
*/
|
|
55
|
+
merkleContext: PackedMerkleContext;
|
|
56
|
+
rootIndex: number;
|
|
1862
57
|
lamports: BN | null;
|
|
1863
|
-
/**
|
|
1864
|
-
* TokenExtension tlv
|
|
1865
|
-
*/
|
|
1866
58
|
tlv: Buffer | null;
|
|
1867
59
|
};
|
|
1868
|
-
type
|
|
60
|
+
type DelegatedTransfer = {
|
|
61
|
+
owner: PublicKey;
|
|
62
|
+
delegateChangeAccountIndex: number | null;
|
|
63
|
+
};
|
|
64
|
+
type MintToInstructionData = {
|
|
65
|
+
recipients: PublicKey[];
|
|
66
|
+
amounts: BN[];
|
|
67
|
+
lamports: BN | null;
|
|
68
|
+
};
|
|
69
|
+
type CompressSplTokenAccountInstructionData = {
|
|
70
|
+
owner: PublicKey;
|
|
71
|
+
remainingAmount: BN | null;
|
|
72
|
+
cpiContext: CompressedCpiContext | null;
|
|
73
|
+
};
|
|
74
|
+
type CompressedTokenInstructionDataTransfer = {
|
|
1869
75
|
/**
|
|
1870
76
|
* Validity proof
|
|
1871
77
|
*/
|
|
1872
78
|
proof: CompressedProof | null;
|
|
1873
|
-
/**
|
|
1874
|
-
* The root indices of the transfer
|
|
1875
|
-
*/
|
|
1876
|
-
rootIndices: number[];
|
|
1877
79
|
/**
|
|
1878
80
|
* The mint of the transfer
|
|
1879
81
|
*/
|
|
@@ -1882,7 +84,7 @@ type CompressedTokenInstructionDataInvoke = {
|
|
|
1882
84
|
* Whether the signer is a delegate
|
|
1883
85
|
* TODO: implement delegated transfer struct
|
|
1884
86
|
*/
|
|
1885
|
-
delegatedTransfer: null;
|
|
87
|
+
delegatedTransfer: DelegatedTransfer | null;
|
|
1886
88
|
/**
|
|
1887
89
|
* Input token data with packed merkle context
|
|
1888
90
|
*/
|
|
@@ -1890,12 +92,20 @@ type CompressedTokenInstructionDataInvoke = {
|
|
|
1890
92
|
/**
|
|
1891
93
|
* Data of the output token accounts
|
|
1892
94
|
*/
|
|
1893
|
-
outputCompressedAccounts:
|
|
95
|
+
outputCompressedAccounts: PackedTokenTransferOutputData[];
|
|
96
|
+
/**
|
|
97
|
+
* Whether it's a compress or decompress action if compressOrDecompressAmount is non-null
|
|
98
|
+
*/
|
|
99
|
+
isCompress: boolean;
|
|
100
|
+
/**
|
|
101
|
+
* If null, it's a transfer.
|
|
102
|
+
* If some, the amount that is being deposited into (compress) or withdrawn from (decompress) the token escrow
|
|
103
|
+
*/
|
|
104
|
+
compressOrDecompressAmount: BN | null;
|
|
1894
105
|
/**
|
|
1895
|
-
*
|
|
1896
|
-
* accounts'
|
|
106
|
+
* CPI context if
|
|
1897
107
|
*/
|
|
1898
|
-
|
|
108
|
+
cpiContext: CompressedCpiContext | null;
|
|
1899
109
|
/**
|
|
1900
110
|
* The index of the Merkle tree for a lamport change account.
|
|
1901
111
|
*/
|
|
@@ -1945,7 +155,7 @@ type PackCompressedTokenAccountsParams = {
|
|
|
1945
155
|
* from the state Merkle tree account for validity proof verification.
|
|
1946
156
|
*/
|
|
1947
157
|
rootIndices: number[];
|
|
1948
|
-
tokenTransferOutputs: TokenTransferOutputData
|
|
158
|
+
tokenTransferOutputs: TokenTransferOutputData[];
|
|
1949
159
|
};
|
|
1950
160
|
/**
|
|
1951
161
|
* Packs Compressed Token Accounts.
|
|
@@ -1959,6 +169,10 @@ declare function packCompressedTokenAccounts(params: PackCompressedTokenAccounts
|
|
|
1959
169
|
declare const POOL_SEED: Buffer;
|
|
1960
170
|
declare const CPI_AUTHORITY_SEED: Buffer;
|
|
1961
171
|
declare const SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE = 1461600;
|
|
172
|
+
declare const CREATE_TOKEN_POOL_DISCRIMINATOR: Buffer;
|
|
173
|
+
declare const MINT_TO_DISCRIMINATOR: Buffer;
|
|
174
|
+
declare const TRANSFER_DISCRIMINATOR: Buffer;
|
|
175
|
+
declare const COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR: Buffer;
|
|
1962
176
|
|
|
1963
177
|
type CompressParams = {
|
|
1964
178
|
/**
|
|
@@ -2300,7 +514,7 @@ declare const parseTokenData: (compressedTokenAccounts: ParsedTokenAccount[]) =>
|
|
|
2300
514
|
* @returns Output token data for the transfer
|
|
2301
515
|
* instruction
|
|
2302
516
|
*/
|
|
2303
|
-
declare function createTransferOutputState(inputCompressedTokenAccounts: ParsedTokenAccount[], toAddress: PublicKey, amount: number | BN): TokenTransferOutputData
|
|
517
|
+
declare function createTransferOutputState(inputCompressedTokenAccounts: ParsedTokenAccount[], toAddress: PublicKey, amount: number | BN): TokenTransferOutputData[];
|
|
2304
518
|
/**
|
|
2305
519
|
* Create the output state for a compress transaction.
|
|
2306
520
|
* @param inputCompressedTokenAccounts Input state
|
|
@@ -2308,7 +522,7 @@ declare function createTransferOutputState(inputCompressedTokenAccounts: ParsedT
|
|
|
2308
522
|
* @returns Output token data for the compress
|
|
2309
523
|
* instruction
|
|
2310
524
|
*/
|
|
2311
|
-
declare function createDecompressOutputState(inputCompressedTokenAccounts: ParsedTokenAccount[], amount: number | BN): TokenTransferOutputData
|
|
525
|
+
declare function createDecompressOutputState(inputCompressedTokenAccounts: ParsedTokenAccount[], amount: number | BN): TokenTransferOutputData[];
|
|
2312
526
|
declare class CompressedTokenProgram {
|
|
2313
527
|
/**
|
|
2314
528
|
* @internal
|
|
@@ -2325,14 +539,6 @@ declare class CompressedTokenProgram {
|
|
|
2325
539
|
* Use this only if you know what you are doing.
|
|
2326
540
|
*/
|
|
2327
541
|
static setProgramId(programId: PublicKey | string): void;
|
|
2328
|
-
private static _program;
|
|
2329
|
-
/** @internal */
|
|
2330
|
-
static get program(): Program<LightCompressedToken>;
|
|
2331
|
-
/**
|
|
2332
|
-
* @internal
|
|
2333
|
-
* Initializes the program statically if not already initialized.
|
|
2334
|
-
*/
|
|
2335
|
-
private static initializeProgram;
|
|
2336
542
|
/** @internal */
|
|
2337
543
|
static deriveTokenPoolPda(mint: PublicKey): PublicKey;
|
|
2338
544
|
/** @internal */
|
|
@@ -2569,4 +775,1797 @@ declare function createTokenProgramLookupTable(rpc: Rpc, payer: Signer, authorit
|
|
|
2569
775
|
*/
|
|
2570
776
|
declare function compressSplTokenAccount(rpc: Rpc, payer: Signer, mint: PublicKey, owner: Signer, tokenAccount: PublicKey, outputStateTree: PublicKey, remainingAmount?: BN, confirmOptions?: ConfirmOptions, tokenProgramId?: PublicKey): Promise<TransactionSignature>;
|
|
2571
777
|
|
|
2572
|
-
|
|
778
|
+
declare const DelegatedTransferLayout: buffer_layout.Layout<unknown>;
|
|
779
|
+
declare const CpiContextLayout: buffer_layout.Layout<unknown>;
|
|
780
|
+
declare const CompressedTokenInstructionDataTransferLayout: buffer_layout.Layout<unknown>;
|
|
781
|
+
declare const mintToLayout: buffer_layout.Layout<unknown>;
|
|
782
|
+
declare const compressSplTokenAccountInstructionDataLayout: buffer_layout.Layout<unknown>;
|
|
783
|
+
declare function encodeMintToInstructionData(data: MintToInstructionData): Buffer$1;
|
|
784
|
+
declare function decodeMintToInstructionData(buffer: Buffer$1): MintToInstructionData;
|
|
785
|
+
declare function encodeCompressSplTokenAccountInstructionData(data: CompressSplTokenAccountInstructionData): Buffer$1;
|
|
786
|
+
declare function decodeCompressSplTokenAccountInstructionData(buffer: Buffer$1): CompressSplTokenAccountInstructionData;
|
|
787
|
+
declare function encodeTransferInstructionData(data: CompressedTokenInstructionDataTransfer): Buffer$1;
|
|
788
|
+
declare function decodeTransferInstructionData(buffer: Buffer$1): CompressedTokenInstructionDataTransfer;
|
|
789
|
+
interface BaseAccountsLayoutParams {
|
|
790
|
+
feePayer: PublicKey;
|
|
791
|
+
authority: PublicKey;
|
|
792
|
+
cpiAuthorityPda: PublicKey;
|
|
793
|
+
lightSystemProgram: PublicKey;
|
|
794
|
+
registeredProgramPda: PublicKey;
|
|
795
|
+
noopProgram: PublicKey;
|
|
796
|
+
accountCompressionAuthority: PublicKey;
|
|
797
|
+
accountCompressionProgram: PublicKey;
|
|
798
|
+
selfProgram: PublicKey;
|
|
799
|
+
systemProgram: PublicKey;
|
|
800
|
+
}
|
|
801
|
+
type createTokenPoolAccountsLayoutParams = {
|
|
802
|
+
feePayer: PublicKey;
|
|
803
|
+
tokenPoolPda: PublicKey;
|
|
804
|
+
systemProgram: PublicKey;
|
|
805
|
+
mint: PublicKey;
|
|
806
|
+
tokenProgram: PublicKey;
|
|
807
|
+
cpiAuthorityPda: PublicKey;
|
|
808
|
+
};
|
|
809
|
+
type mintToAccountsLayoutParams = BaseAccountsLayoutParams & {
|
|
810
|
+
mint: PublicKey;
|
|
811
|
+
tokenPoolPda: PublicKey;
|
|
812
|
+
tokenProgram: PublicKey;
|
|
813
|
+
merkleTree: PublicKey;
|
|
814
|
+
solPoolPda: PublicKey | null;
|
|
815
|
+
};
|
|
816
|
+
type transferAccountsLayoutParams = BaseAccountsLayoutParams & {
|
|
817
|
+
tokenPoolPda?: PublicKey;
|
|
818
|
+
compressOrDecompressTokenAccount?: PublicKey;
|
|
819
|
+
tokenProgram?: PublicKey;
|
|
820
|
+
};
|
|
821
|
+
type approveAccountsLayoutParams = BaseAccountsLayoutParams;
|
|
822
|
+
type revokeAccountsLayoutParams = approveAccountsLayoutParams;
|
|
823
|
+
type freezeAccountsLayoutParams = BaseAccountsLayoutParams & {
|
|
824
|
+
mint: PublicKey;
|
|
825
|
+
};
|
|
826
|
+
type thawAccountsLayoutParams = freezeAccountsLayoutParams;
|
|
827
|
+
declare const createTokenPoolAccountsLayout: (accounts: createTokenPoolAccountsLayoutParams) => AccountMeta[];
|
|
828
|
+
declare const mintToAccountsLayout: (accounts: mintToAccountsLayoutParams) => AccountMeta[];
|
|
829
|
+
declare const transferAccountsLayout: (accounts: transferAccountsLayoutParams) => AccountMeta[];
|
|
830
|
+
|
|
831
|
+
type LightCompressedToken = {
|
|
832
|
+
version: '1.2.0';
|
|
833
|
+
name: 'light_compressed_token';
|
|
834
|
+
instructions: [
|
|
835
|
+
{
|
|
836
|
+
name: 'createTokenPool';
|
|
837
|
+
docs: [
|
|
838
|
+
'This instruction creates a token pool for a given mint. Every spl mint',
|
|
839
|
+
'can have one token pool. When a token is compressed the tokens are',
|
|
840
|
+
'transferrred to the token pool, and their compressed equivalent is',
|
|
841
|
+
'minted into a Merkle tree.'
|
|
842
|
+
];
|
|
843
|
+
accounts: [
|
|
844
|
+
{
|
|
845
|
+
name: 'feePayer';
|
|
846
|
+
isMut: true;
|
|
847
|
+
isSigner: true;
|
|
848
|
+
docs: ['UNCHECKED: only pays fees.'];
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
name: 'tokenPoolPda';
|
|
852
|
+
isMut: true;
|
|
853
|
+
isSigner: false;
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
name: 'systemProgram';
|
|
857
|
+
isMut: false;
|
|
858
|
+
isSigner: false;
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
name: 'mint';
|
|
862
|
+
isMut: true;
|
|
863
|
+
isSigner: false;
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
name: 'tokenProgram';
|
|
867
|
+
isMut: false;
|
|
868
|
+
isSigner: false;
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
name: 'cpiAuthorityPda';
|
|
872
|
+
isMut: false;
|
|
873
|
+
isSigner: false;
|
|
874
|
+
}
|
|
875
|
+
];
|
|
876
|
+
args: [];
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
name: 'addTokenPool';
|
|
880
|
+
docs: [
|
|
881
|
+
'This instruction creates an additional token pool for a given mint.',
|
|
882
|
+
'The maximum number of token pools per mint is 5.'
|
|
883
|
+
];
|
|
884
|
+
accounts: [
|
|
885
|
+
{
|
|
886
|
+
name: 'feePayer';
|
|
887
|
+
isMut: true;
|
|
888
|
+
isSigner: true;
|
|
889
|
+
docs: ['UNCHECKED: only pays fees.'];
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
name: 'tokenPoolPda';
|
|
893
|
+
isMut: true;
|
|
894
|
+
isSigner: false;
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
name: 'existingTokenPoolPda';
|
|
898
|
+
isMut: false;
|
|
899
|
+
isSigner: false;
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
name: 'systemProgram';
|
|
903
|
+
isMut: false;
|
|
904
|
+
isSigner: false;
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
name: 'mint';
|
|
908
|
+
isMut: true;
|
|
909
|
+
isSigner: false;
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
name: 'tokenProgram';
|
|
913
|
+
isMut: false;
|
|
914
|
+
isSigner: false;
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
name: 'cpiAuthorityPda';
|
|
918
|
+
isMut: false;
|
|
919
|
+
isSigner: false;
|
|
920
|
+
}
|
|
921
|
+
];
|
|
922
|
+
args: [
|
|
923
|
+
{
|
|
924
|
+
name: 'tokenPoolBump';
|
|
925
|
+
type: 'u8';
|
|
926
|
+
}
|
|
927
|
+
];
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
name: 'mintTo';
|
|
931
|
+
docs: [
|
|
932
|
+
'Mints tokens from an spl token mint to a list of compressed accounts.',
|
|
933
|
+
'Minted tokens are transferred to a pool account owned by the compressed',
|
|
934
|
+
'token program. The instruction creates one compressed output account for',
|
|
935
|
+
'every amount and pubkey input pair. A constant amount of lamports can be',
|
|
936
|
+
'transferred to each output account to enable. A use case to add lamports',
|
|
937
|
+
'to a compressed token account is to prevent spam. This is the only way',
|
|
938
|
+
'to add lamports to a compressed token account.'
|
|
939
|
+
];
|
|
940
|
+
accounts: [
|
|
941
|
+
{
|
|
942
|
+
name: 'feePayer';
|
|
943
|
+
isMut: true;
|
|
944
|
+
isSigner: true;
|
|
945
|
+
docs: ['UNCHECKED: only pays fees.'];
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
name: 'authority';
|
|
949
|
+
isMut: false;
|
|
950
|
+
isSigner: true;
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
name: 'cpiAuthorityPda';
|
|
954
|
+
isMut: false;
|
|
955
|
+
isSigner: false;
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
name: 'mint';
|
|
959
|
+
isMut: true;
|
|
960
|
+
isSigner: false;
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
name: 'tokenPoolPda';
|
|
964
|
+
isMut: true;
|
|
965
|
+
isSigner: false;
|
|
966
|
+
},
|
|
967
|
+
{
|
|
968
|
+
name: 'tokenProgram';
|
|
969
|
+
isMut: false;
|
|
970
|
+
isSigner: false;
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
name: 'lightSystemProgram';
|
|
974
|
+
isMut: false;
|
|
975
|
+
isSigner: false;
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
name: 'registeredProgramPda';
|
|
979
|
+
isMut: false;
|
|
980
|
+
isSigner: false;
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
name: 'noopProgram';
|
|
984
|
+
isMut: false;
|
|
985
|
+
isSigner: false;
|
|
986
|
+
docs: ['programs'];
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
name: 'accountCompressionAuthority';
|
|
990
|
+
isMut: false;
|
|
991
|
+
isSigner: false;
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
name: 'accountCompressionProgram';
|
|
995
|
+
isMut: false;
|
|
996
|
+
isSigner: false;
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
name: 'merkleTree';
|
|
1000
|
+
isMut: true;
|
|
1001
|
+
isSigner: false;
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
name: 'selfProgram';
|
|
1005
|
+
isMut: false;
|
|
1006
|
+
isSigner: false;
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
name: 'systemProgram';
|
|
1010
|
+
isMut: false;
|
|
1011
|
+
isSigner: false;
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
name: 'solPoolPda';
|
|
1015
|
+
isMut: true;
|
|
1016
|
+
isSigner: false;
|
|
1017
|
+
isOptional: true;
|
|
1018
|
+
}
|
|
1019
|
+
];
|
|
1020
|
+
args: [
|
|
1021
|
+
{
|
|
1022
|
+
name: 'publicKeys';
|
|
1023
|
+
type: {
|
|
1024
|
+
vec: 'publicKey';
|
|
1025
|
+
};
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
name: 'amounts';
|
|
1029
|
+
type: {
|
|
1030
|
+
vec: 'u64';
|
|
1031
|
+
};
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
name: 'lamports';
|
|
1035
|
+
type: {
|
|
1036
|
+
option: 'u64';
|
|
1037
|
+
};
|
|
1038
|
+
}
|
|
1039
|
+
];
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
name: 'compressSplTokenAccount';
|
|
1043
|
+
docs: [
|
|
1044
|
+
'Compresses the balance of an spl token account sub an optional remaining',
|
|
1045
|
+
'amount. This instruction does not close the spl token account. To close',
|
|
1046
|
+
'the account bundle a close spl account instruction in your transaction.'
|
|
1047
|
+
];
|
|
1048
|
+
accounts: [
|
|
1049
|
+
{
|
|
1050
|
+
name: 'feePayer';
|
|
1051
|
+
isMut: true;
|
|
1052
|
+
isSigner: true;
|
|
1053
|
+
docs: ['UNCHECKED: only pays fees.'];
|
|
1054
|
+
},
|
|
1055
|
+
{
|
|
1056
|
+
name: 'authority';
|
|
1057
|
+
isMut: false;
|
|
1058
|
+
isSigner: true;
|
|
1059
|
+
docs: [
|
|
1060
|
+
'Authority is verified through proof since both owner and delegate',
|
|
1061
|
+
'are included in the token data hash, which is a public input to the',
|
|
1062
|
+
'validity proof.'
|
|
1063
|
+
];
|
|
1064
|
+
},
|
|
1065
|
+
{
|
|
1066
|
+
name: 'cpiAuthorityPda';
|
|
1067
|
+
isMut: false;
|
|
1068
|
+
isSigner: false;
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
name: 'lightSystemProgram';
|
|
1072
|
+
isMut: false;
|
|
1073
|
+
isSigner: false;
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
name: 'registeredProgramPda';
|
|
1077
|
+
isMut: false;
|
|
1078
|
+
isSigner: false;
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
name: 'noopProgram';
|
|
1082
|
+
isMut: false;
|
|
1083
|
+
isSigner: false;
|
|
1084
|
+
},
|
|
1085
|
+
{
|
|
1086
|
+
name: 'accountCompressionAuthority';
|
|
1087
|
+
isMut: false;
|
|
1088
|
+
isSigner: false;
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
name: 'accountCompressionProgram';
|
|
1092
|
+
isMut: false;
|
|
1093
|
+
isSigner: false;
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
name: 'selfProgram';
|
|
1097
|
+
isMut: false;
|
|
1098
|
+
isSigner: false;
|
|
1099
|
+
docs: ['this program is the signer of the cpi.'];
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
name: 'tokenPoolPda';
|
|
1103
|
+
isMut: true;
|
|
1104
|
+
isSigner: false;
|
|
1105
|
+
isOptional: true;
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
name: 'compressOrDecompressTokenAccount';
|
|
1109
|
+
isMut: true;
|
|
1110
|
+
isSigner: false;
|
|
1111
|
+
isOptional: true;
|
|
1112
|
+
},
|
|
1113
|
+
{
|
|
1114
|
+
name: 'tokenProgram';
|
|
1115
|
+
isMut: false;
|
|
1116
|
+
isSigner: false;
|
|
1117
|
+
isOptional: true;
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
name: 'systemProgram';
|
|
1121
|
+
isMut: false;
|
|
1122
|
+
isSigner: false;
|
|
1123
|
+
}
|
|
1124
|
+
];
|
|
1125
|
+
args: [
|
|
1126
|
+
{
|
|
1127
|
+
name: 'owner';
|
|
1128
|
+
type: 'publicKey';
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
name: 'remainingAmount';
|
|
1132
|
+
type: {
|
|
1133
|
+
option: 'u64';
|
|
1134
|
+
};
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
name: 'cpiContext';
|
|
1138
|
+
type: {
|
|
1139
|
+
option: {
|
|
1140
|
+
defined: 'CompressedCpiContext';
|
|
1141
|
+
};
|
|
1142
|
+
};
|
|
1143
|
+
}
|
|
1144
|
+
];
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
name: 'transfer';
|
|
1148
|
+
docs: [
|
|
1149
|
+
'Transfers compressed tokens from one account to another. All accounts',
|
|
1150
|
+
'must be of the same mint. Additional spl tokens can be compressed or',
|
|
1151
|
+
'decompressed. In one transaction only compression or decompression is',
|
|
1152
|
+
'possible. Lamports can be transferred alongside tokens. If output token',
|
|
1153
|
+
'accounts specify less lamports than inputs the remaining lamports are',
|
|
1154
|
+
'transferred to an output compressed account. Signer must be owner or',
|
|
1155
|
+
'delegate. If a delegated token account is transferred the delegate is',
|
|
1156
|
+
'not preserved.'
|
|
1157
|
+
];
|
|
1158
|
+
accounts: [
|
|
1159
|
+
{
|
|
1160
|
+
name: 'feePayer';
|
|
1161
|
+
isMut: true;
|
|
1162
|
+
isSigner: true;
|
|
1163
|
+
docs: ['UNCHECKED: only pays fees.'];
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
name: 'authority';
|
|
1167
|
+
isMut: false;
|
|
1168
|
+
isSigner: true;
|
|
1169
|
+
docs: [
|
|
1170
|
+
'Authority is verified through proof since both owner and delegate',
|
|
1171
|
+
'are included in the token data hash, which is a public input to the',
|
|
1172
|
+
'validity proof.'
|
|
1173
|
+
];
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
name: 'cpiAuthorityPda';
|
|
1177
|
+
isMut: false;
|
|
1178
|
+
isSigner: false;
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
name: 'lightSystemProgram';
|
|
1182
|
+
isMut: false;
|
|
1183
|
+
isSigner: false;
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
name: 'registeredProgramPda';
|
|
1187
|
+
isMut: false;
|
|
1188
|
+
isSigner: false;
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
name: 'noopProgram';
|
|
1192
|
+
isMut: false;
|
|
1193
|
+
isSigner: false;
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
name: 'accountCompressionAuthority';
|
|
1197
|
+
isMut: false;
|
|
1198
|
+
isSigner: false;
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
name: 'accountCompressionProgram';
|
|
1202
|
+
isMut: false;
|
|
1203
|
+
isSigner: false;
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
name: 'selfProgram';
|
|
1207
|
+
isMut: false;
|
|
1208
|
+
isSigner: false;
|
|
1209
|
+
docs: ['this program is the signer of the cpi.'];
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
name: 'tokenPoolPda';
|
|
1213
|
+
isMut: true;
|
|
1214
|
+
isSigner: false;
|
|
1215
|
+
isOptional: true;
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
name: 'compressOrDecompressTokenAccount';
|
|
1219
|
+
isMut: true;
|
|
1220
|
+
isSigner: false;
|
|
1221
|
+
isOptional: true;
|
|
1222
|
+
},
|
|
1223
|
+
{
|
|
1224
|
+
name: 'tokenProgram';
|
|
1225
|
+
isMut: false;
|
|
1226
|
+
isSigner: false;
|
|
1227
|
+
isOptional: true;
|
|
1228
|
+
},
|
|
1229
|
+
{
|
|
1230
|
+
name: 'systemProgram';
|
|
1231
|
+
isMut: false;
|
|
1232
|
+
isSigner: false;
|
|
1233
|
+
}
|
|
1234
|
+
];
|
|
1235
|
+
args: [
|
|
1236
|
+
{
|
|
1237
|
+
name: 'inputs';
|
|
1238
|
+
type: 'bytes';
|
|
1239
|
+
}
|
|
1240
|
+
];
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
name: 'approve';
|
|
1244
|
+
docs: [
|
|
1245
|
+
'Delegates an amount to a delegate. A compressed token account is either',
|
|
1246
|
+
'completely delegated or not. Prior delegates are not preserved. Cannot',
|
|
1247
|
+
'be called by a delegate.',
|
|
1248
|
+
'The instruction creates two output accounts:',
|
|
1249
|
+
'1. one account with delegated amount',
|
|
1250
|
+
'2. one account with remaining(change) amount'
|
|
1251
|
+
];
|
|
1252
|
+
accounts: [
|
|
1253
|
+
{
|
|
1254
|
+
name: 'feePayer';
|
|
1255
|
+
isMut: true;
|
|
1256
|
+
isSigner: true;
|
|
1257
|
+
docs: ['UNCHECKED: only pays fees.'];
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
name: 'authority';
|
|
1261
|
+
isMut: false;
|
|
1262
|
+
isSigner: true;
|
|
1263
|
+
docs: [
|
|
1264
|
+
'Authority is verified through proof since both owner and delegate',
|
|
1265
|
+
'are included in the token data hash, which is a public input to the',
|
|
1266
|
+
'validity proof.'
|
|
1267
|
+
];
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
name: 'cpiAuthorityPda';
|
|
1271
|
+
isMut: false;
|
|
1272
|
+
isSigner: false;
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
name: 'lightSystemProgram';
|
|
1276
|
+
isMut: false;
|
|
1277
|
+
isSigner: false;
|
|
1278
|
+
},
|
|
1279
|
+
{
|
|
1280
|
+
name: 'registeredProgramPda';
|
|
1281
|
+
isMut: false;
|
|
1282
|
+
isSigner: false;
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
name: 'noopProgram';
|
|
1286
|
+
isMut: false;
|
|
1287
|
+
isSigner: false;
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
name: 'accountCompressionAuthority';
|
|
1291
|
+
isMut: false;
|
|
1292
|
+
isSigner: false;
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
name: 'accountCompressionProgram';
|
|
1296
|
+
isMut: false;
|
|
1297
|
+
isSigner: false;
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
name: 'selfProgram';
|
|
1301
|
+
isMut: false;
|
|
1302
|
+
isSigner: false;
|
|
1303
|
+
docs: ['this program is the signer of the cpi.'];
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
name: 'systemProgram';
|
|
1307
|
+
isMut: false;
|
|
1308
|
+
isSigner: false;
|
|
1309
|
+
}
|
|
1310
|
+
];
|
|
1311
|
+
args: [
|
|
1312
|
+
{
|
|
1313
|
+
name: 'inputs';
|
|
1314
|
+
type: 'bytes';
|
|
1315
|
+
}
|
|
1316
|
+
];
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
name: 'revoke';
|
|
1320
|
+
docs: [
|
|
1321
|
+
'Revokes a delegation. The instruction merges all inputs into one output',
|
|
1322
|
+
'account. Cannot be called by a delegate. Delegates are not preserved.'
|
|
1323
|
+
];
|
|
1324
|
+
accounts: [
|
|
1325
|
+
{
|
|
1326
|
+
name: 'feePayer';
|
|
1327
|
+
isMut: true;
|
|
1328
|
+
isSigner: true;
|
|
1329
|
+
docs: ['UNCHECKED: only pays fees.'];
|
|
1330
|
+
},
|
|
1331
|
+
{
|
|
1332
|
+
name: 'authority';
|
|
1333
|
+
isMut: false;
|
|
1334
|
+
isSigner: true;
|
|
1335
|
+
docs: [
|
|
1336
|
+
'Authority is verified through proof since both owner and delegate',
|
|
1337
|
+
'are included in the token data hash, which is a public input to the',
|
|
1338
|
+
'validity proof.'
|
|
1339
|
+
];
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
name: 'cpiAuthorityPda';
|
|
1343
|
+
isMut: false;
|
|
1344
|
+
isSigner: false;
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
name: 'lightSystemProgram';
|
|
1348
|
+
isMut: false;
|
|
1349
|
+
isSigner: false;
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
name: 'registeredProgramPda';
|
|
1353
|
+
isMut: false;
|
|
1354
|
+
isSigner: false;
|
|
1355
|
+
},
|
|
1356
|
+
{
|
|
1357
|
+
name: 'noopProgram';
|
|
1358
|
+
isMut: false;
|
|
1359
|
+
isSigner: false;
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
name: 'accountCompressionAuthority';
|
|
1363
|
+
isMut: false;
|
|
1364
|
+
isSigner: false;
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
name: 'accountCompressionProgram';
|
|
1368
|
+
isMut: false;
|
|
1369
|
+
isSigner: false;
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
name: 'selfProgram';
|
|
1373
|
+
isMut: false;
|
|
1374
|
+
isSigner: false;
|
|
1375
|
+
docs: ['this program is the signer of the cpi.'];
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
name: 'systemProgram';
|
|
1379
|
+
isMut: false;
|
|
1380
|
+
isSigner: false;
|
|
1381
|
+
}
|
|
1382
|
+
];
|
|
1383
|
+
args: [
|
|
1384
|
+
{
|
|
1385
|
+
name: 'inputs';
|
|
1386
|
+
type: 'bytes';
|
|
1387
|
+
}
|
|
1388
|
+
];
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
name: 'freeze';
|
|
1392
|
+
docs: [
|
|
1393
|
+
'Freezes compressed token accounts. Inputs must not be frozen. Creates as',
|
|
1394
|
+
'many outputs as inputs. Balances and delegates are preserved.'
|
|
1395
|
+
];
|
|
1396
|
+
accounts: [
|
|
1397
|
+
{
|
|
1398
|
+
name: 'feePayer';
|
|
1399
|
+
isMut: true;
|
|
1400
|
+
isSigner: true;
|
|
1401
|
+
docs: ['UNCHECKED: only pays fees.'];
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
name: 'authority';
|
|
1405
|
+
isMut: false;
|
|
1406
|
+
isSigner: true;
|
|
1407
|
+
},
|
|
1408
|
+
{
|
|
1409
|
+
name: 'cpiAuthorityPda';
|
|
1410
|
+
isMut: false;
|
|
1411
|
+
isSigner: false;
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
name: 'lightSystemProgram';
|
|
1415
|
+
isMut: false;
|
|
1416
|
+
isSigner: false;
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
name: 'registeredProgramPda';
|
|
1420
|
+
isMut: false;
|
|
1421
|
+
isSigner: false;
|
|
1422
|
+
},
|
|
1423
|
+
{
|
|
1424
|
+
name: 'noopProgram';
|
|
1425
|
+
isMut: false;
|
|
1426
|
+
isSigner: false;
|
|
1427
|
+
},
|
|
1428
|
+
{
|
|
1429
|
+
name: 'accountCompressionAuthority';
|
|
1430
|
+
isMut: false;
|
|
1431
|
+
isSigner: false;
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
name: 'accountCompressionProgram';
|
|
1435
|
+
isMut: false;
|
|
1436
|
+
isSigner: false;
|
|
1437
|
+
},
|
|
1438
|
+
{
|
|
1439
|
+
name: 'selfProgram';
|
|
1440
|
+
isMut: false;
|
|
1441
|
+
isSigner: false;
|
|
1442
|
+
docs: ['that this program is the signer of the cpi.'];
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
name: 'systemProgram';
|
|
1446
|
+
isMut: false;
|
|
1447
|
+
isSigner: false;
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
name: 'mint';
|
|
1451
|
+
isMut: false;
|
|
1452
|
+
isSigner: false;
|
|
1453
|
+
}
|
|
1454
|
+
];
|
|
1455
|
+
args: [
|
|
1456
|
+
{
|
|
1457
|
+
name: 'inputs';
|
|
1458
|
+
type: 'bytes';
|
|
1459
|
+
}
|
|
1460
|
+
];
|
|
1461
|
+
},
|
|
1462
|
+
{
|
|
1463
|
+
name: 'thaw';
|
|
1464
|
+
docs: [
|
|
1465
|
+
'Thaws frozen compressed token accounts. Inputs must be frozen. Creates',
|
|
1466
|
+
'as many outputs as inputs. Balances and delegates are preserved.'
|
|
1467
|
+
];
|
|
1468
|
+
accounts: [
|
|
1469
|
+
{
|
|
1470
|
+
name: 'feePayer';
|
|
1471
|
+
isMut: true;
|
|
1472
|
+
isSigner: true;
|
|
1473
|
+
docs: ['UNCHECKED: only pays fees.'];
|
|
1474
|
+
},
|
|
1475
|
+
{
|
|
1476
|
+
name: 'authority';
|
|
1477
|
+
isMut: false;
|
|
1478
|
+
isSigner: true;
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
name: 'cpiAuthorityPda';
|
|
1482
|
+
isMut: false;
|
|
1483
|
+
isSigner: false;
|
|
1484
|
+
},
|
|
1485
|
+
{
|
|
1486
|
+
name: 'lightSystemProgram';
|
|
1487
|
+
isMut: false;
|
|
1488
|
+
isSigner: false;
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
name: 'registeredProgramPda';
|
|
1492
|
+
isMut: false;
|
|
1493
|
+
isSigner: false;
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1496
|
+
name: 'noopProgram';
|
|
1497
|
+
isMut: false;
|
|
1498
|
+
isSigner: false;
|
|
1499
|
+
},
|
|
1500
|
+
{
|
|
1501
|
+
name: 'accountCompressionAuthority';
|
|
1502
|
+
isMut: false;
|
|
1503
|
+
isSigner: false;
|
|
1504
|
+
},
|
|
1505
|
+
{
|
|
1506
|
+
name: 'accountCompressionProgram';
|
|
1507
|
+
isMut: false;
|
|
1508
|
+
isSigner: false;
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
name: 'selfProgram';
|
|
1512
|
+
isMut: false;
|
|
1513
|
+
isSigner: false;
|
|
1514
|
+
docs: ['that this program is the signer of the cpi.'];
|
|
1515
|
+
},
|
|
1516
|
+
{
|
|
1517
|
+
name: 'systemProgram';
|
|
1518
|
+
isMut: false;
|
|
1519
|
+
isSigner: false;
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
name: 'mint';
|
|
1523
|
+
isMut: false;
|
|
1524
|
+
isSigner: false;
|
|
1525
|
+
}
|
|
1526
|
+
];
|
|
1527
|
+
args: [
|
|
1528
|
+
{
|
|
1529
|
+
name: 'inputs';
|
|
1530
|
+
type: 'bytes';
|
|
1531
|
+
}
|
|
1532
|
+
];
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
name: 'burn';
|
|
1536
|
+
docs: [
|
|
1537
|
+
'Burns compressed tokens and spl tokens from the pool account. Delegates',
|
|
1538
|
+
'can burn tokens. The output compressed token account remains delegated.',
|
|
1539
|
+
'Creates one output compressed token account.'
|
|
1540
|
+
];
|
|
1541
|
+
accounts: [
|
|
1542
|
+
{
|
|
1543
|
+
name: 'feePayer';
|
|
1544
|
+
isMut: true;
|
|
1545
|
+
isSigner: true;
|
|
1546
|
+
docs: ['UNCHECKED: only pays fees.'];
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
name: 'authority';
|
|
1550
|
+
isMut: false;
|
|
1551
|
+
isSigner: true;
|
|
1552
|
+
docs: [
|
|
1553
|
+
'Authority is verified through proof since both owner and delegate',
|
|
1554
|
+
'are included in the token data hash, which is a public input to the',
|
|
1555
|
+
'validity proof.'
|
|
1556
|
+
];
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
name: 'cpiAuthorityPda';
|
|
1560
|
+
isMut: false;
|
|
1561
|
+
isSigner: false;
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
name: 'mint';
|
|
1565
|
+
isMut: true;
|
|
1566
|
+
isSigner: false;
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
name: 'tokenPoolPda';
|
|
1570
|
+
isMut: true;
|
|
1571
|
+
isSigner: false;
|
|
1572
|
+
},
|
|
1573
|
+
{
|
|
1574
|
+
name: 'tokenProgram';
|
|
1575
|
+
isMut: false;
|
|
1576
|
+
isSigner: false;
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
name: 'lightSystemProgram';
|
|
1580
|
+
isMut: false;
|
|
1581
|
+
isSigner: false;
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
name: 'registeredProgramPda';
|
|
1585
|
+
isMut: false;
|
|
1586
|
+
isSigner: false;
|
|
1587
|
+
},
|
|
1588
|
+
{
|
|
1589
|
+
name: 'noopProgram';
|
|
1590
|
+
isMut: false;
|
|
1591
|
+
isSigner: false;
|
|
1592
|
+
},
|
|
1593
|
+
{
|
|
1594
|
+
name: 'accountCompressionAuthority';
|
|
1595
|
+
isMut: false;
|
|
1596
|
+
isSigner: false;
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
name: 'accountCompressionProgram';
|
|
1600
|
+
isMut: false;
|
|
1601
|
+
isSigner: false;
|
|
1602
|
+
},
|
|
1603
|
+
{
|
|
1604
|
+
name: 'selfProgram';
|
|
1605
|
+
isMut: false;
|
|
1606
|
+
isSigner: false;
|
|
1607
|
+
},
|
|
1608
|
+
{
|
|
1609
|
+
name: 'systemProgram';
|
|
1610
|
+
isMut: false;
|
|
1611
|
+
isSigner: false;
|
|
1612
|
+
}
|
|
1613
|
+
];
|
|
1614
|
+
args: [
|
|
1615
|
+
{
|
|
1616
|
+
name: 'inputs';
|
|
1617
|
+
type: 'bytes';
|
|
1618
|
+
}
|
|
1619
|
+
];
|
|
1620
|
+
},
|
|
1621
|
+
{
|
|
1622
|
+
name: 'stubIdlBuild';
|
|
1623
|
+
docs: [
|
|
1624
|
+
'This function is a stub to allow Anchor to include the input types in',
|
|
1625
|
+
'the IDL. It should not be included in production builds nor be called in',
|
|
1626
|
+
'practice.'
|
|
1627
|
+
];
|
|
1628
|
+
accounts: [
|
|
1629
|
+
{
|
|
1630
|
+
name: 'feePayer';
|
|
1631
|
+
isMut: true;
|
|
1632
|
+
isSigner: true;
|
|
1633
|
+
docs: ['UNCHECKED: only pays fees.'];
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
name: 'authority';
|
|
1637
|
+
isMut: false;
|
|
1638
|
+
isSigner: true;
|
|
1639
|
+
docs: [
|
|
1640
|
+
'Authority is verified through proof since both owner and delegate',
|
|
1641
|
+
'are included in the token data hash, which is a public input to the',
|
|
1642
|
+
'validity proof.'
|
|
1643
|
+
];
|
|
1644
|
+
},
|
|
1645
|
+
{
|
|
1646
|
+
name: 'cpiAuthorityPda';
|
|
1647
|
+
isMut: false;
|
|
1648
|
+
isSigner: false;
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
name: 'lightSystemProgram';
|
|
1652
|
+
isMut: false;
|
|
1653
|
+
isSigner: false;
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
name: 'registeredProgramPda';
|
|
1657
|
+
isMut: false;
|
|
1658
|
+
isSigner: false;
|
|
1659
|
+
},
|
|
1660
|
+
{
|
|
1661
|
+
name: 'noopProgram';
|
|
1662
|
+
isMut: false;
|
|
1663
|
+
isSigner: false;
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
name: 'accountCompressionAuthority';
|
|
1667
|
+
isMut: false;
|
|
1668
|
+
isSigner: false;
|
|
1669
|
+
},
|
|
1670
|
+
{
|
|
1671
|
+
name: 'accountCompressionProgram';
|
|
1672
|
+
isMut: false;
|
|
1673
|
+
isSigner: false;
|
|
1674
|
+
},
|
|
1675
|
+
{
|
|
1676
|
+
name: 'selfProgram';
|
|
1677
|
+
isMut: false;
|
|
1678
|
+
isSigner: false;
|
|
1679
|
+
docs: ['this program is the signer of the cpi.'];
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
name: 'tokenPoolPda';
|
|
1683
|
+
isMut: true;
|
|
1684
|
+
isSigner: false;
|
|
1685
|
+
isOptional: true;
|
|
1686
|
+
},
|
|
1687
|
+
{
|
|
1688
|
+
name: 'compressOrDecompressTokenAccount';
|
|
1689
|
+
isMut: true;
|
|
1690
|
+
isSigner: false;
|
|
1691
|
+
isOptional: true;
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
name: 'tokenProgram';
|
|
1695
|
+
isMut: false;
|
|
1696
|
+
isSigner: false;
|
|
1697
|
+
isOptional: true;
|
|
1698
|
+
},
|
|
1699
|
+
{
|
|
1700
|
+
name: 'systemProgram';
|
|
1701
|
+
isMut: false;
|
|
1702
|
+
isSigner: false;
|
|
1703
|
+
}
|
|
1704
|
+
];
|
|
1705
|
+
args: [
|
|
1706
|
+
{
|
|
1707
|
+
name: 'inputs1';
|
|
1708
|
+
type: {
|
|
1709
|
+
defined: 'CompressedTokenInstructionDataTransfer';
|
|
1710
|
+
};
|
|
1711
|
+
},
|
|
1712
|
+
{
|
|
1713
|
+
name: 'inputs2';
|
|
1714
|
+
type: {
|
|
1715
|
+
defined: 'TokenData';
|
|
1716
|
+
};
|
|
1717
|
+
}
|
|
1718
|
+
];
|
|
1719
|
+
}
|
|
1720
|
+
];
|
|
1721
|
+
types: [
|
|
1722
|
+
{
|
|
1723
|
+
name: 'AccountState';
|
|
1724
|
+
type: {
|
|
1725
|
+
kind: 'enum';
|
|
1726
|
+
variants: [
|
|
1727
|
+
{
|
|
1728
|
+
name: 'Initialized';
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
name: 'Frozen';
|
|
1732
|
+
}
|
|
1733
|
+
];
|
|
1734
|
+
};
|
|
1735
|
+
},
|
|
1736
|
+
{
|
|
1737
|
+
name: 'CompressedAccount';
|
|
1738
|
+
type: {
|
|
1739
|
+
kind: 'struct';
|
|
1740
|
+
fields: [
|
|
1741
|
+
{
|
|
1742
|
+
name: 'owner';
|
|
1743
|
+
type: 'publicKey';
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
name: 'lamports';
|
|
1747
|
+
type: 'u64';
|
|
1748
|
+
},
|
|
1749
|
+
{
|
|
1750
|
+
name: 'address';
|
|
1751
|
+
type: {
|
|
1752
|
+
option: {
|
|
1753
|
+
array: ['u8', 32];
|
|
1754
|
+
};
|
|
1755
|
+
};
|
|
1756
|
+
},
|
|
1757
|
+
{
|
|
1758
|
+
name: 'data';
|
|
1759
|
+
type: {
|
|
1760
|
+
option: {
|
|
1761
|
+
defined: 'CompressedAccountData';
|
|
1762
|
+
};
|
|
1763
|
+
};
|
|
1764
|
+
}
|
|
1765
|
+
];
|
|
1766
|
+
};
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
name: 'CompressedAccountData';
|
|
1770
|
+
type: {
|
|
1771
|
+
kind: 'struct';
|
|
1772
|
+
fields: [
|
|
1773
|
+
{
|
|
1774
|
+
name: 'discriminator';
|
|
1775
|
+
type: {
|
|
1776
|
+
array: ['u8', 8];
|
|
1777
|
+
};
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
name: 'data';
|
|
1781
|
+
type: 'bytes';
|
|
1782
|
+
},
|
|
1783
|
+
{
|
|
1784
|
+
name: 'dataHash';
|
|
1785
|
+
type: {
|
|
1786
|
+
array: ['u8', 32];
|
|
1787
|
+
};
|
|
1788
|
+
}
|
|
1789
|
+
];
|
|
1790
|
+
};
|
|
1791
|
+
},
|
|
1792
|
+
{
|
|
1793
|
+
name: 'CompressedCpiContext';
|
|
1794
|
+
type: {
|
|
1795
|
+
kind: 'struct';
|
|
1796
|
+
fields: [
|
|
1797
|
+
{
|
|
1798
|
+
name: 'setContext';
|
|
1799
|
+
docs: [
|
|
1800
|
+
'Is set by the program that is invoking the CPI to signal that is should',
|
|
1801
|
+
'set the cpi context.'
|
|
1802
|
+
];
|
|
1803
|
+
type: 'bool';
|
|
1804
|
+
},
|
|
1805
|
+
{
|
|
1806
|
+
name: 'firstSetContext';
|
|
1807
|
+
docs: [
|
|
1808
|
+
'Is set to wipe the cpi context since someone could have set it before',
|
|
1809
|
+
'with unrelated data.'
|
|
1810
|
+
];
|
|
1811
|
+
type: 'bool';
|
|
1812
|
+
},
|
|
1813
|
+
{
|
|
1814
|
+
name: 'cpiContextAccountIndex';
|
|
1815
|
+
docs: [
|
|
1816
|
+
'Index of cpi context account in remaining accounts.'
|
|
1817
|
+
];
|
|
1818
|
+
type: 'u8';
|
|
1819
|
+
}
|
|
1820
|
+
];
|
|
1821
|
+
};
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
name: 'CompressedProof';
|
|
1825
|
+
type: {
|
|
1826
|
+
kind: 'struct';
|
|
1827
|
+
fields: [
|
|
1828
|
+
{
|
|
1829
|
+
name: 'a';
|
|
1830
|
+
type: {
|
|
1831
|
+
array: ['u8', 32];
|
|
1832
|
+
};
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
name: 'b';
|
|
1836
|
+
type: {
|
|
1837
|
+
array: ['u8', 64];
|
|
1838
|
+
};
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
name: 'c';
|
|
1842
|
+
type: {
|
|
1843
|
+
array: ['u8', 32];
|
|
1844
|
+
};
|
|
1845
|
+
}
|
|
1846
|
+
];
|
|
1847
|
+
};
|
|
1848
|
+
},
|
|
1849
|
+
{
|
|
1850
|
+
name: 'CompressedTokenInstructionDataTransfer';
|
|
1851
|
+
type: {
|
|
1852
|
+
kind: 'struct';
|
|
1853
|
+
fields: [
|
|
1854
|
+
{
|
|
1855
|
+
name: 'proof';
|
|
1856
|
+
type: {
|
|
1857
|
+
option: {
|
|
1858
|
+
defined: 'CompressedProof';
|
|
1859
|
+
};
|
|
1860
|
+
};
|
|
1861
|
+
},
|
|
1862
|
+
{
|
|
1863
|
+
name: 'mint';
|
|
1864
|
+
type: 'publicKey';
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
name: 'delegatedTransfer';
|
|
1868
|
+
docs: [
|
|
1869
|
+
'Is required if the signer is delegate,',
|
|
1870
|
+
'-> delegate is authority account,',
|
|
1871
|
+
'owner = Some(owner) is the owner of the token account.'
|
|
1872
|
+
];
|
|
1873
|
+
type: {
|
|
1874
|
+
option: {
|
|
1875
|
+
defined: 'DelegatedTransfer';
|
|
1876
|
+
};
|
|
1877
|
+
};
|
|
1878
|
+
},
|
|
1879
|
+
{
|
|
1880
|
+
name: 'inputTokenDataWithContext';
|
|
1881
|
+
type: {
|
|
1882
|
+
vec: {
|
|
1883
|
+
defined: 'InputTokenDataWithContext';
|
|
1884
|
+
};
|
|
1885
|
+
};
|
|
1886
|
+
},
|
|
1887
|
+
{
|
|
1888
|
+
name: 'outputCompressedAccounts';
|
|
1889
|
+
type: {
|
|
1890
|
+
vec: {
|
|
1891
|
+
defined: 'PackedTokenTransferOutputData';
|
|
1892
|
+
};
|
|
1893
|
+
};
|
|
1894
|
+
},
|
|
1895
|
+
{
|
|
1896
|
+
name: 'isCompress';
|
|
1897
|
+
type: 'bool';
|
|
1898
|
+
},
|
|
1899
|
+
{
|
|
1900
|
+
name: 'compressOrDecompressAmount';
|
|
1901
|
+
type: {
|
|
1902
|
+
option: 'u64';
|
|
1903
|
+
};
|
|
1904
|
+
},
|
|
1905
|
+
{
|
|
1906
|
+
name: 'cpiContext';
|
|
1907
|
+
type: {
|
|
1908
|
+
option: {
|
|
1909
|
+
defined: 'CompressedCpiContext';
|
|
1910
|
+
};
|
|
1911
|
+
};
|
|
1912
|
+
},
|
|
1913
|
+
{
|
|
1914
|
+
name: 'lamportsChangeAccountMerkleTreeIndex';
|
|
1915
|
+
type: {
|
|
1916
|
+
option: 'u8';
|
|
1917
|
+
};
|
|
1918
|
+
}
|
|
1919
|
+
];
|
|
1920
|
+
};
|
|
1921
|
+
},
|
|
1922
|
+
{
|
|
1923
|
+
name: 'DelegatedTransfer';
|
|
1924
|
+
docs: [
|
|
1925
|
+
'Struct to provide the owner when the delegate is signer of the transaction.'
|
|
1926
|
+
];
|
|
1927
|
+
type: {
|
|
1928
|
+
kind: 'struct';
|
|
1929
|
+
fields: [
|
|
1930
|
+
{
|
|
1931
|
+
name: 'owner';
|
|
1932
|
+
type: 'publicKey';
|
|
1933
|
+
},
|
|
1934
|
+
{
|
|
1935
|
+
name: 'delegateChangeAccountIndex';
|
|
1936
|
+
docs: [
|
|
1937
|
+
'Index of change compressed account in output compressed accounts. In',
|
|
1938
|
+
"case that the delegate didn't spend the complete delegated compressed",
|
|
1939
|
+
'account balance the change compressed account will be delegated to her',
|
|
1940
|
+
'as well.'
|
|
1941
|
+
];
|
|
1942
|
+
type: {
|
|
1943
|
+
option: 'u8';
|
|
1944
|
+
};
|
|
1945
|
+
}
|
|
1946
|
+
];
|
|
1947
|
+
};
|
|
1948
|
+
},
|
|
1949
|
+
{
|
|
1950
|
+
name: 'InputTokenDataWithContext';
|
|
1951
|
+
type: {
|
|
1952
|
+
kind: 'struct';
|
|
1953
|
+
fields: [
|
|
1954
|
+
{
|
|
1955
|
+
name: 'amount';
|
|
1956
|
+
type: 'u64';
|
|
1957
|
+
},
|
|
1958
|
+
{
|
|
1959
|
+
name: 'delegateIndex';
|
|
1960
|
+
type: {
|
|
1961
|
+
option: 'u8';
|
|
1962
|
+
};
|
|
1963
|
+
},
|
|
1964
|
+
{
|
|
1965
|
+
name: 'merkleContext';
|
|
1966
|
+
type: {
|
|
1967
|
+
defined: 'PackedMerkleContext';
|
|
1968
|
+
};
|
|
1969
|
+
},
|
|
1970
|
+
{
|
|
1971
|
+
name: 'rootIndex';
|
|
1972
|
+
type: 'u16';
|
|
1973
|
+
},
|
|
1974
|
+
{
|
|
1975
|
+
name: 'lamports';
|
|
1976
|
+
type: {
|
|
1977
|
+
option: 'u64';
|
|
1978
|
+
};
|
|
1979
|
+
},
|
|
1980
|
+
{
|
|
1981
|
+
name: 'tlv';
|
|
1982
|
+
docs: [
|
|
1983
|
+
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
1984
|
+
];
|
|
1985
|
+
type: {
|
|
1986
|
+
option: 'bytes';
|
|
1987
|
+
};
|
|
1988
|
+
}
|
|
1989
|
+
];
|
|
1990
|
+
};
|
|
1991
|
+
},
|
|
1992
|
+
{
|
|
1993
|
+
name: 'InstructionDataInvoke';
|
|
1994
|
+
type: {
|
|
1995
|
+
kind: 'struct';
|
|
1996
|
+
fields: [
|
|
1997
|
+
{
|
|
1998
|
+
name: 'proof';
|
|
1999
|
+
type: {
|
|
2000
|
+
option: {
|
|
2001
|
+
defined: 'CompressedProof';
|
|
2002
|
+
};
|
|
2003
|
+
};
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
name: 'inputCompressedAccountsWithMerkleContext';
|
|
2007
|
+
type: {
|
|
2008
|
+
vec: {
|
|
2009
|
+
defined: 'PackedCompressedAccountWithMerkleContext';
|
|
2010
|
+
};
|
|
2011
|
+
};
|
|
2012
|
+
},
|
|
2013
|
+
{
|
|
2014
|
+
name: 'outputCompressedAccounts';
|
|
2015
|
+
type: {
|
|
2016
|
+
vec: {
|
|
2017
|
+
defined: 'OutputCompressedAccountWithPackedContext';
|
|
2018
|
+
};
|
|
2019
|
+
};
|
|
2020
|
+
},
|
|
2021
|
+
{
|
|
2022
|
+
name: 'relayFee';
|
|
2023
|
+
type: {
|
|
2024
|
+
option: 'u64';
|
|
2025
|
+
};
|
|
2026
|
+
},
|
|
2027
|
+
{
|
|
2028
|
+
name: 'newAddressParams';
|
|
2029
|
+
type: {
|
|
2030
|
+
vec: {
|
|
2031
|
+
defined: 'NewAddressParamsPacked';
|
|
2032
|
+
};
|
|
2033
|
+
};
|
|
2034
|
+
},
|
|
2035
|
+
{
|
|
2036
|
+
name: 'compressOrDecompressLamports';
|
|
2037
|
+
type: {
|
|
2038
|
+
option: 'u64';
|
|
2039
|
+
};
|
|
2040
|
+
},
|
|
2041
|
+
{
|
|
2042
|
+
name: 'isCompress';
|
|
2043
|
+
type: 'bool';
|
|
2044
|
+
}
|
|
2045
|
+
];
|
|
2046
|
+
};
|
|
2047
|
+
},
|
|
2048
|
+
{
|
|
2049
|
+
name: 'InstructionDataInvokeCpi';
|
|
2050
|
+
type: {
|
|
2051
|
+
kind: 'struct';
|
|
2052
|
+
fields: [
|
|
2053
|
+
{
|
|
2054
|
+
name: 'proof';
|
|
2055
|
+
type: {
|
|
2056
|
+
option: {
|
|
2057
|
+
defined: 'CompressedProof';
|
|
2058
|
+
};
|
|
2059
|
+
};
|
|
2060
|
+
},
|
|
2061
|
+
{
|
|
2062
|
+
name: 'newAddressParams';
|
|
2063
|
+
type: {
|
|
2064
|
+
vec: {
|
|
2065
|
+
defined: 'NewAddressParamsPacked';
|
|
2066
|
+
};
|
|
2067
|
+
};
|
|
2068
|
+
},
|
|
2069
|
+
{
|
|
2070
|
+
name: 'inputCompressedAccountsWithMerkleContext';
|
|
2071
|
+
type: {
|
|
2072
|
+
vec: {
|
|
2073
|
+
defined: 'PackedCompressedAccountWithMerkleContext';
|
|
2074
|
+
};
|
|
2075
|
+
};
|
|
2076
|
+
},
|
|
2077
|
+
{
|
|
2078
|
+
name: 'outputCompressedAccounts';
|
|
2079
|
+
type: {
|
|
2080
|
+
vec: {
|
|
2081
|
+
defined: 'OutputCompressedAccountWithPackedContext';
|
|
2082
|
+
};
|
|
2083
|
+
};
|
|
2084
|
+
},
|
|
2085
|
+
{
|
|
2086
|
+
name: 'relayFee';
|
|
2087
|
+
type: {
|
|
2088
|
+
option: 'u64';
|
|
2089
|
+
};
|
|
2090
|
+
},
|
|
2091
|
+
{
|
|
2092
|
+
name: 'compressOrDecompressLamports';
|
|
2093
|
+
type: {
|
|
2094
|
+
option: 'u64';
|
|
2095
|
+
};
|
|
2096
|
+
},
|
|
2097
|
+
{
|
|
2098
|
+
name: 'isCompress';
|
|
2099
|
+
type: 'bool';
|
|
2100
|
+
},
|
|
2101
|
+
{
|
|
2102
|
+
name: 'cpiContext';
|
|
2103
|
+
type: {
|
|
2104
|
+
option: {
|
|
2105
|
+
defined: 'CompressedCpiContext';
|
|
2106
|
+
};
|
|
2107
|
+
};
|
|
2108
|
+
}
|
|
2109
|
+
];
|
|
2110
|
+
};
|
|
2111
|
+
},
|
|
2112
|
+
{
|
|
2113
|
+
name: 'MerkleTreeSequenceNumber';
|
|
2114
|
+
type: {
|
|
2115
|
+
kind: 'struct';
|
|
2116
|
+
fields: [
|
|
2117
|
+
{
|
|
2118
|
+
name: 'pubkey';
|
|
2119
|
+
type: 'publicKey';
|
|
2120
|
+
},
|
|
2121
|
+
{
|
|
2122
|
+
name: 'seq';
|
|
2123
|
+
type: 'u64';
|
|
2124
|
+
}
|
|
2125
|
+
];
|
|
2126
|
+
};
|
|
2127
|
+
},
|
|
2128
|
+
{
|
|
2129
|
+
name: 'NewAddressParamsPacked';
|
|
2130
|
+
type: {
|
|
2131
|
+
kind: 'struct';
|
|
2132
|
+
fields: [
|
|
2133
|
+
{
|
|
2134
|
+
name: 'seed';
|
|
2135
|
+
type: {
|
|
2136
|
+
array: ['u8', 32];
|
|
2137
|
+
};
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
name: 'addressQueueAccountIndex';
|
|
2141
|
+
type: 'u8';
|
|
2142
|
+
},
|
|
2143
|
+
{
|
|
2144
|
+
name: 'addressMerkleTreeAccountIndex';
|
|
2145
|
+
type: 'u8';
|
|
2146
|
+
},
|
|
2147
|
+
{
|
|
2148
|
+
name: 'addressMerkleTreeRootIndex';
|
|
2149
|
+
type: 'u16';
|
|
2150
|
+
}
|
|
2151
|
+
];
|
|
2152
|
+
};
|
|
2153
|
+
},
|
|
2154
|
+
{
|
|
2155
|
+
name: 'OutputCompressedAccountWithPackedContext';
|
|
2156
|
+
type: {
|
|
2157
|
+
kind: 'struct';
|
|
2158
|
+
fields: [
|
|
2159
|
+
{
|
|
2160
|
+
name: 'compressedAccount';
|
|
2161
|
+
type: {
|
|
2162
|
+
defined: 'CompressedAccount';
|
|
2163
|
+
};
|
|
2164
|
+
},
|
|
2165
|
+
{
|
|
2166
|
+
name: 'merkleTreeIndex';
|
|
2167
|
+
type: 'u8';
|
|
2168
|
+
}
|
|
2169
|
+
];
|
|
2170
|
+
};
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
name: 'PackedCompressedAccountWithMerkleContext';
|
|
2174
|
+
type: {
|
|
2175
|
+
kind: 'struct';
|
|
2176
|
+
fields: [
|
|
2177
|
+
{
|
|
2178
|
+
name: 'compressedAccount';
|
|
2179
|
+
type: {
|
|
2180
|
+
defined: 'CompressedAccount';
|
|
2181
|
+
};
|
|
2182
|
+
},
|
|
2183
|
+
{
|
|
2184
|
+
name: 'merkleContext';
|
|
2185
|
+
type: {
|
|
2186
|
+
defined: 'PackedMerkleContext';
|
|
2187
|
+
};
|
|
2188
|
+
},
|
|
2189
|
+
{
|
|
2190
|
+
name: 'rootIndex';
|
|
2191
|
+
docs: [
|
|
2192
|
+
'Index of root used in inclusion validity proof.'
|
|
2193
|
+
];
|
|
2194
|
+
type: 'u16';
|
|
2195
|
+
},
|
|
2196
|
+
{
|
|
2197
|
+
name: 'readOnly';
|
|
2198
|
+
docs: [
|
|
2199
|
+
'Placeholder to mark accounts read-only unimplemented set to false.'
|
|
2200
|
+
];
|
|
2201
|
+
type: 'bool';
|
|
2202
|
+
}
|
|
2203
|
+
];
|
|
2204
|
+
};
|
|
2205
|
+
},
|
|
2206
|
+
{
|
|
2207
|
+
name: 'PackedMerkleContext';
|
|
2208
|
+
type: {
|
|
2209
|
+
kind: 'struct';
|
|
2210
|
+
fields: [
|
|
2211
|
+
{
|
|
2212
|
+
name: 'merkleTreePubkeyIndex';
|
|
2213
|
+
type: 'u8';
|
|
2214
|
+
},
|
|
2215
|
+
{
|
|
2216
|
+
name: 'nullifierQueuePubkeyIndex';
|
|
2217
|
+
type: 'u8';
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
name: 'leafIndex';
|
|
2221
|
+
type: 'u32';
|
|
2222
|
+
},
|
|
2223
|
+
{
|
|
2224
|
+
name: 'queueIndex';
|
|
2225
|
+
type: {
|
|
2226
|
+
option: {
|
|
2227
|
+
defined: 'QueueIndex';
|
|
2228
|
+
};
|
|
2229
|
+
};
|
|
2230
|
+
}
|
|
2231
|
+
];
|
|
2232
|
+
};
|
|
2233
|
+
},
|
|
2234
|
+
{
|
|
2235
|
+
name: 'PackedTokenTransferOutputData';
|
|
2236
|
+
type: {
|
|
2237
|
+
kind: 'struct';
|
|
2238
|
+
fields: [
|
|
2239
|
+
{
|
|
2240
|
+
name: 'owner';
|
|
2241
|
+
type: 'publicKey';
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
name: 'amount';
|
|
2245
|
+
type: 'u64';
|
|
2246
|
+
},
|
|
2247
|
+
{
|
|
2248
|
+
name: 'lamports';
|
|
2249
|
+
type: {
|
|
2250
|
+
option: 'u64';
|
|
2251
|
+
};
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
name: 'merkleTreeIndex';
|
|
2255
|
+
type: 'u8';
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
name: 'tlv';
|
|
2259
|
+
docs: [
|
|
2260
|
+
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
2261
|
+
];
|
|
2262
|
+
type: {
|
|
2263
|
+
option: 'bytes';
|
|
2264
|
+
};
|
|
2265
|
+
}
|
|
2266
|
+
];
|
|
2267
|
+
};
|
|
2268
|
+
},
|
|
2269
|
+
{
|
|
2270
|
+
name: 'PublicTransactionEvent';
|
|
2271
|
+
type: {
|
|
2272
|
+
kind: 'struct';
|
|
2273
|
+
fields: [
|
|
2274
|
+
{
|
|
2275
|
+
name: 'inputCompressedAccountHashes';
|
|
2276
|
+
type: {
|
|
2277
|
+
vec: {
|
|
2278
|
+
array: ['u8', 32];
|
|
2279
|
+
};
|
|
2280
|
+
};
|
|
2281
|
+
},
|
|
2282
|
+
{
|
|
2283
|
+
name: 'outputCompressedAccountHashes';
|
|
2284
|
+
type: {
|
|
2285
|
+
vec: {
|
|
2286
|
+
array: ['u8', 32];
|
|
2287
|
+
};
|
|
2288
|
+
};
|
|
2289
|
+
},
|
|
2290
|
+
{
|
|
2291
|
+
name: 'outputCompressedAccounts';
|
|
2292
|
+
type: {
|
|
2293
|
+
vec: {
|
|
2294
|
+
defined: 'OutputCompressedAccountWithPackedContext';
|
|
2295
|
+
};
|
|
2296
|
+
};
|
|
2297
|
+
},
|
|
2298
|
+
{
|
|
2299
|
+
name: 'outputLeafIndices';
|
|
2300
|
+
type: {
|
|
2301
|
+
vec: 'u32';
|
|
2302
|
+
};
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
name: 'sequenceNumbers';
|
|
2306
|
+
type: {
|
|
2307
|
+
vec: {
|
|
2308
|
+
defined: 'MerkleTreeSequenceNumber';
|
|
2309
|
+
};
|
|
2310
|
+
};
|
|
2311
|
+
},
|
|
2312
|
+
{
|
|
2313
|
+
name: 'relayFee';
|
|
2314
|
+
type: {
|
|
2315
|
+
option: 'u64';
|
|
2316
|
+
};
|
|
2317
|
+
},
|
|
2318
|
+
{
|
|
2319
|
+
name: 'isCompress';
|
|
2320
|
+
type: 'bool';
|
|
2321
|
+
},
|
|
2322
|
+
{
|
|
2323
|
+
name: 'compressOrDecompressLamports';
|
|
2324
|
+
type: {
|
|
2325
|
+
option: 'u64';
|
|
2326
|
+
};
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
name: 'pubkeyArray';
|
|
2330
|
+
type: {
|
|
2331
|
+
vec: 'publicKey';
|
|
2332
|
+
};
|
|
2333
|
+
},
|
|
2334
|
+
{
|
|
2335
|
+
name: 'message';
|
|
2336
|
+
type: {
|
|
2337
|
+
option: 'bytes';
|
|
2338
|
+
};
|
|
2339
|
+
}
|
|
2340
|
+
];
|
|
2341
|
+
};
|
|
2342
|
+
},
|
|
2343
|
+
{
|
|
2344
|
+
name: 'QueueIndex';
|
|
2345
|
+
type: {
|
|
2346
|
+
kind: 'struct';
|
|
2347
|
+
fields: [
|
|
2348
|
+
{
|
|
2349
|
+
name: 'queueId';
|
|
2350
|
+
docs: ['Id of queue in queue account.'];
|
|
2351
|
+
type: 'u8';
|
|
2352
|
+
},
|
|
2353
|
+
{
|
|
2354
|
+
name: 'index';
|
|
2355
|
+
docs: ['Index of compressed account hash in queue.'];
|
|
2356
|
+
type: 'u16';
|
|
2357
|
+
}
|
|
2358
|
+
];
|
|
2359
|
+
};
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
name: 'TokenData';
|
|
2363
|
+
type: {
|
|
2364
|
+
kind: 'struct';
|
|
2365
|
+
fields: [
|
|
2366
|
+
{
|
|
2367
|
+
name: 'mint';
|
|
2368
|
+
docs: ['The mint associated with this account'];
|
|
2369
|
+
type: 'publicKey';
|
|
2370
|
+
},
|
|
2371
|
+
{
|
|
2372
|
+
name: 'owner';
|
|
2373
|
+
docs: ['The owner of this account.'];
|
|
2374
|
+
type: 'publicKey';
|
|
2375
|
+
},
|
|
2376
|
+
{
|
|
2377
|
+
name: 'amount';
|
|
2378
|
+
docs: ['The amount of tokens this account holds.'];
|
|
2379
|
+
type: 'u64';
|
|
2380
|
+
},
|
|
2381
|
+
{
|
|
2382
|
+
name: 'delegate';
|
|
2383
|
+
docs: [
|
|
2384
|
+
'If `delegate` is `Some` then `delegated_amount` represents',
|
|
2385
|
+
'the amount authorized by the delegate'
|
|
2386
|
+
];
|
|
2387
|
+
type: {
|
|
2388
|
+
option: 'publicKey';
|
|
2389
|
+
};
|
|
2390
|
+
},
|
|
2391
|
+
{
|
|
2392
|
+
name: 'state';
|
|
2393
|
+
docs: ["The account's state"];
|
|
2394
|
+
type: {
|
|
2395
|
+
defined: 'AccountState';
|
|
2396
|
+
};
|
|
2397
|
+
},
|
|
2398
|
+
{
|
|
2399
|
+
name: 'tlv';
|
|
2400
|
+
docs: [
|
|
2401
|
+
'Placeholder for TokenExtension tlv data (unimplemented)'
|
|
2402
|
+
];
|
|
2403
|
+
type: {
|
|
2404
|
+
option: 'bytes';
|
|
2405
|
+
};
|
|
2406
|
+
}
|
|
2407
|
+
];
|
|
2408
|
+
};
|
|
2409
|
+
}
|
|
2410
|
+
];
|
|
2411
|
+
errors: [
|
|
2412
|
+
{
|
|
2413
|
+
code: 6000;
|
|
2414
|
+
name: 'PublicKeyAmountMissmatch';
|
|
2415
|
+
msg: 'public keys and amounts must be of same length';
|
|
2416
|
+
},
|
|
2417
|
+
{
|
|
2418
|
+
code: 6001;
|
|
2419
|
+
name: 'ComputeInputSumFailed';
|
|
2420
|
+
msg: 'ComputeInputSumFailed';
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
code: 6002;
|
|
2424
|
+
name: 'ComputeOutputSumFailed';
|
|
2425
|
+
msg: 'ComputeOutputSumFailed';
|
|
2426
|
+
},
|
|
2427
|
+
{
|
|
2428
|
+
code: 6003;
|
|
2429
|
+
name: 'ComputeCompressSumFailed';
|
|
2430
|
+
msg: 'ComputeCompressSumFailed';
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
code: 6004;
|
|
2434
|
+
name: 'ComputeDecompressSumFailed';
|
|
2435
|
+
msg: 'ComputeDecompressSumFailed';
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
code: 6005;
|
|
2439
|
+
name: 'SumCheckFailed';
|
|
2440
|
+
msg: 'SumCheckFailed';
|
|
2441
|
+
},
|
|
2442
|
+
{
|
|
2443
|
+
code: 6006;
|
|
2444
|
+
name: 'DecompressRecipientUndefinedForDecompress';
|
|
2445
|
+
msg: 'DecompressRecipientUndefinedForDecompress';
|
|
2446
|
+
},
|
|
2447
|
+
{
|
|
2448
|
+
code: 6007;
|
|
2449
|
+
name: 'CompressedPdaUndefinedForDecompress';
|
|
2450
|
+
msg: 'CompressedPdaUndefinedForDecompress';
|
|
2451
|
+
},
|
|
2452
|
+
{
|
|
2453
|
+
code: 6008;
|
|
2454
|
+
name: 'DeCompressAmountUndefinedForDecompress';
|
|
2455
|
+
msg: 'DeCompressAmountUndefinedForDecompress';
|
|
2456
|
+
},
|
|
2457
|
+
{
|
|
2458
|
+
code: 6009;
|
|
2459
|
+
name: 'CompressedPdaUndefinedForCompress';
|
|
2460
|
+
msg: 'CompressedPdaUndefinedForCompress';
|
|
2461
|
+
},
|
|
2462
|
+
{
|
|
2463
|
+
code: 6010;
|
|
2464
|
+
name: 'DeCompressAmountUndefinedForCompress';
|
|
2465
|
+
msg: 'DeCompressAmountUndefinedForCompress';
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
code: 6011;
|
|
2469
|
+
name: 'DelegateSignerCheckFailed';
|
|
2470
|
+
msg: 'DelegateSignerCheckFailed';
|
|
2471
|
+
},
|
|
2472
|
+
{
|
|
2473
|
+
code: 6012;
|
|
2474
|
+
name: 'MintTooLarge';
|
|
2475
|
+
msg: 'Minted amount greater than u64::MAX';
|
|
2476
|
+
},
|
|
2477
|
+
{
|
|
2478
|
+
code: 6013;
|
|
2479
|
+
name: 'SplTokenSupplyMismatch';
|
|
2480
|
+
msg: 'SplTokenSupplyMismatch';
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
code: 6014;
|
|
2484
|
+
name: 'HeapMemoryCheckFailed';
|
|
2485
|
+
msg: 'HeapMemoryCheckFailed';
|
|
2486
|
+
},
|
|
2487
|
+
{
|
|
2488
|
+
code: 6015;
|
|
2489
|
+
name: 'InstructionNotCallable';
|
|
2490
|
+
msg: 'The instruction is not callable';
|
|
2491
|
+
},
|
|
2492
|
+
{
|
|
2493
|
+
code: 6016;
|
|
2494
|
+
name: 'ArithmeticUnderflow';
|
|
2495
|
+
msg: 'ArithmeticUnderflow';
|
|
2496
|
+
},
|
|
2497
|
+
{
|
|
2498
|
+
code: 6017;
|
|
2499
|
+
name: 'HashToFieldError';
|
|
2500
|
+
msg: 'HashToFieldError';
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
code: 6018;
|
|
2504
|
+
name: 'InvalidAuthorityMint';
|
|
2505
|
+
msg: 'Expected the authority to be also a mint authority';
|
|
2506
|
+
},
|
|
2507
|
+
{
|
|
2508
|
+
code: 6019;
|
|
2509
|
+
name: 'InvalidFreezeAuthority';
|
|
2510
|
+
msg: 'Provided authority is not the freeze authority';
|
|
2511
|
+
},
|
|
2512
|
+
{
|
|
2513
|
+
code: 6020;
|
|
2514
|
+
name: 'InvalidDelegateIndex';
|
|
2515
|
+
},
|
|
2516
|
+
{
|
|
2517
|
+
code: 6021;
|
|
2518
|
+
name: 'TokenPoolPdaUndefined';
|
|
2519
|
+
},
|
|
2520
|
+
{
|
|
2521
|
+
code: 6022;
|
|
2522
|
+
name: 'IsTokenPoolPda';
|
|
2523
|
+
msg: 'Compress or decompress recipient is the same account as the token pool pda.';
|
|
2524
|
+
},
|
|
2525
|
+
{
|
|
2526
|
+
code: 6023;
|
|
2527
|
+
name: 'InvalidTokenPoolPda';
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
code: 6024;
|
|
2531
|
+
name: 'NoInputTokenAccountsProvided';
|
|
2532
|
+
},
|
|
2533
|
+
{
|
|
2534
|
+
code: 6025;
|
|
2535
|
+
name: 'NoInputsProvided';
|
|
2536
|
+
},
|
|
2537
|
+
{
|
|
2538
|
+
code: 6026;
|
|
2539
|
+
name: 'MintHasNoFreezeAuthority';
|
|
2540
|
+
},
|
|
2541
|
+
{
|
|
2542
|
+
code: 6027;
|
|
2543
|
+
name: 'MintWithInvalidExtension';
|
|
2544
|
+
},
|
|
2545
|
+
{
|
|
2546
|
+
code: 6028;
|
|
2547
|
+
name: 'InsufficientTokenAccountBalance';
|
|
2548
|
+
msg: 'The token account balance is less than the remaining amount.';
|
|
2549
|
+
},
|
|
2550
|
+
{
|
|
2551
|
+
code: 6029;
|
|
2552
|
+
name: 'InvalidTokenPoolBump';
|
|
2553
|
+
msg: 'Max number of token pools reached.';
|
|
2554
|
+
},
|
|
2555
|
+
{
|
|
2556
|
+
code: 6030;
|
|
2557
|
+
name: 'FailedToDecompress';
|
|
2558
|
+
},
|
|
2559
|
+
{
|
|
2560
|
+
code: 6031;
|
|
2561
|
+
name: 'FailedToBurnSplTokensFromTokenPool';
|
|
2562
|
+
},
|
|
2563
|
+
{
|
|
2564
|
+
code: 6032;
|
|
2565
|
+
name: 'NoMatchingBumpFound';
|
|
2566
|
+
}
|
|
2567
|
+
];
|
|
2568
|
+
};
|
|
2569
|
+
declare const IDL: LightCompressedToken;
|
|
2570
|
+
|
|
2571
|
+
export { type ApproveAndMintToParams, COMPRESS_SPL_TOKEN_ACCOUNT_DISCRIMINATOR, CPI_AUTHORITY_SEED, CREATE_TOKEN_POOL_DISCRIMINATOR, type CompressParams, type CompressSplTokenAccountInstructionData, type CompressSplTokenAccountParams, type CompressedCpiContext, type CompressedTokenInstructionDataTransfer, CompressedTokenInstructionDataTransferLayout, CompressedTokenProgram, CpiContextLayout, type CreateMintParams, type CreateTokenProgramLookupTableParams, type DecompressParams, type DelegatedTransfer, DelegatedTransferLayout, IDL, type InputTokenDataWithContext, type LightCompressedToken, MINT_TO_DISCRIMINATOR, type MergeTokenAccountsParams, type MintToInstructionData, type MintToParams, POOL_SEED, type PackCompressedTokenAccountsParams, type PackedTokenTransferOutputData, type RegisterMintParams, SPL_TOKEN_MINT_RENT_EXEMPT_BALANCE, TRANSFER_DISCRIMINATOR, type TokenData, type TokenTransferOutputData, type TransferParams, type approveAccountsLayoutParams, approveAndMintTo, compress, compressSplTokenAccount, compressSplTokenAccountInstructionDataLayout, createDecompressOutputState, createMint, createTokenPool, createTokenPoolAccountsLayout, type createTokenPoolAccountsLayoutParams, createTokenProgramLookupTable, createTransferOutputState, decodeCompressSplTokenAccountInstructionData, decodeMintToInstructionData, decodeTransferInstructionData, decompress, encodeCompressSplTokenAccountInstructionData, encodeMintToInstructionData, encodeTransferInstructionData, type freezeAccountsLayoutParams, mergeTokenAccounts, mintTo, mintToAccountsLayout, type mintToAccountsLayoutParams, mintToLayout, packCompressedTokenAccounts, parseTokenData, type revokeAccountsLayoutParams, selectMinCompressedTokenAccountsForTransfer, sumUpTokenAmount, type thawAccountsLayoutParams, transfer, transferAccountsLayout, type transferAccountsLayoutParams, validateSameTokenOwner };
|