@helium/spl-utils 0.9.19 → 0.9.20

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 (47) hide show
  1. package/lib/cjs/fetchBackwardsCompatibleIdl.js +31 -15475
  2. package/lib/cjs/fetchBackwardsCompatibleIdl.js.map +1 -1
  3. package/lib/cjs/idl/circuit_breaker.json +550 -0
  4. package/lib/cjs/idl/data_credits.json +1235 -0
  5. package/lib/cjs/idl/fanout.json +736 -0
  6. package/lib/cjs/idl/helium_entity_manager.json +4602 -0
  7. package/lib/cjs/idl/helium_sub_daos.json +3286 -0
  8. package/lib/cjs/idl/hexboosting.json +651 -0
  9. package/lib/cjs/idl/lazy_distributor.json +1239 -0
  10. package/lib/cjs/idl/lazy_transactions.json +538 -0
  11. package/lib/cjs/idl/mobile_entity_manager.json +1374 -0
  12. package/lib/cjs/idl/no_emit.json +92 -0
  13. package/lib/cjs/idl/price_oracle.json +256 -0
  14. package/lib/cjs/idl/rewards_oracle.json +167 -0
  15. package/lib/cjs/idl/treasury_management.json +423 -0
  16. package/lib/cjs/idl/voter_stake_registry.json +2224 -0
  17. package/lib/cjs/priorityFees.js +9 -6
  18. package/lib/cjs/priorityFees.js.map +1 -1
  19. package/lib/cjs/transaction.js +2 -2
  20. package/lib/cjs/transaction.js.map +1 -1
  21. package/lib/esm/src/fetchBackwardsCompatibleIdl.js +28 -15475
  22. package/lib/esm/src/fetchBackwardsCompatibleIdl.js.map +1 -1
  23. package/lib/esm/src/idl/circuit_breaker.json +550 -0
  24. package/lib/esm/src/idl/data_credits.json +1235 -0
  25. package/lib/esm/src/idl/fanout.json +736 -0
  26. package/lib/esm/src/idl/helium_entity_manager.json +4602 -0
  27. package/lib/esm/src/idl/helium_sub_daos.json +3286 -0
  28. package/lib/esm/src/idl/hexboosting.json +651 -0
  29. package/lib/esm/src/idl/lazy_distributor.json +1239 -0
  30. package/lib/esm/src/idl/lazy_transactions.json +538 -0
  31. package/lib/esm/src/idl/mobile_entity_manager.json +1374 -0
  32. package/lib/esm/src/idl/no_emit.json +92 -0
  33. package/lib/esm/src/idl/price_oracle.json +256 -0
  34. package/lib/esm/src/idl/rewards_oracle.json +167 -0
  35. package/lib/esm/src/idl/treasury_management.json +423 -0
  36. package/lib/esm/src/idl/voter_stake_registry.json +2224 -0
  37. package/lib/esm/src/priorityFees.js +12 -5
  38. package/lib/esm/src/priorityFees.js.map +1 -1
  39. package/lib/esm/src/transaction.js +3 -3
  40. package/lib/esm/src/transaction.js.map +1 -1
  41. package/lib/esm/tsconfig.esm.tsbuildinfo +1 -1
  42. package/lib/types/src/fetchBackwardsCompatibleIdl.d.ts.map +1 -1
  43. package/lib/types/src/priorityFees.d.ts +5 -2
  44. package/lib/types/src/priorityFees.d.ts.map +1 -1
  45. package/lib/types/src/transaction.d.ts +3 -1
  46. package/lib/types/src/transaction.d.ts.map +1 -1
  47. package/package.json +4 -4
@@ -0,0 +1,651 @@
1
+ {
2
+ "version": "0.1.0",
3
+ "name": "hexboosting",
4
+ "instructions": [
5
+ {
6
+ "name": "boostV0",
7
+ "accounts": [
8
+ {
9
+ "name": "payer",
10
+ "isMut": true,
11
+ "isSigner": true
12
+ },
13
+ {
14
+ "name": "boostConfig",
15
+ "isMut": false,
16
+ "isSigner": false,
17
+ "pda": {
18
+ "seeds": [
19
+ {
20
+ "kind": "const",
21
+ "type": "string",
22
+ "value": "boost_config"
23
+ },
24
+ {
25
+ "kind": "account",
26
+ "type": "publicKey",
27
+ "account": "Mint",
28
+ "path": "payment_mint"
29
+ }
30
+ ]
31
+ },
32
+ "relations": [
33
+ "payment_mint",
34
+ "price_oracle"
35
+ ]
36
+ },
37
+ {
38
+ "name": "carrier",
39
+ "isMut": false,
40
+ "isSigner": false,
41
+ "relations": [
42
+ "hexboost_authority"
43
+ ]
44
+ },
45
+ {
46
+ "name": "hexboostAuthority",
47
+ "isMut": false,
48
+ "isSigner": true
49
+ },
50
+ {
51
+ "name": "priceOracle",
52
+ "isMut": false,
53
+ "isSigner": false
54
+ },
55
+ {
56
+ "name": "paymentMint",
57
+ "isMut": true,
58
+ "isSigner": false
59
+ },
60
+ {
61
+ "name": "paymentAccount",
62
+ "isMut": true,
63
+ "isSigner": false
64
+ },
65
+ {
66
+ "name": "boostedHex",
67
+ "isMut": true,
68
+ "isSigner": false
69
+ },
70
+ {
71
+ "name": "systemProgram",
72
+ "isMut": false,
73
+ "isSigner": false
74
+ },
75
+ {
76
+ "name": "tokenProgram",
77
+ "isMut": false,
78
+ "isSigner": false
79
+ },
80
+ {
81
+ "name": "associatedTokenProgram",
82
+ "isMut": false,
83
+ "isSigner": false
84
+ }
85
+ ],
86
+ "args": [
87
+ {
88
+ "name": "args",
89
+ "type": {
90
+ "defined": "BoostArgsV0"
91
+ }
92
+ }
93
+ ]
94
+ },
95
+ {
96
+ "name": "initializeBoostConfigV0",
97
+ "accounts": [
98
+ {
99
+ "name": "payer",
100
+ "isMut": true,
101
+ "isSigner": true
102
+ },
103
+ {
104
+ "name": "subDao",
105
+ "isMut": false,
106
+ "isSigner": false,
107
+ "relations": [
108
+ "authority",
109
+ "dnt_mint"
110
+ ]
111
+ },
112
+ {
113
+ "name": "authority",
114
+ "isMut": false,
115
+ "isSigner": true
116
+ },
117
+ {
118
+ "name": "rentReclaimAuthority",
119
+ "isMut": false,
120
+ "isSigner": false
121
+ },
122
+ {
123
+ "name": "startAuthority",
124
+ "isMut": false,
125
+ "isSigner": false
126
+ },
127
+ {
128
+ "name": "priceOracle",
129
+ "isMut": false,
130
+ "isSigner": false
131
+ },
132
+ {
133
+ "name": "dntMint",
134
+ "isMut": false,
135
+ "isSigner": false
136
+ },
137
+ {
138
+ "name": "boostConfig",
139
+ "isMut": true,
140
+ "isSigner": false,
141
+ "pda": {
142
+ "seeds": [
143
+ {
144
+ "kind": "const",
145
+ "type": "string",
146
+ "value": "boost_config"
147
+ },
148
+ {
149
+ "kind": "account",
150
+ "type": "publicKey",
151
+ "account": "Mint",
152
+ "path": "dnt_mint"
153
+ }
154
+ ]
155
+ }
156
+ },
157
+ {
158
+ "name": "systemProgram",
159
+ "isMut": false,
160
+ "isSigner": false
161
+ }
162
+ ],
163
+ "args": [
164
+ {
165
+ "name": "args",
166
+ "type": {
167
+ "defined": "InitializeBoostConfigArgsV0"
168
+ }
169
+ }
170
+ ]
171
+ },
172
+ {
173
+ "name": "startBoostV0",
174
+ "accounts": [
175
+ {
176
+ "name": "startAuthority",
177
+ "isMut": false,
178
+ "isSigner": true
179
+ },
180
+ {
181
+ "name": "boostConfig",
182
+ "isMut": false,
183
+ "isSigner": false,
184
+ "relations": [
185
+ "start_authority"
186
+ ]
187
+ },
188
+ {
189
+ "name": "boostedHex",
190
+ "isMut": true,
191
+ "isSigner": false,
192
+ "relations": [
193
+ "boost_config"
194
+ ]
195
+ }
196
+ ],
197
+ "args": [
198
+ {
199
+ "name": "args",
200
+ "type": {
201
+ "defined": "StartBoostArgsV0"
202
+ }
203
+ }
204
+ ]
205
+ },
206
+ {
207
+ "name": "startBoostV1",
208
+ "accounts": [
209
+ {
210
+ "name": "startAuthority",
211
+ "isMut": false,
212
+ "isSigner": true
213
+ },
214
+ {
215
+ "name": "boostConfig",
216
+ "isMut": false,
217
+ "isSigner": false,
218
+ "relations": [
219
+ "start_authority"
220
+ ]
221
+ },
222
+ {
223
+ "name": "boostedHex",
224
+ "isMut": true,
225
+ "isSigner": false,
226
+ "relations": [
227
+ "boost_config"
228
+ ]
229
+ }
230
+ ],
231
+ "args": [
232
+ {
233
+ "name": "args",
234
+ "type": {
235
+ "defined": "StartBoostArgsV0"
236
+ }
237
+ }
238
+ ]
239
+ },
240
+ {
241
+ "name": "closeBoostV0",
242
+ "accounts": [
243
+ {
244
+ "name": "rentReclaimAuthority",
245
+ "isMut": false,
246
+ "isSigner": true
247
+ },
248
+ {
249
+ "name": "boostConfig",
250
+ "isMut": false,
251
+ "isSigner": false,
252
+ "relations": [
253
+ "rent_reclaim_authority"
254
+ ]
255
+ },
256
+ {
257
+ "name": "boostedHex",
258
+ "isMut": true,
259
+ "isSigner": false,
260
+ "relations": [
261
+ "boost_config"
262
+ ]
263
+ }
264
+ ],
265
+ "args": []
266
+ },
267
+ {
268
+ "name": "updateBoostConfigV0",
269
+ "accounts": [
270
+ {
271
+ "name": "subDao",
272
+ "isMut": false,
273
+ "isSigner": false,
274
+ "relations": [
275
+ "authority"
276
+ ]
277
+ },
278
+ {
279
+ "name": "authority",
280
+ "isMut": false,
281
+ "isSigner": true
282
+ },
283
+ {
284
+ "name": "boostConfig",
285
+ "isMut": true,
286
+ "isSigner": false,
287
+ "relations": [
288
+ "sub_dao"
289
+ ]
290
+ }
291
+ ],
292
+ "args": [
293
+ {
294
+ "name": "args",
295
+ "type": {
296
+ "defined": "UpdateBoostConfigArgsV0"
297
+ }
298
+ }
299
+ ]
300
+ }
301
+ ],
302
+ "accounts": [
303
+ {
304
+ "name": "BoostConfigV0",
305
+ "type": {
306
+ "kind": "struct",
307
+ "fields": [
308
+ {
309
+ "name": "priceOracle",
310
+ "type": "publicKey"
311
+ },
312
+ {
313
+ "name": "paymentMint",
314
+ "type": "publicKey"
315
+ },
316
+ {
317
+ "name": "subDao",
318
+ "type": "publicKey"
319
+ },
320
+ {
321
+ "name": "rentReclaimAuthority",
322
+ "docs": [
323
+ "Authority to reclaim rent from hexes no longer boosted"
324
+ ],
325
+ "type": "publicKey"
326
+ },
327
+ {
328
+ "name": "boostPrice",
329
+ "docs": [
330
+ "The price in the oracle (usd) to burn boost",
331
+ "For simplicity, this should have the same number of decimals as the price oracle"
332
+ ],
333
+ "type": "u64"
334
+ },
335
+ {
336
+ "name": "periodLength",
337
+ "docs": [
338
+ "The length of a period (defined as a month in the HIP)"
339
+ ],
340
+ "type": "u32"
341
+ },
342
+ {
343
+ "name": "minimumPeriods",
344
+ "docs": [
345
+ "The minimum of periods to boost"
346
+ ],
347
+ "type": "u16"
348
+ },
349
+ {
350
+ "name": "bumpSeed",
351
+ "type": "u8"
352
+ },
353
+ {
354
+ "name": "startAuthority",
355
+ "docs": [
356
+ "Authority to start the hex"
357
+ ],
358
+ "type": "publicKey"
359
+ }
360
+ ]
361
+ }
362
+ },
363
+ {
364
+ "name": "BoostedHexV0",
365
+ "type": {
366
+ "kind": "struct",
367
+ "fields": [
368
+ {
369
+ "name": "boostConfig",
370
+ "type": "publicKey"
371
+ },
372
+ {
373
+ "name": "location",
374
+ "type": "u64"
375
+ },
376
+ {
377
+ "name": "startTs",
378
+ "type": "i64"
379
+ },
380
+ {
381
+ "name": "reserved",
382
+ "type": {
383
+ "array": [
384
+ "u64",
385
+ 8
386
+ ]
387
+ }
388
+ },
389
+ {
390
+ "name": "bumpSeed",
391
+ "type": "u8"
392
+ },
393
+ {
394
+ "name": "boostsByPeriod",
395
+ "docs": [
396
+ "Each entry represents the boost multiplier for a given period"
397
+ ],
398
+ "type": "bytes"
399
+ },
400
+ {
401
+ "name": "version",
402
+ "type": "u32"
403
+ }
404
+ ]
405
+ }
406
+ },
407
+ {
408
+ "name": "BoostedHexV1",
409
+ "type": {
410
+ "kind": "struct",
411
+ "fields": [
412
+ {
413
+ "name": "deviceType",
414
+ "type": {
415
+ "defined": "DeviceTypeV0"
416
+ }
417
+ },
418
+ {
419
+ "name": "boostConfig",
420
+ "type": "publicKey"
421
+ },
422
+ {
423
+ "name": "version",
424
+ "type": "u32"
425
+ },
426
+ {
427
+ "name": "location",
428
+ "type": "u64"
429
+ },
430
+ {
431
+ "name": "startTs",
432
+ "type": "i64"
433
+ },
434
+ {
435
+ "name": "bumpSeed",
436
+ "type": "u8"
437
+ },
438
+ {
439
+ "name": "boostsByPeriod",
440
+ "docs": [
441
+ "Each entry represents the boost multiplier for a given period"
442
+ ],
443
+ "type": "bytes"
444
+ }
445
+ ]
446
+ }
447
+ }
448
+ ],
449
+ "types": [
450
+ {
451
+ "name": "BoostArgsV0",
452
+ "type": {
453
+ "kind": "struct",
454
+ "fields": [
455
+ {
456
+ "name": "location",
457
+ "type": "u64"
458
+ },
459
+ {
460
+ "name": "version",
461
+ "type": "u32"
462
+ },
463
+ {
464
+ "name": "amounts",
465
+ "type": {
466
+ "vec": {
467
+ "defined": "BoostAmountV0"
468
+ }
469
+ }
470
+ },
471
+ {
472
+ "name": "deviceType",
473
+ "type": {
474
+ "defined": "DeviceTypeV0"
475
+ }
476
+ }
477
+ ]
478
+ }
479
+ },
480
+ {
481
+ "name": "BoostAmountV0",
482
+ "type": {
483
+ "kind": "struct",
484
+ "fields": [
485
+ {
486
+ "name": "period",
487
+ "type": "u16"
488
+ },
489
+ {
490
+ "name": "amount",
491
+ "type": "u8"
492
+ }
493
+ ]
494
+ }
495
+ },
496
+ {
497
+ "name": "InitializeBoostConfigArgsV0",
498
+ "type": {
499
+ "kind": "struct",
500
+ "fields": [
501
+ {
502
+ "name": "boostPrice",
503
+ "docs": [
504
+ "The price in the oracle (usd) to burn boost"
505
+ ],
506
+ "type": "u64"
507
+ },
508
+ {
509
+ "name": "periodLength",
510
+ "docs": [
511
+ "The length of a period (defined as a month in the HIP)"
512
+ ],
513
+ "type": "u32"
514
+ },
515
+ {
516
+ "name": "minimumPeriods",
517
+ "docs": [
518
+ "The minimum of periods to boost"
519
+ ],
520
+ "type": "u16"
521
+ }
522
+ ]
523
+ }
524
+ },
525
+ {
526
+ "name": "StartBoostArgsV0",
527
+ "type": {
528
+ "kind": "struct",
529
+ "fields": [
530
+ {
531
+ "name": "startTs",
532
+ "type": "i64"
533
+ }
534
+ ]
535
+ }
536
+ },
537
+ {
538
+ "name": "UpdateBoostConfigArgsV0",
539
+ "type": {
540
+ "kind": "struct",
541
+ "fields": [
542
+ {
543
+ "name": "startAuthority",
544
+ "type": {
545
+ "option": "publicKey"
546
+ }
547
+ },
548
+ {
549
+ "name": "rentReclaimAuthority",
550
+ "type": {
551
+ "option": "publicKey"
552
+ }
553
+ },
554
+ {
555
+ "name": "boostPrice",
556
+ "type": {
557
+ "option": "u64"
558
+ }
559
+ },
560
+ {
561
+ "name": "minimumPeriods",
562
+ "type": {
563
+ "option": "u16"
564
+ }
565
+ },
566
+ {
567
+ "name": "priceOracle",
568
+ "type": {
569
+ "option": "publicKey"
570
+ }
571
+ }
572
+ ]
573
+ }
574
+ },
575
+ {
576
+ "name": "DeviceTypeV0",
577
+ "type": {
578
+ "kind": "enum",
579
+ "variants": [
580
+ {
581
+ "name": "CbrsIndoor"
582
+ },
583
+ {
584
+ "name": "CbrsOutdoor"
585
+ },
586
+ {
587
+ "name": "WifiIndoor"
588
+ },
589
+ {
590
+ "name": "WifiOutdoor"
591
+ }
592
+ ]
593
+ }
594
+ }
595
+ ],
596
+ "errors": [
597
+ {
598
+ "code": 6000,
599
+ "name": "BelowMinimumBoost",
600
+ "msg": "Must boost for the minimum boosting duration"
601
+ },
602
+ {
603
+ "code": 6001,
604
+ "name": "NoOraclePrice",
605
+ "msg": "No mobile oracle price"
606
+ },
607
+ {
608
+ "code": 6002,
609
+ "name": "MaxBoostExceeded",
610
+ "msg": "Hex is already boosted the maximum amount of 256x"
611
+ },
612
+ {
613
+ "code": 6003,
614
+ "name": "InvalidVersion",
615
+ "msg": "Hexboost version has changed since this instruction was formed, transaction rejected for safety"
616
+ },
617
+ {
618
+ "code": 6004,
619
+ "name": "PythError",
620
+ "msg": "Error from pyth"
621
+ },
622
+ {
623
+ "code": 6005,
624
+ "name": "PythPriceNotFound",
625
+ "msg": "No pyth price found"
626
+ },
627
+ {
628
+ "code": 6006,
629
+ "name": "ArithmeticError",
630
+ "msg": "Error in arithmetic"
631
+ },
632
+ {
633
+ "code": 6007,
634
+ "name": "BoostPeriodOver",
635
+ "msg": "Cannot boost a period that is in progress or over"
636
+ },
637
+ {
638
+ "code": 6008,
639
+ "name": "NoEmptyPeriods",
640
+ "msg": "Cannot leave a gap in boost periods"
641
+ },
642
+ {
643
+ "code": 6009,
644
+ "name": "PythPriceFeedStale",
645
+ "msg": "Pyth price is stale"
646
+ }
647
+ ],
648
+ "metadata": {
649
+ "address": "hexbnKYoA2GercNNhHUCCfrTRWrHjT6ujKPXTa5NPqJ"
650
+ }
651
+ }