@lightprotocol/stateless.js 0.17.2-alpha.1 → 0.17.2-alpha.2
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/constants.d.ts +2 -0
- package/dist/cjs/browser/idl.d.ts +1015 -0
- package/dist/cjs/browser/index.cjs +1 -1
- package/dist/cjs/browser/index.cjs.map +1 -1
- package/dist/cjs/browser/index.d.ts +1 -0
- package/dist/cjs/browser/rpc-interface.d.ts +107 -114
- package/dist/cjs/browser/state/types.d.ts +5 -0
- package/dist/cjs/browser/utils/test-utils.d.ts +8 -0
- package/dist/cjs/node/constants.d.ts +2 -0
- package/dist/cjs/node/idl.d.ts +1015 -0
- package/dist/cjs/node/index.cjs +1 -1
- package/dist/cjs/node/index.cjs.map +1 -1
- package/dist/cjs/node/index.d.ts +1 -0
- package/dist/cjs/node/rpc-interface.d.ts +107 -114
- package/dist/cjs/node/state/types.d.ts +5 -0
- package/dist/cjs/node/utils/test-utils.d.ts +8 -0
- package/dist/types/index.d.ts +1032 -9
- package/package.json +6 -5
- package/dist/es/browser/actions/common.d.ts +0 -3
- package/dist/es/browser/actions/compress.d.ts +0 -16
- package/dist/es/browser/actions/create-account.d.ts +0 -41
- package/dist/es/browser/actions/decompress.d.ts +0 -16
- package/dist/es/browser/actions/index.d.ts +0 -5
- package/dist/es/browser/actions/transfer.d.ts +0 -20
- package/dist/es/browser/constants.d.ts +0 -63
- package/dist/es/browser/errors.d.ts +0 -74
- package/dist/es/browser/index.d.ts +0 -10
- package/dist/es/browser/index.js +0 -2
- package/dist/es/browser/index.js.map +0 -1
- package/dist/es/browser/instruction/index.d.ts +0 -1
- package/dist/es/browser/instruction/pack-compressed-accounts.d.ts +0 -35
- package/dist/es/browser/programs/index.d.ts +0 -2
- package/dist/es/browser/programs/layout.d.ts +0 -25
- package/dist/es/browser/programs/system.d.ts +0 -199
- package/dist/es/browser/rpc-interface.d.ts +0 -1179
- package/dist/es/browser/rpc.d.ts +0 -275
- package/dist/es/browser/state/BN254.d.ts +0 -14
- package/dist/es/browser/state/compressed-account.d.ts +0 -31
- package/dist/es/browser/state/index.d.ts +0 -3
- package/dist/es/browser/state/types.d.ts +0 -91
- package/dist/es/browser/test-helpers/index.d.ts +0 -2
- package/dist/es/browser/test-helpers/merkle-tree/index.d.ts +0 -2
- package/dist/es/browser/test-helpers/merkle-tree/indexed-array.d.ts +0 -85
- package/dist/es/browser/test-helpers/merkle-tree/merkle-tree.d.ts +0 -92
- package/dist/es/browser/test-helpers/test-rpc/get-compressed-accounts.d.ts +0 -7
- package/dist/es/browser/test-helpers/test-rpc/get-compressed-token-accounts.d.ts +0 -40
- package/dist/es/browser/test-helpers/test-rpc/get-parsed-events.d.ts +0 -13
- package/dist/es/browser/test-helpers/test-rpc/index.d.ts +0 -3
- package/dist/es/browser/test-helpers/test-rpc/test-rpc.d.ts +0 -249
- package/dist/es/browser/utils/address.d.ts +0 -63
- package/dist/es/browser/utils/airdrop.d.ts +0 -7
- package/dist/es/browser/utils/calculate-compute-unit-price.d.ts +0 -7
- package/dist/es/browser/utils/conversion.d.ts +0 -31
- package/dist/es/browser/utils/index.d.ts +0 -10
- package/dist/es/browser/utils/parse-validity-proof.d.ts +0 -20
- package/dist/es/browser/utils/pipe.d.ts +0 -2
- package/dist/es/browser/utils/send-and-confirm.d.ts +0 -52
- package/dist/es/browser/utils/sleep.d.ts +0 -1
- package/dist/es/browser/utils/test-utils.d.ts +0 -23
- package/dist/es/browser/utils/validation.d.ts +0 -4
package/dist/cjs/node/index.d.ts
CHANGED
|
@@ -2,13 +2,6 @@ import { PublicKey, MemcmpFilter, DataSlice } from '@solana/web3.js';
|
|
|
2
2
|
import { Struct } from 'superstruct';
|
|
3
3
|
import { BN254, CompressedProof, CompressedAccountWithMerkleContext, MerkleContextWithMerkleProof, TokenData } from './state';
|
|
4
4
|
import BN from 'bn.js';
|
|
5
|
-
export declare class BaseRpc {
|
|
6
|
-
private getCancellationPromise;
|
|
7
|
-
private getTransactionConfirmationPromise;
|
|
8
|
-
private confirmTransactionUsingBlockHeightExceedanceStrategy;
|
|
9
|
-
private confirmTransactionUsingDurableNonceStrategy;
|
|
10
|
-
private confirmTransactionUsingLegacyTimeoutStrategy;
|
|
11
|
-
}
|
|
12
5
|
export interface LatestNonVotingSignatures {
|
|
13
6
|
context: {
|
|
14
7
|
slot: number;
|
|
@@ -172,24 +165,24 @@ export declare function jsonRpcResultAndContext<T, U>(value: Struct<T, U>): Stru
|
|
|
172
165
|
export declare const CompressedAccountResult: Struct<{
|
|
173
166
|
data: {
|
|
174
167
|
data: string;
|
|
175
|
-
dataHash: BN;
|
|
176
168
|
discriminator: BN;
|
|
169
|
+
dataHash: BN;
|
|
177
170
|
} | null;
|
|
171
|
+
owner: PublicKey;
|
|
178
172
|
lamports: BN;
|
|
179
173
|
address: number[] | null;
|
|
180
|
-
hash: BN;
|
|
181
|
-
owner: PublicKey;
|
|
182
174
|
leafIndex: number;
|
|
183
|
-
tree: PublicKey;
|
|
184
175
|
seq: BN | null;
|
|
176
|
+
hash: BN;
|
|
177
|
+
tree: PublicKey;
|
|
185
178
|
slotCreated: BN;
|
|
186
179
|
}, {
|
|
187
180
|
address: Struct<number[] | null, null>;
|
|
188
181
|
hash: Struct<BN, null>;
|
|
189
182
|
data: Struct<{
|
|
190
183
|
data: string;
|
|
191
|
-
dataHash: BN;
|
|
192
184
|
discriminator: BN;
|
|
185
|
+
dataHash: BN;
|
|
193
186
|
} | null, {
|
|
194
187
|
data: Struct<string, null>;
|
|
195
188
|
dataHash: Struct<BN, null>;
|
|
@@ -229,16 +222,16 @@ export declare const CompressedTokenAccountResult: Struct<{
|
|
|
229
222
|
account: {
|
|
230
223
|
data: {
|
|
231
224
|
data: string;
|
|
232
|
-
dataHash: BN;
|
|
233
225
|
discriminator: BN;
|
|
226
|
+
dataHash: BN;
|
|
234
227
|
} | null;
|
|
228
|
+
owner: PublicKey;
|
|
235
229
|
lamports: BN;
|
|
236
230
|
address: number[] | null;
|
|
237
|
-
hash: BN;
|
|
238
|
-
owner: PublicKey;
|
|
239
231
|
leafIndex: number;
|
|
240
|
-
tree: PublicKey;
|
|
241
232
|
seq: BN | null;
|
|
233
|
+
hash: BN;
|
|
234
|
+
tree: PublicKey;
|
|
242
235
|
slotCreated: BN;
|
|
243
236
|
};
|
|
244
237
|
}, {
|
|
@@ -258,24 +251,24 @@ export declare const CompressedTokenAccountResult: Struct<{
|
|
|
258
251
|
account: Struct<{
|
|
259
252
|
data: {
|
|
260
253
|
data: string;
|
|
261
|
-
dataHash: BN;
|
|
262
254
|
discriminator: BN;
|
|
255
|
+
dataHash: BN;
|
|
263
256
|
} | null;
|
|
257
|
+
owner: PublicKey;
|
|
264
258
|
lamports: BN;
|
|
265
259
|
address: number[] | null;
|
|
266
|
-
hash: BN;
|
|
267
|
-
owner: PublicKey;
|
|
268
260
|
leafIndex: number;
|
|
269
|
-
tree: PublicKey;
|
|
270
261
|
seq: BN | null;
|
|
262
|
+
hash: BN;
|
|
263
|
+
tree: PublicKey;
|
|
271
264
|
slotCreated: BN;
|
|
272
265
|
}, {
|
|
273
266
|
address: Struct<number[] | null, null>;
|
|
274
267
|
hash: Struct<BN, null>;
|
|
275
268
|
data: Struct<{
|
|
276
269
|
data: string;
|
|
277
|
-
dataHash: BN;
|
|
278
270
|
discriminator: BN;
|
|
271
|
+
dataHash: BN;
|
|
279
272
|
} | null, {
|
|
280
273
|
data: Struct<string, null>;
|
|
281
274
|
dataHash: Struct<BN, null>;
|
|
@@ -296,54 +289,54 @@ export declare const MultipleCompressedAccountsResult: Struct<{
|
|
|
296
289
|
items: {
|
|
297
290
|
data: {
|
|
298
291
|
data: string;
|
|
299
|
-
dataHash: BN;
|
|
300
292
|
discriminator: BN;
|
|
293
|
+
dataHash: BN;
|
|
301
294
|
} | null;
|
|
295
|
+
owner: PublicKey;
|
|
302
296
|
lamports: BN;
|
|
303
297
|
address: number[] | null;
|
|
304
|
-
hash: BN;
|
|
305
|
-
owner: PublicKey;
|
|
306
298
|
leafIndex: number;
|
|
307
|
-
tree: PublicKey;
|
|
308
299
|
seq: BN | null;
|
|
300
|
+
hash: BN;
|
|
301
|
+
tree: PublicKey;
|
|
309
302
|
slotCreated: BN;
|
|
310
303
|
}[];
|
|
311
304
|
}, {
|
|
312
305
|
items: Struct<{
|
|
313
306
|
data: {
|
|
314
307
|
data: string;
|
|
315
|
-
dataHash: BN;
|
|
316
308
|
discriminator: BN;
|
|
309
|
+
dataHash: BN;
|
|
317
310
|
} | null;
|
|
311
|
+
owner: PublicKey;
|
|
318
312
|
lamports: BN;
|
|
319
313
|
address: number[] | null;
|
|
320
|
-
hash: BN;
|
|
321
|
-
owner: PublicKey;
|
|
322
314
|
leafIndex: number;
|
|
323
|
-
tree: PublicKey;
|
|
324
315
|
seq: BN | null;
|
|
316
|
+
hash: BN;
|
|
317
|
+
tree: PublicKey;
|
|
325
318
|
slotCreated: BN;
|
|
326
319
|
}[], Struct<{
|
|
327
320
|
data: {
|
|
328
321
|
data: string;
|
|
329
|
-
dataHash: BN;
|
|
330
322
|
discriminator: BN;
|
|
323
|
+
dataHash: BN;
|
|
331
324
|
} | null;
|
|
325
|
+
owner: PublicKey;
|
|
332
326
|
lamports: BN;
|
|
333
327
|
address: number[] | null;
|
|
334
|
-
hash: BN;
|
|
335
|
-
owner: PublicKey;
|
|
336
328
|
leafIndex: number;
|
|
337
|
-
tree: PublicKey;
|
|
338
329
|
seq: BN | null;
|
|
330
|
+
hash: BN;
|
|
331
|
+
tree: PublicKey;
|
|
339
332
|
slotCreated: BN;
|
|
340
333
|
}, {
|
|
341
334
|
address: Struct<number[] | null, null>;
|
|
342
335
|
hash: Struct<BN, null>;
|
|
343
336
|
data: Struct<{
|
|
344
337
|
data: string;
|
|
345
|
-
dataHash: BN;
|
|
346
338
|
discriminator: BN;
|
|
339
|
+
dataHash: BN;
|
|
347
340
|
} | null, {
|
|
348
341
|
data: Struct<string, null>;
|
|
349
342
|
dataHash: Struct<BN, null>;
|
|
@@ -364,16 +357,16 @@ export declare const CompressedAccountsByOwnerResult: Struct<{
|
|
|
364
357
|
items: {
|
|
365
358
|
data: {
|
|
366
359
|
data: string;
|
|
367
|
-
dataHash: BN;
|
|
368
360
|
discriminator: BN;
|
|
361
|
+
dataHash: BN;
|
|
369
362
|
} | null;
|
|
363
|
+
owner: PublicKey;
|
|
370
364
|
lamports: BN;
|
|
371
365
|
address: number[] | null;
|
|
372
|
-
hash: BN;
|
|
373
|
-
owner: PublicKey;
|
|
374
366
|
leafIndex: number;
|
|
375
|
-
tree: PublicKey;
|
|
376
367
|
seq: BN | null;
|
|
368
|
+
hash: BN;
|
|
369
|
+
tree: PublicKey;
|
|
377
370
|
slotCreated: BN;
|
|
378
371
|
}[];
|
|
379
372
|
cursor: string | null;
|
|
@@ -381,38 +374,38 @@ export declare const CompressedAccountsByOwnerResult: Struct<{
|
|
|
381
374
|
items: Struct<{
|
|
382
375
|
data: {
|
|
383
376
|
data: string;
|
|
384
|
-
dataHash: BN;
|
|
385
377
|
discriminator: BN;
|
|
378
|
+
dataHash: BN;
|
|
386
379
|
} | null;
|
|
380
|
+
owner: PublicKey;
|
|
387
381
|
lamports: BN;
|
|
388
382
|
address: number[] | null;
|
|
389
|
-
hash: BN;
|
|
390
|
-
owner: PublicKey;
|
|
391
383
|
leafIndex: number;
|
|
392
|
-
tree: PublicKey;
|
|
393
384
|
seq: BN | null;
|
|
385
|
+
hash: BN;
|
|
386
|
+
tree: PublicKey;
|
|
394
387
|
slotCreated: BN;
|
|
395
388
|
}[], Struct<{
|
|
396
389
|
data: {
|
|
397
390
|
data: string;
|
|
398
|
-
dataHash: BN;
|
|
399
391
|
discriminator: BN;
|
|
392
|
+
dataHash: BN;
|
|
400
393
|
} | null;
|
|
394
|
+
owner: PublicKey;
|
|
401
395
|
lamports: BN;
|
|
402
396
|
address: number[] | null;
|
|
403
|
-
hash: BN;
|
|
404
|
-
owner: PublicKey;
|
|
405
397
|
leafIndex: number;
|
|
406
|
-
tree: PublicKey;
|
|
407
398
|
seq: BN | null;
|
|
399
|
+
hash: BN;
|
|
400
|
+
tree: PublicKey;
|
|
408
401
|
slotCreated: BN;
|
|
409
402
|
}, {
|
|
410
403
|
address: Struct<number[] | null, null>;
|
|
411
404
|
hash: Struct<BN, null>;
|
|
412
405
|
data: Struct<{
|
|
413
406
|
data: string;
|
|
414
|
-
dataHash: BN;
|
|
415
407
|
discriminator: BN;
|
|
408
|
+
dataHash: BN;
|
|
416
409
|
} | null, {
|
|
417
410
|
data: Struct<string, null>;
|
|
418
411
|
dataHash: Struct<BN, null>;
|
|
@@ -442,16 +435,16 @@ export declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
|
|
|
442
435
|
account: {
|
|
443
436
|
data: {
|
|
444
437
|
data: string;
|
|
445
|
-
dataHash: BN;
|
|
446
438
|
discriminator: BN;
|
|
439
|
+
dataHash: BN;
|
|
447
440
|
} | null;
|
|
441
|
+
owner: PublicKey;
|
|
448
442
|
lamports: BN;
|
|
449
443
|
address: number[] | null;
|
|
450
|
-
hash: BN;
|
|
451
|
-
owner: PublicKey;
|
|
452
444
|
leafIndex: number;
|
|
453
|
-
tree: PublicKey;
|
|
454
445
|
seq: BN | null;
|
|
446
|
+
hash: BN;
|
|
447
|
+
tree: PublicKey;
|
|
455
448
|
slotCreated: BN;
|
|
456
449
|
};
|
|
457
450
|
}[];
|
|
@@ -468,16 +461,16 @@ export declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
|
|
|
468
461
|
account: {
|
|
469
462
|
data: {
|
|
470
463
|
data: string;
|
|
471
|
-
dataHash: BN;
|
|
472
464
|
discriminator: BN;
|
|
465
|
+
dataHash: BN;
|
|
473
466
|
} | null;
|
|
467
|
+
owner: PublicKey;
|
|
474
468
|
lamports: BN;
|
|
475
469
|
address: number[] | null;
|
|
476
|
-
hash: BN;
|
|
477
|
-
owner: PublicKey;
|
|
478
470
|
leafIndex: number;
|
|
479
|
-
tree: PublicKey;
|
|
480
471
|
seq: BN | null;
|
|
472
|
+
hash: BN;
|
|
473
|
+
tree: PublicKey;
|
|
481
474
|
slotCreated: BN;
|
|
482
475
|
};
|
|
483
476
|
}[], Struct<{
|
|
@@ -491,16 +484,16 @@ export declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
|
|
|
491
484
|
account: {
|
|
492
485
|
data: {
|
|
493
486
|
data: string;
|
|
494
|
-
dataHash: BN;
|
|
495
487
|
discriminator: BN;
|
|
488
|
+
dataHash: BN;
|
|
496
489
|
} | null;
|
|
490
|
+
owner: PublicKey;
|
|
497
491
|
lamports: BN;
|
|
498
492
|
address: number[] | null;
|
|
499
|
-
hash: BN;
|
|
500
|
-
owner: PublicKey;
|
|
501
493
|
leafIndex: number;
|
|
502
|
-
tree: PublicKey;
|
|
503
494
|
seq: BN | null;
|
|
495
|
+
hash: BN;
|
|
496
|
+
tree: PublicKey;
|
|
504
497
|
slotCreated: BN;
|
|
505
498
|
};
|
|
506
499
|
}, {
|
|
@@ -520,24 +513,24 @@ export declare const CompressedTokenAccountsByOwnerOrDelegateResult: Struct<{
|
|
|
520
513
|
account: Struct<{
|
|
521
514
|
data: {
|
|
522
515
|
data: string;
|
|
523
|
-
dataHash: BN;
|
|
524
516
|
discriminator: BN;
|
|
517
|
+
dataHash: BN;
|
|
525
518
|
} | null;
|
|
519
|
+
owner: PublicKey;
|
|
526
520
|
lamports: BN;
|
|
527
521
|
address: number[] | null;
|
|
528
|
-
hash: BN;
|
|
529
|
-
owner: PublicKey;
|
|
530
522
|
leafIndex: number;
|
|
531
|
-
tree: PublicKey;
|
|
532
523
|
seq: BN | null;
|
|
524
|
+
hash: BN;
|
|
525
|
+
tree: PublicKey;
|
|
533
526
|
slotCreated: BN;
|
|
534
527
|
}, {
|
|
535
528
|
address: Struct<number[] | null, null>;
|
|
536
529
|
hash: Struct<BN, null>;
|
|
537
530
|
data: Struct<{
|
|
538
531
|
data: string;
|
|
539
|
-
dataHash: BN;
|
|
540
532
|
discriminator: BN;
|
|
533
|
+
dataHash: BN;
|
|
541
534
|
} | null, {
|
|
542
535
|
data: Struct<string, null>;
|
|
543
536
|
dataHash: Struct<BN, null>;
|
|
@@ -620,10 +613,10 @@ export declare const LatestNonVotingSignaturesResultPaginated: Struct<{
|
|
|
620
613
|
*/
|
|
621
614
|
export declare const MerkeProofResult: Struct<{
|
|
622
615
|
root: BN;
|
|
623
|
-
|
|
616
|
+
proof: BN[];
|
|
624
617
|
leafIndex: number;
|
|
618
|
+
hash: BN;
|
|
625
619
|
merkleTree: PublicKey;
|
|
626
|
-
proof: BN[];
|
|
627
620
|
rootSeq: number;
|
|
628
621
|
}, {
|
|
629
622
|
hash: Struct<BN, null>;
|
|
@@ -638,9 +631,9 @@ export declare const MerkeProofResult: Struct<{
|
|
|
638
631
|
*/
|
|
639
632
|
export declare const NewAddressProofResult: Struct<{
|
|
640
633
|
root: BN;
|
|
634
|
+
proof: BN[];
|
|
641
635
|
address: BN;
|
|
642
636
|
merkleTree: PublicKey;
|
|
643
|
-
proof: BN[];
|
|
644
637
|
rootSeq: number;
|
|
645
638
|
nextIndex: number;
|
|
646
639
|
lowerRangeAddress: BN;
|
|
@@ -692,17 +685,17 @@ export declare const ValidityProofResult: Struct<{
|
|
|
692
685
|
*/
|
|
693
686
|
export declare const MultipleMerkleProofsResult: Struct<{
|
|
694
687
|
root: BN;
|
|
695
|
-
|
|
688
|
+
proof: BN[];
|
|
696
689
|
leafIndex: number;
|
|
690
|
+
hash: BN;
|
|
697
691
|
merkleTree: PublicKey;
|
|
698
|
-
proof: BN[];
|
|
699
692
|
rootSeq: number;
|
|
700
693
|
}[], Struct<{
|
|
701
694
|
root: BN;
|
|
702
|
-
|
|
695
|
+
proof: BN[];
|
|
703
696
|
leafIndex: number;
|
|
697
|
+
hash: BN;
|
|
704
698
|
merkleTree: PublicKey;
|
|
705
|
-
proof: BN[];
|
|
706
699
|
rootSeq: number;
|
|
707
700
|
}, {
|
|
708
701
|
hash: Struct<BN, null>;
|
|
@@ -787,8 +780,8 @@ export declare const CompressedMintTokenHoldersResult: Struct<{
|
|
|
787
780
|
}>;
|
|
788
781
|
export declare const AccountProofResult: Struct<{
|
|
789
782
|
root: number[];
|
|
790
|
-
hash: number[];
|
|
791
783
|
proof: number[][];
|
|
784
|
+
hash: number[];
|
|
792
785
|
}, {
|
|
793
786
|
hash: Struct<number[], Struct<number, null>>;
|
|
794
787
|
root: Struct<number[], Struct<number, null>>;
|
|
@@ -845,16 +838,16 @@ export declare const CompressedTransactionResult: Struct<{
|
|
|
845
838
|
account: {
|
|
846
839
|
data: {
|
|
847
840
|
data: string;
|
|
848
|
-
dataHash: BN;
|
|
849
841
|
discriminator: BN;
|
|
842
|
+
dataHash: BN;
|
|
850
843
|
} | null;
|
|
844
|
+
owner: PublicKey;
|
|
851
845
|
lamports: BN;
|
|
852
846
|
address: number[] | null;
|
|
853
|
-
hash: BN;
|
|
854
|
-
owner: PublicKey;
|
|
855
847
|
leafIndex: number;
|
|
856
|
-
tree: PublicKey;
|
|
857
848
|
seq: BN | null;
|
|
849
|
+
hash: BN;
|
|
850
|
+
tree: PublicKey;
|
|
858
851
|
slotCreated: BN;
|
|
859
852
|
};
|
|
860
853
|
optionalTokenData: {
|
|
@@ -869,16 +862,16 @@ export declare const CompressedTransactionResult: Struct<{
|
|
|
869
862
|
account: {
|
|
870
863
|
data: {
|
|
871
864
|
data: string;
|
|
872
|
-
dataHash: BN;
|
|
873
865
|
discriminator: BN;
|
|
866
|
+
dataHash: BN;
|
|
874
867
|
} | null;
|
|
868
|
+
owner: PublicKey;
|
|
875
869
|
lamports: BN;
|
|
876
870
|
address: number[] | null;
|
|
877
|
-
hash: BN;
|
|
878
|
-
owner: PublicKey;
|
|
879
871
|
leafIndex: number;
|
|
880
|
-
tree: PublicKey;
|
|
881
872
|
seq: BN | null;
|
|
873
|
+
hash: BN;
|
|
874
|
+
tree: PublicKey;
|
|
882
875
|
slotCreated: BN;
|
|
883
876
|
};
|
|
884
877
|
optionalTokenData: {
|
|
@@ -897,16 +890,16 @@ export declare const CompressedTransactionResult: Struct<{
|
|
|
897
890
|
account: {
|
|
898
891
|
data: {
|
|
899
892
|
data: string;
|
|
900
|
-
dataHash: BN;
|
|
901
893
|
discriminator: BN;
|
|
894
|
+
dataHash: BN;
|
|
902
895
|
} | null;
|
|
896
|
+
owner: PublicKey;
|
|
903
897
|
lamports: BN;
|
|
904
898
|
address: number[] | null;
|
|
905
|
-
hash: BN;
|
|
906
|
-
owner: PublicKey;
|
|
907
899
|
leafIndex: number;
|
|
908
|
-
tree: PublicKey;
|
|
909
900
|
seq: BN | null;
|
|
901
|
+
hash: BN;
|
|
902
|
+
tree: PublicKey;
|
|
910
903
|
slotCreated: BN;
|
|
911
904
|
};
|
|
912
905
|
optionalTokenData: {
|
|
@@ -921,16 +914,16 @@ export declare const CompressedTransactionResult: Struct<{
|
|
|
921
914
|
account: {
|
|
922
915
|
data: {
|
|
923
916
|
data: string;
|
|
924
|
-
dataHash: BN;
|
|
925
917
|
discriminator: BN;
|
|
918
|
+
dataHash: BN;
|
|
926
919
|
} | null;
|
|
920
|
+
owner: PublicKey;
|
|
927
921
|
lamports: BN;
|
|
928
922
|
address: number[] | null;
|
|
929
|
-
hash: BN;
|
|
930
|
-
owner: PublicKey;
|
|
931
923
|
leafIndex: number;
|
|
932
|
-
tree: PublicKey;
|
|
933
924
|
seq: BN | null;
|
|
925
|
+
hash: BN;
|
|
926
|
+
tree: PublicKey;
|
|
934
927
|
slotCreated: BN;
|
|
935
928
|
};
|
|
936
929
|
optionalTokenData: {
|
|
@@ -946,16 +939,16 @@ export declare const CompressedTransactionResult: Struct<{
|
|
|
946
939
|
account: {
|
|
947
940
|
data: {
|
|
948
941
|
data: string;
|
|
949
|
-
dataHash: BN;
|
|
950
942
|
discriminator: BN;
|
|
943
|
+
dataHash: BN;
|
|
951
944
|
} | null;
|
|
945
|
+
owner: PublicKey;
|
|
952
946
|
lamports: BN;
|
|
953
947
|
address: number[] | null;
|
|
954
|
-
hash: BN;
|
|
955
|
-
owner: PublicKey;
|
|
956
948
|
leafIndex: number;
|
|
957
|
-
tree: PublicKey;
|
|
958
949
|
seq: BN | null;
|
|
950
|
+
hash: BN;
|
|
951
|
+
tree: PublicKey;
|
|
959
952
|
slotCreated: BN;
|
|
960
953
|
};
|
|
961
954
|
optionalTokenData: {
|
|
@@ -969,16 +962,16 @@ export declare const CompressedTransactionResult: Struct<{
|
|
|
969
962
|
account: {
|
|
970
963
|
data: {
|
|
971
964
|
data: string;
|
|
972
|
-
dataHash: BN;
|
|
973
965
|
discriminator: BN;
|
|
966
|
+
dataHash: BN;
|
|
974
967
|
} | null;
|
|
968
|
+
owner: PublicKey;
|
|
975
969
|
lamports: BN;
|
|
976
970
|
address: number[] | null;
|
|
977
|
-
hash: BN;
|
|
978
|
-
owner: PublicKey;
|
|
979
971
|
leafIndex: number;
|
|
980
|
-
tree: PublicKey;
|
|
981
972
|
seq: BN | null;
|
|
973
|
+
hash: BN;
|
|
974
|
+
tree: PublicKey;
|
|
982
975
|
slotCreated: BN;
|
|
983
976
|
};
|
|
984
977
|
optionalTokenData: {
|
|
@@ -992,24 +985,24 @@ export declare const CompressedTransactionResult: Struct<{
|
|
|
992
985
|
account: Struct<{
|
|
993
986
|
data: {
|
|
994
987
|
data: string;
|
|
995
|
-
dataHash: BN;
|
|
996
988
|
discriminator: BN;
|
|
989
|
+
dataHash: BN;
|
|
997
990
|
} | null;
|
|
991
|
+
owner: PublicKey;
|
|
998
992
|
lamports: BN;
|
|
999
993
|
address: number[] | null;
|
|
1000
|
-
hash: BN;
|
|
1001
|
-
owner: PublicKey;
|
|
1002
994
|
leafIndex: number;
|
|
1003
|
-
tree: PublicKey;
|
|
1004
995
|
seq: BN | null;
|
|
996
|
+
hash: BN;
|
|
997
|
+
tree: PublicKey;
|
|
1005
998
|
slotCreated: BN;
|
|
1006
999
|
}, {
|
|
1007
1000
|
address: Struct<number[] | null, null>;
|
|
1008
1001
|
hash: Struct<BN, null>;
|
|
1009
1002
|
data: Struct<{
|
|
1010
1003
|
data: string;
|
|
1011
|
-
dataHash: BN;
|
|
1012
1004
|
discriminator: BN;
|
|
1005
|
+
dataHash: BN;
|
|
1013
1006
|
} | null, {
|
|
1014
1007
|
data: Struct<string, null>;
|
|
1015
1008
|
dataHash: Struct<BN, null>;
|
|
@@ -1040,16 +1033,16 @@ export declare const CompressedTransactionResult: Struct<{
|
|
|
1040
1033
|
account: {
|
|
1041
1034
|
data: {
|
|
1042
1035
|
data: string;
|
|
1043
|
-
dataHash: BN;
|
|
1044
1036
|
discriminator: BN;
|
|
1037
|
+
dataHash: BN;
|
|
1045
1038
|
} | null;
|
|
1039
|
+
owner: PublicKey;
|
|
1046
1040
|
lamports: BN;
|
|
1047
1041
|
address: number[] | null;
|
|
1048
|
-
hash: BN;
|
|
1049
|
-
owner: PublicKey;
|
|
1050
1042
|
leafIndex: number;
|
|
1051
|
-
tree: PublicKey;
|
|
1052
1043
|
seq: BN | null;
|
|
1044
|
+
hash: BN;
|
|
1045
|
+
tree: PublicKey;
|
|
1053
1046
|
slotCreated: BN;
|
|
1054
1047
|
};
|
|
1055
1048
|
optionalTokenData: {
|
|
@@ -1063,16 +1056,16 @@ export declare const CompressedTransactionResult: Struct<{
|
|
|
1063
1056
|
account: {
|
|
1064
1057
|
data: {
|
|
1065
1058
|
data: string;
|
|
1066
|
-
dataHash: BN;
|
|
1067
1059
|
discriminator: BN;
|
|
1060
|
+
dataHash: BN;
|
|
1068
1061
|
} | null;
|
|
1062
|
+
owner: PublicKey;
|
|
1069
1063
|
lamports: BN;
|
|
1070
1064
|
address: number[] | null;
|
|
1071
|
-
hash: BN;
|
|
1072
|
-
owner: PublicKey;
|
|
1073
1065
|
leafIndex: number;
|
|
1074
|
-
tree: PublicKey;
|
|
1075
1066
|
seq: BN | null;
|
|
1067
|
+
hash: BN;
|
|
1068
|
+
tree: PublicKey;
|
|
1076
1069
|
slotCreated: BN;
|
|
1077
1070
|
};
|
|
1078
1071
|
optionalTokenData: {
|
|
@@ -1086,24 +1079,24 @@ export declare const CompressedTransactionResult: Struct<{
|
|
|
1086
1079
|
account: Struct<{
|
|
1087
1080
|
data: {
|
|
1088
1081
|
data: string;
|
|
1089
|
-
dataHash: BN;
|
|
1090
1082
|
discriminator: BN;
|
|
1083
|
+
dataHash: BN;
|
|
1091
1084
|
} | null;
|
|
1085
|
+
owner: PublicKey;
|
|
1092
1086
|
lamports: BN;
|
|
1093
1087
|
address: number[] | null;
|
|
1094
|
-
hash: BN;
|
|
1095
|
-
owner: PublicKey;
|
|
1096
1088
|
leafIndex: number;
|
|
1097
|
-
tree: PublicKey;
|
|
1098
1089
|
seq: BN | null;
|
|
1090
|
+
hash: BN;
|
|
1091
|
+
tree: PublicKey;
|
|
1099
1092
|
slotCreated: BN;
|
|
1100
1093
|
}, {
|
|
1101
1094
|
address: Struct<number[] | null, null>;
|
|
1102
1095
|
hash: Struct<BN, null>;
|
|
1103
1096
|
data: Struct<{
|
|
1104
1097
|
data: string;
|
|
1105
|
-
dataHash: BN;
|
|
1106
1098
|
discriminator: BN;
|
|
1099
|
+
dataHash: BN;
|
|
1107
1100
|
} | null, {
|
|
1108
1101
|
data: Struct<string, null>;
|
|
1109
1102
|
dataHash: Struct<BN, null>;
|
|
@@ -48,11 +48,16 @@ export interface CompressedAccountData {
|
|
|
48
48
|
data: Buffer;
|
|
49
49
|
dataHash: number[];
|
|
50
50
|
}
|
|
51
|
+
export interface MerkleTreeSequenceNumber {
|
|
52
|
+
pubkey: PublicKey;
|
|
53
|
+
seq: BN;
|
|
54
|
+
}
|
|
51
55
|
export interface PublicTransactionEvent {
|
|
52
56
|
inputCompressedAccountHashes: number[][];
|
|
53
57
|
outputCompressedAccountHashes: number[][];
|
|
54
58
|
outputCompressedAccounts: OutputCompressedAccountWithPackedContext[];
|
|
55
59
|
outputLeafIndices: number[];
|
|
60
|
+
sequenceNumbers: MerkleTreeSequenceNumber[];
|
|
56
61
|
relayFee: BN | null;
|
|
57
62
|
isCompress: boolean;
|
|
58
63
|
compressOrDecompressLamports: BN | null;
|
|
@@ -4,6 +4,14 @@ export declare const ALICE: Keypair;
|
|
|
4
4
|
export declare const BOB: Keypair;
|
|
5
5
|
export declare const CHARLIE: Keypair;
|
|
6
6
|
export declare const DAVE: Keypair;
|
|
7
|
+
/**
|
|
8
|
+
* Deep comparison of two objects. Handles BN comparison correctly.
|
|
9
|
+
*
|
|
10
|
+
* @param ref - The reference object to compare.
|
|
11
|
+
* @param val - The value object to compare.
|
|
12
|
+
* @returns True if the objects are deeply equal, false otherwise.
|
|
13
|
+
*/
|
|
14
|
+
export declare function deepEqual(ref: any, val: any): boolean;
|
|
7
15
|
/**
|
|
8
16
|
* Create a new account and airdrop lamports to it
|
|
9
17
|
*
|