@glamsystems/glam-sdk 1.1.0-alpha.5 → 1.1.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.
Files changed (137) hide show
  1. package/LICENSE +201 -0
  2. package/buffer-layout.d.ts +88 -0
  3. package/index.cjs.d.ts +1 -0
  4. package/index.cjs.js +1 -92594
  5. package/index.esm.d.ts +1 -0
  6. package/index.esm.js +1 -92146
  7. package/package.json +29 -17
  8. package/src/assets.d.ts +39 -0
  9. package/src/client/access.d.ts +57 -0
  10. package/src/client/base.d.ts +234 -0
  11. package/src/client/bridge.d.ts +205 -0
  12. package/src/client/bridgeRegistry.d.ts +32 -0
  13. package/src/client/cctp.d.ts +164 -0
  14. package/src/client/epi.d.ts +228 -0
  15. package/src/client/fees.d.ts +33 -0
  16. package/src/client/invest.d.ts +37 -0
  17. package/src/client/jupiter-lend/borrow.d.ts +92 -0
  18. package/src/client/jupiter-lend/earn.d.ts +64 -0
  19. package/src/client/jupiter-lend/index.d.ts +3 -0
  20. package/src/client/jupiter-lend/shared.d.ts +129 -0
  21. package/src/client/jupiter.d.ts +53 -0
  22. package/src/client/kamino/farm.d.ts +39 -0
  23. package/src/client/kamino/index.d.ts +4 -0
  24. package/src/client/kamino/lending.d.ts +94 -0
  25. package/src/client/kamino/types.d.ts +56 -0
  26. package/src/client/kamino/vaults.d.ts +39 -0
  27. package/src/client/loopscale/borrow.d.ts +118 -0
  28. package/src/client/loopscale/core.d.ts +604 -0
  29. package/src/client/loopscale/index.d.ts +5 -0
  30. package/src/client/loopscale/lend.d.ts +123 -0
  31. package/src/client/loopscale/vault.d.ts +43 -0
  32. package/src/client/marinade.d.ts +42 -0
  33. package/src/client/mint.d.ts +143 -0
  34. package/src/client/orca.d.ts +255 -0
  35. package/src/client/phoenix.d.ts +214 -0
  36. package/src/client/price.d.ts +182 -0
  37. package/src/client/stake-pool.d.ts +39 -0
  38. package/src/client/stake.d.ts +34 -0
  39. package/src/client/state.d.ts +56 -0
  40. package/src/client/timelock.d.ts +31 -0
  41. package/src/client/vault.d.ts +98 -0
  42. package/src/client.d.ts +82 -0
  43. package/src/clientConfig.d.ts +32 -0
  44. package/src/constants.d.ts +111 -0
  45. package/src/deser/base.d.ts +18 -0
  46. package/src/deser/index.d.ts +4 -0
  47. package/src/deser/integrationPolicies.d.ts +195 -0
  48. package/src/deser/kaminoLayouts.d.ts +264 -0
  49. package/src/deser/loopscaleLayouts.d.ts +157 -0
  50. package/src/deser/tokenAclLayouts.d.ts +67 -0
  51. package/src/error.d.ts +29 -0
  52. package/src/glamExports.d.ts +6260 -0
  53. package/src/globalConfig.d.ts +27 -0
  54. package/src/index.d.ts +24 -0
  55. package/src/models/acl.d.ts +43 -0
  56. package/src/models/index.d.ts +8 -0
  57. package/src/models/mint.d.ts +57 -0
  58. package/src/models/state.d.ts +94 -0
  59. package/src/models/types.d.ts +28 -0
  60. package/src/protocols.d.ts +29 -0
  61. package/src/utils/accounts.d.ts +71 -0
  62. package/src/utils/bitmask.d.ts +53 -0
  63. package/src/utils/blockhash.d.ts +11 -0
  64. package/src/utils/common.d.ts +73 -0
  65. package/src/utils/computeBudget.d.ts +15 -0
  66. package/src/utils/evm.d.ts +10 -0
  67. package/src/utils/fraction.d.ts +29 -0
  68. package/src/utils/glamPDAs.d.ts +15 -0
  69. package/src/utils/helius.d.ts +66 -0
  70. package/src/utils/index.d.ts +17 -0
  71. package/src/utils/jupiterApi.d.ts +95 -0
  72. package/src/utils/lookupTables.d.ts +83 -0
  73. package/src/utils/phoenixApi.d.ts +146 -0
  74. package/src/utils/pkmap.d.ts +87 -0
  75. package/src/utils/pkset.d.ts +73 -0
  76. package/src/utils/positionCategorizer.d.ts +38 -0
  77. package/src/utils/rpc.d.ts +18 -0
  78. package/src/utils/timelock.d.ts +52 -0
  79. package/src/utils/transaction.d.ts +13 -0
  80. package/target/idl/ext_bridge-staging.json +2379 -0
  81. package/target/idl/ext_bridge.json +2379 -0
  82. package/target/idl/ext_drift.json +5464 -0
  83. package/target/idl/ext_epi-staging.json +2862 -0
  84. package/target/idl/ext_epi.json +2862 -0
  85. package/target/idl/ext_loopscale-staging.json +4708 -0
  86. package/target/idl/ext_loopscale.json +4708 -0
  87. package/target/idl/ext_marinade-staging.json +1587 -0
  88. package/target/idl/ext_phoenix-staging.json +3525 -0
  89. package/target/idl/ext_phoenix.json +3525 -0
  90. package/target/idl/mock_layerzero_endpoint.json +144 -0
  91. package/target/idl/mock_layerzero_oft.json +155 -0
  92. package/target/idl/mock_wormhole_verify_vaa_shim.json +58 -0
  93. package/target/types/ext_bridge-staging.d.ts +2385 -0
  94. package/target/types/ext_bridge-staging.ts +2385 -0
  95. package/target/types/ext_bridge.d.ts +2385 -0
  96. package/target/types/ext_bridge.ts +2385 -0
  97. package/target/types/ext_cctp-staging.d.ts +1268 -0
  98. package/target/types/ext_cctp.d.ts +1268 -0
  99. package/target/types/ext_drift.d.ts +5470 -0
  100. package/target/types/ext_drift.ts +5470 -0
  101. package/target/types/ext_epi-staging.d.ts +2868 -0
  102. package/target/types/ext_epi-staging.ts +2868 -0
  103. package/target/types/ext_epi.d.ts +2868 -0
  104. package/target/types/ext_epi.ts +2868 -0
  105. package/target/types/ext_jupiter-staging.d.ts +1966 -0
  106. package/target/types/ext_jupiter.d.ts +1966 -0
  107. package/target/types/ext_kamino-staging.d.ts +3433 -0
  108. package/target/types/ext_kamino.d.ts +3433 -0
  109. package/target/types/ext_loopscale-staging.d.ts +4714 -0
  110. package/target/types/ext_loopscale-staging.ts +4714 -0
  111. package/target/types/ext_loopscale.d.ts +4714 -0
  112. package/target/types/ext_loopscale.ts +4714 -0
  113. package/target/types/ext_marinade-staging.d.ts +1593 -0
  114. package/target/types/ext_marinade-staging.ts +1593 -0
  115. package/target/types/ext_marinade.d.ts +1593 -0
  116. package/target/types/ext_orca-staging.d.ts +2829 -0
  117. package/target/types/ext_orca.d.ts +2829 -0
  118. package/target/types/ext_phoenix-staging.d.ts +3531 -0
  119. package/target/types/ext_phoenix-staging.ts +3531 -0
  120. package/target/types/ext_phoenix.d.ts +3531 -0
  121. package/target/types/ext_phoenix.ts +3531 -0
  122. package/target/types/ext_spl-staging.d.ts +1274 -0
  123. package/target/types/ext_spl.d.ts +1274 -0
  124. package/target/types/ext_stake_pool-staging.d.ts +1622 -0
  125. package/target/types/ext_stake_pool.d.ts +1622 -0
  126. package/target/types/glam_config.d.ts +755 -0
  127. package/target/types/glam_mint-staging.d.ts +8802 -0
  128. package/target/types/glam_mint.d.ts +6349 -0
  129. package/target/types/glam_policies.d.ts +477 -0
  130. package/target/types/glam_protocol-staging.d.ts +3362 -0
  131. package/target/types/glam_protocol.d.ts +2783 -0
  132. package/target/types/mock_layerzero_endpoint.d.ts +150 -0
  133. package/target/types/mock_layerzero_endpoint.ts +150 -0
  134. package/target/types/mock_layerzero_oft.d.ts +161 -0
  135. package/target/types/mock_layerzero_oft.ts +161 -0
  136. package/target/types/mock_wormhole_verify_vaa_shim.d.ts +64 -0
  137. package/target/types/mock_wormhole_verify_vaa_shim.ts +64 -0
@@ -0,0 +1,4708 @@
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: `BorrowPermissions::BorrowPrincipal`.",
16
+ "- Policy:",
17
+ "- `principal_mint` must be present in `BorrowPolicy::principal_allowlist`.",
18
+ "- If `market_information` has a `BorrowPolicy::market_policies` entry,",
19
+ "advanced per-market borrow limits are enforced."
20
+ ],
21
+ "discriminator": [
22
+ 106,
23
+ 10,
24
+ 38,
25
+ 204,
26
+ 139,
27
+ 188,
28
+ 124,
29
+ 50
30
+ ],
31
+ "accounts": [
32
+ {
33
+ "name": "glam_state",
34
+ "writable": true
35
+ },
36
+ {
37
+ "name": "glam_vault",
38
+ "writable": true,
39
+ "pda": {
40
+ "seeds": [
41
+ {
42
+ "kind": "const",
43
+ "value": [
44
+ 118,
45
+ 97,
46
+ 117,
47
+ 108,
48
+ 116
49
+ ]
50
+ },
51
+ {
52
+ "kind": "account",
53
+ "path": "glam_state"
54
+ }
55
+ ],
56
+ "program": {
57
+ "kind": "account",
58
+ "path": "glam_protocol_program"
59
+ }
60
+ }
61
+ },
62
+ {
63
+ "name": "glam_signer",
64
+ "writable": true,
65
+ "signer": true
66
+ },
67
+ {
68
+ "name": "integration_authority",
69
+ "pda": {
70
+ "seeds": [
71
+ {
72
+ "kind": "const",
73
+ "value": [
74
+ 105,
75
+ 110,
76
+ 116,
77
+ 101,
78
+ 103,
79
+ 114,
80
+ 97,
81
+ 116,
82
+ 105,
83
+ 111,
84
+ 110,
85
+ 45,
86
+ 97,
87
+ 117,
88
+ 116,
89
+ 104,
90
+ 111,
91
+ 114,
92
+ 105,
93
+ 116,
94
+ 121
95
+ ]
96
+ }
97
+ ]
98
+ }
99
+ },
100
+ {
101
+ "name": "cpi_program",
102
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
103
+ },
104
+ {
105
+ "name": "glam_protocol_program",
106
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
107
+ },
108
+ {
109
+ "name": "system_program",
110
+ "address": "11111111111111111111111111111111"
111
+ },
112
+ {
113
+ "name": "bs_auth",
114
+ "signer": true
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
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
142
+ },
143
+ {
144
+ "name": "token_program"
145
+ },
146
+ {
147
+ "name": "protocol_admin_state"
148
+ },
149
+ {
150
+ "name": "event_authority"
151
+ }
152
+ ],
153
+ "args": [
154
+ {
155
+ "name": "params",
156
+ "type": {
157
+ "defined": {
158
+ "name": "BorrowPrincipalParams"
159
+ }
160
+ }
161
+ }
162
+ ]
163
+ },
164
+ {
165
+ "name": "claim_vault_rewards",
166
+ "docs": [
167
+ "Claim rewards accrued by a Loopscale VaultStake account.",
168
+ "",
169
+ "- Permission: `VaultPermissions::ClaimVaultRewards`.",
170
+ "- Policy: `vault` must be present in `VaultPolicy::vault_allowlist`."
171
+ ],
172
+ "discriminator": [
173
+ 0,
174
+ 152,
175
+ 75,
176
+ 29,
177
+ 195,
178
+ 223,
179
+ 12,
180
+ 101
181
+ ],
182
+ "accounts": [
183
+ {
184
+ "name": "glam_state",
185
+ "writable": true
186
+ },
187
+ {
188
+ "name": "glam_vault",
189
+ "writable": true,
190
+ "pda": {
191
+ "seeds": [
192
+ {
193
+ "kind": "const",
194
+ "value": [
195
+ 118,
196
+ 97,
197
+ 117,
198
+ 108,
199
+ 116
200
+ ]
201
+ },
202
+ {
203
+ "kind": "account",
204
+ "path": "glam_state"
205
+ }
206
+ ],
207
+ "program": {
208
+ "kind": "account",
209
+ "path": "glam_protocol_program"
210
+ }
211
+ }
212
+ },
213
+ {
214
+ "name": "glam_signer",
215
+ "writable": true,
216
+ "signer": true
217
+ },
218
+ {
219
+ "name": "integration_authority",
220
+ "pda": {
221
+ "seeds": [
222
+ {
223
+ "kind": "const",
224
+ "value": [
225
+ 105,
226
+ 110,
227
+ 116,
228
+ 101,
229
+ 103,
230
+ 114,
231
+ 97,
232
+ 116,
233
+ 105,
234
+ 111,
235
+ 110,
236
+ 45,
237
+ 97,
238
+ 117,
239
+ 116,
240
+ 104,
241
+ 111,
242
+ 114,
243
+ 105,
244
+ 116,
245
+ 121
246
+ ]
247
+ }
248
+ ]
249
+ }
250
+ },
251
+ {
252
+ "name": "cpi_program",
253
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
254
+ },
255
+ {
256
+ "name": "glam_protocol_program",
257
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
258
+ },
259
+ {
260
+ "name": "system_program",
261
+ "address": "11111111111111111111111111111111"
262
+ },
263
+ {
264
+ "name": "bs_auth",
265
+ "signer": true
266
+ },
267
+ {
268
+ "name": "vault"
269
+ },
270
+ {
271
+ "name": "vault_rewards_info",
272
+ "writable": true
273
+ },
274
+ {
275
+ "name": "user_rewards_info",
276
+ "writable": true
277
+ },
278
+ {
279
+ "name": "stake_account",
280
+ "writable": true
281
+ },
282
+ {
283
+ "name": "associated_token_program",
284
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
285
+ },
286
+ {
287
+ "name": "protocol_admin_state"
288
+ },
289
+ {
290
+ "name": "event_authority"
291
+ }
292
+ ],
293
+ "args": [
294
+ {
295
+ "name": "mints",
296
+ "type": {
297
+ "vec": "pubkey"
298
+ }
299
+ }
300
+ ]
301
+ },
302
+ {
303
+ "name": "close_loan",
304
+ "docs": [
305
+ "Close an existing Loopscale loan PDA.",
306
+ "",
307
+ "- Permission: `BorrowPermissions::CloseLoan`."
308
+ ],
309
+ "discriminator": [
310
+ 96,
311
+ 114,
312
+ 111,
313
+ 204,
314
+ 149,
315
+ 228,
316
+ 235,
317
+ 124
318
+ ],
319
+ "accounts": [
320
+ {
321
+ "name": "glam_state",
322
+ "writable": true
323
+ },
324
+ {
325
+ "name": "glam_vault",
326
+ "writable": true,
327
+ "pda": {
328
+ "seeds": [
329
+ {
330
+ "kind": "const",
331
+ "value": [
332
+ 118,
333
+ 97,
334
+ 117,
335
+ 108,
336
+ 116
337
+ ]
338
+ },
339
+ {
340
+ "kind": "account",
341
+ "path": "glam_state"
342
+ }
343
+ ],
344
+ "program": {
345
+ "kind": "account",
346
+ "path": "glam_protocol_program"
347
+ }
348
+ }
349
+ },
350
+ {
351
+ "name": "glam_signer",
352
+ "writable": true,
353
+ "signer": true
354
+ },
355
+ {
356
+ "name": "integration_authority",
357
+ "pda": {
358
+ "seeds": [
359
+ {
360
+ "kind": "const",
361
+ "value": [
362
+ 105,
363
+ 110,
364
+ 116,
365
+ 101,
366
+ 103,
367
+ 114,
368
+ 97,
369
+ 116,
370
+ 105,
371
+ 111,
372
+ 110,
373
+ 45,
374
+ 97,
375
+ 117,
376
+ 116,
377
+ 104,
378
+ 111,
379
+ 114,
380
+ 105,
381
+ 116,
382
+ 121
383
+ ]
384
+ }
385
+ ]
386
+ }
387
+ },
388
+ {
389
+ "name": "cpi_program",
390
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
391
+ },
392
+ {
393
+ "name": "glam_protocol_program",
394
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
395
+ },
396
+ {
397
+ "name": "system_program",
398
+ "address": "11111111111111111111111111111111"
399
+ },
400
+ {
401
+ "name": "bs_auth",
402
+ "signer": true
403
+ },
404
+ {
405
+ "name": "loan",
406
+ "writable": true
407
+ },
408
+ {
409
+ "name": "protocol_admin_state"
410
+ },
411
+ {
412
+ "name": "event_authority"
413
+ }
414
+ ],
415
+ "args": []
416
+ },
417
+ {
418
+ "name": "close_strategy",
419
+ "docs": [
420
+ "Close a Loopscale lender strategy account.",
421
+ "",
422
+ "- Permission: `LendingPermissions::CloseStrategy`."
423
+ ],
424
+ "discriminator": [
425
+ 56,
426
+ 247,
427
+ 170,
428
+ 246,
429
+ 89,
430
+ 221,
431
+ 134,
432
+ 200
433
+ ],
434
+ "accounts": [
435
+ {
436
+ "name": "glam_state",
437
+ "writable": true
438
+ },
439
+ {
440
+ "name": "glam_vault",
441
+ "writable": true,
442
+ "pda": {
443
+ "seeds": [
444
+ {
445
+ "kind": "const",
446
+ "value": [
447
+ 118,
448
+ 97,
449
+ 117,
450
+ 108,
451
+ 116
452
+ ]
453
+ },
454
+ {
455
+ "kind": "account",
456
+ "path": "glam_state"
457
+ }
458
+ ],
459
+ "program": {
460
+ "kind": "account",
461
+ "path": "glam_protocol_program"
462
+ }
463
+ }
464
+ },
465
+ {
466
+ "name": "glam_signer",
467
+ "writable": true,
468
+ "signer": true
469
+ },
470
+ {
471
+ "name": "integration_authority",
472
+ "pda": {
473
+ "seeds": [
474
+ {
475
+ "kind": "const",
476
+ "value": [
477
+ 105,
478
+ 110,
479
+ 116,
480
+ 101,
481
+ 103,
482
+ 114,
483
+ 97,
484
+ 116,
485
+ 105,
486
+ 111,
487
+ 110,
488
+ 45,
489
+ 97,
490
+ 117,
491
+ 116,
492
+ 104,
493
+ 111,
494
+ 114,
495
+ 105,
496
+ 116,
497
+ 121
498
+ ]
499
+ }
500
+ ]
501
+ }
502
+ },
503
+ {
504
+ "name": "cpi_program",
505
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
506
+ },
507
+ {
508
+ "name": "glam_protocol_program",
509
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
510
+ },
511
+ {
512
+ "name": "system_program",
513
+ "address": "11111111111111111111111111111111"
514
+ },
515
+ {
516
+ "name": "bs_auth",
517
+ "signer": true
518
+ },
519
+ {
520
+ "name": "strategy",
521
+ "writable": true
522
+ },
523
+ {
524
+ "name": "principal_mint"
525
+ },
526
+ {
527
+ "name": "token_program"
528
+ },
529
+ {
530
+ "name": "associated_token_program",
531
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
532
+ },
533
+ {
534
+ "name": "protocol_admin_state"
535
+ },
536
+ {
537
+ "name": "event_authority"
538
+ }
539
+ ],
540
+ "args": []
541
+ },
542
+ {
543
+ "name": "create_loan",
544
+ "docs": [
545
+ "Create a new Loopscale loan PDA owned by the GLAM vault.",
546
+ "",
547
+ "- Permission: `BorrowPermissions::CreateLoan`."
548
+ ],
549
+ "discriminator": [
550
+ 166,
551
+ 131,
552
+ 118,
553
+ 219,
554
+ 138,
555
+ 218,
556
+ 206,
557
+ 140
558
+ ],
559
+ "accounts": [
560
+ {
561
+ "name": "glam_state",
562
+ "writable": true
563
+ },
564
+ {
565
+ "name": "glam_vault",
566
+ "writable": true,
567
+ "pda": {
568
+ "seeds": [
569
+ {
570
+ "kind": "const",
571
+ "value": [
572
+ 118,
573
+ 97,
574
+ 117,
575
+ 108,
576
+ 116
577
+ ]
578
+ },
579
+ {
580
+ "kind": "account",
581
+ "path": "glam_state"
582
+ }
583
+ ],
584
+ "program": {
585
+ "kind": "account",
586
+ "path": "glam_protocol_program"
587
+ }
588
+ }
589
+ },
590
+ {
591
+ "name": "glam_signer",
592
+ "writable": true,
593
+ "signer": true
594
+ },
595
+ {
596
+ "name": "integration_authority",
597
+ "pda": {
598
+ "seeds": [
599
+ {
600
+ "kind": "const",
601
+ "value": [
602
+ 105,
603
+ 110,
604
+ 116,
605
+ 101,
606
+ 103,
607
+ 114,
608
+ 97,
609
+ 116,
610
+ 105,
611
+ 111,
612
+ 110,
613
+ 45,
614
+ 97,
615
+ 117,
616
+ 116,
617
+ 104,
618
+ 111,
619
+ 114,
620
+ 105,
621
+ 116,
622
+ 121
623
+ ]
624
+ }
625
+ ]
626
+ }
627
+ },
628
+ {
629
+ "name": "cpi_program",
630
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
631
+ },
632
+ {
633
+ "name": "glam_protocol_program",
634
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
635
+ },
636
+ {
637
+ "name": "system_program",
638
+ "address": "11111111111111111111111111111111"
639
+ },
640
+ {
641
+ "name": "bs_auth",
642
+ "signer": true
643
+ },
644
+ {
645
+ "name": "loan",
646
+ "writable": true
647
+ },
648
+ {
649
+ "name": "protocol_admin_state"
650
+ },
651
+ {
652
+ "name": "event_authority"
653
+ }
654
+ ],
655
+ "args": [
656
+ {
657
+ "name": "params",
658
+ "type": {
659
+ "defined": {
660
+ "name": "CreateLoanParams"
661
+ }
662
+ }
663
+ }
664
+ ]
665
+ },
666
+ {
667
+ "name": "create_strategy",
668
+ "docs": [
669
+ "Create a new Loopscale lender strategy owned by the GLAM vault.",
670
+ "",
671
+ "- Permission: `LendingPermissions::CreateStrategy`.",
672
+ "- Policy:",
673
+ "- `principal_mint` must be present in `LendingPolicy::principal_allowlist`.",
674
+ "- If `market_information` has a `LendingPolicy::market_policies` entry,",
675
+ "advanced per-market lending limits are enforced.",
676
+ "- `params.lender` must equal the GLAM vault."
677
+ ],
678
+ "discriminator": [
679
+ 152,
680
+ 160,
681
+ 107,
682
+ 148,
683
+ 245,
684
+ 190,
685
+ 127,
686
+ 224
687
+ ],
688
+ "accounts": [
689
+ {
690
+ "name": "glam_state",
691
+ "writable": true
692
+ },
693
+ {
694
+ "name": "glam_vault",
695
+ "writable": true,
696
+ "pda": {
697
+ "seeds": [
698
+ {
699
+ "kind": "const",
700
+ "value": [
701
+ 118,
702
+ 97,
703
+ 117,
704
+ 108,
705
+ 116
706
+ ]
707
+ },
708
+ {
709
+ "kind": "account",
710
+ "path": "glam_state"
711
+ }
712
+ ],
713
+ "program": {
714
+ "kind": "account",
715
+ "path": "glam_protocol_program"
716
+ }
717
+ }
718
+ },
719
+ {
720
+ "name": "glam_signer",
721
+ "writable": true,
722
+ "signer": true
723
+ },
724
+ {
725
+ "name": "integration_authority",
726
+ "pda": {
727
+ "seeds": [
728
+ {
729
+ "kind": "const",
730
+ "value": [
731
+ 105,
732
+ 110,
733
+ 116,
734
+ 101,
735
+ 103,
736
+ 114,
737
+ 97,
738
+ 116,
739
+ 105,
740
+ 111,
741
+ 110,
742
+ 45,
743
+ 97,
744
+ 117,
745
+ 116,
746
+ 104,
747
+ 111,
748
+ 114,
749
+ 105,
750
+ 116,
751
+ 121
752
+ ]
753
+ }
754
+ ]
755
+ }
756
+ },
757
+ {
758
+ "name": "cpi_program",
759
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
760
+ },
761
+ {
762
+ "name": "glam_protocol_program",
763
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
764
+ },
765
+ {
766
+ "name": "system_program",
767
+ "address": "11111111111111111111111111111111"
768
+ },
769
+ {
770
+ "name": "bs_auth",
771
+ "signer": true
772
+ },
773
+ {
774
+ "name": "nonce",
775
+ "signer": true
776
+ },
777
+ {
778
+ "name": "strategy",
779
+ "writable": true
780
+ },
781
+ {
782
+ "name": "market_information"
783
+ },
784
+ {
785
+ "name": "principal_mint"
786
+ },
787
+ {
788
+ "name": "protocol_admin_state"
789
+ },
790
+ {
791
+ "name": "event_authority"
792
+ }
793
+ ],
794
+ "args": [
795
+ {
796
+ "name": "params",
797
+ "type": {
798
+ "defined": {
799
+ "name": "CreateStrategyParams"
800
+ }
801
+ }
802
+ }
803
+ ]
804
+ },
805
+ {
806
+ "name": "deposit_collateral",
807
+ "docs": [
808
+ "Deposit collateral into a Loopscale loan.",
809
+ "",
810
+ "- Permission: `BorrowPermissions::DepositCollateral`.",
811
+ "- Policy:",
812
+ "- `deposit_mint` must be present in `BorrowPolicy::collateral_allowlist`."
813
+ ],
814
+ "discriminator": [
815
+ 156,
816
+ 131,
817
+ 142,
818
+ 116,
819
+ 146,
820
+ 247,
821
+ 162,
822
+ 120
823
+ ],
824
+ "accounts": [
825
+ {
826
+ "name": "glam_state",
827
+ "writable": true
828
+ },
829
+ {
830
+ "name": "glam_vault",
831
+ "writable": true,
832
+ "pda": {
833
+ "seeds": [
834
+ {
835
+ "kind": "const",
836
+ "value": [
837
+ 118,
838
+ 97,
839
+ 117,
840
+ 108,
841
+ 116
842
+ ]
843
+ },
844
+ {
845
+ "kind": "account",
846
+ "path": "glam_state"
847
+ }
848
+ ],
849
+ "program": {
850
+ "kind": "account",
851
+ "path": "glam_protocol_program"
852
+ }
853
+ }
854
+ },
855
+ {
856
+ "name": "glam_signer",
857
+ "writable": true,
858
+ "signer": true
859
+ },
860
+ {
861
+ "name": "integration_authority",
862
+ "pda": {
863
+ "seeds": [
864
+ {
865
+ "kind": "const",
866
+ "value": [
867
+ 105,
868
+ 110,
869
+ 116,
870
+ 101,
871
+ 103,
872
+ 114,
873
+ 97,
874
+ 116,
875
+ 105,
876
+ 111,
877
+ 110,
878
+ 45,
879
+ 97,
880
+ 117,
881
+ 116,
882
+ 104,
883
+ 111,
884
+ 114,
885
+ 105,
886
+ 116,
887
+ 121
888
+ ]
889
+ }
890
+ ]
891
+ }
892
+ },
893
+ {
894
+ "name": "cpi_program",
895
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
896
+ },
897
+ {
898
+ "name": "glam_protocol_program",
899
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
900
+ },
901
+ {
902
+ "name": "system_program",
903
+ "address": "11111111111111111111111111111111"
904
+ },
905
+ {
906
+ "name": "bs_auth",
907
+ "signer": true
908
+ },
909
+ {
910
+ "name": "loan",
911
+ "writable": true
912
+ },
913
+ {
914
+ "name": "borrower_collateral_ta",
915
+ "writable": true
916
+ },
917
+ {
918
+ "name": "loan_collateral_ta",
919
+ "writable": true
920
+ },
921
+ {
922
+ "name": "deposit_mint"
923
+ },
924
+ {
925
+ "name": "asset_identifier"
926
+ },
927
+ {
928
+ "name": "token_program"
929
+ },
930
+ {
931
+ "name": "associated_token_program",
932
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
933
+ },
934
+ {
935
+ "name": "protocol_admin_state"
936
+ },
937
+ {
938
+ "name": "event_authority"
939
+ }
940
+ ],
941
+ "args": [
942
+ {
943
+ "name": "params",
944
+ "type": {
945
+ "defined": {
946
+ "name": "DepositCollateralParams"
947
+ }
948
+ }
949
+ }
950
+ ]
951
+ },
952
+ {
953
+ "name": "deposit_strategy",
954
+ "docs": [
955
+ "Deposit principal liquidity into a Loopscale lender strategy.",
956
+ "",
957
+ "- Permission: `LendingPermissions::DepositStrategy`.",
958
+ "- Policy:",
959
+ "- `principal_mint` must be present in `LendingPolicy::principal_allowlist`.",
960
+ "- If `market_information` has a `LendingPolicy::market_policies` entry,",
961
+ "advanced per-market lending limits are enforced."
962
+ ],
963
+ "discriminator": [
964
+ 246,
965
+ 82,
966
+ 57,
967
+ 226,
968
+ 131,
969
+ 222,
970
+ 253,
971
+ 249
972
+ ],
973
+ "accounts": [
974
+ {
975
+ "name": "glam_state",
976
+ "writable": true
977
+ },
978
+ {
979
+ "name": "glam_vault",
980
+ "writable": true,
981
+ "pda": {
982
+ "seeds": [
983
+ {
984
+ "kind": "const",
985
+ "value": [
986
+ 118,
987
+ 97,
988
+ 117,
989
+ 108,
990
+ 116
991
+ ]
992
+ },
993
+ {
994
+ "kind": "account",
995
+ "path": "glam_state"
996
+ }
997
+ ],
998
+ "program": {
999
+ "kind": "account",
1000
+ "path": "glam_protocol_program"
1001
+ }
1002
+ }
1003
+ },
1004
+ {
1005
+ "name": "glam_signer",
1006
+ "writable": true,
1007
+ "signer": true
1008
+ },
1009
+ {
1010
+ "name": "integration_authority",
1011
+ "pda": {
1012
+ "seeds": [
1013
+ {
1014
+ "kind": "const",
1015
+ "value": [
1016
+ 105,
1017
+ 110,
1018
+ 116,
1019
+ 101,
1020
+ 103,
1021
+ 114,
1022
+ 97,
1023
+ 116,
1024
+ 105,
1025
+ 111,
1026
+ 110,
1027
+ 45,
1028
+ 97,
1029
+ 117,
1030
+ 116,
1031
+ 104,
1032
+ 111,
1033
+ 114,
1034
+ 105,
1035
+ 116,
1036
+ 121
1037
+ ]
1038
+ }
1039
+ ]
1040
+ }
1041
+ },
1042
+ {
1043
+ "name": "cpi_program",
1044
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
1045
+ },
1046
+ {
1047
+ "name": "glam_protocol_program",
1048
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1049
+ },
1050
+ {
1051
+ "name": "system_program",
1052
+ "address": "11111111111111111111111111111111"
1053
+ },
1054
+ {
1055
+ "name": "bs_auth",
1056
+ "signer": true
1057
+ },
1058
+ {
1059
+ "name": "strategy",
1060
+ "writable": true
1061
+ },
1062
+ {
1063
+ "name": "principal_mint"
1064
+ },
1065
+ {
1066
+ "name": "market_information"
1067
+ },
1068
+ {
1069
+ "name": "lender_ta",
1070
+ "writable": true
1071
+ },
1072
+ {
1073
+ "name": "strategy_ta",
1074
+ "writable": true
1075
+ },
1076
+ {
1077
+ "name": "token_program"
1078
+ },
1079
+ {
1080
+ "name": "associated_token_program",
1081
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1082
+ },
1083
+ {
1084
+ "name": "protocol_admin_state"
1085
+ },
1086
+ {
1087
+ "name": "event_authority"
1088
+ }
1089
+ ],
1090
+ "args": [
1091
+ {
1092
+ "name": "amount",
1093
+ "type": "u64"
1094
+ }
1095
+ ]
1096
+ },
1097
+ {
1098
+ "name": "deposit_user_vault",
1099
+ "docs": [
1100
+ "Deposit principal into a Loopscale user vault and receive Token-2022 LP tokens.",
1101
+ "",
1102
+ "- Permission: `VaultPermissions::DepositUserVault`.",
1103
+ "- Policy: `vault` must be present in `VaultPolicy::vault_allowlist`."
1104
+ ],
1105
+ "discriminator": [
1106
+ 204,
1107
+ 190,
1108
+ 182,
1109
+ 224,
1110
+ 15,
1111
+ 219,
1112
+ 247,
1113
+ 121
1114
+ ],
1115
+ "accounts": [
1116
+ {
1117
+ "name": "glam_state",
1118
+ "writable": true
1119
+ },
1120
+ {
1121
+ "name": "glam_vault",
1122
+ "writable": true,
1123
+ "pda": {
1124
+ "seeds": [
1125
+ {
1126
+ "kind": "const",
1127
+ "value": [
1128
+ 118,
1129
+ 97,
1130
+ 117,
1131
+ 108,
1132
+ 116
1133
+ ]
1134
+ },
1135
+ {
1136
+ "kind": "account",
1137
+ "path": "glam_state"
1138
+ }
1139
+ ],
1140
+ "program": {
1141
+ "kind": "account",
1142
+ "path": "glam_protocol_program"
1143
+ }
1144
+ }
1145
+ },
1146
+ {
1147
+ "name": "glam_signer",
1148
+ "writable": true,
1149
+ "signer": true
1150
+ },
1151
+ {
1152
+ "name": "integration_authority",
1153
+ "pda": {
1154
+ "seeds": [
1155
+ {
1156
+ "kind": "const",
1157
+ "value": [
1158
+ 105,
1159
+ 110,
1160
+ 116,
1161
+ 101,
1162
+ 103,
1163
+ 114,
1164
+ 97,
1165
+ 116,
1166
+ 105,
1167
+ 111,
1168
+ 110,
1169
+ 45,
1170
+ 97,
1171
+ 117,
1172
+ 116,
1173
+ 104,
1174
+ 111,
1175
+ 114,
1176
+ 105,
1177
+ 116,
1178
+ 121
1179
+ ]
1180
+ }
1181
+ ]
1182
+ }
1183
+ },
1184
+ {
1185
+ "name": "cpi_program",
1186
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
1187
+ },
1188
+ {
1189
+ "name": "glam_protocol_program",
1190
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1191
+ },
1192
+ {
1193
+ "name": "system_program",
1194
+ "address": "11111111111111111111111111111111"
1195
+ },
1196
+ {
1197
+ "name": "bs_auth",
1198
+ "signer": true
1199
+ },
1200
+ {
1201
+ "name": "vault",
1202
+ "writable": true
1203
+ },
1204
+ {
1205
+ "name": "strategy",
1206
+ "writable": true
1207
+ },
1208
+ {
1209
+ "name": "market_information"
1210
+ },
1211
+ {
1212
+ "name": "lp_mint",
1213
+ "writable": true
1214
+ },
1215
+ {
1216
+ "name": "user_lp_ta",
1217
+ "writable": true
1218
+ },
1219
+ {
1220
+ "name": "user_principal_ta",
1221
+ "writable": true
1222
+ },
1223
+ {
1224
+ "name": "strategy_principal_ta",
1225
+ "writable": true
1226
+ },
1227
+ {
1228
+ "name": "principal_mint"
1229
+ },
1230
+ {
1231
+ "name": "principal_token_program"
1232
+ },
1233
+ {
1234
+ "name": "token_2022_program",
1235
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
1236
+ },
1237
+ {
1238
+ "name": "associated_token_program",
1239
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1240
+ },
1241
+ {
1242
+ "name": "protocol_admin_state"
1243
+ },
1244
+ {
1245
+ "name": "event_authority"
1246
+ }
1247
+ ],
1248
+ "args": [
1249
+ {
1250
+ "name": "params",
1251
+ "type": {
1252
+ "defined": {
1253
+ "name": "LpParams"
1254
+ }
1255
+ }
1256
+ }
1257
+ ]
1258
+ },
1259
+ {
1260
+ "name": "repay_principal",
1261
+ "docs": [
1262
+ "Repay principal on a Loopscale loan.",
1263
+ "",
1264
+ "- Permission: `BorrowPermissions::RepayPrincipal`."
1265
+ ],
1266
+ "discriminator": [
1267
+ 229,
1268
+ 67,
1269
+ 83,
1270
+ 65,
1271
+ 77,
1272
+ 84,
1273
+ 80,
1274
+ 141
1275
+ ],
1276
+ "accounts": [
1277
+ {
1278
+ "name": "glam_state",
1279
+ "writable": true
1280
+ },
1281
+ {
1282
+ "name": "glam_vault",
1283
+ "writable": true,
1284
+ "pda": {
1285
+ "seeds": [
1286
+ {
1287
+ "kind": "const",
1288
+ "value": [
1289
+ 118,
1290
+ 97,
1291
+ 117,
1292
+ 108,
1293
+ 116
1294
+ ]
1295
+ },
1296
+ {
1297
+ "kind": "account",
1298
+ "path": "glam_state"
1299
+ }
1300
+ ],
1301
+ "program": {
1302
+ "kind": "account",
1303
+ "path": "glam_protocol_program"
1304
+ }
1305
+ }
1306
+ },
1307
+ {
1308
+ "name": "glam_signer",
1309
+ "writable": true,
1310
+ "signer": true
1311
+ },
1312
+ {
1313
+ "name": "integration_authority",
1314
+ "pda": {
1315
+ "seeds": [
1316
+ {
1317
+ "kind": "const",
1318
+ "value": [
1319
+ 105,
1320
+ 110,
1321
+ 116,
1322
+ 101,
1323
+ 103,
1324
+ 114,
1325
+ 97,
1326
+ 116,
1327
+ 105,
1328
+ 111,
1329
+ 110,
1330
+ 45,
1331
+ 97,
1332
+ 117,
1333
+ 116,
1334
+ 104,
1335
+ 111,
1336
+ 114,
1337
+ 105,
1338
+ 116,
1339
+ 121
1340
+ ]
1341
+ }
1342
+ ]
1343
+ }
1344
+ },
1345
+ {
1346
+ "name": "cpi_program",
1347
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
1348
+ },
1349
+ {
1350
+ "name": "glam_protocol_program",
1351
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1352
+ },
1353
+ {
1354
+ "name": "system_program",
1355
+ "address": "11111111111111111111111111111111"
1356
+ },
1357
+ {
1358
+ "name": "bs_auth",
1359
+ "signer": true
1360
+ },
1361
+ {
1362
+ "name": "loan",
1363
+ "writable": true
1364
+ },
1365
+ {
1366
+ "name": "strategy",
1367
+ "writable": true
1368
+ },
1369
+ {
1370
+ "name": "market_information",
1371
+ "writable": true
1372
+ },
1373
+ {
1374
+ "name": "principal_mint"
1375
+ },
1376
+ {
1377
+ "name": "borrower_ta",
1378
+ "writable": true
1379
+ },
1380
+ {
1381
+ "name": "strategy_ta",
1382
+ "writable": true
1383
+ },
1384
+ {
1385
+ "name": "associated_token_program",
1386
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1387
+ },
1388
+ {
1389
+ "name": "token_program"
1390
+ },
1391
+ {
1392
+ "name": "protocol_admin_state"
1393
+ },
1394
+ {
1395
+ "name": "event_authority"
1396
+ }
1397
+ ],
1398
+ "args": [
1399
+ {
1400
+ "name": "params",
1401
+ "type": {
1402
+ "defined": {
1403
+ "name": "RepayPrincipalParams"
1404
+ }
1405
+ }
1406
+ }
1407
+ ]
1408
+ },
1409
+ {
1410
+ "name": "sell_ledger",
1411
+ "docs": [
1412
+ "Sell a loan ledger from one strategy to another.",
1413
+ "",
1414
+ "- Permission: `LendingPermissions::SellLedger`.",
1415
+ "- Policy:",
1416
+ "- `principal_mint` must be present in `LendingPolicy::principal_allowlist`.",
1417
+ "- If the new strategy market account has a `LendingPolicy::market_policies` entry,",
1418
+ "advanced exposure limits are enforced."
1419
+ ],
1420
+ "discriminator": [
1421
+ 55,
1422
+ 17,
1423
+ 153,
1424
+ 148,
1425
+ 120,
1426
+ 242,
1427
+ 80,
1428
+ 5
1429
+ ],
1430
+ "accounts": [
1431
+ {
1432
+ "name": "glam_state",
1433
+ "writable": true
1434
+ },
1435
+ {
1436
+ "name": "glam_vault",
1437
+ "writable": true,
1438
+ "pda": {
1439
+ "seeds": [
1440
+ {
1441
+ "kind": "const",
1442
+ "value": [
1443
+ 118,
1444
+ 97,
1445
+ 117,
1446
+ 108,
1447
+ 116
1448
+ ]
1449
+ },
1450
+ {
1451
+ "kind": "account",
1452
+ "path": "glam_state"
1453
+ }
1454
+ ],
1455
+ "program": {
1456
+ "kind": "account",
1457
+ "path": "glam_protocol_program"
1458
+ }
1459
+ }
1460
+ },
1461
+ {
1462
+ "name": "glam_signer",
1463
+ "writable": true,
1464
+ "signer": true
1465
+ },
1466
+ {
1467
+ "name": "integration_authority",
1468
+ "pda": {
1469
+ "seeds": [
1470
+ {
1471
+ "kind": "const",
1472
+ "value": [
1473
+ 105,
1474
+ 110,
1475
+ 116,
1476
+ 101,
1477
+ 103,
1478
+ 114,
1479
+ 97,
1480
+ 116,
1481
+ 105,
1482
+ 111,
1483
+ 110,
1484
+ 45,
1485
+ 97,
1486
+ 117,
1487
+ 116,
1488
+ 104,
1489
+ 111,
1490
+ 114,
1491
+ 105,
1492
+ 116,
1493
+ 121
1494
+ ]
1495
+ }
1496
+ ]
1497
+ }
1498
+ },
1499
+ {
1500
+ "name": "cpi_program",
1501
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
1502
+ },
1503
+ {
1504
+ "name": "glam_protocol_program",
1505
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1506
+ },
1507
+ {
1508
+ "name": "system_program",
1509
+ "address": "11111111111111111111111111111111"
1510
+ },
1511
+ {
1512
+ "name": "bs_auth",
1513
+ "signer": true
1514
+ },
1515
+ {
1516
+ "name": "loan",
1517
+ "writable": true
1518
+ },
1519
+ {
1520
+ "name": "new_strategy_ta",
1521
+ "writable": true
1522
+ },
1523
+ {
1524
+ "name": "lender_auth_ta",
1525
+ "writable": true
1526
+ },
1527
+ {
1528
+ "name": "old_strategy",
1529
+ "writable": true
1530
+ },
1531
+ {
1532
+ "name": "new_strategy",
1533
+ "writable": true
1534
+ },
1535
+ {
1536
+ "name": "old_strategy_market_information",
1537
+ "writable": true
1538
+ },
1539
+ {
1540
+ "name": "new_strategy_market_information",
1541
+ "writable": true
1542
+ },
1543
+ {
1544
+ "name": "principal_mint"
1545
+ },
1546
+ {
1547
+ "name": "token_program"
1548
+ },
1549
+ {
1550
+ "name": "associated_token_program",
1551
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1552
+ },
1553
+ {
1554
+ "name": "user_vault"
1555
+ },
1556
+ {
1557
+ "name": "old_strategy_ta"
1558
+ },
1559
+ {
1560
+ "name": "protocol_admin_state"
1561
+ },
1562
+ {
1563
+ "name": "event_authority"
1564
+ }
1565
+ ],
1566
+ "args": [
1567
+ {
1568
+ "name": "params",
1569
+ "type": {
1570
+ "defined": {
1571
+ "name": "SellLedgerParams"
1572
+ }
1573
+ }
1574
+ }
1575
+ ]
1576
+ },
1577
+ {
1578
+ "name": "set_borrow_policy",
1579
+ "docs": [
1580
+ "Set the Loopscale borrow policy (collateral allowlist and market policies).",
1581
+ "",
1582
+ "- Permission: `BorrowPermissions::SetPolicy`."
1583
+ ],
1584
+ "discriminator": [
1585
+ 199,
1586
+ 94,
1587
+ 106,
1588
+ 205,
1589
+ 150,
1590
+ 227,
1591
+ 206,
1592
+ 68
1593
+ ],
1594
+ "accounts": [
1595
+ {
1596
+ "name": "glam_state",
1597
+ "writable": true
1598
+ },
1599
+ {
1600
+ "name": "glam_signer",
1601
+ "writable": true,
1602
+ "signer": true
1603
+ },
1604
+ {
1605
+ "name": "glam_protocol_program",
1606
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1607
+ },
1608
+ {
1609
+ "name": "integration_program",
1610
+ "address": "G1NTLoPS5orMCxgFjzNDE5H6c3AbxiU1DgqCJBaJ1pfM"
1611
+ },
1612
+ {
1613
+ "name": "integration_authority",
1614
+ "pda": {
1615
+ "seeds": [
1616
+ {
1617
+ "kind": "const",
1618
+ "value": [
1619
+ 105,
1620
+ 110,
1621
+ 116,
1622
+ 101,
1623
+ 103,
1624
+ 114,
1625
+ 97,
1626
+ 116,
1627
+ 105,
1628
+ 111,
1629
+ 110,
1630
+ 45,
1631
+ 97,
1632
+ 117,
1633
+ 116,
1634
+ 104,
1635
+ 111,
1636
+ 114,
1637
+ 105,
1638
+ 116,
1639
+ 121
1640
+ ]
1641
+ }
1642
+ ]
1643
+ }
1644
+ }
1645
+ ],
1646
+ "args": [
1647
+ {
1648
+ "name": "policy",
1649
+ "type": {
1650
+ "defined": {
1651
+ "name": "BorrowPolicy"
1652
+ }
1653
+ }
1654
+ }
1655
+ ]
1656
+ },
1657
+ {
1658
+ "name": "set_lending_policy",
1659
+ "docs": [
1660
+ "Set the Loopscale lending policy (allowlists, market policies, and sell-ledger limits).",
1661
+ "",
1662
+ "- Permission: `LendingPermissions::SetPolicy`."
1663
+ ],
1664
+ "discriminator": [
1665
+ 226,
1666
+ 185,
1667
+ 23,
1668
+ 3,
1669
+ 113,
1670
+ 88,
1671
+ 118,
1672
+ 176
1673
+ ],
1674
+ "accounts": [
1675
+ {
1676
+ "name": "glam_state",
1677
+ "writable": true
1678
+ },
1679
+ {
1680
+ "name": "glam_signer",
1681
+ "writable": true,
1682
+ "signer": true
1683
+ },
1684
+ {
1685
+ "name": "glam_protocol_program",
1686
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1687
+ },
1688
+ {
1689
+ "name": "integration_program",
1690
+ "address": "G1NTLoPS5orMCxgFjzNDE5H6c3AbxiU1DgqCJBaJ1pfM"
1691
+ },
1692
+ {
1693
+ "name": "integration_authority",
1694
+ "pda": {
1695
+ "seeds": [
1696
+ {
1697
+ "kind": "const",
1698
+ "value": [
1699
+ 105,
1700
+ 110,
1701
+ 116,
1702
+ 101,
1703
+ 103,
1704
+ 114,
1705
+ 97,
1706
+ 116,
1707
+ 105,
1708
+ 111,
1709
+ 110,
1710
+ 45,
1711
+ 97,
1712
+ 117,
1713
+ 116,
1714
+ 104,
1715
+ 111,
1716
+ 114,
1717
+ 105,
1718
+ 116,
1719
+ 121
1720
+ ]
1721
+ }
1722
+ ]
1723
+ }
1724
+ }
1725
+ ],
1726
+ "args": [
1727
+ {
1728
+ "name": "policy",
1729
+ "type": {
1730
+ "defined": {
1731
+ "name": "LendingPolicy"
1732
+ }
1733
+ }
1734
+ }
1735
+ ]
1736
+ },
1737
+ {
1738
+ "name": "set_vault_policy",
1739
+ "docs": [
1740
+ "Set the Loopscale vault policy (vault allowlist).",
1741
+ "",
1742
+ "- Permission: `VaultPermissions::SetPolicy`."
1743
+ ],
1744
+ "discriminator": [
1745
+ 184,
1746
+ 31,
1747
+ 142,
1748
+ 18,
1749
+ 106,
1750
+ 143,
1751
+ 184,
1752
+ 158
1753
+ ],
1754
+ "accounts": [
1755
+ {
1756
+ "name": "glam_state",
1757
+ "writable": true
1758
+ },
1759
+ {
1760
+ "name": "glam_signer",
1761
+ "writable": true,
1762
+ "signer": true
1763
+ },
1764
+ {
1765
+ "name": "glam_protocol_program",
1766
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1767
+ },
1768
+ {
1769
+ "name": "integration_program",
1770
+ "address": "G1NTLoPS5orMCxgFjzNDE5H6c3AbxiU1DgqCJBaJ1pfM"
1771
+ },
1772
+ {
1773
+ "name": "integration_authority",
1774
+ "pda": {
1775
+ "seeds": [
1776
+ {
1777
+ "kind": "const",
1778
+ "value": [
1779
+ 105,
1780
+ 110,
1781
+ 116,
1782
+ 101,
1783
+ 103,
1784
+ 114,
1785
+ 97,
1786
+ 116,
1787
+ 105,
1788
+ 111,
1789
+ 110,
1790
+ 45,
1791
+ 97,
1792
+ 117,
1793
+ 116,
1794
+ 104,
1795
+ 111,
1796
+ 114,
1797
+ 105,
1798
+ 116,
1799
+ 121
1800
+ ]
1801
+ }
1802
+ ]
1803
+ }
1804
+ }
1805
+ ],
1806
+ "args": [
1807
+ {
1808
+ "name": "policy",
1809
+ "type": {
1810
+ "defined": {
1811
+ "name": "VaultPolicy"
1812
+ }
1813
+ }
1814
+ }
1815
+ ]
1816
+ },
1817
+ {
1818
+ "name": "stake_user_vault_lp",
1819
+ "docs": [
1820
+ "Stake Loopscale user vault LP tokens into a VaultStake account.",
1821
+ "",
1822
+ "- Permission: `VaultPermissions::StakeUserVaultLp`.",
1823
+ "- Policy: `vault` must be present in `VaultPolicy::vault_allowlist`."
1824
+ ],
1825
+ "discriminator": [
1826
+ 114,
1827
+ 132,
1828
+ 194,
1829
+ 209,
1830
+ 208,
1831
+ 149,
1832
+ 43,
1833
+ 136
1834
+ ],
1835
+ "accounts": [
1836
+ {
1837
+ "name": "glam_state",
1838
+ "writable": true
1839
+ },
1840
+ {
1841
+ "name": "glam_vault",
1842
+ "writable": true,
1843
+ "pda": {
1844
+ "seeds": [
1845
+ {
1846
+ "kind": "const",
1847
+ "value": [
1848
+ 118,
1849
+ 97,
1850
+ 117,
1851
+ 108,
1852
+ 116
1853
+ ]
1854
+ },
1855
+ {
1856
+ "kind": "account",
1857
+ "path": "glam_state"
1858
+ }
1859
+ ],
1860
+ "program": {
1861
+ "kind": "account",
1862
+ "path": "glam_protocol_program"
1863
+ }
1864
+ }
1865
+ },
1866
+ {
1867
+ "name": "glam_signer",
1868
+ "writable": true,
1869
+ "signer": true
1870
+ },
1871
+ {
1872
+ "name": "integration_authority",
1873
+ "pda": {
1874
+ "seeds": [
1875
+ {
1876
+ "kind": "const",
1877
+ "value": [
1878
+ 105,
1879
+ 110,
1880
+ 116,
1881
+ 101,
1882
+ 103,
1883
+ 114,
1884
+ 97,
1885
+ 116,
1886
+ 105,
1887
+ 111,
1888
+ 110,
1889
+ 45,
1890
+ 97,
1891
+ 117,
1892
+ 116,
1893
+ 104,
1894
+ 111,
1895
+ 114,
1896
+ 105,
1897
+ 116,
1898
+ 121
1899
+ ]
1900
+ }
1901
+ ]
1902
+ }
1903
+ },
1904
+ {
1905
+ "name": "cpi_program",
1906
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
1907
+ },
1908
+ {
1909
+ "name": "glam_protocol_program",
1910
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1911
+ },
1912
+ {
1913
+ "name": "system_program",
1914
+ "address": "11111111111111111111111111111111"
1915
+ },
1916
+ {
1917
+ "name": "bs_auth",
1918
+ "signer": true
1919
+ },
1920
+ {
1921
+ "name": "nonce",
1922
+ "signer": true
1923
+ },
1924
+ {
1925
+ "name": "vault",
1926
+ "writable": true
1927
+ },
1928
+ {
1929
+ "name": "vault_stake",
1930
+ "writable": true
1931
+ },
1932
+ {
1933
+ "name": "lp_mint"
1934
+ },
1935
+ {
1936
+ "name": "user_lp_ta",
1937
+ "writable": true
1938
+ },
1939
+ {
1940
+ "name": "vault_stake_lp_ta",
1941
+ "writable": true
1942
+ },
1943
+ {
1944
+ "name": "vault_rewards_info",
1945
+ "writable": true
1946
+ },
1947
+ {
1948
+ "name": "user_rewards_info",
1949
+ "writable": true
1950
+ },
1951
+ {
1952
+ "name": "token_program",
1953
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
1954
+ },
1955
+ {
1956
+ "name": "associated_token_program",
1957
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1958
+ },
1959
+ {
1960
+ "name": "protocol_admin_state"
1961
+ },
1962
+ {
1963
+ "name": "event_authority"
1964
+ }
1965
+ ],
1966
+ "args": [
1967
+ {
1968
+ "name": "params",
1969
+ "type": {
1970
+ "defined": {
1971
+ "name": "VaultStakeParams"
1972
+ }
1973
+ }
1974
+ }
1975
+ ]
1976
+ },
1977
+ {
1978
+ "name": "unstake_user_vault_lp",
1979
+ "docs": [
1980
+ "Unstake Loopscale user vault LP tokens from a VaultStake account.",
1981
+ "",
1982
+ "- Permission: `VaultPermissions::UnstakeUserVaultLp`.",
1983
+ "- Policy: `vault` must be present in `VaultPolicy::vault_allowlist`."
1984
+ ],
1985
+ "discriminator": [
1986
+ 83,
1987
+ 78,
1988
+ 230,
1989
+ 123,
1990
+ 226,
1991
+ 40,
1992
+ 158,
1993
+ 97
1994
+ ],
1995
+ "accounts": [
1996
+ {
1997
+ "name": "glam_state",
1998
+ "writable": true
1999
+ },
2000
+ {
2001
+ "name": "glam_vault",
2002
+ "writable": true,
2003
+ "pda": {
2004
+ "seeds": [
2005
+ {
2006
+ "kind": "const",
2007
+ "value": [
2008
+ 118,
2009
+ 97,
2010
+ 117,
2011
+ 108,
2012
+ 116
2013
+ ]
2014
+ },
2015
+ {
2016
+ "kind": "account",
2017
+ "path": "glam_state"
2018
+ }
2019
+ ],
2020
+ "program": {
2021
+ "kind": "account",
2022
+ "path": "glam_protocol_program"
2023
+ }
2024
+ }
2025
+ },
2026
+ {
2027
+ "name": "glam_signer",
2028
+ "writable": true,
2029
+ "signer": true
2030
+ },
2031
+ {
2032
+ "name": "integration_authority",
2033
+ "pda": {
2034
+ "seeds": [
2035
+ {
2036
+ "kind": "const",
2037
+ "value": [
2038
+ 105,
2039
+ 110,
2040
+ 116,
2041
+ 101,
2042
+ 103,
2043
+ 114,
2044
+ 97,
2045
+ 116,
2046
+ 105,
2047
+ 111,
2048
+ 110,
2049
+ 45,
2050
+ 97,
2051
+ 117,
2052
+ 116,
2053
+ 104,
2054
+ 111,
2055
+ 114,
2056
+ 105,
2057
+ 116,
2058
+ 121
2059
+ ]
2060
+ }
2061
+ ]
2062
+ }
2063
+ },
2064
+ {
2065
+ "name": "cpi_program",
2066
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
2067
+ },
2068
+ {
2069
+ "name": "glam_protocol_program",
2070
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2071
+ },
2072
+ {
2073
+ "name": "system_program",
2074
+ "address": "11111111111111111111111111111111"
2075
+ },
2076
+ {
2077
+ "name": "bs_auth",
2078
+ "signer": true
2079
+ },
2080
+ {
2081
+ "name": "vault",
2082
+ "writable": true
2083
+ },
2084
+ {
2085
+ "name": "lp_mint",
2086
+ "writable": true
2087
+ },
2088
+ {
2089
+ "name": "vault_stake",
2090
+ "writable": true
2091
+ },
2092
+ {
2093
+ "name": "user_lp_ta",
2094
+ "writable": true
2095
+ },
2096
+ {
2097
+ "name": "vault_stake_lp_ta",
2098
+ "writable": true
2099
+ },
2100
+ {
2101
+ "name": "vault_rewards_info",
2102
+ "writable": true
2103
+ },
2104
+ {
2105
+ "name": "user_rewards_info",
2106
+ "writable": true
2107
+ },
2108
+ {
2109
+ "name": "token_program",
2110
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
2111
+ },
2112
+ {
2113
+ "name": "associated_token_program",
2114
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
2115
+ },
2116
+ {
2117
+ "name": "protocol_admin_state"
2118
+ },
2119
+ {
2120
+ "name": "event_authority"
2121
+ }
2122
+ ],
2123
+ "args": [
2124
+ {
2125
+ "name": "params",
2126
+ "type": {
2127
+ "defined": {
2128
+ "name": "VaultUnstakeParams"
2129
+ }
2130
+ }
2131
+ }
2132
+ ]
2133
+ },
2134
+ {
2135
+ "name": "update_strategy",
2136
+ "docs": [
2137
+ "Update a Loopscale lender strategy's terms, caps, and collateral terms.",
2138
+ "",
2139
+ "- Permission: `LendingPermissions::UpdateStrategy`.",
2140
+ "- Policy:",
2141
+ "- The strategy market account must be passed as the first remaining account.",
2142
+ "- `principal_mint` must be present in `LendingPolicy::principal_allowlist`.",
2143
+ "- Collateral term asset identifiers must be present in",
2144
+ "`LendingPolicy::collateral_allowlist`.",
2145
+ "- If the strategy market account has a `LendingPolicy::market_policies` entry,",
2146
+ "advanced per-market lending limits are enforced."
2147
+ ],
2148
+ "discriminator": [
2149
+ 16,
2150
+ 76,
2151
+ 138,
2152
+ 179,
2153
+ 171,
2154
+ 112,
2155
+ 196,
2156
+ 21
2157
+ ],
2158
+ "accounts": [
2159
+ {
2160
+ "name": "glam_state",
2161
+ "writable": true
2162
+ },
2163
+ {
2164
+ "name": "glam_vault",
2165
+ "writable": true,
2166
+ "pda": {
2167
+ "seeds": [
2168
+ {
2169
+ "kind": "const",
2170
+ "value": [
2171
+ 118,
2172
+ 97,
2173
+ 117,
2174
+ 108,
2175
+ 116
2176
+ ]
2177
+ },
2178
+ {
2179
+ "kind": "account",
2180
+ "path": "glam_state"
2181
+ }
2182
+ ],
2183
+ "program": {
2184
+ "kind": "account",
2185
+ "path": "glam_protocol_program"
2186
+ }
2187
+ }
2188
+ },
2189
+ {
2190
+ "name": "glam_signer",
2191
+ "writable": true,
2192
+ "signer": true
2193
+ },
2194
+ {
2195
+ "name": "integration_authority",
2196
+ "pda": {
2197
+ "seeds": [
2198
+ {
2199
+ "kind": "const",
2200
+ "value": [
2201
+ 105,
2202
+ 110,
2203
+ 116,
2204
+ 101,
2205
+ 103,
2206
+ 114,
2207
+ 97,
2208
+ 116,
2209
+ 105,
2210
+ 111,
2211
+ 110,
2212
+ 45,
2213
+ 97,
2214
+ 117,
2215
+ 116,
2216
+ 104,
2217
+ 111,
2218
+ 114,
2219
+ 105,
2220
+ 116,
2221
+ 121
2222
+ ]
2223
+ }
2224
+ ]
2225
+ }
2226
+ },
2227
+ {
2228
+ "name": "cpi_program",
2229
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
2230
+ },
2231
+ {
2232
+ "name": "glam_protocol_program",
2233
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2234
+ },
2235
+ {
2236
+ "name": "system_program",
2237
+ "address": "11111111111111111111111111111111"
2238
+ },
2239
+ {
2240
+ "name": "bs_auth",
2241
+ "signer": true
2242
+ },
2243
+ {
2244
+ "name": "strategy",
2245
+ "writable": true
2246
+ },
2247
+ {
2248
+ "name": "principal_mint"
2249
+ },
2250
+ {
2251
+ "name": "strategy_ta",
2252
+ "writable": true
2253
+ },
2254
+ {
2255
+ "name": "associated_token_program",
2256
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
2257
+ },
2258
+ {
2259
+ "name": "token_program"
2260
+ },
2261
+ {
2262
+ "name": "protocol_admin_state"
2263
+ },
2264
+ {
2265
+ "name": "event_authority"
2266
+ }
2267
+ ],
2268
+ "args": [
2269
+ {
2270
+ "name": "collateral_terms",
2271
+ "type": {
2272
+ "vec": {
2273
+ "defined": {
2274
+ "name": "MultiCollateralTermsUpdateParams"
2275
+ }
2276
+ }
2277
+ }
2278
+ },
2279
+ {
2280
+ "name": "params",
2281
+ "type": {
2282
+ "option": {
2283
+ "defined": {
2284
+ "name": "UpdateStrategyParams"
2285
+ }
2286
+ }
2287
+ }
2288
+ }
2289
+ ]
2290
+ },
2291
+ {
2292
+ "name": "update_weight_matrix",
2293
+ "docs": [
2294
+ "Update the collateral weight matrix on a loan.",
2295
+ "",
2296
+ "- Permission: `BorrowPermissions::UpdateLoan`."
2297
+ ],
2298
+ "discriminator": [
2299
+ 252,
2300
+ 166,
2301
+ 37,
2302
+ 207,
2303
+ 154,
2304
+ 83,
2305
+ 187,
2306
+ 128
2307
+ ],
2308
+ "accounts": [
2309
+ {
2310
+ "name": "glam_state",
2311
+ "writable": true
2312
+ },
2313
+ {
2314
+ "name": "glam_vault",
2315
+ "writable": true,
2316
+ "pda": {
2317
+ "seeds": [
2318
+ {
2319
+ "kind": "const",
2320
+ "value": [
2321
+ 118,
2322
+ 97,
2323
+ 117,
2324
+ 108,
2325
+ 116
2326
+ ]
2327
+ },
2328
+ {
2329
+ "kind": "account",
2330
+ "path": "glam_state"
2331
+ }
2332
+ ],
2333
+ "program": {
2334
+ "kind": "account",
2335
+ "path": "glam_protocol_program"
2336
+ }
2337
+ }
2338
+ },
2339
+ {
2340
+ "name": "glam_signer",
2341
+ "writable": true,
2342
+ "signer": true
2343
+ },
2344
+ {
2345
+ "name": "integration_authority",
2346
+ "pda": {
2347
+ "seeds": [
2348
+ {
2349
+ "kind": "const",
2350
+ "value": [
2351
+ 105,
2352
+ 110,
2353
+ 116,
2354
+ 101,
2355
+ 103,
2356
+ 114,
2357
+ 97,
2358
+ 116,
2359
+ 105,
2360
+ 111,
2361
+ 110,
2362
+ 45,
2363
+ 97,
2364
+ 117,
2365
+ 116,
2366
+ 104,
2367
+ 111,
2368
+ 114,
2369
+ 105,
2370
+ 116,
2371
+ 121
2372
+ ]
2373
+ }
2374
+ ]
2375
+ }
2376
+ },
2377
+ {
2378
+ "name": "cpi_program",
2379
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
2380
+ },
2381
+ {
2382
+ "name": "glam_protocol_program",
2383
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2384
+ },
2385
+ {
2386
+ "name": "system_program",
2387
+ "address": "11111111111111111111111111111111"
2388
+ },
2389
+ {
2390
+ "name": "bs_auth",
2391
+ "signer": true
2392
+ },
2393
+ {
2394
+ "name": "loan",
2395
+ "writable": true
2396
+ },
2397
+ {
2398
+ "name": "protocol_admin_state"
2399
+ }
2400
+ ],
2401
+ "args": [
2402
+ {
2403
+ "name": "params",
2404
+ "type": {
2405
+ "defined": {
2406
+ "name": "UpdateWeightMatrixParams"
2407
+ }
2408
+ }
2409
+ }
2410
+ ]
2411
+ },
2412
+ {
2413
+ "name": "withdraw_collateral",
2414
+ "docs": [
2415
+ "Withdraw collateral from a Loopscale loan.",
2416
+ "",
2417
+ "- Permission: `BorrowPermissions::WithdrawCollateral`."
2418
+ ],
2419
+ "discriminator": [
2420
+ 115,
2421
+ 135,
2422
+ 168,
2423
+ 106,
2424
+ 139,
2425
+ 214,
2426
+ 138,
2427
+ 150
2428
+ ],
2429
+ "accounts": [
2430
+ {
2431
+ "name": "glam_state",
2432
+ "writable": true
2433
+ },
2434
+ {
2435
+ "name": "glam_vault",
2436
+ "writable": true,
2437
+ "pda": {
2438
+ "seeds": [
2439
+ {
2440
+ "kind": "const",
2441
+ "value": [
2442
+ 118,
2443
+ 97,
2444
+ 117,
2445
+ 108,
2446
+ 116
2447
+ ]
2448
+ },
2449
+ {
2450
+ "kind": "account",
2451
+ "path": "glam_state"
2452
+ }
2453
+ ],
2454
+ "program": {
2455
+ "kind": "account",
2456
+ "path": "glam_protocol_program"
2457
+ }
2458
+ }
2459
+ },
2460
+ {
2461
+ "name": "glam_signer",
2462
+ "writable": true,
2463
+ "signer": true
2464
+ },
2465
+ {
2466
+ "name": "integration_authority",
2467
+ "pda": {
2468
+ "seeds": [
2469
+ {
2470
+ "kind": "const",
2471
+ "value": [
2472
+ 105,
2473
+ 110,
2474
+ 116,
2475
+ 101,
2476
+ 103,
2477
+ 114,
2478
+ 97,
2479
+ 116,
2480
+ 105,
2481
+ 111,
2482
+ 110,
2483
+ 45,
2484
+ 97,
2485
+ 117,
2486
+ 116,
2487
+ 104,
2488
+ 111,
2489
+ 114,
2490
+ 105,
2491
+ 116,
2492
+ 121
2493
+ ]
2494
+ }
2495
+ ]
2496
+ }
2497
+ },
2498
+ {
2499
+ "name": "cpi_program",
2500
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
2501
+ },
2502
+ {
2503
+ "name": "glam_protocol_program",
2504
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2505
+ },
2506
+ {
2507
+ "name": "system_program",
2508
+ "address": "11111111111111111111111111111111"
2509
+ },
2510
+ {
2511
+ "name": "bs_auth",
2512
+ "signer": true
2513
+ },
2514
+ {
2515
+ "name": "loan",
2516
+ "writable": true
2517
+ },
2518
+ {
2519
+ "name": "borrower_ta",
2520
+ "writable": true
2521
+ },
2522
+ {
2523
+ "name": "loan_ta",
2524
+ "writable": true
2525
+ },
2526
+ {
2527
+ "name": "asset_mint"
2528
+ },
2529
+ {
2530
+ "name": "token_program"
2531
+ },
2532
+ {
2533
+ "name": "associated_token_program",
2534
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
2535
+ },
2536
+ {
2537
+ "name": "protocol_admin_state"
2538
+ },
2539
+ {
2540
+ "name": "event_authority"
2541
+ }
2542
+ ],
2543
+ "args": [
2544
+ {
2545
+ "name": "params",
2546
+ "type": {
2547
+ "defined": {
2548
+ "name": "WithdrawCollateralParams"
2549
+ }
2550
+ }
2551
+ }
2552
+ ]
2553
+ },
2554
+ {
2555
+ "name": "withdraw_strategy",
2556
+ "docs": [
2557
+ "Withdraw undeployed principal from a Loopscale lender strategy.",
2558
+ "",
2559
+ "- Permission: `LendingPermissions::WithdrawStrategy`."
2560
+ ],
2561
+ "discriminator": [
2562
+ 31,
2563
+ 45,
2564
+ 162,
2565
+ 5,
2566
+ 193,
2567
+ 217,
2568
+ 134,
2569
+ 188
2570
+ ],
2571
+ "accounts": [
2572
+ {
2573
+ "name": "glam_state",
2574
+ "writable": true
2575
+ },
2576
+ {
2577
+ "name": "glam_vault",
2578
+ "writable": true,
2579
+ "pda": {
2580
+ "seeds": [
2581
+ {
2582
+ "kind": "const",
2583
+ "value": [
2584
+ 118,
2585
+ 97,
2586
+ 117,
2587
+ 108,
2588
+ 116
2589
+ ]
2590
+ },
2591
+ {
2592
+ "kind": "account",
2593
+ "path": "glam_state"
2594
+ }
2595
+ ],
2596
+ "program": {
2597
+ "kind": "account",
2598
+ "path": "glam_protocol_program"
2599
+ }
2600
+ }
2601
+ },
2602
+ {
2603
+ "name": "glam_signer",
2604
+ "writable": true,
2605
+ "signer": true
2606
+ },
2607
+ {
2608
+ "name": "integration_authority",
2609
+ "pda": {
2610
+ "seeds": [
2611
+ {
2612
+ "kind": "const",
2613
+ "value": [
2614
+ 105,
2615
+ 110,
2616
+ 116,
2617
+ 101,
2618
+ 103,
2619
+ 114,
2620
+ 97,
2621
+ 116,
2622
+ 105,
2623
+ 111,
2624
+ 110,
2625
+ 45,
2626
+ 97,
2627
+ 117,
2628
+ 116,
2629
+ 104,
2630
+ 111,
2631
+ 114,
2632
+ 105,
2633
+ 116,
2634
+ 121
2635
+ ]
2636
+ }
2637
+ ]
2638
+ }
2639
+ },
2640
+ {
2641
+ "name": "cpi_program",
2642
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
2643
+ },
2644
+ {
2645
+ "name": "glam_protocol_program",
2646
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2647
+ },
2648
+ {
2649
+ "name": "system_program",
2650
+ "address": "11111111111111111111111111111111"
2651
+ },
2652
+ {
2653
+ "name": "bs_auth",
2654
+ "signer": true
2655
+ },
2656
+ {
2657
+ "name": "strategy",
2658
+ "writable": true
2659
+ },
2660
+ {
2661
+ "name": "principal_mint"
2662
+ },
2663
+ {
2664
+ "name": "market_information"
2665
+ },
2666
+ {
2667
+ "name": "lender_ta",
2668
+ "writable": true
2669
+ },
2670
+ {
2671
+ "name": "strategy_ta",
2672
+ "writable": true
2673
+ },
2674
+ {
2675
+ "name": "associated_token_program",
2676
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
2677
+ },
2678
+ {
2679
+ "name": "token_program"
2680
+ },
2681
+ {
2682
+ "name": "protocol_admin_state"
2683
+ },
2684
+ {
2685
+ "name": "event_authority"
2686
+ }
2687
+ ],
2688
+ "args": [
2689
+ {
2690
+ "name": "amount",
2691
+ "type": "u64"
2692
+ },
2693
+ {
2694
+ "name": "withdraw_all",
2695
+ "type": "bool"
2696
+ }
2697
+ ]
2698
+ },
2699
+ {
2700
+ "name": "withdraw_user_vault",
2701
+ "docs": [
2702
+ "Withdraw principal from a Loopscale user vault by burning Token-2022 LP tokens.",
2703
+ "",
2704
+ "- Permission: `VaultPermissions::WithdrawUserVault`.",
2705
+ "- Policy: `vault` must be present in `VaultPolicy::vault_allowlist`."
2706
+ ],
2707
+ "discriminator": [
2708
+ 9,
2709
+ 80,
2710
+ 134,
2711
+ 138,
2712
+ 212,
2713
+ 20,
2714
+ 61,
2715
+ 42
2716
+ ],
2717
+ "accounts": [
2718
+ {
2719
+ "name": "glam_state",
2720
+ "writable": true
2721
+ },
2722
+ {
2723
+ "name": "glam_vault",
2724
+ "writable": true,
2725
+ "pda": {
2726
+ "seeds": [
2727
+ {
2728
+ "kind": "const",
2729
+ "value": [
2730
+ 118,
2731
+ 97,
2732
+ 117,
2733
+ 108,
2734
+ 116
2735
+ ]
2736
+ },
2737
+ {
2738
+ "kind": "account",
2739
+ "path": "glam_state"
2740
+ }
2741
+ ],
2742
+ "program": {
2743
+ "kind": "account",
2744
+ "path": "glam_protocol_program"
2745
+ }
2746
+ }
2747
+ },
2748
+ {
2749
+ "name": "glam_signer",
2750
+ "writable": true,
2751
+ "signer": true
2752
+ },
2753
+ {
2754
+ "name": "integration_authority",
2755
+ "pda": {
2756
+ "seeds": [
2757
+ {
2758
+ "kind": "const",
2759
+ "value": [
2760
+ 105,
2761
+ 110,
2762
+ 116,
2763
+ 101,
2764
+ 103,
2765
+ 114,
2766
+ 97,
2767
+ 116,
2768
+ 105,
2769
+ 111,
2770
+ 110,
2771
+ 45,
2772
+ 97,
2773
+ 117,
2774
+ 116,
2775
+ 104,
2776
+ 111,
2777
+ 114,
2778
+ 105,
2779
+ 116,
2780
+ 121
2781
+ ]
2782
+ }
2783
+ ]
2784
+ }
2785
+ },
2786
+ {
2787
+ "name": "cpi_program",
2788
+ "address": "1oopBoJG58DgkUVKkEzKgyG9dvRmpgeEm1AVjoHkF78"
2789
+ },
2790
+ {
2791
+ "name": "glam_protocol_program",
2792
+ "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2793
+ },
2794
+ {
2795
+ "name": "system_program",
2796
+ "address": "11111111111111111111111111111111"
2797
+ },
2798
+ {
2799
+ "name": "bs_auth",
2800
+ "signer": true
2801
+ },
2802
+ {
2803
+ "name": "vault",
2804
+ "writable": true
2805
+ },
2806
+ {
2807
+ "name": "strategy",
2808
+ "writable": true
2809
+ },
2810
+ {
2811
+ "name": "market_information"
2812
+ },
2813
+ {
2814
+ "name": "lp_mint",
2815
+ "writable": true
2816
+ },
2817
+ {
2818
+ "name": "user_lp_ta",
2819
+ "writable": true
2820
+ },
2821
+ {
2822
+ "name": "user_principal_ta",
2823
+ "writable": true
2824
+ },
2825
+ {
2826
+ "name": "strategy_principal_ta",
2827
+ "writable": true
2828
+ },
2829
+ {
2830
+ "name": "principal_mint"
2831
+ },
2832
+ {
2833
+ "name": "principal_token_program"
2834
+ },
2835
+ {
2836
+ "name": "token_2022_program",
2837
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
2838
+ },
2839
+ {
2840
+ "name": "associated_token_program",
2841
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
2842
+ },
2843
+ {
2844
+ "name": "protocol_admin_state"
2845
+ },
2846
+ {
2847
+ "name": "event_authority"
2848
+ }
2849
+ ],
2850
+ "args": [
2851
+ {
2852
+ "name": "params",
2853
+ "type": {
2854
+ "defined": {
2855
+ "name": "LpParams"
2856
+ }
2857
+ }
2858
+ }
2859
+ ]
2860
+ }
2861
+ ],
2862
+ "accounts": [
2863
+ {
2864
+ "name": "StateAccount",
2865
+ "discriminator": [
2866
+ 142,
2867
+ 247,
2868
+ 54,
2869
+ 95,
2870
+ 85,
2871
+ 133,
2872
+ 249,
2873
+ 103
2874
+ ]
2875
+ }
2876
+ ],
2877
+ "errors": [
2878
+ {
2879
+ "code": 6000,
2880
+ "name": "AutoCloseLoanNotSupported",
2881
+ "msg": "Auto-close loan not supported"
2882
+ },
2883
+ {
2884
+ "code": 6001,
2885
+ "name": "InvalidVaultTokenAccount",
2886
+ "msg": "Vault token account must be the GLAM vault ATA for the expected mint"
2887
+ }
2888
+ ],
2889
+ "types": [
2890
+ {
2891
+ "name": "AccountType",
2892
+ "type": {
2893
+ "kind": "enum",
2894
+ "variants": [
2895
+ {
2896
+ "name": "Vault"
2897
+ },
2898
+ {
2899
+ "name": "TokenizedVault"
2900
+ },
2901
+ {
2902
+ "name": "Mint"
2903
+ },
2904
+ {
2905
+ "name": "SingleAssetVault"
2906
+ }
2907
+ ]
2908
+ }
2909
+ },
2910
+ {
2911
+ "name": "AccruedFees",
2912
+ "type": {
2913
+ "kind": "struct",
2914
+ "fields": [
2915
+ {
2916
+ "name": "vault_subscription_fee",
2917
+ "type": "u128"
2918
+ },
2919
+ {
2920
+ "name": "vault_redemption_fee",
2921
+ "type": "u128"
2922
+ },
2923
+ {
2924
+ "name": "manager_subscription_fee",
2925
+ "type": "u128"
2926
+ },
2927
+ {
2928
+ "name": "manager_redemption_fee",
2929
+ "type": "u128"
2930
+ },
2931
+ {
2932
+ "name": "management_fee",
2933
+ "type": "u128"
2934
+ },
2935
+ {
2936
+ "name": "performance_fee",
2937
+ "type": "u128"
2938
+ },
2939
+ {
2940
+ "name": "protocol_base_fee",
2941
+ "type": "u128"
2942
+ },
2943
+ {
2944
+ "name": "protocol_flow_fee",
2945
+ "type": "u128"
2946
+ }
2947
+ ]
2948
+ }
2949
+ },
2950
+ {
2951
+ "name": "BorrowMarketPolicy",
2952
+ "type": {
2953
+ "kind": "struct",
2954
+ "fields": [
2955
+ {
2956
+ "name": "market",
2957
+ "docs": [
2958
+ "Loopscale market information account this policy applies to."
2959
+ ],
2960
+ "type": "pubkey"
2961
+ },
2962
+ {
2963
+ "name": "max_borrow_amount",
2964
+ "docs": [
2965
+ "Maximum principal amount that may be borrowed in a single instruction.",
2966
+ "A value of zero means no per-instruction borrow is allowed for this market."
2967
+ ],
2968
+ "type": "u64"
2969
+ },
2970
+ {
2971
+ "name": "max_total_borrow_amount",
2972
+ "docs": [
2973
+ "Maximum outstanding principal a single loan may owe in this market.",
2974
+ "Enforced per loan (summed over that loan's ledgers in this market), not",
2975
+ "aggregated across all of the vault's loans in this market. A value of zero",
2976
+ "means no outstanding borrow exposure is allowed for this market."
2977
+ ],
2978
+ "type": "u64"
2979
+ },
2980
+ {
2981
+ "name": "max_ltv_bps",
2982
+ "docs": [
2983
+ "Maximum expected liquidation LTV threshold, in basis points.",
2984
+ "Borrow enforcement compares this to Loopscale's expected LQT values.",
2985
+ "A value of zero means no expected liquidation LTV is allowed for this market."
2986
+ ],
2987
+ "type": "u16"
2988
+ },
2989
+ {
2990
+ "name": "duration_indexes_allowlist",
2991
+ "docs": [
2992
+ "Duration indexes that may be used when borrowing from this market.",
2993
+ "An empty list denies all borrow durations for this market. Index mapping:",
2994
+ "- 0 = 1 day",
2995
+ "- 1 = 1 week",
2996
+ "- 2 = 1 month",
2997
+ "- 3 = 3 months",
2998
+ "- 4 = 1 year"
2999
+ ],
3000
+ "type": "bytes"
3001
+ }
3002
+ ]
3003
+ }
3004
+ },
3005
+ {
3006
+ "name": "BorrowPolicy",
3007
+ "type": {
3008
+ "kind": "struct",
3009
+ "fields": [
3010
+ {
3011
+ "name": "collateral_allowlist",
3012
+ "docs": [
3013
+ "Collateral mints that may be deposited into Loopscale borrow loans."
3014
+ ],
3015
+ "type": {
3016
+ "vec": "pubkey"
3017
+ }
3018
+ },
3019
+ {
3020
+ "name": "principal_allowlist",
3021
+ "docs": [
3022
+ "Principal mints that may be borrowed from Loopscale borrow markets.",
3023
+ "An empty list denies all principal borrows."
3024
+ ],
3025
+ "type": {
3026
+ "vec": "pubkey"
3027
+ }
3028
+ },
3029
+ {
3030
+ "name": "market_policies",
3031
+ "docs": [
3032
+ "Optional per-market risk limits for borrow operations.",
3033
+ "If a market is present here, advanced per-market limits are enforced.",
3034
+ "If absent, borrow operations are governed by the top-level allowlists."
3035
+ ],
3036
+ "type": {
3037
+ "vec": {
3038
+ "defined": {
3039
+ "name": "BorrowMarketPolicy"
3040
+ }
3041
+ }
3042
+ }
3043
+ }
3044
+ ]
3045
+ }
3046
+ },
3047
+ {
3048
+ "name": "BorrowPrincipalParams",
3049
+ "type": {
3050
+ "kind": "struct",
3051
+ "fields": [
3052
+ {
3053
+ "name": "amount",
3054
+ "type": "u64"
3055
+ },
3056
+ {
3057
+ "name": "asset_index_guidance",
3058
+ "type": "bytes"
3059
+ },
3060
+ {
3061
+ "name": "duration",
3062
+ "type": "u8"
3063
+ },
3064
+ {
3065
+ "name": "expected_loan_values",
3066
+ "type": {
3067
+ "defined": {
3068
+ "name": "ExpectedLoanValues"
3069
+ }
3070
+ }
3071
+ },
3072
+ {
3073
+ "name": "skip_sol_unwrap",
3074
+ "type": "bool"
3075
+ }
3076
+ ]
3077
+ }
3078
+ },
3079
+ {
3080
+ "name": "CollateralTermsIndices",
3081
+ "type": {
3082
+ "kind": "struct",
3083
+ "fields": [
3084
+ {
3085
+ "name": "collateral_index",
3086
+ "type": "u8"
3087
+ },
3088
+ {
3089
+ "name": "duration_index",
3090
+ "type": "u8"
3091
+ }
3092
+ ]
3093
+ }
3094
+ },
3095
+ {
3096
+ "name": "CreateLoanParams",
3097
+ "type": {
3098
+ "kind": "struct",
3099
+ "fields": [
3100
+ {
3101
+ "name": "nonce",
3102
+ "type": "u64"
3103
+ }
3104
+ ]
3105
+ }
3106
+ },
3107
+ {
3108
+ "name": "CreateStrategyParams",
3109
+ "type": {
3110
+ "kind": "struct",
3111
+ "fields": [
3112
+ {
3113
+ "name": "lender",
3114
+ "type": "pubkey"
3115
+ },
3116
+ {
3117
+ "name": "origination_cap",
3118
+ "type": "u64"
3119
+ },
3120
+ {
3121
+ "name": "liquidity_buffer",
3122
+ "type": "u64"
3123
+ },
3124
+ {
3125
+ "name": "interest_fee",
3126
+ "type": "u64"
3127
+ },
3128
+ {
3129
+ "name": "origination_fee",
3130
+ "type": "u64"
3131
+ },
3132
+ {
3133
+ "name": "principal_fee",
3134
+ "type": "u64"
3135
+ },
3136
+ {
3137
+ "name": "originations_enabled",
3138
+ "type": "bool"
3139
+ },
3140
+ {
3141
+ "name": "external_yield_source_args",
3142
+ "type": {
3143
+ "option": {
3144
+ "defined": {
3145
+ "name": "ExternalYieldSourceArgs"
3146
+ }
3147
+ }
3148
+ }
3149
+ }
3150
+ ]
3151
+ }
3152
+ },
3153
+ {
3154
+ "name": "CreatedModel",
3155
+ "type": {
3156
+ "kind": "struct",
3157
+ "fields": [
3158
+ {
3159
+ "name": "key",
3160
+ "type": {
3161
+ "array": [
3162
+ "u8",
3163
+ 8
3164
+ ]
3165
+ }
3166
+ },
3167
+ {
3168
+ "name": "created_by",
3169
+ "type": "pubkey"
3170
+ },
3171
+ {
3172
+ "name": "created_at",
3173
+ "type": "i64"
3174
+ }
3175
+ ]
3176
+ }
3177
+ },
3178
+ {
3179
+ "name": "DelegateAcl",
3180
+ "type": {
3181
+ "kind": "struct",
3182
+ "fields": [
3183
+ {
3184
+ "name": "pubkey",
3185
+ "type": "pubkey"
3186
+ },
3187
+ {
3188
+ "name": "integration_permissions",
3189
+ "type": {
3190
+ "vec": {
3191
+ "defined": {
3192
+ "name": "IntegrationPermissions"
3193
+ }
3194
+ }
3195
+ }
3196
+ },
3197
+ {
3198
+ "name": "expires_at",
3199
+ "type": "i64"
3200
+ }
3201
+ ]
3202
+ }
3203
+ },
3204
+ {
3205
+ "name": "DepositCollateralParams",
3206
+ "type": {
3207
+ "kind": "struct",
3208
+ "fields": [
3209
+ {
3210
+ "name": "amount",
3211
+ "type": "u64"
3212
+ },
3213
+ {
3214
+ "name": "asset_type",
3215
+ "type": "u8"
3216
+ },
3217
+ {
3218
+ "name": "asset_identifier",
3219
+ "type": "pubkey"
3220
+ },
3221
+ {
3222
+ "name": "asset_index_guidance",
3223
+ "type": "bytes"
3224
+ }
3225
+ ]
3226
+ }
3227
+ },
3228
+ {
3229
+ "name": "EngineField",
3230
+ "type": {
3231
+ "kind": "struct",
3232
+ "fields": [
3233
+ {
3234
+ "name": "name",
3235
+ "type": {
3236
+ "defined": {
3237
+ "name": "EngineFieldName"
3238
+ }
3239
+ }
3240
+ },
3241
+ {
3242
+ "name": "value",
3243
+ "type": {
3244
+ "defined": {
3245
+ "name": "EngineFieldValue"
3246
+ }
3247
+ }
3248
+ }
3249
+ ]
3250
+ }
3251
+ },
3252
+ {
3253
+ "name": "EngineFieldName",
3254
+ "type": {
3255
+ "kind": "enum",
3256
+ "variants": [
3257
+ {
3258
+ "name": "Owner"
3259
+ },
3260
+ {
3261
+ "name": "PortfolioManagerName"
3262
+ },
3263
+ {
3264
+ "name": "Name"
3265
+ },
3266
+ {
3267
+ "name": "Uri"
3268
+ },
3269
+ {
3270
+ "name": "Assets"
3271
+ },
3272
+ {
3273
+ "name": "DelegateAcls"
3274
+ },
3275
+ {
3276
+ "name": "IntegrationAcls"
3277
+ },
3278
+ {
3279
+ "name": "TimelockDuration"
3280
+ },
3281
+ {
3282
+ "name": "Borrowable"
3283
+ },
3284
+ {
3285
+ "name": "DefaultAccountStateFrozen"
3286
+ },
3287
+ {
3288
+ "name": "PermanentDelegate"
3289
+ },
3290
+ {
3291
+ "name": "NotifyAndSettle"
3292
+ },
3293
+ {
3294
+ "name": "FeeStructure"
3295
+ },
3296
+ {
3297
+ "name": "FeeParams"
3298
+ },
3299
+ {
3300
+ "name": "ClaimableFees"
3301
+ },
3302
+ {
3303
+ "name": "ClaimedFees"
3304
+ },
3305
+ {
3306
+ "name": "OracleConfigs"
3307
+ }
3308
+ ]
3309
+ }
3310
+ },
3311
+ {
3312
+ "name": "EngineFieldValue",
3313
+ "type": {
3314
+ "kind": "enum",
3315
+ "variants": [
3316
+ {
3317
+ "name": "Boolean",
3318
+ "fields": [
3319
+ {
3320
+ "name": "val",
3321
+ "type": "bool"
3322
+ }
3323
+ ]
3324
+ },
3325
+ {
3326
+ "name": "U8",
3327
+ "fields": [
3328
+ {
3329
+ "name": "val",
3330
+ "type": "u8"
3331
+ }
3332
+ ]
3333
+ },
3334
+ {
3335
+ "name": "U32",
3336
+ "fields": [
3337
+ {
3338
+ "name": "val",
3339
+ "type": "u32"
3340
+ }
3341
+ ]
3342
+ },
3343
+ {
3344
+ "name": "U64",
3345
+ "fields": [
3346
+ {
3347
+ "name": "val",
3348
+ "type": "u64"
3349
+ }
3350
+ ]
3351
+ },
3352
+ {
3353
+ "name": "String",
3354
+ "fields": [
3355
+ {
3356
+ "name": "val",
3357
+ "type": "string"
3358
+ }
3359
+ ]
3360
+ },
3361
+ {
3362
+ "name": "Pubkey",
3363
+ "fields": [
3364
+ {
3365
+ "name": "val",
3366
+ "type": "pubkey"
3367
+ }
3368
+ ]
3369
+ },
3370
+ {
3371
+ "name": "VecPubkey",
3372
+ "fields": [
3373
+ {
3374
+ "name": "val",
3375
+ "type": {
3376
+ "vec": "pubkey"
3377
+ }
3378
+ }
3379
+ ]
3380
+ },
3381
+ {
3382
+ "name": "VecU8",
3383
+ "fields": [
3384
+ {
3385
+ "name": "val",
3386
+ "type": "bytes"
3387
+ }
3388
+ ]
3389
+ },
3390
+ {
3391
+ "name": "VecU32",
3392
+ "fields": [
3393
+ {
3394
+ "name": "val",
3395
+ "type": {
3396
+ "vec": "u32"
3397
+ }
3398
+ }
3399
+ ]
3400
+ },
3401
+ {
3402
+ "name": "VecDelegateAcl",
3403
+ "fields": [
3404
+ {
3405
+ "name": "val",
3406
+ "type": {
3407
+ "vec": {
3408
+ "defined": {
3409
+ "name": "DelegateAcl"
3410
+ }
3411
+ }
3412
+ }
3413
+ }
3414
+ ]
3415
+ },
3416
+ {
3417
+ "name": "VecIntegrationAcl",
3418
+ "fields": [
3419
+ {
3420
+ "name": "val",
3421
+ "type": {
3422
+ "vec": {
3423
+ "defined": {
3424
+ "name": "IntegrationAcl"
3425
+ }
3426
+ }
3427
+ }
3428
+ }
3429
+ ]
3430
+ },
3431
+ {
3432
+ "name": "FeeStructure",
3433
+ "fields": [
3434
+ {
3435
+ "name": "val",
3436
+ "type": {
3437
+ "defined": {
3438
+ "name": "FeeStructure"
3439
+ }
3440
+ }
3441
+ }
3442
+ ]
3443
+ },
3444
+ {
3445
+ "name": "FeeParams",
3446
+ "fields": [
3447
+ {
3448
+ "name": "val",
3449
+ "type": {
3450
+ "defined": {
3451
+ "name": "FeeParams"
3452
+ }
3453
+ }
3454
+ }
3455
+ ]
3456
+ },
3457
+ {
3458
+ "name": "AccruedFees",
3459
+ "fields": [
3460
+ {
3461
+ "name": "val",
3462
+ "type": {
3463
+ "defined": {
3464
+ "name": "AccruedFees"
3465
+ }
3466
+ }
3467
+ }
3468
+ ]
3469
+ },
3470
+ {
3471
+ "name": "NotifyAndSettle",
3472
+ "fields": [
3473
+ {
3474
+ "name": "val",
3475
+ "type": {
3476
+ "defined": {
3477
+ "name": "NotifyAndSettle"
3478
+ }
3479
+ }
3480
+ }
3481
+ ]
3482
+ },
3483
+ {
3484
+ "name": "OracleConfigs",
3485
+ "fields": [
3486
+ {
3487
+ "name": "val",
3488
+ "type": {
3489
+ "defined": {
3490
+ "name": "OracleConfigs"
3491
+ }
3492
+ }
3493
+ }
3494
+ ]
3495
+ }
3496
+ ]
3497
+ }
3498
+ },
3499
+ {
3500
+ "name": "EntryExitFees",
3501
+ "type": {
3502
+ "kind": "struct",
3503
+ "fields": [
3504
+ {
3505
+ "name": "subscription_fee_bps",
3506
+ "type": "u16"
3507
+ },
3508
+ {
3509
+ "name": "redemption_fee_bps",
3510
+ "type": "u16"
3511
+ }
3512
+ ]
3513
+ }
3514
+ },
3515
+ {
3516
+ "name": "ExactInParams",
3517
+ "type": {
3518
+ "kind": "struct",
3519
+ "fields": [
3520
+ {
3521
+ "name": "amount_in",
3522
+ "type": "u64"
3523
+ },
3524
+ {
3525
+ "name": "min_amount_out",
3526
+ "type": "u64"
3527
+ }
3528
+ ]
3529
+ }
3530
+ },
3531
+ {
3532
+ "name": "ExactOutParams",
3533
+ "type": {
3534
+ "kind": "struct",
3535
+ "fields": [
3536
+ {
3537
+ "name": "amount_out",
3538
+ "type": "u64"
3539
+ },
3540
+ {
3541
+ "name": "max_amount_in",
3542
+ "type": "u64"
3543
+ }
3544
+ ]
3545
+ }
3546
+ },
3547
+ {
3548
+ "name": "ExpectedLoanValues",
3549
+ "type": {
3550
+ "kind": "struct",
3551
+ "fields": [
3552
+ {
3553
+ "name": "expected_apy",
3554
+ "type": "u64"
3555
+ },
3556
+ {
3557
+ "name": "expected_lqt",
3558
+ "type": {
3559
+ "array": [
3560
+ "u32",
3561
+ 5
3562
+ ]
3563
+ }
3564
+ }
3565
+ ]
3566
+ }
3567
+ },
3568
+ {
3569
+ "name": "ExternalYieldSourceArgs",
3570
+ "type": {
3571
+ "kind": "struct",
3572
+ "fields": [
3573
+ {
3574
+ "name": "new_external_yield_source",
3575
+ "type": "u8"
3576
+ },
3577
+ {
3578
+ "name": "external_yield_vault",
3579
+ "type": "pubkey"
3580
+ }
3581
+ ]
3582
+ }
3583
+ },
3584
+ {
3585
+ "name": "FeeParams",
3586
+ "type": {
3587
+ "kind": "struct",
3588
+ "fields": [
3589
+ {
3590
+ "name": "year_in_seconds",
3591
+ "type": "u32"
3592
+ },
3593
+ {
3594
+ "name": "pa_high_water_mark",
3595
+ "type": "i128"
3596
+ },
3597
+ {
3598
+ "name": "pa_last_nav",
3599
+ "type": "i128"
3600
+ },
3601
+ {
3602
+ "name": "last_aum",
3603
+ "type": "i128"
3604
+ },
3605
+ {
3606
+ "name": "last_performance_fee_crystallized",
3607
+ "type": "i64"
3608
+ },
3609
+ {
3610
+ "name": "last_management_fee_crystallized",
3611
+ "type": "i64"
3612
+ },
3613
+ {
3614
+ "name": "last_protocol_fee_crystallized",
3615
+ "type": "i64"
3616
+ }
3617
+ ]
3618
+ }
3619
+ },
3620
+ {
3621
+ "name": "FeeStructure",
3622
+ "type": {
3623
+ "kind": "struct",
3624
+ "fields": [
3625
+ {
3626
+ "name": "vault",
3627
+ "type": {
3628
+ "defined": {
3629
+ "name": "EntryExitFees"
3630
+ }
3631
+ }
3632
+ },
3633
+ {
3634
+ "name": "manager",
3635
+ "type": {
3636
+ "defined": {
3637
+ "name": "EntryExitFees"
3638
+ }
3639
+ }
3640
+ },
3641
+ {
3642
+ "name": "management",
3643
+ "type": {
3644
+ "defined": {
3645
+ "name": "ManagementFee"
3646
+ }
3647
+ }
3648
+ },
3649
+ {
3650
+ "name": "performance",
3651
+ "type": {
3652
+ "defined": {
3653
+ "name": "PerformanceFee"
3654
+ }
3655
+ }
3656
+ },
3657
+ {
3658
+ "name": "protocol",
3659
+ "type": {
3660
+ "defined": {
3661
+ "name": "ProtocolFees"
3662
+ }
3663
+ }
3664
+ }
3665
+ ]
3666
+ }
3667
+ },
3668
+ {
3669
+ "name": "HurdleType",
3670
+ "type": {
3671
+ "kind": "enum",
3672
+ "variants": [
3673
+ {
3674
+ "name": "Hard"
3675
+ },
3676
+ {
3677
+ "name": "Soft"
3678
+ }
3679
+ ]
3680
+ }
3681
+ },
3682
+ {
3683
+ "name": "IntegrationAcl",
3684
+ "docs": [
3685
+ "An integration program can have multiple protocols supported.",
3686
+ "Enabled protocols are stored in a bitmask, and each protocol can have its own policy."
3687
+ ],
3688
+ "type": {
3689
+ "kind": "struct",
3690
+ "fields": [
3691
+ {
3692
+ "name": "integration_program",
3693
+ "type": "pubkey"
3694
+ },
3695
+ {
3696
+ "name": "protocols_bitmask",
3697
+ "type": "u16"
3698
+ },
3699
+ {
3700
+ "name": "protocol_policies",
3701
+ "type": {
3702
+ "vec": {
3703
+ "defined": {
3704
+ "name": "ProtocolPolicy"
3705
+ }
3706
+ }
3707
+ }
3708
+ }
3709
+ ]
3710
+ }
3711
+ },
3712
+ {
3713
+ "name": "IntegrationPermissions",
3714
+ "docs": [
3715
+ "Stores delegate permissions for an integration program."
3716
+ ],
3717
+ "type": {
3718
+ "kind": "struct",
3719
+ "fields": [
3720
+ {
3721
+ "name": "integration_program",
3722
+ "type": "pubkey"
3723
+ },
3724
+ {
3725
+ "name": "protocol_permissions",
3726
+ "type": {
3727
+ "vec": {
3728
+ "defined": {
3729
+ "name": "ProtocolPermissions"
3730
+ }
3731
+ }
3732
+ }
3733
+ }
3734
+ ]
3735
+ }
3736
+ },
3737
+ {
3738
+ "name": "LendingMarketPolicy",
3739
+ "type": {
3740
+ "kind": "struct",
3741
+ "fields": [
3742
+ {
3743
+ "name": "market",
3744
+ "docs": [
3745
+ "Loopscale market information account this policy applies to."
3746
+ ],
3747
+ "type": "pubkey"
3748
+ },
3749
+ {
3750
+ "name": "max_deposit_amount",
3751
+ "docs": [
3752
+ "Maximum principal amount that may be deposited in a single instruction.",
3753
+ "A value of zero means no per-instruction deposit is allowed for this market."
3754
+ ],
3755
+ "type": "u64"
3756
+ },
3757
+ {
3758
+ "name": "max_total_deposit_amount",
3759
+ "docs": [
3760
+ "Maximum principal exposure (token balance + deployed amount) a single",
3761
+ "strategy may hold in this market. Enforced per strategy, not aggregated",
3762
+ "across all of the vault's strategies in this market. A value of zero means",
3763
+ "no lending exposure is allowed for this market."
3764
+ ],
3765
+ "type": "u64"
3766
+ },
3767
+ {
3768
+ "name": "min_loan_apy_cbps",
3769
+ "docs": [
3770
+ "Minimum accepted loan APY, in centibasis points, for strategy terms in this market."
3771
+ ],
3772
+ "type": "u32"
3773
+ },
3774
+ {
3775
+ "name": "max_ltv_bps",
3776
+ "docs": [
3777
+ "Maximum accepted borrower loan-to-value, in basis points, for strategy terms in this market.",
3778
+ "A value of zero means no borrower LTV is allowed for this market."
3779
+ ],
3780
+ "type": "u16"
3781
+ },
3782
+ {
3783
+ "name": "duration_indexes_allowlist",
3784
+ "docs": [
3785
+ "Duration indexes that may be offered by vault-owned strategies in this market.",
3786
+ "An empty list denies all lending durations for this market. Index mapping:",
3787
+ "- 0 = 1 day",
3788
+ "- 1 = 1 week",
3789
+ "- 2 = 1 month",
3790
+ "- 3 = 3 months",
3791
+ "- 4 = 1 year"
3792
+ ],
3793
+ "type": "bytes"
3794
+ },
3795
+ {
3796
+ "name": "collateral_asset_allowlist",
3797
+ "docs": [
3798
+ "Collateral asset identifiers that vault-owned strategies may accept in this market.",
3799
+ "An empty list denies all strategy collateral assets for this market."
3800
+ ],
3801
+ "type": {
3802
+ "vec": "pubkey"
3803
+ }
3804
+ }
3805
+ ]
3806
+ }
3807
+ },
3808
+ {
3809
+ "name": "LendingPolicy",
3810
+ "type": {
3811
+ "kind": "struct",
3812
+ "fields": [
3813
+ {
3814
+ "name": "principal_allowlist",
3815
+ "docs": [
3816
+ "Principal mints that may be lent into Loopscale strategies.",
3817
+ "An empty list denies all strategy creation, updates, deposits, and ledger sales."
3818
+ ],
3819
+ "type": {
3820
+ "vec": "pubkey"
3821
+ }
3822
+ },
3823
+ {
3824
+ "name": "collateral_allowlist",
3825
+ "docs": [
3826
+ "Collateral asset identifiers that vault-owned strategies may accept.",
3827
+ "An empty list denies all strategy collateral assets."
3828
+ ],
3829
+ "type": {
3830
+ "vec": "pubkey"
3831
+ }
3832
+ },
3833
+ {
3834
+ "name": "market_policies",
3835
+ "docs": [
3836
+ "Optional per-market risk limits for strategy creation, updates, deposits, and ledger sales.",
3837
+ "If a market is present here, advanced per-market limits are enforced.",
3838
+ "If absent, lending operations are governed by top-level allowlists,",
3839
+ "permission checks, and sell-ledger limits."
3840
+ ],
3841
+ "type": {
3842
+ "vec": {
3843
+ "defined": {
3844
+ "name": "LendingMarketPolicy"
3845
+ }
3846
+ }
3847
+ }
3848
+ },
3849
+ {
3850
+ "name": "sell_ledger_policy",
3851
+ "docs": [
3852
+ "Risk limits for selling Loopscale loan ledgers."
3853
+ ],
3854
+ "type": {
3855
+ "defined": {
3856
+ "name": "SellLedgerPolicy"
3857
+ }
3858
+ }
3859
+ }
3860
+ ]
3861
+ }
3862
+ },
3863
+ {
3864
+ "name": "LpParams",
3865
+ "type": {
3866
+ "kind": "enum",
3867
+ "variants": [
3868
+ {
3869
+ "name": "ExactIn",
3870
+ "fields": [
3871
+ {
3872
+ "defined": {
3873
+ "name": "ExactInParams"
3874
+ }
3875
+ }
3876
+ ]
3877
+ },
3878
+ {
3879
+ "name": "ExactOut",
3880
+ "fields": [
3881
+ {
3882
+ "defined": {
3883
+ "name": "ExactOutParams"
3884
+ }
3885
+ }
3886
+ ]
3887
+ }
3888
+ ]
3889
+ }
3890
+ },
3891
+ {
3892
+ "name": "ManagementFee",
3893
+ "type": {
3894
+ "kind": "struct",
3895
+ "fields": [
3896
+ {
3897
+ "name": "fee_bps",
3898
+ "type": "u16"
3899
+ }
3900
+ ]
3901
+ }
3902
+ },
3903
+ {
3904
+ "name": "MultiCollateralTermsUpdateParams",
3905
+ "type": {
3906
+ "kind": "struct",
3907
+ "fields": [
3908
+ {
3909
+ "name": "apy",
3910
+ "type": "u64"
3911
+ },
3912
+ {
3913
+ "name": "indices",
3914
+ "type": {
3915
+ "vec": {
3916
+ "defined": {
3917
+ "name": "CollateralTermsIndices"
3918
+ }
3919
+ }
3920
+ }
3921
+ }
3922
+ ]
3923
+ }
3924
+ },
3925
+ {
3926
+ "name": "NoticePeriodType",
3927
+ "type": {
3928
+ "kind": "enum",
3929
+ "variants": [
3930
+ {
3931
+ "name": "Hard"
3932
+ },
3933
+ {
3934
+ "name": "Soft"
3935
+ }
3936
+ ]
3937
+ }
3938
+ },
3939
+ {
3940
+ "name": "NotifyAndSettle",
3941
+ "type": {
3942
+ "kind": "struct",
3943
+ "fields": [
3944
+ {
3945
+ "name": "model",
3946
+ "type": {
3947
+ "defined": {
3948
+ "name": "ValuationModel"
3949
+ }
3950
+ }
3951
+ },
3952
+ {
3953
+ "name": "permissionless_fulfillment",
3954
+ "type": "bool"
3955
+ },
3956
+ {
3957
+ "name": "subscribe_notice_period_type",
3958
+ "type": {
3959
+ "defined": {
3960
+ "name": "NoticePeriodType"
3961
+ }
3962
+ }
3963
+ },
3964
+ {
3965
+ "name": "subscribe_notice_period",
3966
+ "type": "u64"
3967
+ },
3968
+ {
3969
+ "name": "subscribe_settlement_period",
3970
+ "type": "u64"
3971
+ },
3972
+ {
3973
+ "name": "subscribe_cancellation_window",
3974
+ "type": "u64"
3975
+ },
3976
+ {
3977
+ "name": "redeem_notice_period_type",
3978
+ "type": {
3979
+ "defined": {
3980
+ "name": "NoticePeriodType"
3981
+ }
3982
+ }
3983
+ },
3984
+ {
3985
+ "name": "redeem_notice_period",
3986
+ "type": "u64"
3987
+ },
3988
+ {
3989
+ "name": "redeem_settlement_period",
3990
+ "type": "u64"
3991
+ },
3992
+ {
3993
+ "name": "redeem_cancellation_window",
3994
+ "type": "u64"
3995
+ },
3996
+ {
3997
+ "name": "time_unit",
3998
+ "type": {
3999
+ "defined": {
4000
+ "name": "TimeUnit"
4001
+ }
4002
+ }
4003
+ },
4004
+ {
4005
+ "name": "_padding",
4006
+ "type": {
4007
+ "array": [
4008
+ "u8",
4009
+ 3
4010
+ ]
4011
+ }
4012
+ }
4013
+ ]
4014
+ }
4015
+ },
4016
+ {
4017
+ "name": "OracleConfigs",
4018
+ "docs": [
4019
+ "Vault-specific oracle configs. If available, these configs are preferred over the global config."
4020
+ ],
4021
+ "type": {
4022
+ "kind": "struct",
4023
+ "fields": [
4024
+ {
4025
+ "name": "max_ages_seconds",
4026
+ "type": {
4027
+ "vec": {
4028
+ "array": [
4029
+ "u16",
4030
+ 2
4031
+ ]
4032
+ }
4033
+ }
4034
+ },
4035
+ {
4036
+ "name": "padding",
4037
+ "type": {
4038
+ "array": [
4039
+ "u8",
4040
+ 12
4041
+ ]
4042
+ }
4043
+ }
4044
+ ]
4045
+ }
4046
+ },
4047
+ {
4048
+ "name": "PerformanceFee",
4049
+ "type": {
4050
+ "kind": "struct",
4051
+ "fields": [
4052
+ {
4053
+ "name": "fee_bps",
4054
+ "type": "u16"
4055
+ },
4056
+ {
4057
+ "name": "hurdle_rate_bps",
4058
+ "type": "u16"
4059
+ },
4060
+ {
4061
+ "name": "hurdle_type",
4062
+ "type": {
4063
+ "defined": {
4064
+ "name": "HurdleType"
4065
+ }
4066
+ }
4067
+ }
4068
+ ]
4069
+ }
4070
+ },
4071
+ {
4072
+ "name": "PricedProtocol",
4073
+ "type": {
4074
+ "kind": "struct",
4075
+ "fields": [
4076
+ {
4077
+ "name": "rent",
4078
+ "type": "u64"
4079
+ },
4080
+ {
4081
+ "name": "amount",
4082
+ "type": "i128"
4083
+ },
4084
+ {
4085
+ "name": "decimals",
4086
+ "type": "u8"
4087
+ },
4088
+ {
4089
+ "name": "last_updated_slot",
4090
+ "type": "u64"
4091
+ },
4092
+ {
4093
+ "name": "integration_program",
4094
+ "type": "pubkey"
4095
+ },
4096
+ {
4097
+ "name": "protocol_bitflag",
4098
+ "type": "u16"
4099
+ },
4100
+ {
4101
+ "name": "positions",
4102
+ "type": {
4103
+ "vec": "pubkey"
4104
+ }
4105
+ }
4106
+ ]
4107
+ }
4108
+ },
4109
+ {
4110
+ "name": "ProtocolFees",
4111
+ "type": {
4112
+ "kind": "struct",
4113
+ "fields": [
4114
+ {
4115
+ "name": "base_fee_bps",
4116
+ "type": "u16"
4117
+ },
4118
+ {
4119
+ "name": "flow_fee_bps",
4120
+ "type": "u16"
4121
+ }
4122
+ ]
4123
+ }
4124
+ },
4125
+ {
4126
+ "name": "ProtocolPermissions",
4127
+ "docs": [
4128
+ "Represents a delegate's permissions for a specific protocol"
4129
+ ],
4130
+ "type": {
4131
+ "kind": "struct",
4132
+ "fields": [
4133
+ {
4134
+ "name": "protocol_bitflag",
4135
+ "type": "u16"
4136
+ },
4137
+ {
4138
+ "name": "permissions_bitmask",
4139
+ "type": "u64"
4140
+ }
4141
+ ]
4142
+ }
4143
+ },
4144
+ {
4145
+ "name": "ProtocolPolicy",
4146
+ "docs": [
4147
+ "Stores policy data for an integrated protocol.",
4148
+ "Integration programs serialize/deserialize this data."
4149
+ ],
4150
+ "type": {
4151
+ "kind": "struct",
4152
+ "fields": [
4153
+ {
4154
+ "name": "protocol_bitflag",
4155
+ "type": "u16"
4156
+ },
4157
+ {
4158
+ "name": "data",
4159
+ "type": "bytes"
4160
+ }
4161
+ ]
4162
+ }
4163
+ },
4164
+ {
4165
+ "name": "RepayPrincipalParams",
4166
+ "type": {
4167
+ "kind": "struct",
4168
+ "fields": [
4169
+ {
4170
+ "name": "amount",
4171
+ "type": "u64"
4172
+ },
4173
+ {
4174
+ "name": "ledger_index",
4175
+ "type": "u8"
4176
+ },
4177
+ {
4178
+ "name": "repay_all",
4179
+ "type": "bool"
4180
+ }
4181
+ ]
4182
+ }
4183
+ },
4184
+ {
4185
+ "name": "SellLedgerParams",
4186
+ "type": {
4187
+ "kind": "struct",
4188
+ "fields": [
4189
+ {
4190
+ "name": "ledger_index",
4191
+ "type": "u8"
4192
+ },
4193
+ {
4194
+ "name": "expected_sale_price",
4195
+ "type": "u64"
4196
+ },
4197
+ {
4198
+ "name": "asset_index_guidance",
4199
+ "type": "bytes"
4200
+ }
4201
+ ]
4202
+ }
4203
+ },
4204
+ {
4205
+ "name": "SellLedgerPolicy",
4206
+ "type": {
4207
+ "kind": "struct",
4208
+ "fields": [
4209
+ {
4210
+ "name": "max_discount_bps",
4211
+ "docs": [
4212
+ "Maximum discount from the ledger's expected value, in basis points.",
4213
+ "A value of zero requires no discount."
4214
+ ],
4215
+ "type": "u16"
4216
+ },
4217
+ {
4218
+ "name": "max_slippage_bps",
4219
+ "docs": [
4220
+ "Maximum tolerated slippage while selling a ledger, in basis points.",
4221
+ "A value of zero allows no slippage."
4222
+ ],
4223
+ "type": "u16"
4224
+ }
4225
+ ]
4226
+ }
4227
+ },
4228
+ {
4229
+ "name": "StateAccount",
4230
+ "type": {
4231
+ "kind": "struct",
4232
+ "fields": [
4233
+ {
4234
+ "name": "account_type",
4235
+ "type": {
4236
+ "defined": {
4237
+ "name": "AccountType"
4238
+ }
4239
+ }
4240
+ },
4241
+ {
4242
+ "name": "enabled",
4243
+ "type": "bool"
4244
+ },
4245
+ {
4246
+ "name": "vault",
4247
+ "type": "pubkey"
4248
+ },
4249
+ {
4250
+ "name": "owner",
4251
+ "type": "pubkey"
4252
+ },
4253
+ {
4254
+ "name": "portfolio_manager_name",
4255
+ "type": {
4256
+ "array": [
4257
+ "u8",
4258
+ 32
4259
+ ]
4260
+ }
4261
+ },
4262
+ {
4263
+ "name": "created",
4264
+ "type": {
4265
+ "defined": {
4266
+ "name": "CreatedModel"
4267
+ }
4268
+ }
4269
+ },
4270
+ {
4271
+ "name": "base_asset_mint",
4272
+ "type": "pubkey"
4273
+ },
4274
+ {
4275
+ "name": "base_asset_decimals",
4276
+ "type": "u8"
4277
+ },
4278
+ {
4279
+ "name": "base_asset_token_program",
4280
+ "type": "u8"
4281
+ },
4282
+ {
4283
+ "name": "name",
4284
+ "type": {
4285
+ "array": [
4286
+ "u8",
4287
+ 32
4288
+ ]
4289
+ }
4290
+ },
4291
+ {
4292
+ "name": "timelock_duration",
4293
+ "type": "u32"
4294
+ },
4295
+ {
4296
+ "name": "timelock_expires_at",
4297
+ "type": "u64"
4298
+ },
4299
+ {
4300
+ "name": "mint",
4301
+ "type": "pubkey"
4302
+ },
4303
+ {
4304
+ "name": "assets",
4305
+ "type": {
4306
+ "vec": "pubkey"
4307
+ }
4308
+ },
4309
+ {
4310
+ "name": "integration_acls",
4311
+ "type": {
4312
+ "vec": {
4313
+ "defined": {
4314
+ "name": "IntegrationAcl"
4315
+ }
4316
+ }
4317
+ }
4318
+ },
4319
+ {
4320
+ "name": "delegate_acls",
4321
+ "type": {
4322
+ "vec": {
4323
+ "defined": {
4324
+ "name": "DelegateAcl"
4325
+ }
4326
+ }
4327
+ }
4328
+ },
4329
+ {
4330
+ "name": "external_positions",
4331
+ "type": {
4332
+ "vec": "pubkey"
4333
+ }
4334
+ },
4335
+ {
4336
+ "name": "priced_protocols",
4337
+ "type": {
4338
+ "vec": {
4339
+ "defined": {
4340
+ "name": "PricedProtocol"
4341
+ }
4342
+ }
4343
+ }
4344
+ },
4345
+ {
4346
+ "name": "params",
4347
+ "type": {
4348
+ "vec": {
4349
+ "vec": {
4350
+ "defined": {
4351
+ "name": "EngineField"
4352
+ }
4353
+ }
4354
+ }
4355
+ }
4356
+ }
4357
+ ]
4358
+ }
4359
+ },
4360
+ {
4361
+ "name": "TimeUnit",
4362
+ "type": {
4363
+ "kind": "enum",
4364
+ "variants": [
4365
+ {
4366
+ "name": "Second"
4367
+ },
4368
+ {
4369
+ "name": "Slot"
4370
+ }
4371
+ ]
4372
+ }
4373
+ },
4374
+ {
4375
+ "name": "UpdateStrategyParams",
4376
+ "type": {
4377
+ "kind": "struct",
4378
+ "fields": [
4379
+ {
4380
+ "name": "originations_enabled",
4381
+ "type": {
4382
+ "option": "bool"
4383
+ }
4384
+ },
4385
+ {
4386
+ "name": "liquidity_buffer",
4387
+ "type": {
4388
+ "option": "u64"
4389
+ }
4390
+ },
4391
+ {
4392
+ "name": "interest_fee",
4393
+ "type": {
4394
+ "option": "u64"
4395
+ }
4396
+ },
4397
+ {
4398
+ "name": "origination_fee",
4399
+ "type": {
4400
+ "option": "u64"
4401
+ }
4402
+ },
4403
+ {
4404
+ "name": "principal_fee",
4405
+ "type": {
4406
+ "option": "u64"
4407
+ }
4408
+ },
4409
+ {
4410
+ "name": "origination_cap",
4411
+ "type": {
4412
+ "option": "u64"
4413
+ }
4414
+ },
4415
+ {
4416
+ "name": "market_information",
4417
+ "type": {
4418
+ "option": "pubkey"
4419
+ }
4420
+ },
4421
+ {
4422
+ "name": "external_yield_source_args",
4423
+ "type": {
4424
+ "option": {
4425
+ "defined": {
4426
+ "name": "ExternalYieldSourceArgs"
4427
+ }
4428
+ }
4429
+ }
4430
+ }
4431
+ ]
4432
+ }
4433
+ },
4434
+ {
4435
+ "name": "UpdateWeightMatrixParams",
4436
+ "type": {
4437
+ "kind": "struct",
4438
+ "fields": [
4439
+ {
4440
+ "name": "collateral_index",
4441
+ "type": "u8"
4442
+ },
4443
+ {
4444
+ "name": "weight_matrix",
4445
+ "type": {
4446
+ "array": [
4447
+ "u32",
4448
+ 5
4449
+ ]
4450
+ }
4451
+ },
4452
+ {
4453
+ "name": "expected_loan_values",
4454
+ "type": {
4455
+ "defined": {
4456
+ "name": "ExpectedLoanValues"
4457
+ }
4458
+ }
4459
+ },
4460
+ {
4461
+ "name": "asset_index_guidance",
4462
+ "type": "bytes"
4463
+ }
4464
+ ]
4465
+ }
4466
+ },
4467
+ {
4468
+ "name": "ValuationModel",
4469
+ "type": {
4470
+ "kind": "enum",
4471
+ "variants": [
4472
+ {
4473
+ "name": "Continuous"
4474
+ },
4475
+ {
4476
+ "name": "Periodic"
4477
+ }
4478
+ ]
4479
+ }
4480
+ },
4481
+ {
4482
+ "name": "VaultPolicy",
4483
+ "type": {
4484
+ "kind": "struct",
4485
+ "fields": [
4486
+ {
4487
+ "name": "vault_allowlist",
4488
+ "docs": [
4489
+ "Loopscale user vault accounts that may be used by the GLAM vault.",
4490
+ "An empty list denies all Loopscale user vault operations."
4491
+ ],
4492
+ "type": {
4493
+ "vec": "pubkey"
4494
+ }
4495
+ }
4496
+ ]
4497
+ }
4498
+ },
4499
+ {
4500
+ "name": "VaultStakeParams",
4501
+ "type": {
4502
+ "kind": "struct",
4503
+ "fields": [
4504
+ {
4505
+ "name": "amount",
4506
+ "type": "u64"
4507
+ },
4508
+ {
4509
+ "name": "principal_amount",
4510
+ "type": "u64"
4511
+ },
4512
+ {
4513
+ "name": "stake_all",
4514
+ "type": {
4515
+ "option": "bool"
4516
+ }
4517
+ },
4518
+ {
4519
+ "name": "duration",
4520
+ "type": "u32"
4521
+ },
4522
+ {
4523
+ "name": "duration_type",
4524
+ "type": "u8"
4525
+ },
4526
+ {
4527
+ "name": "action_type",
4528
+ "type": "u8"
4529
+ }
4530
+ ]
4531
+ }
4532
+ },
4533
+ {
4534
+ "name": "VaultUnstakeParams",
4535
+ "type": {
4536
+ "kind": "struct",
4537
+ "fields": [
4538
+ {
4539
+ "name": "action_type",
4540
+ "type": "u8"
4541
+ },
4542
+ {
4543
+ "name": "principal_amount",
4544
+ "type": "u64"
4545
+ }
4546
+ ]
4547
+ }
4548
+ },
4549
+ {
4550
+ "name": "WithdrawCollateralParams",
4551
+ "type": {
4552
+ "kind": "struct",
4553
+ "fields": [
4554
+ {
4555
+ "name": "amount",
4556
+ "type": "u64"
4557
+ },
4558
+ {
4559
+ "name": "collateral_index",
4560
+ "type": "u8"
4561
+ },
4562
+ {
4563
+ "name": "asset_index_guidance",
4564
+ "type": "bytes"
4565
+ },
4566
+ {
4567
+ "name": "expected_loan_values",
4568
+ "type": {
4569
+ "defined": {
4570
+ "name": "ExpectedLoanValues"
4571
+ }
4572
+ }
4573
+ },
4574
+ {
4575
+ "name": "close_if_eligible",
4576
+ "type": "bool"
4577
+ },
4578
+ {
4579
+ "name": "withdraw_all",
4580
+ "type": "bool"
4581
+ }
4582
+ ]
4583
+ }
4584
+ }
4585
+ ],
4586
+ "constants": [
4587
+ {
4588
+ "name": "PROTO_LOOPSCALE_BORROW",
4589
+ "type": "u16",
4590
+ "value": "1"
4591
+ },
4592
+ {
4593
+ "name": "PROTO_LOOPSCALE_BORROW_PERM_BORROW_PRINCIPAL",
4594
+ "type": "u64",
4595
+ "value": "32"
4596
+ },
4597
+ {
4598
+ "name": "PROTO_LOOPSCALE_BORROW_PERM_CLOSE_LOAN",
4599
+ "type": "u64",
4600
+ "value": "2"
4601
+ },
4602
+ {
4603
+ "name": "PROTO_LOOPSCALE_BORROW_PERM_CREATE_LOAN",
4604
+ "type": "u64",
4605
+ "value": "1"
4606
+ },
4607
+ {
4608
+ "name": "PROTO_LOOPSCALE_BORROW_PERM_DEPOSIT_COLLATERAL",
4609
+ "type": "u64",
4610
+ "value": "8"
4611
+ },
4612
+ {
4613
+ "name": "PROTO_LOOPSCALE_BORROW_PERM_REPAY_PRINCIPAL",
4614
+ "type": "u64",
4615
+ "value": "64"
4616
+ },
4617
+ {
4618
+ "name": "PROTO_LOOPSCALE_BORROW_PERM_SET_POLICY",
4619
+ "type": "u64",
4620
+ "value": "128"
4621
+ },
4622
+ {
4623
+ "name": "PROTO_LOOPSCALE_BORROW_PERM_UPDATE_LOAN",
4624
+ "type": "u64",
4625
+ "value": "4"
4626
+ },
4627
+ {
4628
+ "name": "PROTO_LOOPSCALE_BORROW_PERM_WITHDRAW_COLLATERAL",
4629
+ "type": "u64",
4630
+ "value": "16"
4631
+ },
4632
+ {
4633
+ "name": "PROTO_LOOPSCALE_LENDING",
4634
+ "type": "u16",
4635
+ "value": "2"
4636
+ },
4637
+ {
4638
+ "name": "PROTO_LOOPSCALE_LENDING_PERM_CLOSE_STRATEGY",
4639
+ "type": "u64",
4640
+ "value": "16"
4641
+ },
4642
+ {
4643
+ "name": "PROTO_LOOPSCALE_LENDING_PERM_CREATE_STRATEGY",
4644
+ "type": "u64",
4645
+ "value": "1"
4646
+ },
4647
+ {
4648
+ "name": "PROTO_LOOPSCALE_LENDING_PERM_DEPOSIT_STRATEGY",
4649
+ "type": "u64",
4650
+ "value": "4"
4651
+ },
4652
+ {
4653
+ "name": "PROTO_LOOPSCALE_LENDING_PERM_SELL_LEDGER",
4654
+ "type": "u64",
4655
+ "value": "32"
4656
+ },
4657
+ {
4658
+ "name": "PROTO_LOOPSCALE_LENDING_PERM_SET_POLICY",
4659
+ "type": "u64",
4660
+ "value": "64"
4661
+ },
4662
+ {
4663
+ "name": "PROTO_LOOPSCALE_LENDING_PERM_UPDATE_STRATEGY",
4664
+ "type": "u64",
4665
+ "value": "2"
4666
+ },
4667
+ {
4668
+ "name": "PROTO_LOOPSCALE_LENDING_PERM_WITHDRAW_STRATEGY",
4669
+ "type": "u64",
4670
+ "value": "8"
4671
+ },
4672
+ {
4673
+ "name": "PROTO_LOOPSCALE_VAULT",
4674
+ "type": "u16",
4675
+ "value": "4"
4676
+ },
4677
+ {
4678
+ "name": "PROTO_LOOPSCALE_VAULT_PERM_CLAIM_VAULT_REWARDS",
4679
+ "type": "u64",
4680
+ "value": "16"
4681
+ },
4682
+ {
4683
+ "name": "PROTO_LOOPSCALE_VAULT_PERM_DEPOSIT_USER_VAULT",
4684
+ "type": "u64",
4685
+ "value": "1"
4686
+ },
4687
+ {
4688
+ "name": "PROTO_LOOPSCALE_VAULT_PERM_SET_POLICY",
4689
+ "type": "u64",
4690
+ "value": "32"
4691
+ },
4692
+ {
4693
+ "name": "PROTO_LOOPSCALE_VAULT_PERM_STAKE_USER_VAULT_LP",
4694
+ "type": "u64",
4695
+ "value": "4"
4696
+ },
4697
+ {
4698
+ "name": "PROTO_LOOPSCALE_VAULT_PERM_UNSTAKE_USER_VAULT_LP",
4699
+ "type": "u64",
4700
+ "value": "8"
4701
+ },
4702
+ {
4703
+ "name": "PROTO_LOOPSCALE_VAULT_PERM_WITHDRAW_USER_VAULT",
4704
+ "type": "u64",
4705
+ "value": "2"
4706
+ }
4707
+ ]
4708
+ }