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