@glamsystems/glam-sdk 1.0.2 → 1.0.3-alpha.0

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.
@@ -33,61 +33,8 @@
33
33
  "writable": true
34
34
  },
35
35
  {
36
- "name": "from_ata",
37
- "writable": true,
38
- "pda": {
39
- "seeds": [
40
- {
41
- "kind": "account",
42
- "path": "from"
43
- },
44
- {
45
- "kind": "account",
46
- "path": "token_2022_program"
47
- },
48
- {
49
- "kind": "account",
50
- "path": "glam_mint"
51
- }
52
- ],
53
- "program": {
54
- "kind": "const",
55
- "value": [
56
- 140,
57
- 151,
58
- 37,
59
- 143,
60
- 78,
61
- 36,
62
- 137,
63
- 241,
64
- 187,
65
- 61,
66
- 16,
67
- 41,
68
- 20,
69
- 142,
70
- 13,
71
- 131,
72
- 11,
73
- 90,
74
- 19,
75
- 153,
76
- 218,
77
- 255,
78
- 16,
79
- 132,
80
- 4,
81
- 142,
82
- 123,
83
- 216,
84
- 219,
85
- 233,
86
- 248,
87
- 89
88
- ]
89
- }
90
- }
36
+ "name": "from_token_account",
37
+ "writable": true
91
38
  },
92
39
  {
93
40
  "name": "from"
@@ -1261,61 +1208,8 @@
1261
1208
  "writable": true
1262
1209
  },
1263
1210
  {
1264
- "name": "from_ata",
1265
- "writable": true,
1266
- "pda": {
1267
- "seeds": [
1268
- {
1269
- "kind": "account",
1270
- "path": "from"
1271
- },
1272
- {
1273
- "kind": "account",
1274
- "path": "token_2022_program"
1275
- },
1276
- {
1277
- "kind": "account",
1278
- "path": "glam_mint"
1279
- }
1280
- ],
1281
- "program": {
1282
- "kind": "const",
1283
- "value": [
1284
- 140,
1285
- 151,
1286
- 37,
1287
- 143,
1288
- 78,
1289
- 36,
1290
- 137,
1291
- 241,
1292
- 187,
1293
- 61,
1294
- 16,
1295
- 41,
1296
- 20,
1297
- 142,
1298
- 13,
1299
- 131,
1300
- 11,
1301
- 90,
1302
- 19,
1303
- 153,
1304
- 218,
1305
- 255,
1306
- 16,
1307
- 132,
1308
- 4,
1309
- 142,
1310
- 123,
1311
- 216,
1312
- 219,
1313
- 233,
1314
- 248,
1315
- 89
1316
- ]
1317
- }
1318
- }
1211
+ "name": "from_token_account",
1212
+ "writable": true
1319
1213
  },
1320
1214
  {
1321
1215
  "name": "to_ata",
@@ -2070,7 +1964,7 @@
2070
1964
  "name": "sol_usd_oracle"
2071
1965
  },
2072
1966
  {
2073
- "name": "base_asset_usd_oracle"
1967
+ "name": "base_asset_oracle"
2074
1968
  },
2075
1969
  {
2076
1970
  "name": "integration_authority",
@@ -2170,6 +2064,41 @@
2170
2064
  {
2171
2065
  "name": "glam_protocol",
2172
2066
  "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2067
+ },
2068
+ {
2069
+ "name": "event_authority",
2070
+ "optional": true,
2071
+ "pda": {
2072
+ "seeds": [
2073
+ {
2074
+ "kind": "const",
2075
+ "value": [
2076
+ 95,
2077
+ 95,
2078
+ 101,
2079
+ 118,
2080
+ 101,
2081
+ 110,
2082
+ 116,
2083
+ 95,
2084
+ 97,
2085
+ 117,
2086
+ 116,
2087
+ 104,
2088
+ 111,
2089
+ 114,
2090
+ 105,
2091
+ 116,
2092
+ 121
2093
+ ]
2094
+ }
2095
+ ]
2096
+ }
2097
+ },
2098
+ {
2099
+ "name": "event_program",
2100
+ "optional": true,
2101
+ "address": "GM1NtvvnSXUptTrMCqbogAdZJydZSNv98DoU5AZVLmGh"
2173
2102
  }
2174
2103
  ],
2175
2104
  "args": [
@@ -2270,7 +2199,7 @@
2270
2199
  "name": "sol_usd_oracle"
2271
2200
  },
2272
2201
  {
2273
- "name": "base_asset_usd_oracle"
2202
+ "name": "base_asset_oracle"
2274
2203
  },
2275
2204
  {
2276
2205
  "name": "integration_authority",
@@ -2370,6 +2299,41 @@
2370
2299
  {
2371
2300
  "name": "glam_protocol",
2372
2301
  "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2302
+ },
2303
+ {
2304
+ "name": "event_authority",
2305
+ "optional": true,
2306
+ "pda": {
2307
+ "seeds": [
2308
+ {
2309
+ "kind": "const",
2310
+ "value": [
2311
+ 95,
2312
+ 95,
2313
+ 101,
2314
+ 118,
2315
+ 101,
2316
+ 110,
2317
+ 116,
2318
+ 95,
2319
+ 97,
2320
+ 117,
2321
+ 116,
2322
+ 104,
2323
+ 111,
2324
+ 114,
2325
+ 105,
2326
+ 116,
2327
+ 121
2328
+ ]
2329
+ }
2330
+ ]
2331
+ }
2332
+ },
2333
+ {
2334
+ "name": "event_program",
2335
+ "optional": true,
2336
+ "address": "GM1NtvvnSXUptTrMCqbogAdZJydZSNv98DoU5AZVLmGh"
2373
2337
  }
2374
2338
  ],
2375
2339
  "args": [
@@ -2390,15 +2354,10 @@
2390
2354
  {
2391
2355
  "name": "price_kamino_obligations",
2392
2356
  "docs": [
2393
- "Prices Kamino obligations.",
2394
- "- `num_obligations` Number of kamino obligations to price.",
2395
- "- `num_markets` Number of unique markets used by obligations.",
2396
- "- `num_reserves` Number of unique reserves used by obligations.",
2357
+ "Prices Kamino obligations. Reserves and obligations must be refreshed in the same slot before calling this ix.",
2397
2358
  "",
2398
2359
  "Extra accounts for pricing N kamino obligations:",
2399
- "- obligation x num_obligations",
2400
- "- reserve x num_reserves: no specific order",
2401
- "- market x num_markets: no specific order"
2360
+ "- obligations x N"
2402
2361
  ],
2403
2362
  "discriminator": [
2404
2363
  166,
@@ -2478,15 +2437,11 @@
2478
2437
  "writable": true,
2479
2438
  "signer": true
2480
2439
  },
2481
- {
2482
- "name": "kamino_lending_program",
2483
- "address": "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"
2484
- },
2485
2440
  {
2486
2441
  "name": "sol_usd_oracle"
2487
2442
  },
2488
2443
  {
2489
- "name": "base_asset_usd_oracle"
2444
+ "name": "base_asset_oracle"
2490
2445
  },
2491
2446
  {
2492
2447
  "name": "integration_authority",
@@ -2588,36 +2543,42 @@
2588
2543
  "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2589
2544
  },
2590
2545
  {
2591
- "name": "pyth_oracle",
2592
- "optional": true
2593
- },
2594
- {
2595
- "name": "switchboard_price_oracle",
2596
- "optional": true
2597
- },
2598
- {
2599
- "name": "switchboard_twap_oracle",
2600
- "optional": true
2546
+ "name": "event_authority",
2547
+ "optional": true,
2548
+ "pda": {
2549
+ "seeds": [
2550
+ {
2551
+ "kind": "const",
2552
+ "value": [
2553
+ 95,
2554
+ 95,
2555
+ 101,
2556
+ 118,
2557
+ 101,
2558
+ 110,
2559
+ 116,
2560
+ 95,
2561
+ 97,
2562
+ 117,
2563
+ 116,
2564
+ 104,
2565
+ 111,
2566
+ 114,
2567
+ 105,
2568
+ 116,
2569
+ 121
2570
+ ]
2571
+ }
2572
+ ]
2573
+ }
2601
2574
  },
2602
2575
  {
2603
- "name": "scope_prices",
2604
- "optional": true
2576
+ "name": "event_program",
2577
+ "optional": true,
2578
+ "address": "GM1NtvvnSXUptTrMCqbogAdZJydZSNv98DoU5AZVLmGh"
2605
2579
  }
2606
2580
  ],
2607
- "args": [
2608
- {
2609
- "name": "num_obligations",
2610
- "type": "u8"
2611
- },
2612
- {
2613
- "name": "num_markets",
2614
- "type": "u8"
2615
- },
2616
- {
2617
- "name": "num_reserves",
2618
- "type": "u8"
2619
- }
2620
- ]
2581
+ "args": []
2621
2582
  },
2622
2583
  {
2623
2584
  "name": "price_kamino_vault_shares",
@@ -2713,7 +2674,7 @@
2713
2674
  "name": "sol_usd_oracle"
2714
2675
  },
2715
2676
  {
2716
- "name": "base_asset_usd_oracle"
2677
+ "name": "base_asset_oracle"
2717
2678
  },
2718
2679
  {
2719
2680
  "name": "integration_authority",
@@ -2813,6 +2774,41 @@
2813
2774
  {
2814
2775
  "name": "glam_protocol",
2815
2776
  "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2777
+ },
2778
+ {
2779
+ "name": "event_authority",
2780
+ "optional": true,
2781
+ "pda": {
2782
+ "seeds": [
2783
+ {
2784
+ "kind": "const",
2785
+ "value": [
2786
+ 95,
2787
+ 95,
2788
+ 101,
2789
+ 118,
2790
+ 101,
2791
+ 110,
2792
+ 116,
2793
+ 95,
2794
+ 97,
2795
+ 117,
2796
+ 116,
2797
+ 104,
2798
+ 111,
2799
+ 114,
2800
+ 105,
2801
+ 116,
2802
+ 121
2803
+ ]
2804
+ }
2805
+ ]
2806
+ }
2807
+ },
2808
+ {
2809
+ "name": "event_program",
2810
+ "optional": true,
2811
+ "address": "GM1NtvvnSXUptTrMCqbogAdZJydZSNv98DoU5AZVLmGh"
2816
2812
  }
2817
2813
  ],
2818
2814
  "args": [
@@ -2917,7 +2913,7 @@
2917
2913
  "name": "sol_usd_oracle"
2918
2914
  },
2919
2915
  {
2920
- "name": "base_asset_usd_oracle"
2916
+ "name": "base_asset_oracle"
2921
2917
  },
2922
2918
  {
2923
2919
  "name": "integration_authority",
@@ -3017,6 +3013,41 @@
3017
3013
  {
3018
3014
  "name": "glam_protocol",
3019
3015
  "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
3016
+ },
3017
+ {
3018
+ "name": "event_authority",
3019
+ "optional": true,
3020
+ "pda": {
3021
+ "seeds": [
3022
+ {
3023
+ "kind": "const",
3024
+ "value": [
3025
+ 95,
3026
+ 95,
3027
+ 101,
3028
+ 118,
3029
+ 101,
3030
+ 110,
3031
+ 116,
3032
+ 95,
3033
+ 97,
3034
+ 117,
3035
+ 116,
3036
+ 104,
3037
+ 111,
3038
+ 114,
3039
+ 105,
3040
+ 116,
3041
+ 121
3042
+ ]
3043
+ }
3044
+ ]
3045
+ }
3046
+ },
3047
+ {
3048
+ "name": "event_program",
3049
+ "optional": true,
3050
+ "address": "GM1NtvvnSXUptTrMCqbogAdZJydZSNv98DoU5AZVLmGh"
3020
3051
  }
3021
3052
  ],
3022
3053
  "args": [
@@ -4157,6 +4188,68 @@
4157
4188
  }
4158
4189
  ],
4159
4190
  "args": []
4191
+ },
4192
+ {
4193
+ "name": "validate_aum",
4194
+ "docs": [
4195
+ "Validates AUM of the vault and emits AumRecord event."
4196
+ ],
4197
+ "discriminator": [
4198
+ 101,
4199
+ 15,
4200
+ 233,
4201
+ 89,
4202
+ 134,
4203
+ 123,
4204
+ 224,
4205
+ 99
4206
+ ],
4207
+ "accounts": [
4208
+ {
4209
+ "name": "glam_state"
4210
+ },
4211
+ {
4212
+ "name": "signer",
4213
+ "writable": true,
4214
+ "signer": true
4215
+ },
4216
+ {
4217
+ "name": "event_authority",
4218
+ "optional": true,
4219
+ "pda": {
4220
+ "seeds": [
4221
+ {
4222
+ "kind": "const",
4223
+ "value": [
4224
+ 95,
4225
+ 95,
4226
+ 101,
4227
+ 118,
4228
+ 101,
4229
+ 110,
4230
+ 116,
4231
+ 95,
4232
+ 97,
4233
+ 117,
4234
+ 116,
4235
+ 104,
4236
+ 111,
4237
+ 114,
4238
+ 105,
4239
+ 116,
4240
+ 121
4241
+ ]
4242
+ }
4243
+ ]
4244
+ }
4245
+ },
4246
+ {
4247
+ "name": "event_program",
4248
+ "optional": true,
4249
+ "address": "GM1NtvvnSXUptTrMCqbogAdZJydZSNv98DoU5AZVLmGh"
4250
+ }
4251
+ ],
4252
+ "args": []
4160
4253
  }
4161
4254
  ],
4162
4255
  "accounts": [
@@ -4200,6 +4293,34 @@
4200
4293
  ]
4201
4294
  }
4202
4295
  ],
4296
+ "events": [
4297
+ {
4298
+ "name": "AumRecord",
4299
+ "discriminator": [
4300
+ 162,
4301
+ 116,
4302
+ 55,
4303
+ 29,
4304
+ 223,
4305
+ 230,
4306
+ 239,
4307
+ 205
4308
+ ]
4309
+ },
4310
+ {
4311
+ "name": "PricedProtocolRecord",
4312
+ "discriminator": [
4313
+ 232,
4314
+ 89,
4315
+ 187,
4316
+ 82,
4317
+ 49,
4318
+ 200,
4319
+ 127,
4320
+ 132
4321
+ ]
4322
+ }
4323
+ ],
4203
4324
  "errors": [
4204
4325
  {
4205
4326
  "code": 6000,
@@ -4375,6 +4496,18 @@
4375
4496
  ]
4376
4497
  }
4377
4498
  },
4499
+ {
4500
+ "name": "AumRecord",
4501
+ "type": {
4502
+ "kind": "struct",
4503
+ "fields": [
4504
+ {
4505
+ "name": "base_asset_amount",
4506
+ "type": "i128"
4507
+ }
4508
+ ]
4509
+ }
4510
+ },
4378
4511
  {
4379
4512
  "name": "CreatedModel",
4380
4513
  "type": {
@@ -5399,6 +5532,18 @@
5399
5532
  ]
5400
5533
  }
5401
5534
  },
5535
+ {
5536
+ "name": "PricedProtocolRecord",
5537
+ "type": {
5538
+ "kind": "struct",
5539
+ "fields": [
5540
+ {
5541
+ "name": "base_asset_amount",
5542
+ "type": "i128"
5543
+ }
5544
+ ]
5545
+ }
5546
+ },
5402
5547
  {
5403
5548
  "name": "ProtocolFees",
5404
5549
  "type": {