@glamsystems/glam-sdk 1.0.12 → 1.0.13-test

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 (110) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +1 -1
  3. package/index.cjs.js +1 -57320
  4. package/index.esm.js +1 -57081
  5. package/package.json +26 -15
  6. package/src/assets.d.ts +10 -17
  7. package/src/client/access.d.ts +13 -0
  8. package/src/client/base.d.ts +30 -7
  9. package/src/client/bridge.d.ts +183 -0
  10. package/src/client/bridgeRegistry.d.ts +32 -0
  11. package/src/client/epi.d.ts +78 -0
  12. package/src/client/fees.d.ts +4 -0
  13. package/src/client/invest.d.ts +1 -1
  14. package/src/client/jupiter.d.ts +27 -20
  15. package/src/client/loopscale.d.ts +84 -0
  16. package/src/client/mint.d.ts +54 -1
  17. package/src/client/price.d.ts +26 -39
  18. package/src/client.d.ts +9 -5
  19. package/src/constants.d.ts +11 -7
  20. package/src/deser/index.d.ts +1 -1
  21. package/src/deser/integrationPolicies.d.ts +30 -20
  22. package/src/deser/tokenAclLayouts.d.ts +67 -0
  23. package/src/error.d.ts +2 -1
  24. package/src/glamExports.d.ts +1351 -1546
  25. package/src/globalConfig.d.ts +27 -0
  26. package/src/index.d.ts +5 -1
  27. package/src/models/state.d.ts +2 -0
  28. package/src/utils/accounts.d.ts +9 -1
  29. package/src/utils/bitmask.d.ts +3 -0
  30. package/src/utils/common.d.ts +2 -0
  31. package/src/utils/glamPDAs.d.ts +6 -0
  32. package/src/utils/index.d.ts +0 -1
  33. package/src/utils/pkmap.d.ts +23 -18
  34. package/src/utils/positionCategorizer.d.ts +3 -21
  35. package/target/idl/ext_bridge-staging.json +2379 -0
  36. package/target/idl/ext_bridge.json +2379 -0
  37. package/target/idl/ext_cctp.json +1 -1
  38. package/target/idl/ext_drift.json +1613 -142
  39. package/target/idl/ext_epi-staging.json +2169 -0
  40. package/target/idl/ext_epi.json +2169 -0
  41. package/target/idl/ext_kamino-staging.json +1 -1
  42. package/target/idl/ext_kamino.json +109 -1
  43. package/target/idl/{ext_drift-staging.json → ext_loopscale-staging.json} +986 -1438
  44. package/target/idl/ext_loopscale.json +3541 -0
  45. package/target/idl/ext_marinade-staging.json +1587 -0
  46. package/target/idl/ext_spl-staging.json +1 -1
  47. package/target/idl/ext_spl.json +1 -1
  48. package/target/idl/glam_config.json +78 -9
  49. package/target/idl/glam_mint-staging.json +3002 -1244
  50. package/target/idl/glam_mint.json +239 -8
  51. package/target/idl/glam_policies.json +2 -7
  52. package/target/idl/glam_protocol-staging.json +187 -266
  53. package/target/idl/glam_protocol.json +217 -114
  54. package/target/idl/mock_layerzero_endpoint.json +144 -0
  55. package/target/idl/mock_layerzero_oft.json +155 -0
  56. package/target/types/ext_bridge-staging.d.ts +2385 -0
  57. package/target/types/ext_bridge-staging.ts +2385 -0
  58. package/target/types/ext_bridge.d.ts +2385 -0
  59. package/target/types/ext_bridge.ts +2385 -0
  60. package/target/types/ext_cctp.d.ts +1 -1
  61. package/target/types/ext_cctp.ts +1 -1
  62. package/target/types/ext_drift.d.ts +1609 -138
  63. package/target/types/ext_drift.ts +1613 -142
  64. package/target/types/ext_epi-staging.d.ts +2175 -0
  65. package/target/types/ext_epi-staging.ts +2175 -0
  66. package/target/types/ext_epi.d.ts +2175 -0
  67. package/target/types/ext_epi.ts +2175 -0
  68. package/target/types/ext_kamino-staging.d.ts +3433 -0
  69. package/target/types/ext_kamino-staging.ts +1 -1
  70. package/target/types/ext_kamino.d.ts +109 -1
  71. package/target/types/ext_kamino.ts +109 -1
  72. package/target/types/ext_loopscale-staging.d.ts +3547 -0
  73. package/target/types/{ext_drift-staging.ts → ext_loopscale-staging.ts} +988 -1440
  74. package/target/types/ext_loopscale.d.ts +3547 -0
  75. package/target/types/ext_loopscale.ts +3547 -0
  76. package/target/types/ext_marinade-staging.d.ts +1593 -0
  77. package/target/types/ext_marinade-staging.ts +1593 -0
  78. package/target/types/{ext_offchain.d.ts → ext_spl-staging.d.ts} +219 -19
  79. package/target/types/ext_spl-staging.ts +1 -1
  80. package/target/types/ext_spl.d.ts +1 -1
  81. package/target/types/ext_spl.ts +1 -1
  82. package/target/types/ext_stake_pool-staging.d.ts +1622 -0
  83. package/target/types/glam_config.d.ts +78 -9
  84. package/target/types/glam_config.ts +78 -9
  85. package/target/types/glam_mint-staging.d.ts +7856 -0
  86. package/target/types/glam_mint-staging.ts +3002 -1244
  87. package/target/types/glam_mint.d.ts +239 -8
  88. package/target/types/glam_mint.ts +239 -8
  89. package/target/types/glam_policies.d.ts +477 -0
  90. package/target/types/glam_policies.ts +2 -7
  91. package/target/types/glam_protocol-staging.d.ts +3292 -0
  92. package/target/types/glam_protocol-staging.ts +187 -266
  93. package/target/types/glam_protocol.d.ts +217 -114
  94. package/target/types/glam_protocol.ts +217 -114
  95. package/target/types/mock_layerzero_endpoint.d.ts +150 -0
  96. package/target/types/mock_layerzero_endpoint.ts +150 -0
  97. package/target/types/mock_layerzero_oft.d.ts +161 -0
  98. package/target/types/mock_layerzero_oft.ts +161 -0
  99. package/src/client/drift/index.d.ts +0 -2
  100. package/src/client/drift/protocol-v2.d.ts +0 -93
  101. package/src/client/drift/vaults.d.ts +0 -60
  102. package/src/deser/driftLayouts.d.ts +0 -217
  103. package/src/react/cluster-provider.d.ts +0 -22
  104. package/src/react/glam.d.ts +0 -51
  105. package/src/react/index.d.ts +0 -5
  106. package/src/react/query-keys.d.ts +0 -40
  107. package/src/react/useVaultBalanceSubscription.d.ts +0 -17
  108. package/src/utils/drift/index.d.ts +0 -2
  109. package/src/utils/drift/orderParams.d.ts +0 -28
  110. package/src/utils/drift/types.d.ts +0 -522
@@ -0,0 +1,3541 @@
1
+ {
2
+ "address": "G1NTLoPS5orMCxgFjzNDE5H6c3AbxiU1DgqCJBaJ1pfM",
3
+ "metadata": {
4
+ "name": "ext_loopscale",
5
+ "version": "0.1.0",
6
+ "spec": "0.1.0",
7
+ "description": "Loopscale integration for GLAM Protocol"
8
+ },
9
+ "instructions": [
10
+ {
11
+ "name": "borrow_principal",
12
+ "docs": [
13
+ "Borrow principal against a locked loan.",
14
+ "",
15
+ "- Permission: `BorrowPrincipal`.",
16
+ "- Policy",
17
+ "- `principal_mint` must be present in `LoopscalePolicy::borrow_allowlist`.",
18
+ "- `market_information` must be present in `LoopscalePolicy::market_allowlist`."
19
+ ],
20
+ "discriminator": [
21
+ 106,
22
+ 10,
23
+ 38,
24
+ 204,
25
+ 139,
26
+ 188,
27
+ 124,
28
+ 50
29
+ ],
30
+ "accounts": [
31
+ {
32
+ "name": "glam_state",
33
+ "writable": true
34
+ },
35
+ {
36
+ "name": "glam_vault",
37
+ "writable": true,
38
+ "pda": {
39
+ "seeds": [
40
+ {
41
+ "kind": "const",
42
+ "value": [
43
+ 118,
44
+ 97,
45
+ 117,
46
+ 108,
47
+ 116
48
+ ]
49
+ },
50
+ {
51
+ "kind": "account",
52
+ "path": "glam_state"
53
+ }
54
+ ],
55
+ "program": {
56
+ "kind": "account",
57
+ "path": "glam_protocol_program"
58
+ }
59
+ }
60
+ },
61
+ {
62
+ "name": "glam_signer",
63
+ "writable": true,
64
+ "signer": true
65
+ },
66
+ {
67
+ "name": "integration_authority",
68
+ "pda": {
69
+ "seeds": [
70
+ {
71
+ "kind": "const",
72
+ "value": [
73
+ 105,
74
+ 110,
75
+ 116,
76
+ 101,
77
+ 103,
78
+ 114,
79
+ 97,
80
+ 116,
81
+ 105,
82
+ 111,
83
+ 110,
84
+ 45,
85
+ 97,
86
+ 117,
87
+ 116,
88
+ 104,
89
+ 111,
90
+ 114,
91
+ 105,
92
+ 116,
93
+ 121
94
+ ]
95
+ }
96
+ ]
97
+ }
98
+ },
99
+ {
100
+ "name": "cpi_program",
101
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
102
+ },
103
+ {
104
+ "name": "glam_protocol_program",
105
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
106
+ },
107
+ {
108
+ "name": "system_program",
109
+ "address": "11111111111111111111111111111111"
110
+ },
111
+ {
112
+ "name": "bs_auth",
113
+ "signer": true,
114
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
115
+ },
116
+ {
117
+ "name": "loan",
118
+ "writable": true
119
+ },
120
+ {
121
+ "name": "strategy",
122
+ "writable": true
123
+ },
124
+ {
125
+ "name": "market_information",
126
+ "writable": true
127
+ },
128
+ {
129
+ "name": "principal_mint"
130
+ },
131
+ {
132
+ "name": "borrower_ta",
133
+ "writable": true
134
+ },
135
+ {
136
+ "name": "strategy_ta",
137
+ "writable": true
138
+ },
139
+ {
140
+ "name": "associated_token_program"
141
+ },
142
+ {
143
+ "name": "token_program"
144
+ },
145
+ {
146
+ "name": "event_authority"
147
+ }
148
+ ],
149
+ "args": [
150
+ {
151
+ "name": "params",
152
+ "type": {
153
+ "defined": {
154
+ "name": "BorrowPrincipalParams"
155
+ }
156
+ }
157
+ }
158
+ ]
159
+ },
160
+ {
161
+ "name": "claim_vault_rewards",
162
+ "docs": [
163
+ "Claim accrued rewards on staked user-vault LP positions.",
164
+ "",
165
+ "- Permission: `ClaimVaultRewards`."
166
+ ],
167
+ "discriminator": [
168
+ 0,
169
+ 152,
170
+ 75,
171
+ 29,
172
+ 195,
173
+ 223,
174
+ 12,
175
+ 101
176
+ ],
177
+ "accounts": [
178
+ {
179
+ "name": "glam_state",
180
+ "writable": true
181
+ },
182
+ {
183
+ "name": "glam_vault",
184
+ "writable": true,
185
+ "pda": {
186
+ "seeds": [
187
+ {
188
+ "kind": "const",
189
+ "value": [
190
+ 118,
191
+ 97,
192
+ 117,
193
+ 108,
194
+ 116
195
+ ]
196
+ },
197
+ {
198
+ "kind": "account",
199
+ "path": "glam_state"
200
+ }
201
+ ],
202
+ "program": {
203
+ "kind": "account",
204
+ "path": "glam_protocol_program"
205
+ }
206
+ }
207
+ },
208
+ {
209
+ "name": "glam_signer",
210
+ "writable": true,
211
+ "signer": true
212
+ },
213
+ {
214
+ "name": "integration_authority",
215
+ "pda": {
216
+ "seeds": [
217
+ {
218
+ "kind": "const",
219
+ "value": [
220
+ 105,
221
+ 110,
222
+ 116,
223
+ 101,
224
+ 103,
225
+ 114,
226
+ 97,
227
+ 116,
228
+ 105,
229
+ 111,
230
+ 110,
231
+ 45,
232
+ 97,
233
+ 117,
234
+ 116,
235
+ 104,
236
+ 111,
237
+ 114,
238
+ 105,
239
+ 116,
240
+ 121
241
+ ]
242
+ }
243
+ ]
244
+ }
245
+ },
246
+ {
247
+ "name": "cpi_program",
248
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
249
+ },
250
+ {
251
+ "name": "glam_protocol_program",
252
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
253
+ },
254
+ {
255
+ "name": "system_program",
256
+ "address": "11111111111111111111111111111111"
257
+ },
258
+ {
259
+ "name": "bs_auth",
260
+ "signer": true,
261
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
262
+ },
263
+ {
264
+ "name": "vault"
265
+ },
266
+ {
267
+ "name": "vault_rewards_info",
268
+ "writable": true
269
+ },
270
+ {
271
+ "name": "user_rewards_info",
272
+ "writable": true
273
+ },
274
+ {
275
+ "name": "stake_account",
276
+ "writable": true
277
+ },
278
+ {
279
+ "name": "associated_token_program"
280
+ },
281
+ {
282
+ "name": "event_authority"
283
+ }
284
+ ],
285
+ "args": [
286
+ {
287
+ "name": "mints",
288
+ "type": {
289
+ "vec": "pubkey"
290
+ }
291
+ }
292
+ ]
293
+ },
294
+ {
295
+ "name": "close_loan",
296
+ "docs": [
297
+ "Close an existing Loopscale loan PDA.",
298
+ "",
299
+ "- Permission: `ManageLoan`."
300
+ ],
301
+ "discriminator": [
302
+ 96,
303
+ 114,
304
+ 111,
305
+ 204,
306
+ 149,
307
+ 228,
308
+ 235,
309
+ 124
310
+ ],
311
+ "accounts": [
312
+ {
313
+ "name": "glam_state",
314
+ "writable": true
315
+ },
316
+ {
317
+ "name": "glam_vault",
318
+ "writable": true,
319
+ "pda": {
320
+ "seeds": [
321
+ {
322
+ "kind": "const",
323
+ "value": [
324
+ 118,
325
+ 97,
326
+ 117,
327
+ 108,
328
+ 116
329
+ ]
330
+ },
331
+ {
332
+ "kind": "account",
333
+ "path": "glam_state"
334
+ }
335
+ ],
336
+ "program": {
337
+ "kind": "account",
338
+ "path": "glam_protocol_program"
339
+ }
340
+ }
341
+ },
342
+ {
343
+ "name": "glam_signer",
344
+ "writable": true,
345
+ "signer": true
346
+ },
347
+ {
348
+ "name": "integration_authority",
349
+ "pda": {
350
+ "seeds": [
351
+ {
352
+ "kind": "const",
353
+ "value": [
354
+ 105,
355
+ 110,
356
+ 116,
357
+ 101,
358
+ 103,
359
+ 114,
360
+ 97,
361
+ 116,
362
+ 105,
363
+ 111,
364
+ 110,
365
+ 45,
366
+ 97,
367
+ 117,
368
+ 116,
369
+ 104,
370
+ 111,
371
+ 114,
372
+ 105,
373
+ 116,
374
+ 121
375
+ ]
376
+ }
377
+ ]
378
+ }
379
+ },
380
+ {
381
+ "name": "cpi_program",
382
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
383
+ },
384
+ {
385
+ "name": "glam_protocol_program",
386
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
387
+ },
388
+ {
389
+ "name": "system_program",
390
+ "address": "11111111111111111111111111111111"
391
+ },
392
+ {
393
+ "name": "bs_auth",
394
+ "signer": true,
395
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
396
+ },
397
+ {
398
+ "name": "loan",
399
+ "writable": true
400
+ },
401
+ {
402
+ "name": "event_authority"
403
+ }
404
+ ],
405
+ "args": []
406
+ },
407
+ {
408
+ "name": "create_loan",
409
+ "docs": [
410
+ "Create a new Loopscale loan PDA owned by the GLAM vault.",
411
+ "",
412
+ "- Permission: `ManageLoan`."
413
+ ],
414
+ "discriminator": [
415
+ 166,
416
+ 131,
417
+ 118,
418
+ 219,
419
+ 138,
420
+ 218,
421
+ 206,
422
+ 140
423
+ ],
424
+ "accounts": [
425
+ {
426
+ "name": "glam_state",
427
+ "writable": true
428
+ },
429
+ {
430
+ "name": "glam_vault",
431
+ "writable": true,
432
+ "pda": {
433
+ "seeds": [
434
+ {
435
+ "kind": "const",
436
+ "value": [
437
+ 118,
438
+ 97,
439
+ 117,
440
+ 108,
441
+ 116
442
+ ]
443
+ },
444
+ {
445
+ "kind": "account",
446
+ "path": "glam_state"
447
+ }
448
+ ],
449
+ "program": {
450
+ "kind": "account",
451
+ "path": "glam_protocol_program"
452
+ }
453
+ }
454
+ },
455
+ {
456
+ "name": "glam_signer",
457
+ "writable": true,
458
+ "signer": true
459
+ },
460
+ {
461
+ "name": "integration_authority",
462
+ "pda": {
463
+ "seeds": [
464
+ {
465
+ "kind": "const",
466
+ "value": [
467
+ 105,
468
+ 110,
469
+ 116,
470
+ 101,
471
+ 103,
472
+ 114,
473
+ 97,
474
+ 116,
475
+ 105,
476
+ 111,
477
+ 110,
478
+ 45,
479
+ 97,
480
+ 117,
481
+ 116,
482
+ 104,
483
+ 111,
484
+ 114,
485
+ 105,
486
+ 116,
487
+ 121
488
+ ]
489
+ }
490
+ ]
491
+ }
492
+ },
493
+ {
494
+ "name": "cpi_program",
495
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
496
+ },
497
+ {
498
+ "name": "glam_protocol_program",
499
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
500
+ },
501
+ {
502
+ "name": "system_program",
503
+ "address": "11111111111111111111111111111111"
504
+ },
505
+ {
506
+ "name": "bs_auth",
507
+ "signer": true,
508
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
509
+ },
510
+ {
511
+ "name": "loan",
512
+ "writable": true
513
+ },
514
+ {
515
+ "name": "event_authority"
516
+ }
517
+ ],
518
+ "args": [
519
+ {
520
+ "name": "params",
521
+ "type": {
522
+ "defined": {
523
+ "name": "CreateLoanParams"
524
+ }
525
+ }
526
+ }
527
+ ]
528
+ },
529
+ {
530
+ "name": "deposit_collateral",
531
+ "docs": [
532
+ "Deposit collateral into a Loopscale loan.",
533
+ "",
534
+ "- Permission: `DepositCollateral`.",
535
+ "- Policy: `deposit_mint` must be present in `LoopscalePolicy::deposit_allowlist`."
536
+ ],
537
+ "discriminator": [
538
+ 156,
539
+ 131,
540
+ 142,
541
+ 116,
542
+ 146,
543
+ 247,
544
+ 162,
545
+ 120
546
+ ],
547
+ "accounts": [
548
+ {
549
+ "name": "glam_state",
550
+ "writable": true
551
+ },
552
+ {
553
+ "name": "glam_vault",
554
+ "writable": true,
555
+ "pda": {
556
+ "seeds": [
557
+ {
558
+ "kind": "const",
559
+ "value": [
560
+ 118,
561
+ 97,
562
+ 117,
563
+ 108,
564
+ 116
565
+ ]
566
+ },
567
+ {
568
+ "kind": "account",
569
+ "path": "glam_state"
570
+ }
571
+ ],
572
+ "program": {
573
+ "kind": "account",
574
+ "path": "glam_protocol_program"
575
+ }
576
+ }
577
+ },
578
+ {
579
+ "name": "glam_signer",
580
+ "writable": true,
581
+ "signer": true
582
+ },
583
+ {
584
+ "name": "integration_authority",
585
+ "pda": {
586
+ "seeds": [
587
+ {
588
+ "kind": "const",
589
+ "value": [
590
+ 105,
591
+ 110,
592
+ 116,
593
+ 101,
594
+ 103,
595
+ 114,
596
+ 97,
597
+ 116,
598
+ 105,
599
+ 111,
600
+ 110,
601
+ 45,
602
+ 97,
603
+ 117,
604
+ 116,
605
+ 104,
606
+ 111,
607
+ 114,
608
+ 105,
609
+ 116,
610
+ 121
611
+ ]
612
+ }
613
+ ]
614
+ }
615
+ },
616
+ {
617
+ "name": "cpi_program",
618
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
619
+ },
620
+ {
621
+ "name": "glam_protocol_program",
622
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
623
+ },
624
+ {
625
+ "name": "system_program",
626
+ "address": "11111111111111111111111111111111"
627
+ },
628
+ {
629
+ "name": "bs_auth",
630
+ "signer": true,
631
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
632
+ },
633
+ {
634
+ "name": "loan",
635
+ "writable": true
636
+ },
637
+ {
638
+ "name": "borrower_collateral_ta",
639
+ "writable": true
640
+ },
641
+ {
642
+ "name": "loan_collateral_ta",
643
+ "writable": true
644
+ },
645
+ {
646
+ "name": "deposit_mint"
647
+ },
648
+ {
649
+ "name": "asset_identifier"
650
+ },
651
+ {
652
+ "name": "token_program"
653
+ },
654
+ {
655
+ "name": "associated_token_program"
656
+ },
657
+ {
658
+ "name": "event_authority"
659
+ }
660
+ ],
661
+ "args": [
662
+ {
663
+ "name": "params",
664
+ "type": {
665
+ "defined": {
666
+ "name": "DepositCollateralParams"
667
+ }
668
+ }
669
+ }
670
+ ]
671
+ },
672
+ {
673
+ "name": "deposit_user_vault",
674
+ "docs": [
675
+ "Deposit principal into a Loopscale user vault and mint LP tokens to the GLAM vault.",
676
+ "",
677
+ "- Permission: `DepositUserVault`."
678
+ ],
679
+ "discriminator": [
680
+ 204,
681
+ 190,
682
+ 182,
683
+ 224,
684
+ 15,
685
+ 219,
686
+ 247,
687
+ 121
688
+ ],
689
+ "accounts": [
690
+ {
691
+ "name": "glam_state",
692
+ "writable": true
693
+ },
694
+ {
695
+ "name": "glam_vault",
696
+ "writable": true,
697
+ "pda": {
698
+ "seeds": [
699
+ {
700
+ "kind": "const",
701
+ "value": [
702
+ 118,
703
+ 97,
704
+ 117,
705
+ 108,
706
+ 116
707
+ ]
708
+ },
709
+ {
710
+ "kind": "account",
711
+ "path": "glam_state"
712
+ }
713
+ ],
714
+ "program": {
715
+ "kind": "account",
716
+ "path": "glam_protocol_program"
717
+ }
718
+ }
719
+ },
720
+ {
721
+ "name": "glam_signer",
722
+ "writable": true,
723
+ "signer": true
724
+ },
725
+ {
726
+ "name": "integration_authority",
727
+ "pda": {
728
+ "seeds": [
729
+ {
730
+ "kind": "const",
731
+ "value": [
732
+ 105,
733
+ 110,
734
+ 116,
735
+ 101,
736
+ 103,
737
+ 114,
738
+ 97,
739
+ 116,
740
+ 105,
741
+ 111,
742
+ 110,
743
+ 45,
744
+ 97,
745
+ 117,
746
+ 116,
747
+ 104,
748
+ 111,
749
+ 114,
750
+ 105,
751
+ 116,
752
+ 121
753
+ ]
754
+ }
755
+ ]
756
+ }
757
+ },
758
+ {
759
+ "name": "cpi_program",
760
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
761
+ },
762
+ {
763
+ "name": "glam_protocol_program",
764
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
765
+ },
766
+ {
767
+ "name": "system_program",
768
+ "address": "11111111111111111111111111111111"
769
+ },
770
+ {
771
+ "name": "bs_auth",
772
+ "signer": true,
773
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
774
+ },
775
+ {
776
+ "name": "vault",
777
+ "writable": true
778
+ },
779
+ {
780
+ "name": "strategy",
781
+ "writable": true
782
+ },
783
+ {
784
+ "name": "market_information"
785
+ },
786
+ {
787
+ "name": "lp_mint",
788
+ "writable": true
789
+ },
790
+ {
791
+ "name": "user_lp_ta",
792
+ "writable": true
793
+ },
794
+ {
795
+ "name": "user_principal_ta",
796
+ "writable": true
797
+ },
798
+ {
799
+ "name": "strategy_principal_ta",
800
+ "writable": true
801
+ },
802
+ {
803
+ "name": "principal_mint"
804
+ },
805
+ {
806
+ "name": "principal_token_program"
807
+ },
808
+ {
809
+ "name": "token_2022_program"
810
+ },
811
+ {
812
+ "name": "associated_token_program"
813
+ },
814
+ {
815
+ "name": "event_authority"
816
+ }
817
+ ],
818
+ "args": [
819
+ {
820
+ "name": "params",
821
+ "type": {
822
+ "defined": {
823
+ "name": "LpParams"
824
+ }
825
+ }
826
+ }
827
+ ]
828
+ },
829
+ {
830
+ "name": "lock_loan",
831
+ "docs": [
832
+ "Lock a loan to commit borrowed principal and collateral.",
833
+ "",
834
+ "- Permission: `ManageLoan`."
835
+ ],
836
+ "discriminator": [
837
+ 28,
838
+ 101,
839
+ 52,
840
+ 240,
841
+ 146,
842
+ 230,
843
+ 95,
844
+ 22
845
+ ],
846
+ "accounts": [
847
+ {
848
+ "name": "glam_state",
849
+ "writable": true
850
+ },
851
+ {
852
+ "name": "glam_vault",
853
+ "writable": true,
854
+ "pda": {
855
+ "seeds": [
856
+ {
857
+ "kind": "const",
858
+ "value": [
859
+ 118,
860
+ 97,
861
+ 117,
862
+ 108,
863
+ 116
864
+ ]
865
+ },
866
+ {
867
+ "kind": "account",
868
+ "path": "glam_state"
869
+ }
870
+ ],
871
+ "program": {
872
+ "kind": "account",
873
+ "path": "glam_protocol_program"
874
+ }
875
+ }
876
+ },
877
+ {
878
+ "name": "glam_signer",
879
+ "writable": true,
880
+ "signer": true
881
+ },
882
+ {
883
+ "name": "integration_authority",
884
+ "pda": {
885
+ "seeds": [
886
+ {
887
+ "kind": "const",
888
+ "value": [
889
+ 105,
890
+ 110,
891
+ 116,
892
+ 101,
893
+ 103,
894
+ 114,
895
+ 97,
896
+ 116,
897
+ 105,
898
+ 111,
899
+ 110,
900
+ 45,
901
+ 97,
902
+ 117,
903
+ 116,
904
+ 104,
905
+ 111,
906
+ 114,
907
+ 105,
908
+ 116,
909
+ 121
910
+ ]
911
+ }
912
+ ]
913
+ }
914
+ },
915
+ {
916
+ "name": "cpi_program",
917
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
918
+ },
919
+ {
920
+ "name": "glam_protocol_program",
921
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
922
+ },
923
+ {
924
+ "name": "system_program",
925
+ "address": "11111111111111111111111111111111"
926
+ },
927
+ {
928
+ "name": "bs_auth",
929
+ "signer": true,
930
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
931
+ },
932
+ {
933
+ "name": "loan",
934
+ "writable": true
935
+ },
936
+ {
937
+ "name": "instructions_sysvar",
938
+ "address": "Sysvar1nstructions1111111111111111111111111"
939
+ }
940
+ ],
941
+ "args": [
942
+ {
943
+ "name": "params",
944
+ "type": {
945
+ "defined": {
946
+ "name": "LockLoanParams"
947
+ }
948
+ }
949
+ }
950
+ ]
951
+ },
952
+ {
953
+ "name": "refinance_ledger",
954
+ "docs": [
955
+ "Refinance a loan ledger from one strategy to another.",
956
+ "",
957
+ "- Permission: `RefinanceLedger`.",
958
+ "- Policy",
959
+ "- `principal_mint` must be present in `LoopscalePolicy::borrow_allowlist`.",
960
+ "- `new_strategy_market_information` must be present in `LoopscalePolicy::market_allowlist`."
961
+ ],
962
+ "discriminator": [
963
+ 103,
964
+ 41,
965
+ 134,
966
+ 43,
967
+ 140,
968
+ 152,
969
+ 253,
970
+ 74
971
+ ],
972
+ "accounts": [
973
+ {
974
+ "name": "glam_state",
975
+ "writable": true
976
+ },
977
+ {
978
+ "name": "glam_vault",
979
+ "writable": true,
980
+ "pda": {
981
+ "seeds": [
982
+ {
983
+ "kind": "const",
984
+ "value": [
985
+ 118,
986
+ 97,
987
+ 117,
988
+ 108,
989
+ 116
990
+ ]
991
+ },
992
+ {
993
+ "kind": "account",
994
+ "path": "glam_state"
995
+ }
996
+ ],
997
+ "program": {
998
+ "kind": "account",
999
+ "path": "glam_protocol_program"
1000
+ }
1001
+ }
1002
+ },
1003
+ {
1004
+ "name": "glam_signer",
1005
+ "writable": true,
1006
+ "signer": true
1007
+ },
1008
+ {
1009
+ "name": "integration_authority",
1010
+ "pda": {
1011
+ "seeds": [
1012
+ {
1013
+ "kind": "const",
1014
+ "value": [
1015
+ 105,
1016
+ 110,
1017
+ 116,
1018
+ 101,
1019
+ 103,
1020
+ 114,
1021
+ 97,
1022
+ 116,
1023
+ 105,
1024
+ 111,
1025
+ 110,
1026
+ 45,
1027
+ 97,
1028
+ 117,
1029
+ 116,
1030
+ 104,
1031
+ 111,
1032
+ 114,
1033
+ 105,
1034
+ 116,
1035
+ 121
1036
+ ]
1037
+ }
1038
+ ]
1039
+ }
1040
+ },
1041
+ {
1042
+ "name": "cpi_program",
1043
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
1044
+ },
1045
+ {
1046
+ "name": "glam_protocol_program",
1047
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1048
+ },
1049
+ {
1050
+ "name": "system_program",
1051
+ "address": "11111111111111111111111111111111"
1052
+ },
1053
+ {
1054
+ "name": "bs_auth",
1055
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
1056
+ },
1057
+ {
1058
+ "name": "loan",
1059
+ "writable": true
1060
+ },
1061
+ {
1062
+ "name": "old_strategy",
1063
+ "writable": true
1064
+ },
1065
+ {
1066
+ "name": "new_strategy",
1067
+ "writable": true
1068
+ },
1069
+ {
1070
+ "name": "old_strategy_ta",
1071
+ "writable": true
1072
+ },
1073
+ {
1074
+ "name": "new_strategy_ta",
1075
+ "writable": true
1076
+ },
1077
+ {
1078
+ "name": "old_strategy_market_information",
1079
+ "writable": true
1080
+ },
1081
+ {
1082
+ "name": "new_strategy_market_information",
1083
+ "writable": true
1084
+ },
1085
+ {
1086
+ "name": "principal_mint"
1087
+ },
1088
+ {
1089
+ "name": "token_program"
1090
+ },
1091
+ {
1092
+ "name": "associated_token_program"
1093
+ },
1094
+ {
1095
+ "name": "event_authority"
1096
+ },
1097
+ {
1098
+ "name": "program"
1099
+ }
1100
+ ],
1101
+ "args": [
1102
+ {
1103
+ "name": "params",
1104
+ "type": {
1105
+ "defined": {
1106
+ "name": "RefinanceLedgerParams"
1107
+ }
1108
+ }
1109
+ }
1110
+ ]
1111
+ },
1112
+ {
1113
+ "name": "repay_principal",
1114
+ "docs": [
1115
+ "Repay principal on a Loopscale loan.",
1116
+ "",
1117
+ "- Permission: `RepayPrincipal`."
1118
+ ],
1119
+ "discriminator": [
1120
+ 229,
1121
+ 67,
1122
+ 83,
1123
+ 65,
1124
+ 77,
1125
+ 84,
1126
+ 80,
1127
+ 141
1128
+ ],
1129
+ "accounts": [
1130
+ {
1131
+ "name": "glam_state",
1132
+ "writable": true
1133
+ },
1134
+ {
1135
+ "name": "glam_vault",
1136
+ "writable": true,
1137
+ "pda": {
1138
+ "seeds": [
1139
+ {
1140
+ "kind": "const",
1141
+ "value": [
1142
+ 118,
1143
+ 97,
1144
+ 117,
1145
+ 108,
1146
+ 116
1147
+ ]
1148
+ },
1149
+ {
1150
+ "kind": "account",
1151
+ "path": "glam_state"
1152
+ }
1153
+ ],
1154
+ "program": {
1155
+ "kind": "account",
1156
+ "path": "glam_protocol_program"
1157
+ }
1158
+ }
1159
+ },
1160
+ {
1161
+ "name": "glam_signer",
1162
+ "writable": true,
1163
+ "signer": true
1164
+ },
1165
+ {
1166
+ "name": "integration_authority",
1167
+ "pda": {
1168
+ "seeds": [
1169
+ {
1170
+ "kind": "const",
1171
+ "value": [
1172
+ 105,
1173
+ 110,
1174
+ 116,
1175
+ 101,
1176
+ 103,
1177
+ 114,
1178
+ 97,
1179
+ 116,
1180
+ 105,
1181
+ 111,
1182
+ 110,
1183
+ 45,
1184
+ 97,
1185
+ 117,
1186
+ 116,
1187
+ 104,
1188
+ 111,
1189
+ 114,
1190
+ 105,
1191
+ 116,
1192
+ 121
1193
+ ]
1194
+ }
1195
+ ]
1196
+ }
1197
+ },
1198
+ {
1199
+ "name": "cpi_program",
1200
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
1201
+ },
1202
+ {
1203
+ "name": "glam_protocol_program",
1204
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1205
+ },
1206
+ {
1207
+ "name": "system_program",
1208
+ "address": "11111111111111111111111111111111"
1209
+ },
1210
+ {
1211
+ "name": "bs_auth",
1212
+ "signer": true,
1213
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
1214
+ },
1215
+ {
1216
+ "name": "loan",
1217
+ "writable": true
1218
+ },
1219
+ {
1220
+ "name": "strategy",
1221
+ "writable": true
1222
+ },
1223
+ {
1224
+ "name": "market_information",
1225
+ "writable": true
1226
+ },
1227
+ {
1228
+ "name": "principal_mint"
1229
+ },
1230
+ {
1231
+ "name": "borrower_ta",
1232
+ "writable": true
1233
+ },
1234
+ {
1235
+ "name": "strategy_ta",
1236
+ "writable": true
1237
+ },
1238
+ {
1239
+ "name": "associated_token_program"
1240
+ },
1241
+ {
1242
+ "name": "token_program"
1243
+ },
1244
+ {
1245
+ "name": "event_authority"
1246
+ }
1247
+ ],
1248
+ "args": [
1249
+ {
1250
+ "name": "params",
1251
+ "type": {
1252
+ "defined": {
1253
+ "name": "RepayPrincipalParams"
1254
+ }
1255
+ }
1256
+ }
1257
+ ]
1258
+ },
1259
+ {
1260
+ "name": "set_loopscale_policy",
1261
+ "docs": [
1262
+ "Set the `LoopscalePolicy` (deposit, borrow, and market allowlists) on the GLAM state."
1263
+ ],
1264
+ "discriminator": [
1265
+ 216,
1266
+ 84,
1267
+ 180,
1268
+ 148,
1269
+ 164,
1270
+ 253,
1271
+ 148,
1272
+ 173
1273
+ ],
1274
+ "accounts": [
1275
+ {
1276
+ "name": "glam_state",
1277
+ "writable": true
1278
+ },
1279
+ {
1280
+ "name": "glam_signer",
1281
+ "writable": true,
1282
+ "signer": true
1283
+ },
1284
+ {
1285
+ "name": "glam_protocol_program",
1286
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1287
+ }
1288
+ ],
1289
+ "args": [
1290
+ {
1291
+ "name": "policy",
1292
+ "type": {
1293
+ "defined": {
1294
+ "name": "LoopscalePolicy"
1295
+ }
1296
+ }
1297
+ }
1298
+ ]
1299
+ },
1300
+ {
1301
+ "name": "stake_user_vault_lp",
1302
+ "docs": [
1303
+ "Stake user-vault LP tokens to earn rewards.",
1304
+ "",
1305
+ "- Permission: `StakeUserVaultLp`."
1306
+ ],
1307
+ "discriminator": [
1308
+ 114,
1309
+ 132,
1310
+ 194,
1311
+ 209,
1312
+ 208,
1313
+ 149,
1314
+ 43,
1315
+ 136
1316
+ ],
1317
+ "accounts": [
1318
+ {
1319
+ "name": "glam_state",
1320
+ "writable": true
1321
+ },
1322
+ {
1323
+ "name": "glam_vault",
1324
+ "writable": true,
1325
+ "pda": {
1326
+ "seeds": [
1327
+ {
1328
+ "kind": "const",
1329
+ "value": [
1330
+ 118,
1331
+ 97,
1332
+ 117,
1333
+ 108,
1334
+ 116
1335
+ ]
1336
+ },
1337
+ {
1338
+ "kind": "account",
1339
+ "path": "glam_state"
1340
+ }
1341
+ ],
1342
+ "program": {
1343
+ "kind": "account",
1344
+ "path": "glam_protocol_program"
1345
+ }
1346
+ }
1347
+ },
1348
+ {
1349
+ "name": "glam_signer",
1350
+ "writable": true,
1351
+ "signer": true
1352
+ },
1353
+ {
1354
+ "name": "integration_authority",
1355
+ "pda": {
1356
+ "seeds": [
1357
+ {
1358
+ "kind": "const",
1359
+ "value": [
1360
+ 105,
1361
+ 110,
1362
+ 116,
1363
+ 101,
1364
+ 103,
1365
+ 114,
1366
+ 97,
1367
+ 116,
1368
+ 105,
1369
+ 111,
1370
+ 110,
1371
+ 45,
1372
+ 97,
1373
+ 117,
1374
+ 116,
1375
+ 104,
1376
+ 111,
1377
+ 114,
1378
+ 105,
1379
+ 116,
1380
+ 121
1381
+ ]
1382
+ }
1383
+ ]
1384
+ }
1385
+ },
1386
+ {
1387
+ "name": "cpi_program",
1388
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
1389
+ },
1390
+ {
1391
+ "name": "glam_protocol_program",
1392
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1393
+ },
1394
+ {
1395
+ "name": "system_program",
1396
+ "address": "11111111111111111111111111111111"
1397
+ },
1398
+ {
1399
+ "name": "bs_auth",
1400
+ "signer": true,
1401
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
1402
+ },
1403
+ {
1404
+ "name": "nonce",
1405
+ "signer": true
1406
+ },
1407
+ {
1408
+ "name": "vault",
1409
+ "writable": true
1410
+ },
1411
+ {
1412
+ "name": "vault_stake",
1413
+ "writable": true
1414
+ },
1415
+ {
1416
+ "name": "lp_mint"
1417
+ },
1418
+ {
1419
+ "name": "user_lp_ta",
1420
+ "writable": true
1421
+ },
1422
+ {
1423
+ "name": "vault_stake_lp_ta",
1424
+ "writable": true
1425
+ },
1426
+ {
1427
+ "name": "vault_rewards_info",
1428
+ "writable": true
1429
+ },
1430
+ {
1431
+ "name": "user_rewards_info",
1432
+ "writable": true
1433
+ },
1434
+ {
1435
+ "name": "token_program"
1436
+ },
1437
+ {
1438
+ "name": "associated_token_program"
1439
+ },
1440
+ {
1441
+ "name": "event_authority"
1442
+ }
1443
+ ],
1444
+ "args": [
1445
+ {
1446
+ "name": "params",
1447
+ "type": {
1448
+ "defined": {
1449
+ "name": "VaultStakeParams"
1450
+ }
1451
+ }
1452
+ }
1453
+ ]
1454
+ },
1455
+ {
1456
+ "name": "unlock_loan",
1457
+ "docs": [
1458
+ "Unlock a previously locked loan.",
1459
+ "",
1460
+ "- Permission: `ManageLoan`."
1461
+ ],
1462
+ "discriminator": [
1463
+ 121,
1464
+ 226,
1465
+ 178,
1466
+ 98,
1467
+ 215,
1468
+ 209,
1469
+ 240,
1470
+ 38
1471
+ ],
1472
+ "accounts": [
1473
+ {
1474
+ "name": "glam_state",
1475
+ "writable": true
1476
+ },
1477
+ {
1478
+ "name": "glam_vault",
1479
+ "writable": true,
1480
+ "pda": {
1481
+ "seeds": [
1482
+ {
1483
+ "kind": "const",
1484
+ "value": [
1485
+ 118,
1486
+ 97,
1487
+ 117,
1488
+ 108,
1489
+ 116
1490
+ ]
1491
+ },
1492
+ {
1493
+ "kind": "account",
1494
+ "path": "glam_state"
1495
+ }
1496
+ ],
1497
+ "program": {
1498
+ "kind": "account",
1499
+ "path": "glam_protocol_program"
1500
+ }
1501
+ }
1502
+ },
1503
+ {
1504
+ "name": "glam_signer",
1505
+ "writable": true,
1506
+ "signer": true
1507
+ },
1508
+ {
1509
+ "name": "integration_authority",
1510
+ "pda": {
1511
+ "seeds": [
1512
+ {
1513
+ "kind": "const",
1514
+ "value": [
1515
+ 105,
1516
+ 110,
1517
+ 116,
1518
+ 101,
1519
+ 103,
1520
+ 114,
1521
+ 97,
1522
+ 116,
1523
+ 105,
1524
+ 111,
1525
+ 110,
1526
+ 45,
1527
+ 97,
1528
+ 117,
1529
+ 116,
1530
+ 104,
1531
+ 111,
1532
+ 114,
1533
+ 105,
1534
+ 116,
1535
+ 121
1536
+ ]
1537
+ }
1538
+ ]
1539
+ }
1540
+ },
1541
+ {
1542
+ "name": "cpi_program",
1543
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
1544
+ },
1545
+ {
1546
+ "name": "glam_protocol_program",
1547
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1548
+ },
1549
+ {
1550
+ "name": "system_program",
1551
+ "address": "11111111111111111111111111111111"
1552
+ },
1553
+ {
1554
+ "name": "bs_auth",
1555
+ "signer": true,
1556
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
1557
+ },
1558
+ {
1559
+ "name": "loan",
1560
+ "writable": true
1561
+ }
1562
+ ],
1563
+ "args": [
1564
+ {
1565
+ "name": "params",
1566
+ "type": {
1567
+ "defined": {
1568
+ "name": "LoanUnlockParams"
1569
+ }
1570
+ }
1571
+ }
1572
+ ]
1573
+ },
1574
+ {
1575
+ "name": "unstake_user_vault_lp",
1576
+ "docs": [
1577
+ "Unstake user-vault LP tokens.",
1578
+ "",
1579
+ "- Permission: `UnstakeUserVaultLp`."
1580
+ ],
1581
+ "discriminator": [
1582
+ 83,
1583
+ 78,
1584
+ 230,
1585
+ 123,
1586
+ 226,
1587
+ 40,
1588
+ 158,
1589
+ 97
1590
+ ],
1591
+ "accounts": [
1592
+ {
1593
+ "name": "glam_state",
1594
+ "writable": true
1595
+ },
1596
+ {
1597
+ "name": "glam_vault",
1598
+ "writable": true,
1599
+ "pda": {
1600
+ "seeds": [
1601
+ {
1602
+ "kind": "const",
1603
+ "value": [
1604
+ 118,
1605
+ 97,
1606
+ 117,
1607
+ 108,
1608
+ 116
1609
+ ]
1610
+ },
1611
+ {
1612
+ "kind": "account",
1613
+ "path": "glam_state"
1614
+ }
1615
+ ],
1616
+ "program": {
1617
+ "kind": "account",
1618
+ "path": "glam_protocol_program"
1619
+ }
1620
+ }
1621
+ },
1622
+ {
1623
+ "name": "glam_signer",
1624
+ "writable": true,
1625
+ "signer": true
1626
+ },
1627
+ {
1628
+ "name": "integration_authority",
1629
+ "pda": {
1630
+ "seeds": [
1631
+ {
1632
+ "kind": "const",
1633
+ "value": [
1634
+ 105,
1635
+ 110,
1636
+ 116,
1637
+ 101,
1638
+ 103,
1639
+ 114,
1640
+ 97,
1641
+ 116,
1642
+ 105,
1643
+ 111,
1644
+ 110,
1645
+ 45,
1646
+ 97,
1647
+ 117,
1648
+ 116,
1649
+ 104,
1650
+ 111,
1651
+ 114,
1652
+ 105,
1653
+ 116,
1654
+ 121
1655
+ ]
1656
+ }
1657
+ ]
1658
+ }
1659
+ },
1660
+ {
1661
+ "name": "cpi_program",
1662
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
1663
+ },
1664
+ {
1665
+ "name": "glam_protocol_program",
1666
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1667
+ },
1668
+ {
1669
+ "name": "system_program",
1670
+ "address": "11111111111111111111111111111111"
1671
+ },
1672
+ {
1673
+ "name": "bs_auth",
1674
+ "signer": true,
1675
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
1676
+ },
1677
+ {
1678
+ "name": "vault",
1679
+ "writable": true
1680
+ },
1681
+ {
1682
+ "name": "lp_mint",
1683
+ "writable": true
1684
+ },
1685
+ {
1686
+ "name": "vault_stake",
1687
+ "writable": true
1688
+ },
1689
+ {
1690
+ "name": "user_lp_ta",
1691
+ "writable": true
1692
+ },
1693
+ {
1694
+ "name": "vault_stake_lp_ta",
1695
+ "writable": true
1696
+ },
1697
+ {
1698
+ "name": "vault_rewards_info",
1699
+ "writable": true
1700
+ },
1701
+ {
1702
+ "name": "user_rewards_info",
1703
+ "writable": true
1704
+ },
1705
+ {
1706
+ "name": "token_program"
1707
+ },
1708
+ {
1709
+ "name": "associated_token_program"
1710
+ },
1711
+ {
1712
+ "name": "event_authority"
1713
+ }
1714
+ ],
1715
+ "args": [
1716
+ {
1717
+ "name": "params",
1718
+ "type": {
1719
+ "defined": {
1720
+ "name": "VaultUnstakeParams"
1721
+ }
1722
+ }
1723
+ }
1724
+ ]
1725
+ },
1726
+ {
1727
+ "name": "update_weight_matrix",
1728
+ "docs": [
1729
+ "Update the collateral weight matrix on a loan.",
1730
+ "",
1731
+ "- Permission: `ManageLoan`."
1732
+ ],
1733
+ "discriminator": [
1734
+ 252,
1735
+ 166,
1736
+ 37,
1737
+ 207,
1738
+ 154,
1739
+ 83,
1740
+ 187,
1741
+ 128
1742
+ ],
1743
+ "accounts": [
1744
+ {
1745
+ "name": "glam_state",
1746
+ "writable": true
1747
+ },
1748
+ {
1749
+ "name": "glam_vault",
1750
+ "writable": true,
1751
+ "pda": {
1752
+ "seeds": [
1753
+ {
1754
+ "kind": "const",
1755
+ "value": [
1756
+ 118,
1757
+ 97,
1758
+ 117,
1759
+ 108,
1760
+ 116
1761
+ ]
1762
+ },
1763
+ {
1764
+ "kind": "account",
1765
+ "path": "glam_state"
1766
+ }
1767
+ ],
1768
+ "program": {
1769
+ "kind": "account",
1770
+ "path": "glam_protocol_program"
1771
+ }
1772
+ }
1773
+ },
1774
+ {
1775
+ "name": "glam_signer",
1776
+ "writable": true,
1777
+ "signer": true
1778
+ },
1779
+ {
1780
+ "name": "integration_authority",
1781
+ "pda": {
1782
+ "seeds": [
1783
+ {
1784
+ "kind": "const",
1785
+ "value": [
1786
+ 105,
1787
+ 110,
1788
+ 116,
1789
+ 101,
1790
+ 103,
1791
+ 114,
1792
+ 97,
1793
+ 116,
1794
+ 105,
1795
+ 111,
1796
+ 110,
1797
+ 45,
1798
+ 97,
1799
+ 117,
1800
+ 116,
1801
+ 104,
1802
+ 111,
1803
+ 114,
1804
+ 105,
1805
+ 116,
1806
+ 121
1807
+ ]
1808
+ }
1809
+ ]
1810
+ }
1811
+ },
1812
+ {
1813
+ "name": "cpi_program",
1814
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
1815
+ },
1816
+ {
1817
+ "name": "glam_protocol_program",
1818
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1819
+ },
1820
+ {
1821
+ "name": "system_program",
1822
+ "address": "11111111111111111111111111111111"
1823
+ },
1824
+ {
1825
+ "name": "bs_auth",
1826
+ "signer": true,
1827
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
1828
+ },
1829
+ {
1830
+ "name": "loan",
1831
+ "writable": true
1832
+ }
1833
+ ],
1834
+ "args": [
1835
+ {
1836
+ "name": "params",
1837
+ "type": {
1838
+ "defined": {
1839
+ "name": "UpdateWeightMatrixParams"
1840
+ }
1841
+ }
1842
+ }
1843
+ ]
1844
+ },
1845
+ {
1846
+ "name": "withdraw_collateral",
1847
+ "docs": [
1848
+ "Withdraw collateral from a Loopscale loan.",
1849
+ "",
1850
+ "- Permission: `WithdrawCollateral`."
1851
+ ],
1852
+ "discriminator": [
1853
+ 115,
1854
+ 135,
1855
+ 168,
1856
+ 106,
1857
+ 139,
1858
+ 214,
1859
+ 138,
1860
+ 150
1861
+ ],
1862
+ "accounts": [
1863
+ {
1864
+ "name": "glam_state",
1865
+ "writable": true
1866
+ },
1867
+ {
1868
+ "name": "glam_vault",
1869
+ "writable": true,
1870
+ "pda": {
1871
+ "seeds": [
1872
+ {
1873
+ "kind": "const",
1874
+ "value": [
1875
+ 118,
1876
+ 97,
1877
+ 117,
1878
+ 108,
1879
+ 116
1880
+ ]
1881
+ },
1882
+ {
1883
+ "kind": "account",
1884
+ "path": "glam_state"
1885
+ }
1886
+ ],
1887
+ "program": {
1888
+ "kind": "account",
1889
+ "path": "glam_protocol_program"
1890
+ }
1891
+ }
1892
+ },
1893
+ {
1894
+ "name": "glam_signer",
1895
+ "writable": true,
1896
+ "signer": true
1897
+ },
1898
+ {
1899
+ "name": "integration_authority",
1900
+ "pda": {
1901
+ "seeds": [
1902
+ {
1903
+ "kind": "const",
1904
+ "value": [
1905
+ 105,
1906
+ 110,
1907
+ 116,
1908
+ 101,
1909
+ 103,
1910
+ 114,
1911
+ 97,
1912
+ 116,
1913
+ 105,
1914
+ 111,
1915
+ 110,
1916
+ 45,
1917
+ 97,
1918
+ 117,
1919
+ 116,
1920
+ 104,
1921
+ 111,
1922
+ 114,
1923
+ 105,
1924
+ 116,
1925
+ 121
1926
+ ]
1927
+ }
1928
+ ]
1929
+ }
1930
+ },
1931
+ {
1932
+ "name": "cpi_program",
1933
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
1934
+ },
1935
+ {
1936
+ "name": "glam_protocol_program",
1937
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1938
+ },
1939
+ {
1940
+ "name": "system_program",
1941
+ "address": "11111111111111111111111111111111"
1942
+ },
1943
+ {
1944
+ "name": "bs_auth",
1945
+ "signer": true,
1946
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
1947
+ },
1948
+ {
1949
+ "name": "loan",
1950
+ "writable": true
1951
+ },
1952
+ {
1953
+ "name": "borrower_ta",
1954
+ "writable": true
1955
+ },
1956
+ {
1957
+ "name": "loan_ta",
1958
+ "writable": true
1959
+ },
1960
+ {
1961
+ "name": "asset_mint"
1962
+ },
1963
+ {
1964
+ "name": "token_program"
1965
+ },
1966
+ {
1967
+ "name": "associated_token_program"
1968
+ },
1969
+ {
1970
+ "name": "event_authority"
1971
+ }
1972
+ ],
1973
+ "args": [
1974
+ {
1975
+ "name": "params",
1976
+ "type": {
1977
+ "defined": {
1978
+ "name": "WithdrawCollateralParams"
1979
+ }
1980
+ }
1981
+ }
1982
+ ]
1983
+ },
1984
+ {
1985
+ "name": "withdraw_user_vault",
1986
+ "docs": [
1987
+ "Withdraw principal from a Loopscale user vault by redeeming LP tokens.",
1988
+ "",
1989
+ "- Permission: `WithdrawUserVault`."
1990
+ ],
1991
+ "discriminator": [
1992
+ 9,
1993
+ 80,
1994
+ 134,
1995
+ 138,
1996
+ 212,
1997
+ 20,
1998
+ 61,
1999
+ 42
2000
+ ],
2001
+ "accounts": [
2002
+ {
2003
+ "name": "glam_state",
2004
+ "writable": true
2005
+ },
2006
+ {
2007
+ "name": "glam_vault",
2008
+ "writable": true,
2009
+ "pda": {
2010
+ "seeds": [
2011
+ {
2012
+ "kind": "const",
2013
+ "value": [
2014
+ 118,
2015
+ 97,
2016
+ 117,
2017
+ 108,
2018
+ 116
2019
+ ]
2020
+ },
2021
+ {
2022
+ "kind": "account",
2023
+ "path": "glam_state"
2024
+ }
2025
+ ],
2026
+ "program": {
2027
+ "kind": "account",
2028
+ "path": "glam_protocol_program"
2029
+ }
2030
+ }
2031
+ },
2032
+ {
2033
+ "name": "glam_signer",
2034
+ "writable": true,
2035
+ "signer": true
2036
+ },
2037
+ {
2038
+ "name": "integration_authority",
2039
+ "pda": {
2040
+ "seeds": [
2041
+ {
2042
+ "kind": "const",
2043
+ "value": [
2044
+ 105,
2045
+ 110,
2046
+ 116,
2047
+ 101,
2048
+ 103,
2049
+ 114,
2050
+ 97,
2051
+ 116,
2052
+ 105,
2053
+ 111,
2054
+ 110,
2055
+ 45,
2056
+ 97,
2057
+ 117,
2058
+ 116,
2059
+ 104,
2060
+ 111,
2061
+ 114,
2062
+ 105,
2063
+ 116,
2064
+ 121
2065
+ ]
2066
+ }
2067
+ ]
2068
+ }
2069
+ },
2070
+ {
2071
+ "name": "cpi_program",
2072
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
2073
+ },
2074
+ {
2075
+ "name": "glam_protocol_program",
2076
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2077
+ },
2078
+ {
2079
+ "name": "system_program",
2080
+ "address": "11111111111111111111111111111111"
2081
+ },
2082
+ {
2083
+ "name": "bs_auth",
2084
+ "signer": true,
2085
+ "address": "CyNKPfqsSLAejjZtEeNG3pR4SkPhSPHXdGhuNTyudrNs"
2086
+ },
2087
+ {
2088
+ "name": "vault",
2089
+ "writable": true
2090
+ },
2091
+ {
2092
+ "name": "strategy",
2093
+ "writable": true
2094
+ },
2095
+ {
2096
+ "name": "market_information"
2097
+ },
2098
+ {
2099
+ "name": "lp_mint",
2100
+ "writable": true
2101
+ },
2102
+ {
2103
+ "name": "user_lp_ta",
2104
+ "writable": true
2105
+ },
2106
+ {
2107
+ "name": "user_principal_ta",
2108
+ "writable": true
2109
+ },
2110
+ {
2111
+ "name": "strategy_principal_ta",
2112
+ "writable": true
2113
+ },
2114
+ {
2115
+ "name": "principal_mint"
2116
+ },
2117
+ {
2118
+ "name": "principal_token_program"
2119
+ },
2120
+ {
2121
+ "name": "token_2022_program"
2122
+ },
2123
+ {
2124
+ "name": "associated_token_program"
2125
+ },
2126
+ {
2127
+ "name": "event_authority"
2128
+ }
2129
+ ],
2130
+ "args": [
2131
+ {
2132
+ "name": "params",
2133
+ "type": {
2134
+ "defined": {
2135
+ "name": "LpParams"
2136
+ }
2137
+ }
2138
+ }
2139
+ ]
2140
+ }
2141
+ ],
2142
+ "accounts": [
2143
+ {
2144
+ "name": "StateAccount",
2145
+ "discriminator": [
2146
+ 142,
2147
+ 247,
2148
+ 54,
2149
+ 95,
2150
+ 85,
2151
+ 133,
2152
+ 249,
2153
+ 103
2154
+ ]
2155
+ }
2156
+ ],
2157
+ "types": [
2158
+ {
2159
+ "name": "AccountType",
2160
+ "type": {
2161
+ "kind": "enum",
2162
+ "variants": [
2163
+ {
2164
+ "name": "Vault"
2165
+ },
2166
+ {
2167
+ "name": "TokenizedVault"
2168
+ },
2169
+ {
2170
+ "name": "Mint"
2171
+ },
2172
+ {
2173
+ "name": "SingleAssetVault"
2174
+ }
2175
+ ]
2176
+ }
2177
+ },
2178
+ {
2179
+ "name": "AccruedFees",
2180
+ "type": {
2181
+ "kind": "struct",
2182
+ "fields": [
2183
+ {
2184
+ "name": "vault_subscription_fee",
2185
+ "type": "u128"
2186
+ },
2187
+ {
2188
+ "name": "vault_redemption_fee",
2189
+ "type": "u128"
2190
+ },
2191
+ {
2192
+ "name": "manager_subscription_fee",
2193
+ "type": "u128"
2194
+ },
2195
+ {
2196
+ "name": "manager_redemption_fee",
2197
+ "type": "u128"
2198
+ },
2199
+ {
2200
+ "name": "management_fee",
2201
+ "type": "u128"
2202
+ },
2203
+ {
2204
+ "name": "performance_fee",
2205
+ "type": "u128"
2206
+ },
2207
+ {
2208
+ "name": "protocol_base_fee",
2209
+ "type": "u128"
2210
+ },
2211
+ {
2212
+ "name": "protocol_flow_fee",
2213
+ "type": "u128"
2214
+ }
2215
+ ]
2216
+ }
2217
+ },
2218
+ {
2219
+ "name": "BorrowPrincipalParams",
2220
+ "type": {
2221
+ "kind": "struct",
2222
+ "fields": [
2223
+ {
2224
+ "name": "amount",
2225
+ "type": "u64"
2226
+ },
2227
+ {
2228
+ "name": "asset_index_guidance",
2229
+ "type": "bytes"
2230
+ },
2231
+ {
2232
+ "name": "duration",
2233
+ "type": "u8"
2234
+ },
2235
+ {
2236
+ "name": "expected_loan_values",
2237
+ "type": {
2238
+ "defined": {
2239
+ "name": "ExpectedLoanValues"
2240
+ }
2241
+ }
2242
+ },
2243
+ {
2244
+ "name": "skip_sol_unwrap",
2245
+ "type": "bool"
2246
+ }
2247
+ ]
2248
+ }
2249
+ },
2250
+ {
2251
+ "name": "CreateLoanParams",
2252
+ "type": {
2253
+ "kind": "struct",
2254
+ "fields": [
2255
+ {
2256
+ "name": "nonce",
2257
+ "type": "u64"
2258
+ }
2259
+ ]
2260
+ }
2261
+ },
2262
+ {
2263
+ "name": "CreatedModel",
2264
+ "type": {
2265
+ "kind": "struct",
2266
+ "fields": [
2267
+ {
2268
+ "name": "key",
2269
+ "type": {
2270
+ "array": [
2271
+ "u8",
2272
+ 8
2273
+ ]
2274
+ }
2275
+ },
2276
+ {
2277
+ "name": "created_by",
2278
+ "type": "pubkey"
2279
+ },
2280
+ {
2281
+ "name": "created_at",
2282
+ "type": "i64"
2283
+ }
2284
+ ]
2285
+ }
2286
+ },
2287
+ {
2288
+ "name": "DelegateAcl",
2289
+ "type": {
2290
+ "kind": "struct",
2291
+ "fields": [
2292
+ {
2293
+ "name": "pubkey",
2294
+ "type": "pubkey"
2295
+ },
2296
+ {
2297
+ "name": "integration_permissions",
2298
+ "type": {
2299
+ "vec": {
2300
+ "defined": {
2301
+ "name": "IntegrationPermissions"
2302
+ }
2303
+ }
2304
+ }
2305
+ },
2306
+ {
2307
+ "name": "expires_at",
2308
+ "type": "i64"
2309
+ }
2310
+ ]
2311
+ }
2312
+ },
2313
+ {
2314
+ "name": "DepositCollateralParams",
2315
+ "type": {
2316
+ "kind": "struct",
2317
+ "fields": [
2318
+ {
2319
+ "name": "amount",
2320
+ "type": "u64"
2321
+ },
2322
+ {
2323
+ "name": "asset_type",
2324
+ "type": "u8"
2325
+ },
2326
+ {
2327
+ "name": "asset_identifier",
2328
+ "type": "pubkey"
2329
+ },
2330
+ {
2331
+ "name": "asset_index_guidance",
2332
+ "type": "bytes"
2333
+ }
2334
+ ]
2335
+ }
2336
+ },
2337
+ {
2338
+ "name": "EngineField",
2339
+ "type": {
2340
+ "kind": "struct",
2341
+ "fields": [
2342
+ {
2343
+ "name": "name",
2344
+ "type": {
2345
+ "defined": {
2346
+ "name": "EngineFieldName"
2347
+ }
2348
+ }
2349
+ },
2350
+ {
2351
+ "name": "value",
2352
+ "type": {
2353
+ "defined": {
2354
+ "name": "EngineFieldValue"
2355
+ }
2356
+ }
2357
+ }
2358
+ ]
2359
+ }
2360
+ },
2361
+ {
2362
+ "name": "EngineFieldName",
2363
+ "type": {
2364
+ "kind": "enum",
2365
+ "variants": [
2366
+ {
2367
+ "name": "Owner"
2368
+ },
2369
+ {
2370
+ "name": "PortfolioManagerName"
2371
+ },
2372
+ {
2373
+ "name": "Name"
2374
+ },
2375
+ {
2376
+ "name": "Uri"
2377
+ },
2378
+ {
2379
+ "name": "Assets"
2380
+ },
2381
+ {
2382
+ "name": "DelegateAcls"
2383
+ },
2384
+ {
2385
+ "name": "IntegrationAcls"
2386
+ },
2387
+ {
2388
+ "name": "TimelockDuration"
2389
+ },
2390
+ {
2391
+ "name": "Borrowable"
2392
+ },
2393
+ {
2394
+ "name": "DefaultAccountStateFrozen"
2395
+ },
2396
+ {
2397
+ "name": "PermanentDelegate"
2398
+ },
2399
+ {
2400
+ "name": "NotifyAndSettle"
2401
+ },
2402
+ {
2403
+ "name": "FeeStructure"
2404
+ },
2405
+ {
2406
+ "name": "FeeParams"
2407
+ },
2408
+ {
2409
+ "name": "ClaimableFees"
2410
+ },
2411
+ {
2412
+ "name": "ClaimedFees"
2413
+ },
2414
+ {
2415
+ "name": "OracleConfigs"
2416
+ }
2417
+ ]
2418
+ }
2419
+ },
2420
+ {
2421
+ "name": "EngineFieldValue",
2422
+ "type": {
2423
+ "kind": "enum",
2424
+ "variants": [
2425
+ {
2426
+ "name": "Boolean",
2427
+ "fields": [
2428
+ {
2429
+ "name": "val",
2430
+ "type": "bool"
2431
+ }
2432
+ ]
2433
+ },
2434
+ {
2435
+ "name": "U8",
2436
+ "fields": [
2437
+ {
2438
+ "name": "val",
2439
+ "type": "u8"
2440
+ }
2441
+ ]
2442
+ },
2443
+ {
2444
+ "name": "U32",
2445
+ "fields": [
2446
+ {
2447
+ "name": "val",
2448
+ "type": "u32"
2449
+ }
2450
+ ]
2451
+ },
2452
+ {
2453
+ "name": "U64",
2454
+ "fields": [
2455
+ {
2456
+ "name": "val",
2457
+ "type": "u64"
2458
+ }
2459
+ ]
2460
+ },
2461
+ {
2462
+ "name": "String",
2463
+ "fields": [
2464
+ {
2465
+ "name": "val",
2466
+ "type": "string"
2467
+ }
2468
+ ]
2469
+ },
2470
+ {
2471
+ "name": "Pubkey",
2472
+ "fields": [
2473
+ {
2474
+ "name": "val",
2475
+ "type": "pubkey"
2476
+ }
2477
+ ]
2478
+ },
2479
+ {
2480
+ "name": "VecPubkey",
2481
+ "fields": [
2482
+ {
2483
+ "name": "val",
2484
+ "type": {
2485
+ "vec": "pubkey"
2486
+ }
2487
+ }
2488
+ ]
2489
+ },
2490
+ {
2491
+ "name": "VecU8",
2492
+ "fields": [
2493
+ {
2494
+ "name": "val",
2495
+ "type": "bytes"
2496
+ }
2497
+ ]
2498
+ },
2499
+ {
2500
+ "name": "VecU32",
2501
+ "fields": [
2502
+ {
2503
+ "name": "val",
2504
+ "type": {
2505
+ "vec": "u32"
2506
+ }
2507
+ }
2508
+ ]
2509
+ },
2510
+ {
2511
+ "name": "VecDelegateAcl",
2512
+ "fields": [
2513
+ {
2514
+ "name": "val",
2515
+ "type": {
2516
+ "vec": {
2517
+ "defined": {
2518
+ "name": "DelegateAcl"
2519
+ }
2520
+ }
2521
+ }
2522
+ }
2523
+ ]
2524
+ },
2525
+ {
2526
+ "name": "VecIntegrationAcl",
2527
+ "fields": [
2528
+ {
2529
+ "name": "val",
2530
+ "type": {
2531
+ "vec": {
2532
+ "defined": {
2533
+ "name": "IntegrationAcl"
2534
+ }
2535
+ }
2536
+ }
2537
+ }
2538
+ ]
2539
+ },
2540
+ {
2541
+ "name": "FeeStructure",
2542
+ "fields": [
2543
+ {
2544
+ "name": "val",
2545
+ "type": {
2546
+ "defined": {
2547
+ "name": "FeeStructure"
2548
+ }
2549
+ }
2550
+ }
2551
+ ]
2552
+ },
2553
+ {
2554
+ "name": "FeeParams",
2555
+ "fields": [
2556
+ {
2557
+ "name": "val",
2558
+ "type": {
2559
+ "defined": {
2560
+ "name": "FeeParams"
2561
+ }
2562
+ }
2563
+ }
2564
+ ]
2565
+ },
2566
+ {
2567
+ "name": "AccruedFees",
2568
+ "fields": [
2569
+ {
2570
+ "name": "val",
2571
+ "type": {
2572
+ "defined": {
2573
+ "name": "AccruedFees"
2574
+ }
2575
+ }
2576
+ }
2577
+ ]
2578
+ },
2579
+ {
2580
+ "name": "NotifyAndSettle",
2581
+ "fields": [
2582
+ {
2583
+ "name": "val",
2584
+ "type": {
2585
+ "defined": {
2586
+ "name": "NotifyAndSettle"
2587
+ }
2588
+ }
2589
+ }
2590
+ ]
2591
+ },
2592
+ {
2593
+ "name": "OracleConfigs",
2594
+ "fields": [
2595
+ {
2596
+ "name": "val",
2597
+ "type": {
2598
+ "defined": {
2599
+ "name": "OracleConfigs"
2600
+ }
2601
+ }
2602
+ }
2603
+ ]
2604
+ }
2605
+ ]
2606
+ }
2607
+ },
2608
+ {
2609
+ "name": "EntryExitFees",
2610
+ "type": {
2611
+ "kind": "struct",
2612
+ "fields": [
2613
+ {
2614
+ "name": "subscription_fee_bps",
2615
+ "type": "u16"
2616
+ },
2617
+ {
2618
+ "name": "redemption_fee_bps",
2619
+ "type": "u16"
2620
+ }
2621
+ ]
2622
+ }
2623
+ },
2624
+ {
2625
+ "name": "ExactInParams",
2626
+ "type": {
2627
+ "kind": "struct",
2628
+ "fields": [
2629
+ {
2630
+ "name": "amount_in",
2631
+ "type": "u64"
2632
+ },
2633
+ {
2634
+ "name": "min_amount_out",
2635
+ "type": "u64"
2636
+ }
2637
+ ]
2638
+ }
2639
+ },
2640
+ {
2641
+ "name": "ExactOutParams",
2642
+ "type": {
2643
+ "kind": "struct",
2644
+ "fields": [
2645
+ {
2646
+ "name": "amount_out",
2647
+ "type": "u64"
2648
+ },
2649
+ {
2650
+ "name": "max_amount_in",
2651
+ "type": "u64"
2652
+ }
2653
+ ]
2654
+ }
2655
+ },
2656
+ {
2657
+ "name": "ExpectedLoanValues",
2658
+ "type": {
2659
+ "kind": "struct",
2660
+ "fields": [
2661
+ {
2662
+ "name": "expected_apy",
2663
+ "type": "u64"
2664
+ },
2665
+ {
2666
+ "name": "expected_lqt",
2667
+ "type": {
2668
+ "array": [
2669
+ "u32",
2670
+ 5
2671
+ ]
2672
+ }
2673
+ }
2674
+ ]
2675
+ }
2676
+ },
2677
+ {
2678
+ "name": "FeeParams",
2679
+ "type": {
2680
+ "kind": "struct",
2681
+ "fields": [
2682
+ {
2683
+ "name": "year_in_seconds",
2684
+ "type": "u32"
2685
+ },
2686
+ {
2687
+ "name": "pa_high_water_mark",
2688
+ "type": "i128"
2689
+ },
2690
+ {
2691
+ "name": "pa_last_nav",
2692
+ "type": "i128"
2693
+ },
2694
+ {
2695
+ "name": "last_aum",
2696
+ "type": "i128"
2697
+ },
2698
+ {
2699
+ "name": "last_performance_fee_crystallized",
2700
+ "type": "i64"
2701
+ },
2702
+ {
2703
+ "name": "last_management_fee_crystallized",
2704
+ "type": "i64"
2705
+ },
2706
+ {
2707
+ "name": "last_protocol_fee_crystallized",
2708
+ "type": "i64"
2709
+ }
2710
+ ]
2711
+ }
2712
+ },
2713
+ {
2714
+ "name": "FeeStructure",
2715
+ "type": {
2716
+ "kind": "struct",
2717
+ "fields": [
2718
+ {
2719
+ "name": "vault",
2720
+ "type": {
2721
+ "defined": {
2722
+ "name": "EntryExitFees"
2723
+ }
2724
+ }
2725
+ },
2726
+ {
2727
+ "name": "manager",
2728
+ "type": {
2729
+ "defined": {
2730
+ "name": "EntryExitFees"
2731
+ }
2732
+ }
2733
+ },
2734
+ {
2735
+ "name": "management",
2736
+ "type": {
2737
+ "defined": {
2738
+ "name": "ManagementFee"
2739
+ }
2740
+ }
2741
+ },
2742
+ {
2743
+ "name": "performance",
2744
+ "type": {
2745
+ "defined": {
2746
+ "name": "PerformanceFee"
2747
+ }
2748
+ }
2749
+ },
2750
+ {
2751
+ "name": "protocol",
2752
+ "type": {
2753
+ "defined": {
2754
+ "name": "ProtocolFees"
2755
+ }
2756
+ }
2757
+ }
2758
+ ]
2759
+ }
2760
+ },
2761
+ {
2762
+ "name": "HurdleType",
2763
+ "type": {
2764
+ "kind": "enum",
2765
+ "variants": [
2766
+ {
2767
+ "name": "Hard"
2768
+ },
2769
+ {
2770
+ "name": "Soft"
2771
+ }
2772
+ ]
2773
+ }
2774
+ },
2775
+ {
2776
+ "name": "IntegrationAcl",
2777
+ "docs": [
2778
+ "An integration program can have multiple protocols supported.",
2779
+ "Enabled protocols are stored in a bitmask, and each protocol can have its own policy."
2780
+ ],
2781
+ "type": {
2782
+ "kind": "struct",
2783
+ "fields": [
2784
+ {
2785
+ "name": "integration_program",
2786
+ "type": "pubkey"
2787
+ },
2788
+ {
2789
+ "name": "protocols_bitmask",
2790
+ "type": "u16"
2791
+ },
2792
+ {
2793
+ "name": "protocol_policies",
2794
+ "type": {
2795
+ "vec": {
2796
+ "defined": {
2797
+ "name": "ProtocolPolicy"
2798
+ }
2799
+ }
2800
+ }
2801
+ }
2802
+ ]
2803
+ }
2804
+ },
2805
+ {
2806
+ "name": "IntegrationPermissions",
2807
+ "docs": [
2808
+ "Stores delegate permissions for an integration program."
2809
+ ],
2810
+ "type": {
2811
+ "kind": "struct",
2812
+ "fields": [
2813
+ {
2814
+ "name": "integration_program",
2815
+ "type": "pubkey"
2816
+ },
2817
+ {
2818
+ "name": "protocol_permissions",
2819
+ "type": {
2820
+ "vec": {
2821
+ "defined": {
2822
+ "name": "ProtocolPermissions"
2823
+ }
2824
+ }
2825
+ }
2826
+ }
2827
+ ]
2828
+ }
2829
+ },
2830
+ {
2831
+ "name": "LoanUnlockParams",
2832
+ "type": {
2833
+ "kind": "struct",
2834
+ "fields": [
2835
+ {
2836
+ "name": "asset_index_guidance",
2837
+ "type": "bytes"
2838
+ }
2839
+ ]
2840
+ }
2841
+ },
2842
+ {
2843
+ "name": "LockLoanParams",
2844
+ "type": {
2845
+ "kind": "struct",
2846
+ "fields": [
2847
+ {
2848
+ "name": "unlock_idx",
2849
+ "type": "u8"
2850
+ }
2851
+ ]
2852
+ }
2853
+ },
2854
+ {
2855
+ "name": "LoopscalePolicy",
2856
+ "type": {
2857
+ "kind": "struct",
2858
+ "fields": [
2859
+ {
2860
+ "name": "deposit_allowlist",
2861
+ "type": {
2862
+ "vec": "pubkey"
2863
+ }
2864
+ },
2865
+ {
2866
+ "name": "borrow_allowlist",
2867
+ "type": {
2868
+ "vec": "pubkey"
2869
+ }
2870
+ },
2871
+ {
2872
+ "name": "markets_allowlist",
2873
+ "type": {
2874
+ "vec": "pubkey"
2875
+ }
2876
+ }
2877
+ ]
2878
+ }
2879
+ },
2880
+ {
2881
+ "name": "LpParams",
2882
+ "type": {
2883
+ "kind": "enum",
2884
+ "variants": [
2885
+ {
2886
+ "name": "ExactIn",
2887
+ "fields": [
2888
+ {
2889
+ "defined": {
2890
+ "name": "ExactInParams"
2891
+ }
2892
+ }
2893
+ ]
2894
+ },
2895
+ {
2896
+ "name": "ExactOut",
2897
+ "fields": [
2898
+ {
2899
+ "defined": {
2900
+ "name": "ExactOutParams"
2901
+ }
2902
+ }
2903
+ ]
2904
+ }
2905
+ ]
2906
+ }
2907
+ },
2908
+ {
2909
+ "name": "ManagementFee",
2910
+ "type": {
2911
+ "kind": "struct",
2912
+ "fields": [
2913
+ {
2914
+ "name": "fee_bps",
2915
+ "type": "u16"
2916
+ }
2917
+ ]
2918
+ }
2919
+ },
2920
+ {
2921
+ "name": "NoticePeriodType",
2922
+ "type": {
2923
+ "kind": "enum",
2924
+ "variants": [
2925
+ {
2926
+ "name": "Hard"
2927
+ },
2928
+ {
2929
+ "name": "Soft"
2930
+ }
2931
+ ]
2932
+ }
2933
+ },
2934
+ {
2935
+ "name": "NotifyAndSettle",
2936
+ "type": {
2937
+ "kind": "struct",
2938
+ "fields": [
2939
+ {
2940
+ "name": "model",
2941
+ "type": {
2942
+ "defined": {
2943
+ "name": "ValuationModel"
2944
+ }
2945
+ }
2946
+ },
2947
+ {
2948
+ "name": "permissionless_fulfillment",
2949
+ "type": "bool"
2950
+ },
2951
+ {
2952
+ "name": "subscribe_notice_period_type",
2953
+ "type": {
2954
+ "defined": {
2955
+ "name": "NoticePeriodType"
2956
+ }
2957
+ }
2958
+ },
2959
+ {
2960
+ "name": "subscribe_notice_period",
2961
+ "type": "u64"
2962
+ },
2963
+ {
2964
+ "name": "subscribe_settlement_period",
2965
+ "type": "u64"
2966
+ },
2967
+ {
2968
+ "name": "subscribe_cancellation_window",
2969
+ "type": "u64"
2970
+ },
2971
+ {
2972
+ "name": "redeem_notice_period_type",
2973
+ "type": {
2974
+ "defined": {
2975
+ "name": "NoticePeriodType"
2976
+ }
2977
+ }
2978
+ },
2979
+ {
2980
+ "name": "redeem_notice_period",
2981
+ "type": "u64"
2982
+ },
2983
+ {
2984
+ "name": "redeem_settlement_period",
2985
+ "type": "u64"
2986
+ },
2987
+ {
2988
+ "name": "redeem_cancellation_window",
2989
+ "type": "u64"
2990
+ },
2991
+ {
2992
+ "name": "time_unit",
2993
+ "type": {
2994
+ "defined": {
2995
+ "name": "TimeUnit"
2996
+ }
2997
+ }
2998
+ },
2999
+ {
3000
+ "name": "_padding",
3001
+ "type": {
3002
+ "array": [
3003
+ "u8",
3004
+ 3
3005
+ ]
3006
+ }
3007
+ }
3008
+ ]
3009
+ }
3010
+ },
3011
+ {
3012
+ "name": "OracleConfigs",
3013
+ "docs": [
3014
+ "Vault-specific oracle configs. If available, these configs are preferred over the global config."
3015
+ ],
3016
+ "type": {
3017
+ "kind": "struct",
3018
+ "fields": [
3019
+ {
3020
+ "name": "max_ages_seconds",
3021
+ "type": {
3022
+ "vec": {
3023
+ "array": [
3024
+ "u16",
3025
+ 2
3026
+ ]
3027
+ }
3028
+ }
3029
+ },
3030
+ {
3031
+ "name": "padding",
3032
+ "type": {
3033
+ "array": [
3034
+ "u8",
3035
+ 12
3036
+ ]
3037
+ }
3038
+ }
3039
+ ]
3040
+ }
3041
+ },
3042
+ {
3043
+ "name": "PerformanceFee",
3044
+ "type": {
3045
+ "kind": "struct",
3046
+ "fields": [
3047
+ {
3048
+ "name": "fee_bps",
3049
+ "type": "u16"
3050
+ },
3051
+ {
3052
+ "name": "hurdle_rate_bps",
3053
+ "type": "u16"
3054
+ },
3055
+ {
3056
+ "name": "hurdle_type",
3057
+ "type": {
3058
+ "defined": {
3059
+ "name": "HurdleType"
3060
+ }
3061
+ }
3062
+ }
3063
+ ]
3064
+ }
3065
+ },
3066
+ {
3067
+ "name": "PricedProtocol",
3068
+ "type": {
3069
+ "kind": "struct",
3070
+ "fields": [
3071
+ {
3072
+ "name": "rent",
3073
+ "type": "u64"
3074
+ },
3075
+ {
3076
+ "name": "amount",
3077
+ "type": "i128"
3078
+ },
3079
+ {
3080
+ "name": "decimals",
3081
+ "type": "u8"
3082
+ },
3083
+ {
3084
+ "name": "last_updated_slot",
3085
+ "type": "u64"
3086
+ },
3087
+ {
3088
+ "name": "integration_program",
3089
+ "type": "pubkey"
3090
+ },
3091
+ {
3092
+ "name": "protocol_bitflag",
3093
+ "type": "u16"
3094
+ },
3095
+ {
3096
+ "name": "positions",
3097
+ "type": {
3098
+ "vec": "pubkey"
3099
+ }
3100
+ }
3101
+ ]
3102
+ }
3103
+ },
3104
+ {
3105
+ "name": "ProtocolFees",
3106
+ "type": {
3107
+ "kind": "struct",
3108
+ "fields": [
3109
+ {
3110
+ "name": "base_fee_bps",
3111
+ "type": "u16"
3112
+ },
3113
+ {
3114
+ "name": "flow_fee_bps",
3115
+ "type": "u16"
3116
+ }
3117
+ ]
3118
+ }
3119
+ },
3120
+ {
3121
+ "name": "ProtocolPermissions",
3122
+ "docs": [
3123
+ "Represents a delegate's permissions for a specific protocol"
3124
+ ],
3125
+ "type": {
3126
+ "kind": "struct",
3127
+ "fields": [
3128
+ {
3129
+ "name": "protocol_bitflag",
3130
+ "type": "u16"
3131
+ },
3132
+ {
3133
+ "name": "permissions_bitmask",
3134
+ "type": "u64"
3135
+ }
3136
+ ]
3137
+ }
3138
+ },
3139
+ {
3140
+ "name": "ProtocolPolicy",
3141
+ "docs": [
3142
+ "Stores policy data for an integrated protocol.",
3143
+ "Integration programs serialize/deserialize this data."
3144
+ ],
3145
+ "type": {
3146
+ "kind": "struct",
3147
+ "fields": [
3148
+ {
3149
+ "name": "protocol_bitflag",
3150
+ "type": "u16"
3151
+ },
3152
+ {
3153
+ "name": "data",
3154
+ "type": "bytes"
3155
+ }
3156
+ ]
3157
+ }
3158
+ },
3159
+ {
3160
+ "name": "RefinanceLedgerParams",
3161
+ "type": {
3162
+ "kind": "struct",
3163
+ "fields": [
3164
+ {
3165
+ "name": "ledger_index",
3166
+ "type": "u8"
3167
+ },
3168
+ {
3169
+ "name": "duration_index",
3170
+ "type": "u8"
3171
+ },
3172
+ {
3173
+ "name": "asset_index_guidance",
3174
+ "type": "bytes"
3175
+ }
3176
+ ]
3177
+ }
3178
+ },
3179
+ {
3180
+ "name": "RepayPrincipalParams",
3181
+ "type": {
3182
+ "kind": "struct",
3183
+ "fields": [
3184
+ {
3185
+ "name": "amount",
3186
+ "type": "u64"
3187
+ },
3188
+ {
3189
+ "name": "ledger_index",
3190
+ "type": "u8"
3191
+ },
3192
+ {
3193
+ "name": "repay_all",
3194
+ "type": "bool"
3195
+ }
3196
+ ]
3197
+ }
3198
+ },
3199
+ {
3200
+ "name": "StateAccount",
3201
+ "type": {
3202
+ "kind": "struct",
3203
+ "fields": [
3204
+ {
3205
+ "name": "account_type",
3206
+ "type": {
3207
+ "defined": {
3208
+ "name": "AccountType"
3209
+ }
3210
+ }
3211
+ },
3212
+ {
3213
+ "name": "enabled",
3214
+ "type": "bool"
3215
+ },
3216
+ {
3217
+ "name": "vault",
3218
+ "type": "pubkey"
3219
+ },
3220
+ {
3221
+ "name": "owner",
3222
+ "type": "pubkey"
3223
+ },
3224
+ {
3225
+ "name": "portfolio_manager_name",
3226
+ "type": {
3227
+ "array": [
3228
+ "u8",
3229
+ 32
3230
+ ]
3231
+ }
3232
+ },
3233
+ {
3234
+ "name": "created",
3235
+ "type": {
3236
+ "defined": {
3237
+ "name": "CreatedModel"
3238
+ }
3239
+ }
3240
+ },
3241
+ {
3242
+ "name": "base_asset_mint",
3243
+ "type": "pubkey"
3244
+ },
3245
+ {
3246
+ "name": "base_asset_decimals",
3247
+ "type": "u8"
3248
+ },
3249
+ {
3250
+ "name": "base_asset_token_program",
3251
+ "type": "u8"
3252
+ },
3253
+ {
3254
+ "name": "name",
3255
+ "type": {
3256
+ "array": [
3257
+ "u8",
3258
+ 32
3259
+ ]
3260
+ }
3261
+ },
3262
+ {
3263
+ "name": "timelock_duration",
3264
+ "type": "u32"
3265
+ },
3266
+ {
3267
+ "name": "timelock_expires_at",
3268
+ "type": "u64"
3269
+ },
3270
+ {
3271
+ "name": "mint",
3272
+ "type": "pubkey"
3273
+ },
3274
+ {
3275
+ "name": "assets",
3276
+ "type": {
3277
+ "vec": "pubkey"
3278
+ }
3279
+ },
3280
+ {
3281
+ "name": "integration_acls",
3282
+ "type": {
3283
+ "vec": {
3284
+ "defined": {
3285
+ "name": "IntegrationAcl"
3286
+ }
3287
+ }
3288
+ }
3289
+ },
3290
+ {
3291
+ "name": "delegate_acls",
3292
+ "type": {
3293
+ "vec": {
3294
+ "defined": {
3295
+ "name": "DelegateAcl"
3296
+ }
3297
+ }
3298
+ }
3299
+ },
3300
+ {
3301
+ "name": "external_positions",
3302
+ "type": {
3303
+ "vec": "pubkey"
3304
+ }
3305
+ },
3306
+ {
3307
+ "name": "priced_protocols",
3308
+ "type": {
3309
+ "vec": {
3310
+ "defined": {
3311
+ "name": "PricedProtocol"
3312
+ }
3313
+ }
3314
+ }
3315
+ },
3316
+ {
3317
+ "name": "params",
3318
+ "type": {
3319
+ "vec": {
3320
+ "vec": {
3321
+ "defined": {
3322
+ "name": "EngineField"
3323
+ }
3324
+ }
3325
+ }
3326
+ }
3327
+ }
3328
+ ]
3329
+ }
3330
+ },
3331
+ {
3332
+ "name": "TimeUnit",
3333
+ "type": {
3334
+ "kind": "enum",
3335
+ "variants": [
3336
+ {
3337
+ "name": "Second"
3338
+ },
3339
+ {
3340
+ "name": "Slot"
3341
+ }
3342
+ ]
3343
+ }
3344
+ },
3345
+ {
3346
+ "name": "UpdateWeightMatrixParams",
3347
+ "type": {
3348
+ "kind": "struct",
3349
+ "fields": [
3350
+ {
3351
+ "name": "collateral_index",
3352
+ "type": "u8"
3353
+ },
3354
+ {
3355
+ "name": "weight_matrix",
3356
+ "type": {
3357
+ "array": [
3358
+ "u32",
3359
+ 5
3360
+ ]
3361
+ }
3362
+ },
3363
+ {
3364
+ "name": "expected_loan_values",
3365
+ "type": {
3366
+ "defined": {
3367
+ "name": "ExpectedLoanValues"
3368
+ }
3369
+ }
3370
+ },
3371
+ {
3372
+ "name": "asset_index_guidance",
3373
+ "type": "bytes"
3374
+ }
3375
+ ]
3376
+ }
3377
+ },
3378
+ {
3379
+ "name": "ValuationModel",
3380
+ "type": {
3381
+ "kind": "enum",
3382
+ "variants": [
3383
+ {
3384
+ "name": "Continuous"
3385
+ },
3386
+ {
3387
+ "name": "Periodic"
3388
+ }
3389
+ ]
3390
+ }
3391
+ },
3392
+ {
3393
+ "name": "VaultStakeParams",
3394
+ "type": {
3395
+ "kind": "struct",
3396
+ "fields": [
3397
+ {
3398
+ "name": "amount",
3399
+ "type": "u64"
3400
+ },
3401
+ {
3402
+ "name": "principal_amount",
3403
+ "type": "u64"
3404
+ },
3405
+ {
3406
+ "name": "stake_all",
3407
+ "type": {
3408
+ "option": "bool"
3409
+ }
3410
+ },
3411
+ {
3412
+ "name": "duration",
3413
+ "type": "u32"
3414
+ },
3415
+ {
3416
+ "name": "duration_type",
3417
+ "type": "u8"
3418
+ },
3419
+ {
3420
+ "name": "action_type",
3421
+ "type": "u8"
3422
+ }
3423
+ ]
3424
+ }
3425
+ },
3426
+ {
3427
+ "name": "VaultUnstakeParams",
3428
+ "type": {
3429
+ "kind": "struct",
3430
+ "fields": [
3431
+ {
3432
+ "name": "action_type",
3433
+ "type": "u8"
3434
+ },
3435
+ {
3436
+ "name": "principal_amount",
3437
+ "type": "u64"
3438
+ }
3439
+ ]
3440
+ }
3441
+ },
3442
+ {
3443
+ "name": "WithdrawCollateralParams",
3444
+ "type": {
3445
+ "kind": "struct",
3446
+ "fields": [
3447
+ {
3448
+ "name": "amount",
3449
+ "type": "u64"
3450
+ },
3451
+ {
3452
+ "name": "collateral_index",
3453
+ "type": "u8"
3454
+ },
3455
+ {
3456
+ "name": "asset_index_guidance",
3457
+ "type": "bytes"
3458
+ },
3459
+ {
3460
+ "name": "expected_loan_values",
3461
+ "type": {
3462
+ "defined": {
3463
+ "name": "ExpectedLoanValues"
3464
+ }
3465
+ }
3466
+ },
3467
+ {
3468
+ "name": "close_if_eligible",
3469
+ "type": "bool"
3470
+ },
3471
+ {
3472
+ "name": "withdraw_all",
3473
+ "type": "bool"
3474
+ }
3475
+ ]
3476
+ }
3477
+ }
3478
+ ],
3479
+ "constants": [
3480
+ {
3481
+ "name": "PROTO_LOOPSCALE",
3482
+ "type": "u16",
3483
+ "value": "1"
3484
+ },
3485
+ {
3486
+ "name": "PROTO_LOOPSCALE_PERM_BORROW_PRINCIPAL",
3487
+ "type": "u64",
3488
+ "value": "8"
3489
+ },
3490
+ {
3491
+ "name": "PROTO_LOOPSCALE_PERM_CLAIM_VAULT_REWARDS",
3492
+ "type": "u64",
3493
+ "value": "1024"
3494
+ },
3495
+ {
3496
+ "name": "PROTO_LOOPSCALE_PERM_DEPOSIT_COLLATERAL",
3497
+ "type": "u64",
3498
+ "value": "2"
3499
+ },
3500
+ {
3501
+ "name": "PROTO_LOOPSCALE_PERM_DEPOSIT_USER_VAULT",
3502
+ "type": "u64",
3503
+ "value": "64"
3504
+ },
3505
+ {
3506
+ "name": "PROTO_LOOPSCALE_PERM_MANAGE_LOAN",
3507
+ "type": "u64",
3508
+ "value": "1"
3509
+ },
3510
+ {
3511
+ "name": "PROTO_LOOPSCALE_PERM_REFINANCE_LEDGER",
3512
+ "type": "u64",
3513
+ "value": "32"
3514
+ },
3515
+ {
3516
+ "name": "PROTO_LOOPSCALE_PERM_REPAY_PRINCIPAL",
3517
+ "type": "u64",
3518
+ "value": "16"
3519
+ },
3520
+ {
3521
+ "name": "PROTO_LOOPSCALE_PERM_STAKE_USER_VAULT_LP",
3522
+ "type": "u64",
3523
+ "value": "256"
3524
+ },
3525
+ {
3526
+ "name": "PROTO_LOOPSCALE_PERM_UNSTAKE_USER_VAULT_LP",
3527
+ "type": "u64",
3528
+ "value": "512"
3529
+ },
3530
+ {
3531
+ "name": "PROTO_LOOPSCALE_PERM_WITHDRAW_COLLATERAL",
3532
+ "type": "u64",
3533
+ "value": "4"
3534
+ },
3535
+ {
3536
+ "name": "PROTO_LOOPSCALE_PERM_WITHDRAW_USER_VAULT",
3537
+ "type": "u64",
3538
+ "value": "128"
3539
+ }
3540
+ ]
3541
+ }