@glamsystems/glam-sdk 1.1.0-alpha.1 → 1.1.0-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.
Files changed (85) hide show
  1. package/index.cjs.js +6583 -2920
  2. package/index.esm.js +6575 -2909
  3. package/package.json +2 -2
  4. package/target/idl/glam_mint-staging.json +18 -15
  5. package/target/idl/glam_protocol-staging.json +5 -0
  6. package/target/idl/glam_protocol.json +5 -0
  7. package/target/types/glam_mint-staging.ts +18 -15
  8. package/target/types/glam_protocol-staging.ts +5 -0
  9. package/target/types/glam_protocol.ts +5 -0
  10. package/src/assets.d.ts +0 -39
  11. package/src/client/access.d.ts +0 -57
  12. package/src/client/base.d.ts +0 -184
  13. package/src/client/bridge.d.ts +0 -183
  14. package/src/client/bridgeRegistry.d.ts +0 -32
  15. package/src/client/cctp.d.ts +0 -156
  16. package/src/client/epi.d.ts +0 -78
  17. package/src/client/fees.d.ts +0 -33
  18. package/src/client/invest.d.ts +0 -37
  19. package/src/client/jupiter.d.ts +0 -45
  20. package/src/client/kamino/farm.d.ts +0 -39
  21. package/src/client/kamino/index.d.ts +0 -4
  22. package/src/client/kamino/lending.d.ts +0 -86
  23. package/src/client/kamino/types.d.ts +0 -56
  24. package/src/client/kamino/vaults.d.ts +0 -31
  25. package/src/client/loopscale.d.ts +0 -84
  26. package/src/client/marinade.d.ts +0 -42
  27. package/src/client/mint.d.ts +0 -127
  28. package/src/client/neutral.d.ts +0 -109
  29. package/src/client/price.d.ts +0 -138
  30. package/src/client/stake-pool.d.ts +0 -39
  31. package/src/client/stake.d.ts +0 -34
  32. package/src/client/state.d.ts +0 -56
  33. package/src/client/timelock.d.ts +0 -31
  34. package/src/client/vault.d.ts +0 -90
  35. package/src/client.d.ts +0 -68
  36. package/src/clientConfig.d.ts +0 -29
  37. package/src/constants.d.ts +0 -84
  38. package/src/deser/base.d.ts +0 -18
  39. package/src/deser/index.d.ts +0 -3
  40. package/src/deser/integrationPolicies.d.ts +0 -120
  41. package/src/deser/kaminoLayouts.d.ts +0 -264
  42. package/src/deser/tokenAclLayouts.d.ts +0 -67
  43. package/src/error.d.ts +0 -29
  44. package/src/glamExports.d.ts +0 -5116
  45. package/src/globalConfig.d.ts +0 -27
  46. package/src/index.d.ts +0 -20
  47. package/src/models/acl.d.ts +0 -43
  48. package/src/models/index.d.ts +0 -8
  49. package/src/models/mint.d.ts +0 -64
  50. package/src/models/state.d.ts +0 -104
  51. package/src/models/types.d.ts +0 -28
  52. package/src/react/cluster-provider.d.ts +0 -22
  53. package/src/react/glam.d.ts +0 -47
  54. package/src/react/index.d.ts +0 -5
  55. package/src/react/query-keys.d.ts +0 -38
  56. package/src/react/useVaultBalanceSubscription.d.ts +0 -17
  57. package/src/utils/accounts.d.ts +0 -72
  58. package/src/utils/bitmask.d.ts +0 -53
  59. package/src/utils/blockhash.d.ts +0 -11
  60. package/src/utils/common.d.ts +0 -37
  61. package/src/utils/computeBudget.d.ts +0 -15
  62. package/src/utils/evm.d.ts +0 -10
  63. package/src/utils/fraction.d.ts +0 -29
  64. package/src/utils/glamPDAs.d.ts +0 -15
  65. package/src/utils/index.d.ts +0 -16
  66. package/src/utils/jupiterApi.d.ts +0 -89
  67. package/src/utils/lookupTables.d.ts +0 -53
  68. package/src/utils/pkmap.d.ts +0 -87
  69. package/src/utils/pkset.d.ts +0 -73
  70. package/src/utils/positionCategorizer.d.ts +0 -36
  71. package/src/utils/rpc.d.ts +0 -33
  72. package/src/utils/timelock.d.ts +0 -52
  73. package/src/utils/transaction.d.ts +0 -13
  74. package/target/types/ext_bridge.d.ts +0 -2385
  75. package/target/types/ext_cctp.d.ts +0 -1268
  76. package/target/types/ext_epi.d.ts +0 -2175
  77. package/target/types/ext_kamino.d.ts +0 -3433
  78. package/target/types/ext_loopscale.d.ts +0 -3547
  79. package/target/types/ext_marinade.d.ts +0 -1593
  80. package/target/types/ext_neutral.d.ts +0 -1670
  81. package/target/types/ext_spl.d.ts +0 -1274
  82. package/target/types/ext_stake_pool.d.ts +0 -1622
  83. package/target/types/glam_config.d.ts +0 -755
  84. package/target/types/glam_mint.d.ts +0 -6106
  85. package/target/types/glam_protocol.d.ts +0 -2708
@@ -1,755 +0,0 @@
1
- /**
2
- * Program IDL in camelCase format in order to be used in JS/TS.
3
- *
4
- * Note that this is only a type helper and is not the actual IDL. The original
5
- * IDL can be found at `target/idl/glam_config.json`.
6
- */
7
- export type GlamConfig = {
8
- "address": "gConFzxKL9USmwTdJoeQJvfKmqhJ2CyUaXTyQ8v9TGX";
9
- "metadata": {
10
- "name": "glamConfig";
11
- "version": "1.0.1";
12
- "spec": "0.1.0";
13
- "description": "GLAM config program";
14
- };
15
- "instructions": [
16
- {
17
- "name": "close";
18
- "discriminator": [
19
- 98,
20
- 165,
21
- 201,
22
- 177,
23
- 108,
24
- 65,
25
- 206,
26
- 96
27
- ];
28
- "accounts": [
29
- {
30
- "name": "globalConfig";
31
- "writable": true;
32
- },
33
- {
34
- "name": "admin";
35
- "writable": true;
36
- "signer": true;
37
- },
38
- {
39
- "name": "systemProgram";
40
- "address": "11111111111111111111111111111111";
41
- }
42
- ];
43
- "args": [];
44
- },
45
- {
46
- "name": "deleteAssetMeta";
47
- "docs": [
48
- "Deletes an asset meta"
49
- ];
50
- "discriminator": [
51
- 108,
52
- 173,
53
- 149,
54
- 99,
55
- 144,
56
- 203,
57
- 21,
58
- 115
59
- ];
60
- "accounts": [
61
- {
62
- "name": "globalConfig";
63
- "writable": true;
64
- "pda": {
65
- "seeds": [
66
- {
67
- "kind": "const";
68
- "value": [
69
- 103,
70
- 108,
71
- 111,
72
- 98,
73
- 97,
74
- 108,
75
- 45,
76
- 99,
77
- 111,
78
- 110,
79
- 102,
80
- 105,
81
- 103
82
- ];
83
- }
84
- ];
85
- };
86
- },
87
- {
88
- "name": "admin";
89
- "writable": true;
90
- "signer": true;
91
- },
92
- {
93
- "name": "systemProgram";
94
- "address": "11111111111111111111111111111111";
95
- }
96
- ];
97
- "args": [
98
- {
99
- "name": "asset";
100
- "type": "pubkey";
101
- },
102
- {
103
- "name": "oracle";
104
- "type": "pubkey";
105
- }
106
- ];
107
- },
108
- {
109
- "name": "deprecateAssetMeta";
110
- "docs": [
111
- "Marks an asset meta as deprecated"
112
- ];
113
- "discriminator": [
114
- 138,
115
- 242,
116
- 230,
117
- 22,
118
- 21,
119
- 151,
120
- 149,
121
- 19
122
- ];
123
- "accounts": [
124
- {
125
- "name": "globalConfig";
126
- "writable": true;
127
- "pda": {
128
- "seeds": [
129
- {
130
- "kind": "const";
131
- "value": [
132
- 103,
133
- 108,
134
- 111,
135
- 98,
136
- 97,
137
- 108,
138
- 45,
139
- 99,
140
- 111,
141
- 110,
142
- 102,
143
- 105,
144
- 103
145
- ];
146
- }
147
- ];
148
- };
149
- },
150
- {
151
- "name": "admin";
152
- "writable": true;
153
- "signer": true;
154
- },
155
- {
156
- "name": "systemProgram";
157
- "address": "11111111111111111111111111111111";
158
- }
159
- ];
160
- "args": [
161
- {
162
- "name": "asset";
163
- "type": "pubkey";
164
- },
165
- {
166
- "name": "oracle";
167
- "type": "pubkey";
168
- }
169
- ];
170
- },
171
- {
172
- "name": "initialize";
173
- "discriminator": [
174
- 175,
175
- 175,
176
- 109,
177
- 31,
178
- 13,
179
- 152,
180
- 155,
181
- 237
182
- ];
183
- "accounts": [
184
- {
185
- "name": "globalConfig";
186
- "writable": true;
187
- "pda": {
188
- "seeds": [
189
- {
190
- "kind": "const";
191
- "value": [
192
- 103,
193
- 108,
194
- 111,
195
- 98,
196
- 97,
197
- 108,
198
- 45,
199
- 99,
200
- 111,
201
- 110,
202
- 102,
203
- 105,
204
- 103
205
- ];
206
- }
207
- ];
208
- };
209
- },
210
- {
211
- "name": "payer";
212
- "writable": true;
213
- "signer": true;
214
- },
215
- {
216
- "name": "systemProgram";
217
- "address": "11111111111111111111111111111111";
218
- }
219
- ];
220
- "args": [
221
- {
222
- "name": "admin";
223
- "type": "pubkey";
224
- },
225
- {
226
- "name": "feeAuthority";
227
- "type": "pubkey";
228
- },
229
- {
230
- "name": "referrer";
231
- "type": "pubkey";
232
- },
233
- {
234
- "name": "baseFeeBps";
235
- "type": "u16";
236
- },
237
- {
238
- "name": "flowFeeBps";
239
- "type": "u16";
240
- }
241
- ];
242
- },
243
- {
244
- "name": "updateAdmin";
245
- "discriminator": [
246
- 161,
247
- 176,
248
- 40,
249
- 213,
250
- 60,
251
- 184,
252
- 179,
253
- 228
254
- ];
255
- "accounts": [
256
- {
257
- "name": "globalConfig";
258
- "writable": true;
259
- "pda": {
260
- "seeds": [
261
- {
262
- "kind": "const";
263
- "value": [
264
- 103,
265
- 108,
266
- 111,
267
- 98,
268
- 97,
269
- 108,
270
- 45,
271
- 99,
272
- 111,
273
- 110,
274
- 102,
275
- 105,
276
- 103
277
- ];
278
- }
279
- ];
280
- };
281
- },
282
- {
283
- "name": "admin";
284
- "writable": true;
285
- "signer": true;
286
- },
287
- {
288
- "name": "systemProgram";
289
- "address": "11111111111111111111111111111111";
290
- }
291
- ];
292
- "args": [
293
- {
294
- "name": "newAdmin";
295
- "type": "pubkey";
296
- }
297
- ];
298
- },
299
- {
300
- "name": "updateFeeAuthority";
301
- "discriminator": [
302
- 31,
303
- 223,
304
- 200,
305
- 21,
306
- 114,
307
- 158,
308
- 65,
309
- 61
310
- ];
311
- "accounts": [
312
- {
313
- "name": "globalConfig";
314
- "writable": true;
315
- "pda": {
316
- "seeds": [
317
- {
318
- "kind": "const";
319
- "value": [
320
- 103,
321
- 108,
322
- 111,
323
- 98,
324
- 97,
325
- 108,
326
- 45,
327
- 99,
328
- 111,
329
- 110,
330
- 102,
331
- 105,
332
- 103
333
- ];
334
- }
335
- ];
336
- };
337
- },
338
- {
339
- "name": "feeAuthority";
340
- "signer": true;
341
- }
342
- ];
343
- "args": [
344
- {
345
- "name": "feeAuthority";
346
- "type": "pubkey";
347
- }
348
- ];
349
- },
350
- {
351
- "name": "updateProtocolFees";
352
- "discriminator": [
353
- 158,
354
- 219,
355
- 253,
356
- 143,
357
- 54,
358
- 45,
359
- 113,
360
- 182
361
- ];
362
- "accounts": [
363
- {
364
- "name": "globalConfig";
365
- "writable": true;
366
- "pda": {
367
- "seeds": [
368
- {
369
- "kind": "const";
370
- "value": [
371
- 103,
372
- 108,
373
- 111,
374
- 98,
375
- 97,
376
- 108,
377
- 45,
378
- 99,
379
- 111,
380
- 110,
381
- 102,
382
- 105,
383
- 103
384
- ];
385
- }
386
- ];
387
- };
388
- },
389
- {
390
- "name": "feeAuthority";
391
- "signer": true;
392
- }
393
- ];
394
- "args": [
395
- {
396
- "name": "baseFeeBps";
397
- "type": "u16";
398
- },
399
- {
400
- "name": "flowFeeBps";
401
- "type": "u16";
402
- }
403
- ];
404
- },
405
- {
406
- "name": "updateReferrer";
407
- "discriminator": [
408
- 208,
409
- 225,
410
- 56,
411
- 15,
412
- 244,
413
- 21,
414
- 195,
415
- 34
416
- ];
417
- "accounts": [
418
- {
419
- "name": "globalConfig";
420
- "writable": true;
421
- "pda": {
422
- "seeds": [
423
- {
424
- "kind": "const";
425
- "value": [
426
- 103,
427
- 108,
428
- 111,
429
- 98,
430
- 97,
431
- 108,
432
- 45,
433
- 99,
434
- 111,
435
- 110,
436
- 102,
437
- 105,
438
- 103
439
- ];
440
- }
441
- ];
442
- };
443
- },
444
- {
445
- "name": "feeAuthority";
446
- "signer": true;
447
- }
448
- ];
449
- "args": [
450
- {
451
- "name": "referrer";
452
- "type": "pubkey";
453
- }
454
- ];
455
- },
456
- {
457
- "name": "upsertAssetMeta";
458
- "discriminator": [
459
- 29,
460
- 40,
461
- 115,
462
- 194,
463
- 215,
464
- 146,
465
- 222,
466
- 212
467
- ];
468
- "accounts": [
469
- {
470
- "name": "globalConfig";
471
- "writable": true;
472
- "pda": {
473
- "seeds": [
474
- {
475
- "kind": "const";
476
- "value": [
477
- 103,
478
- 108,
479
- 111,
480
- 98,
481
- 97,
482
- 108,
483
- 45,
484
- 99,
485
- 111,
486
- 110,
487
- 102,
488
- 105,
489
- 103
490
- ];
491
- }
492
- ];
493
- };
494
- },
495
- {
496
- "name": "admin";
497
- "writable": true;
498
- "signer": true;
499
- },
500
- {
501
- "name": "asset";
502
- },
503
- {
504
- "name": "oracle";
505
- },
506
- {
507
- "name": "systemProgram";
508
- "address": "11111111111111111111111111111111";
509
- }
510
- ];
511
- "args": [
512
- {
513
- "name": "assetMeta";
514
- "type": {
515
- "defined": {
516
- "name": "assetMeta";
517
- };
518
- };
519
- }
520
- ];
521
- }
522
- ];
523
- "accounts": [
524
- {
525
- "name": "globalConfig";
526
- "discriminator": [
527
- 149,
528
- 8,
529
- 156,
530
- 202,
531
- 160,
532
- 252,
533
- 176,
534
- 217
535
- ];
536
- }
537
- ];
538
- "errors": [
539
- {
540
- "code": 6000;
541
- "name": "invalidAuthority";
542
- "msg": "Invalid authority";
543
- },
544
- {
545
- "code": 6001;
546
- "name": "invalidAssetMeta";
547
- "msg": "Invalid asset meta";
548
- },
549
- {
550
- "code": 6002;
551
- "name": "assetMetaNotFound";
552
- "msg": "Asset meta not found";
553
- },
554
- {
555
- "code": 6003;
556
- "name": "invalidParameters";
557
- "msg": "Invalid fee parameters or insufficient account space";
558
- },
559
- {
560
- "code": 6004;
561
- "name": "invalidOracleSource";
562
- "msg": "Invalid oracle source";
563
- },
564
- {
565
- "code": 6005;
566
- "name": "invalidGlobalConfig";
567
- "msg": "Invalid or corrupted global config account";
568
- },
569
- {
570
- "code": 6006;
571
- "name": "invalidFeeAuthority";
572
- "msg": "Invalid fee authority";
573
- }
574
- ];
575
- "types": [
576
- {
577
- "name": "assetMeta";
578
- "type": {
579
- "kind": "struct";
580
- "fields": [
581
- {
582
- "name": "asset";
583
- "type": "pubkey";
584
- },
585
- {
586
- "name": "decimals";
587
- "type": "u8";
588
- },
589
- {
590
- "name": "oracle";
591
- "type": "pubkey";
592
- },
593
- {
594
- "name": "oracleSource";
595
- "type": {
596
- "defined": {
597
- "name": "oracleSource";
598
- };
599
- };
600
- },
601
- {
602
- "name": "maxAgeSeconds";
603
- "type": "u16";
604
- },
605
- {
606
- "name": "priority";
607
- "type": "i8";
608
- },
609
- {
610
- "name": "padding";
611
- "type": {
612
- "array": [
613
- "u8",
614
- 3
615
- ];
616
- };
617
- }
618
- ];
619
- };
620
- },
621
- {
622
- "name": "globalConfig";
623
- "type": {
624
- "kind": "struct";
625
- "fields": [
626
- {
627
- "name": "admin";
628
- "docs": [
629
- "The authority that can modify the config"
630
- ];
631
- "type": "pubkey";
632
- },
633
- {
634
- "name": "feeAuthority";
635
- "docs": [
636
- "The authority that can modify fee structure of individual glam state and claim protocol fees"
637
- ];
638
- "type": "pubkey";
639
- },
640
- {
641
- "name": "referrer";
642
- "docs": [
643
- "Default GLAM referrer"
644
- ];
645
- "type": "pubkey";
646
- },
647
- {
648
- "name": "baseFeeBps";
649
- "docs": [
650
- "Default protocol base fee applied to all vaults"
651
- ];
652
- "type": "u16";
653
- },
654
- {
655
- "name": "flowFeeBps";
656
- "docs": [
657
- "Default protocol flow fee applied to all vaults"
658
- ];
659
- "type": "u16";
660
- },
661
- {
662
- "name": "assetMetas";
663
- "docs": [
664
- "List of assets and their oracle configs supported by the protocol"
665
- ];
666
- "type": {
667
- "vec": {
668
- "defined": {
669
- "name": "assetMeta";
670
- };
671
- };
672
- };
673
- }
674
- ];
675
- };
676
- },
677
- {
678
- "name": "oracleSource";
679
- "type": {
680
- "kind": "enum";
681
- "variants": [
682
- {
683
- "name": "pyth";
684
- },
685
- {
686
- "name": "switchboard";
687
- },
688
- {
689
- "name": "quoteAsset";
690
- },
691
- {
692
- "name": "pyth1K";
693
- },
694
- {
695
- "name": "pyth1M";
696
- },
697
- {
698
- "name": "pythStableCoin";
699
- },
700
- {
701
- "name": "prelaunch";
702
- },
703
- {
704
- "name": "pythPull";
705
- },
706
- {
707
- "name": "pyth1KPull";
708
- },
709
- {
710
- "name": "pyth1MPull";
711
- },
712
- {
713
- "name": "pythStableCoinPull";
714
- },
715
- {
716
- "name": "switchboardOnDemand";
717
- },
718
- {
719
- "name": "pythLazer";
720
- },
721
- {
722
- "name": "pythLazer1K";
723
- },
724
- {
725
- "name": "pythLazer1M";
726
- },
727
- {
728
- "name": "pythLazerStableCoin";
729
- },
730
- {
731
- "name": "notSet";
732
- },
733
- {
734
- "name": "lstPoolState";
735
- },
736
- {
737
- "name": "marinadeState";
738
- },
739
- {
740
- "name": "baseAsset";
741
- },
742
- {
743
- "name": "chainlinkRwa";
744
- },
745
- {
746
- "name": "chainlinkX";
747
- },
748
- {
749
- "name": "kaminoReserve";
750
- }
751
- ];
752
- };
753
- }
754
- ];
755
- };