@helium/idls 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/lib/cjs/circuit_breaker.js +126 -0
  2. package/lib/cjs/circuit_breaker.js.map +1 -1
  3. package/lib/cjs/data_credits.js +146 -0
  4. package/lib/cjs/data_credits.js.map +1 -1
  5. package/lib/cjs/helium_entity_manager.js +585 -102
  6. package/lib/cjs/helium_entity_manager.js.map +1 -1
  7. package/lib/cjs/helium_sub_daos.js +22 -93
  8. package/lib/cjs/helium_sub_daos.js.map +1 -1
  9. package/lib/cjs/lazy_distributor.js +675 -56
  10. package/lib/cjs/lazy_distributor.js.map +1 -1
  11. package/lib/cjs/lazy_transactions.js +268 -0
  12. package/lib/cjs/lazy_transactions.js.map +1 -0
  13. package/lib/esm/circuit_breaker.js +126 -0
  14. package/lib/esm/circuit_breaker.js.map +1 -1
  15. package/lib/esm/data_credits.js +146 -0
  16. package/lib/esm/data_credits.js.map +1 -1
  17. package/lib/esm/helium_entity_manager.js +585 -102
  18. package/lib/esm/helium_entity_manager.js.map +1 -1
  19. package/lib/esm/helium_sub_daos.js +22 -93
  20. package/lib/esm/helium_sub_daos.js.map +1 -1
  21. package/lib/esm/lazy_distributor.js +675 -56
  22. package/lib/esm/lazy_distributor.js.map +1 -1
  23. package/lib/esm/lazy_transactions.js +265 -0
  24. package/lib/esm/lazy_transactions.js.map +1 -0
  25. package/lib/types/circuit_breaker.d.ts +126 -0
  26. package/lib/types/circuit_breaker.d.ts.map +1 -1
  27. package/lib/types/data_credits.d.ts +146 -0
  28. package/lib/types/data_credits.d.ts.map +1 -1
  29. package/lib/types/helium_entity_manager.d.ts +599 -116
  30. package/lib/types/helium_entity_manager.d.ts.map +1 -1
  31. package/lib/types/helium_sub_daos.d.ts +22 -93
  32. package/lib/types/helium_sub_daos.d.ts.map +1 -1
  33. package/lib/types/lazy_distributor.d.ts +671 -52
  34. package/lib/types/lazy_distributor.d.ts.map +1 -1
  35. package/lib/types/lazy_transactions.d.ts +266 -0
  36. package/lib/types/lazy_transactions.d.ts.map +1 -0
  37. package/package.json +4 -4
@@ -179,7 +179,7 @@ exports.IDL = {
179
179
  "args": []
180
180
  },
181
181
  {
182
- "name": "setCurrentRewardsV0",
182
+ "name": "initializeCompressionRecipientV0",
183
183
  "accounts": [
184
184
  {
185
185
  "name": "payer",
@@ -189,20 +189,98 @@ exports.IDL = {
189
189
  {
190
190
  "name": "lazyDistributor",
191
191
  "isMut": false,
192
- "isSigner": false
192
+ "isSigner": false,
193
+ "pda": {
194
+ "seeds": [
195
+ {
196
+ "kind": "const",
197
+ "type": "string",
198
+ "value": "lazy_distributor"
199
+ },
200
+ {
201
+ "kind": "account",
202
+ "type": "publicKey",
203
+ "account": "LazyDistributorV0",
204
+ "path": "lazy_distributor.rewards_mint"
205
+ }
206
+ ]
207
+ }
193
208
  },
194
209
  {
195
210
  "name": "recipient",
196
211
  "isMut": true,
197
212
  "isSigner": false,
198
- "relations": [
199
- "lazy_distributor"
200
- ]
213
+ "pda": {
214
+ "seeds": [
215
+ {
216
+ "kind": "const",
217
+ "type": "string",
218
+ "value": "recipient"
219
+ },
220
+ {
221
+ "kind": "account",
222
+ "type": "publicKey",
223
+ "account": "LazyDistributorV0",
224
+ "path": "lazy_distributor"
225
+ },
226
+ {
227
+ "kind": "account",
228
+ "type": "publicKey",
229
+ "path": "merkle_tree"
230
+ },
231
+ {
232
+ "kind": "arg",
233
+ "type": {
234
+ "defined": "InitializeCompressionRecipientArgsV0"
235
+ },
236
+ "path": "args.index"
237
+ }
238
+ ]
239
+ }
201
240
  },
202
241
  {
203
- "name": "oracle",
242
+ "name": "merkleTree",
204
243
  "isMut": false,
205
- "isSigner": true
244
+ "isSigner": false
245
+ },
246
+ {
247
+ "name": "owner",
248
+ "isMut": false,
249
+ "isSigner": false
250
+ },
251
+ {
252
+ "name": "delegate",
253
+ "isMut": false,
254
+ "isSigner": false
255
+ },
256
+ {
257
+ "name": "treeAuthority",
258
+ "isMut": false,
259
+ "isSigner": false,
260
+ "pda": {
261
+ "seeds": [
262
+ {
263
+ "kind": "account",
264
+ "type": "publicKey",
265
+ "path": "merkle_tree"
266
+ }
267
+ ],
268
+ "programId": {
269
+ "kind": "account",
270
+ "type": "publicKey",
271
+ "path": "bubblegum_program"
272
+ }
273
+ }
274
+ },
275
+ {
276
+ "name": "bubblegumProgram",
277
+ "isMut": false,
278
+ "isSigner": false
279
+ },
280
+ {
281
+ "name": "compressionProgram",
282
+ "isMut": false,
283
+ "isSigner": false
206
284
  },
207
285
  {
208
286
  "name": "systemProgram",
@@ -214,13 +292,13 @@ exports.IDL = {
214
292
  {
215
293
  "name": "args",
216
294
  "type": {
217
- "defined": "SetRewardsArgsV0"
295
+ "defined": "InitializeCompressionRecipientArgsV0"
218
296
  }
219
297
  }
220
298
  ]
221
299
  },
222
300
  {
223
- "name": "distributeRewardsV0",
301
+ "name": "setCurrentRewardsV0",
224
302
  "accounts": [
225
303
  {
226
304
  "name": "payer",
@@ -230,11 +308,7 @@ exports.IDL = {
230
308
  {
231
309
  "name": "lazyDistributor",
232
310
  "isMut": false,
233
- "isSigner": false,
234
- "relations": [
235
- "rewards_mint",
236
- "rewards_escrow"
237
- ]
311
+ "isSigner": false
238
312
  },
239
313
  {
240
314
  "name": "recipient",
@@ -245,90 +319,337 @@ exports.IDL = {
245
319
  ]
246
320
  },
247
321
  {
248
- "name": "rewardsMint",
322
+ "name": "oracle",
323
+ "isMut": false,
324
+ "isSigner": true
325
+ },
326
+ {
327
+ "name": "systemProgram",
249
328
  "isMut": false,
250
329
  "isSigner": false
330
+ }
331
+ ],
332
+ "args": [
333
+ {
334
+ "name": "args",
335
+ "type": {
336
+ "defined": "SetRewardsArgsV0"
337
+ }
338
+ }
339
+ ]
340
+ },
341
+ {
342
+ "name": "distributeRewardsV0",
343
+ "accounts": [
344
+ {
345
+ "name": "common",
346
+ "accounts": [
347
+ {
348
+ "name": "payer",
349
+ "isMut": true,
350
+ "isSigner": true
351
+ },
352
+ {
353
+ "name": "lazyDistributor",
354
+ "isMut": false,
355
+ "isSigner": false,
356
+ "relations": [
357
+ "rewards_mint",
358
+ "rewards_escrow"
359
+ ]
360
+ },
361
+ {
362
+ "name": "recipient",
363
+ "isMut": true,
364
+ "isSigner": false,
365
+ "relations": [
366
+ "lazy_distributor"
367
+ ]
368
+ },
369
+ {
370
+ "name": "rewardsMint",
371
+ "isMut": false,
372
+ "isSigner": false
373
+ },
374
+ {
375
+ "name": "rewardsEscrow",
376
+ "isMut": true,
377
+ "isSigner": false
378
+ },
379
+ {
380
+ "name": "circuitBreaker",
381
+ "isMut": true,
382
+ "isSigner": false,
383
+ "pda": {
384
+ "seeds": [
385
+ {
386
+ "kind": "const",
387
+ "type": "string",
388
+ "value": "account_windowed_breaker"
389
+ },
390
+ {
391
+ "kind": "account",
392
+ "type": "publicKey",
393
+ "account": "TokenAccount",
394
+ "path": "rewards_escrow"
395
+ }
396
+ ],
397
+ "programId": {
398
+ "kind": "account",
399
+ "type": "publicKey",
400
+ "path": "circuit_breaker_program"
401
+ }
402
+ }
403
+ },
404
+ {
405
+ "name": "owner",
406
+ "isMut": false,
407
+ "isSigner": false
408
+ },
409
+ {
410
+ "name": "destinationAccount",
411
+ "isMut": true,
412
+ "isSigner": false
413
+ },
414
+ {
415
+ "name": "associatedTokenProgram",
416
+ "isMut": false,
417
+ "isSigner": false
418
+ },
419
+ {
420
+ "name": "circuitBreakerProgram",
421
+ "isMut": false,
422
+ "isSigner": false
423
+ },
424
+ {
425
+ "name": "systemProgram",
426
+ "isMut": false,
427
+ "isSigner": false
428
+ },
429
+ {
430
+ "name": "tokenProgram",
431
+ "isMut": false,
432
+ "isSigner": false
433
+ },
434
+ {
435
+ "name": "rent",
436
+ "isMut": false,
437
+ "isSigner": false
438
+ },
439
+ {
440
+ "name": "clock",
441
+ "isMut": false,
442
+ "isSigner": false
443
+ }
444
+ ]
251
445
  },
252
446
  {
253
- "name": "rewardsEscrow",
254
- "isMut": true,
447
+ "name": "recipientMintAccount",
448
+ "isMut": false,
255
449
  "isSigner": false
450
+ }
451
+ ],
452
+ "args": []
453
+ },
454
+ {
455
+ "name": "distributeCompressionRewardsV0",
456
+ "accounts": [
457
+ {
458
+ "name": "common",
459
+ "accounts": [
460
+ {
461
+ "name": "payer",
462
+ "isMut": true,
463
+ "isSigner": true
464
+ },
465
+ {
466
+ "name": "lazyDistributor",
467
+ "isMut": false,
468
+ "isSigner": false,
469
+ "relations": [
470
+ "rewards_mint",
471
+ "rewards_escrow"
472
+ ]
473
+ },
474
+ {
475
+ "name": "recipient",
476
+ "isMut": true,
477
+ "isSigner": false,
478
+ "relations": [
479
+ "lazy_distributor"
480
+ ]
481
+ },
482
+ {
483
+ "name": "rewardsMint",
484
+ "isMut": false,
485
+ "isSigner": false
486
+ },
487
+ {
488
+ "name": "rewardsEscrow",
489
+ "isMut": true,
490
+ "isSigner": false
491
+ },
492
+ {
493
+ "name": "circuitBreaker",
494
+ "isMut": true,
495
+ "isSigner": false,
496
+ "pda": {
497
+ "seeds": [
498
+ {
499
+ "kind": "const",
500
+ "type": "string",
501
+ "value": "account_windowed_breaker"
502
+ },
503
+ {
504
+ "kind": "account",
505
+ "type": "publicKey",
506
+ "account": "TokenAccount",
507
+ "path": "rewards_escrow"
508
+ }
509
+ ],
510
+ "programId": {
511
+ "kind": "account",
512
+ "type": "publicKey",
513
+ "path": "circuit_breaker_program"
514
+ }
515
+ }
516
+ },
517
+ {
518
+ "name": "owner",
519
+ "isMut": false,
520
+ "isSigner": false
521
+ },
522
+ {
523
+ "name": "destinationAccount",
524
+ "isMut": true,
525
+ "isSigner": false
526
+ },
527
+ {
528
+ "name": "associatedTokenProgram",
529
+ "isMut": false,
530
+ "isSigner": false
531
+ },
532
+ {
533
+ "name": "circuitBreakerProgram",
534
+ "isMut": false,
535
+ "isSigner": false
536
+ },
537
+ {
538
+ "name": "systemProgram",
539
+ "isMut": false,
540
+ "isSigner": false
541
+ },
542
+ {
543
+ "name": "tokenProgram",
544
+ "isMut": false,
545
+ "isSigner": false
546
+ },
547
+ {
548
+ "name": "rent",
549
+ "isMut": false,
550
+ "isSigner": false
551
+ },
552
+ {
553
+ "name": "clock",
554
+ "isMut": false,
555
+ "isSigner": false
556
+ }
557
+ ]
256
558
  },
257
559
  {
258
- "name": "circuitBreaker",
259
- "isMut": true,
560
+ "name": "merkleTree",
561
+ "isMut": false,
562
+ "isSigner": false
563
+ },
564
+ {
565
+ "name": "treeAuthority",
566
+ "isMut": false,
260
567
  "isSigner": false,
261
568
  "pda": {
262
569
  "seeds": [
263
- {
264
- "kind": "const",
265
- "type": "string",
266
- "value": "account_windowed_breaker"
267
- },
268
570
  {
269
571
  "kind": "account",
270
572
  "type": "publicKey",
271
- "account": "TokenAccount",
272
- "path": "rewards_escrow"
573
+ "path": "merkle_tree"
273
574
  }
274
575
  ],
275
576
  "programId": {
276
577
  "kind": "account",
277
578
  "type": "publicKey",
278
- "path": "circuit_breaker_program"
579
+ "path": "bubblegum_program"
279
580
  }
280
581
  }
281
582
  },
282
583
  {
283
- "name": "recipientMintAccount",
284
- "isMut": false,
285
- "isSigner": false,
286
- "relations": [
287
- "owner"
288
- ]
289
- },
290
- {
291
- "name": "owner",
584
+ "name": "bubblegumProgram",
292
585
  "isMut": false,
293
586
  "isSigner": false
294
587
  },
295
588
  {
296
- "name": "destinationAccount",
297
- "isMut": true,
298
- "isSigner": false
299
- },
300
- {
301
- "name": "associatedTokenProgram",
589
+ "name": "compressionProgram",
302
590
  "isMut": false,
303
591
  "isSigner": false
304
592
  },
305
593
  {
306
- "name": "circuitBreakerProgram",
594
+ "name": "tokenProgram",
307
595
  "isMut": false,
308
596
  "isSigner": false
309
- },
597
+ }
598
+ ],
599
+ "args": [
310
600
  {
311
- "name": "systemProgram",
312
- "isMut": false,
313
- "isSigner": false
314
- },
601
+ "name": "args",
602
+ "type": {
603
+ "defined": "DistributeCompressionRewardsArgsV0"
604
+ }
605
+ }
606
+ ]
607
+ },
608
+ {
609
+ "name": "updateLazyDistributorV0",
610
+ "accounts": [
315
611
  {
316
- "name": "tokenProgram",
317
- "isMut": false,
318
- "isSigner": false
612
+ "name": "lazyDistributor",
613
+ "isMut": true,
614
+ "isSigner": false,
615
+ "pda": {
616
+ "seeds": [
617
+ {
618
+ "kind": "const",
619
+ "type": "string",
620
+ "value": "lazy_distributor"
621
+ },
622
+ {
623
+ "kind": "account",
624
+ "type": "publicKey",
625
+ "account": "Mint",
626
+ "path": "rewards_mint"
627
+ }
628
+ ]
629
+ },
630
+ "relations": [
631
+ "authority"
632
+ ]
319
633
  },
320
634
  {
321
- "name": "rent",
635
+ "name": "rewardsMint",
322
636
  "isMut": false,
323
637
  "isSigner": false
324
638
  },
325
639
  {
326
- "name": "clock",
640
+ "name": "authority",
327
641
  "isMut": false,
328
- "isSigner": false
642
+ "isSigner": true
329
643
  }
330
644
  ],
331
- "args": []
645
+ "args": [
646
+ {
647
+ "name": "args",
648
+ "type": {
649
+ "defined": "UpdateLazyDistributorArgsV0"
650
+ }
651
+ }
652
+ ]
332
653
  }
333
654
  ],
334
655
  "accounts": [
@@ -378,7 +699,7 @@ exports.IDL = {
378
699
  "type": "publicKey"
379
700
  },
380
701
  {
381
- "name": "mint",
702
+ "name": "asset",
382
703
  "type": "publicKey"
383
704
  },
384
705
  {
@@ -428,6 +749,66 @@ exports.IDL = {
428
749
  ]
429
750
  }
430
751
  },
752
+ {
753
+ "name": "DistributeCompressionRewardsArgsV0",
754
+ "type": {
755
+ "kind": "struct",
756
+ "fields": [
757
+ {
758
+ "name": "hash",
759
+ "type": {
760
+ "array": [
761
+ "u8",
762
+ 32
763
+ ]
764
+ }
765
+ },
766
+ {
767
+ "name": "root",
768
+ "type": {
769
+ "array": [
770
+ "u8",
771
+ 32
772
+ ]
773
+ }
774
+ },
775
+ {
776
+ "name": "index",
777
+ "type": "u32"
778
+ }
779
+ ]
780
+ }
781
+ },
782
+ {
783
+ "name": "InitializeCompressionRecipientArgsV0",
784
+ "type": {
785
+ "kind": "struct",
786
+ "fields": [
787
+ {
788
+ "name": "hash",
789
+ "type": {
790
+ "array": [
791
+ "u8",
792
+ 32
793
+ ]
794
+ }
795
+ },
796
+ {
797
+ "name": "root",
798
+ "type": {
799
+ "array": [
800
+ "u8",
801
+ 32
802
+ ]
803
+ }
804
+ },
805
+ {
806
+ "name": "index",
807
+ "type": "u32"
808
+ }
809
+ ]
810
+ }
811
+ },
431
812
  {
432
813
  "name": "InitializeLazyDistributorArgsV0",
433
814
  "type": {
@@ -470,6 +851,30 @@ exports.IDL = {
470
851
  ]
471
852
  }
472
853
  },
854
+ {
855
+ "name": "UpdateLazyDistributorArgsV0",
856
+ "type": {
857
+ "kind": "struct",
858
+ "fields": [
859
+ {
860
+ "name": "oracles",
861
+ "type": {
862
+ "option": {
863
+ "vec": {
864
+ "defined": "OracleConfigV0"
865
+ }
866
+ }
867
+ }
868
+ },
869
+ {
870
+ "name": "authority",
871
+ "type": {
872
+ "option": "publicKey"
873
+ }
874
+ }
875
+ ]
876
+ }
877
+ },
473
878
  {
474
879
  "name": "OracleConfigV0",
475
880
  "type": {
@@ -486,6 +891,164 @@ exports.IDL = {
486
891
  ]
487
892
  }
488
893
  },
894
+ {
895
+ "name": "Creator",
896
+ "type": {
897
+ "kind": "struct",
898
+ "fields": [
899
+ {
900
+ "name": "address",
901
+ "type": "publicKey"
902
+ },
903
+ {
904
+ "name": "verified",
905
+ "type": "bool"
906
+ },
907
+ {
908
+ "name": "share",
909
+ "type": "u8"
910
+ }
911
+ ]
912
+ }
913
+ },
914
+ {
915
+ "name": "Uses",
916
+ "type": {
917
+ "kind": "struct",
918
+ "fields": [
919
+ {
920
+ "name": "useMethod",
921
+ "type": {
922
+ "defined": "UseMethod"
923
+ }
924
+ },
925
+ {
926
+ "name": "remaining",
927
+ "type": "u64"
928
+ },
929
+ {
930
+ "name": "total",
931
+ "type": "u64"
932
+ }
933
+ ]
934
+ }
935
+ },
936
+ {
937
+ "name": "Collection",
938
+ "type": {
939
+ "kind": "struct",
940
+ "fields": [
941
+ {
942
+ "name": "verified",
943
+ "type": "bool"
944
+ },
945
+ {
946
+ "name": "key",
947
+ "type": "publicKey"
948
+ }
949
+ ]
950
+ }
951
+ },
952
+ {
953
+ "name": "MetadataArgs",
954
+ "type": {
955
+ "kind": "struct",
956
+ "fields": [
957
+ {
958
+ "name": "name",
959
+ "docs": [
960
+ "The name of the asset"
961
+ ],
962
+ "type": "string"
963
+ },
964
+ {
965
+ "name": "symbol",
966
+ "docs": [
967
+ "The symbol for the asset"
968
+ ],
969
+ "type": "string"
970
+ },
971
+ {
972
+ "name": "uri",
973
+ "docs": [
974
+ "URI pointing to JSON representing the asset"
975
+ ],
976
+ "type": "string"
977
+ },
978
+ {
979
+ "name": "sellerFeeBasisPoints",
980
+ "docs": [
981
+ "Royalty basis points that goes to creators in secondary sales (0-10000)"
982
+ ],
983
+ "type": "u16"
984
+ },
985
+ {
986
+ "name": "primarySaleHappened",
987
+ "type": "bool"
988
+ },
989
+ {
990
+ "name": "isMutable",
991
+ "type": "bool"
992
+ },
993
+ {
994
+ "name": "editionNonce",
995
+ "docs": [
996
+ "nonce for easy calculation of editions, if present"
997
+ ],
998
+ "type": {
999
+ "option": "u8"
1000
+ }
1001
+ },
1002
+ {
1003
+ "name": "tokenStandard",
1004
+ "docs": [
1005
+ "Since we cannot easily change Metadata, we add the new DataV2 fields here at the end."
1006
+ ],
1007
+ "type": {
1008
+ "option": {
1009
+ "defined": "TokenStandard"
1010
+ }
1011
+ }
1012
+ },
1013
+ {
1014
+ "name": "collection",
1015
+ "docs": [
1016
+ "Collection"
1017
+ ],
1018
+ "type": {
1019
+ "option": {
1020
+ "defined": "Collection"
1021
+ }
1022
+ }
1023
+ },
1024
+ {
1025
+ "name": "uses",
1026
+ "docs": [
1027
+ "Uses"
1028
+ ],
1029
+ "type": {
1030
+ "option": {
1031
+ "defined": "Uses"
1032
+ }
1033
+ }
1034
+ },
1035
+ {
1036
+ "name": "tokenProgramVersion",
1037
+ "type": {
1038
+ "defined": "TokenProgramVersion"
1039
+ }
1040
+ },
1041
+ {
1042
+ "name": "creators",
1043
+ "type": {
1044
+ "vec": {
1045
+ "defined": "Creator"
1046
+ }
1047
+ }
1048
+ }
1049
+ ]
1050
+ }
1051
+ },
489
1052
  {
490
1053
  "name": "ThresholdType",
491
1054
  "type": {
@@ -499,6 +1062,57 @@ exports.IDL = {
499
1062
  }
500
1063
  ]
501
1064
  }
1065
+ },
1066
+ {
1067
+ "name": "TokenProgramVersion",
1068
+ "type": {
1069
+ "kind": "enum",
1070
+ "variants": [
1071
+ {
1072
+ "name": "Original"
1073
+ },
1074
+ {
1075
+ "name": "Token2022"
1076
+ }
1077
+ ]
1078
+ }
1079
+ },
1080
+ {
1081
+ "name": "TokenStandard",
1082
+ "type": {
1083
+ "kind": "enum",
1084
+ "variants": [
1085
+ {
1086
+ "name": "NonFungible"
1087
+ },
1088
+ {
1089
+ "name": "FungibleAsset"
1090
+ },
1091
+ {
1092
+ "name": "Fungible"
1093
+ },
1094
+ {
1095
+ "name": "NonFungibleEdition"
1096
+ }
1097
+ ]
1098
+ }
1099
+ },
1100
+ {
1101
+ "name": "UseMethod",
1102
+ "type": {
1103
+ "kind": "enum",
1104
+ "variants": [
1105
+ {
1106
+ "name": "Burn"
1107
+ },
1108
+ {
1109
+ "name": "Multiple"
1110
+ },
1111
+ {
1112
+ "name": "Single"
1113
+ }
1114
+ ]
1115
+ }
502
1116
  }
503
1117
  ],
504
1118
  "errors": [
@@ -511,6 +1125,11 @@ exports.IDL = {
511
1125
  "code": 6001,
512
1126
  "name": "ArithmeticError",
513
1127
  "msg": "Error in arithmetic"
1128
+ },
1129
+ {
1130
+ "code": 6002,
1131
+ "name": "InvalidAsset",
1132
+ "msg": "Provided asset was invalid"
514
1133
  }
515
1134
  ]
516
1135
  };