@huma-finance/permissionless-sdk 1.0.22 → 1.0.23
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.
- package/dist/idl/permissionless-devnet.json +298 -14
- package/dist/idl/permissionless-staging.json +8279 -0
- package/dist/idl/permissionless.d.ts +336 -16
- package/dist/idl/permissionless.d.ts.map +1 -1
- package/dist/idl/permissionless.json +276 -4
- package/dist/utils/program.d.ts.map +1 -1
- package/dist/utils/program.js +4 -1
- package/dist/utils/program.js.map +1 -1
- package/examples/permissionless/deposit.ts +1 -1
- package/examples/permissionless/getModeTargetAPY.ts +1 -1
- package/examples/permissionless/tokenPrice.ts +1 -1
- package/package.json +3 -2
|
@@ -642,7 +642,7 @@
|
|
|
642
642
|
"args": [
|
|
643
643
|
{
|
|
644
644
|
"name": "shares",
|
|
645
|
-
"type": "
|
|
645
|
+
"type": "u64"
|
|
646
646
|
}
|
|
647
647
|
]
|
|
648
648
|
},
|
|
@@ -812,7 +812,8 @@
|
|
|
812
812
|
"account": "ModeConfig"
|
|
813
813
|
}
|
|
814
814
|
]
|
|
815
|
-
}
|
|
815
|
+
},
|
|
816
|
+
"relations": ["redemption_request"]
|
|
816
817
|
},
|
|
817
818
|
{
|
|
818
819
|
"name": "mode_mint",
|
|
@@ -1005,6 +1006,87 @@
|
|
|
1005
1006
|
}
|
|
1006
1007
|
]
|
|
1007
1008
|
},
|
|
1009
|
+
{
|
|
1010
|
+
"name": "clear_instant_withdrawal_liquidity_source",
|
|
1011
|
+
"docs": [
|
|
1012
|
+
"Clears the deployment target from which liquidity is pulled when the pool's available",
|
|
1013
|
+
"balance is insufficient to satisfy an instant withdrawal.",
|
|
1014
|
+
"",
|
|
1015
|
+
"# Trigger Condition",
|
|
1016
|
+
"When the protocol is on.",
|
|
1017
|
+
"",
|
|
1018
|
+
"# Access Control",
|
|
1019
|
+
"Only strategy manager wallets can call this instruction."
|
|
1020
|
+
],
|
|
1021
|
+
"discriminator": [53, 151, 188, 231, 236, 184, 141, 85],
|
|
1022
|
+
"accounts": [
|
|
1023
|
+
{
|
|
1024
|
+
"name": "wallet",
|
|
1025
|
+
"signer": true,
|
|
1026
|
+
"relations": ["strategy_manager_wallet"]
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"name": "huma_config",
|
|
1030
|
+
"relations": ["pool_config"]
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
"name": "pool_config",
|
|
1034
|
+
"writable": true,
|
|
1035
|
+
"pda": {
|
|
1036
|
+
"seeds": [
|
|
1037
|
+
{
|
|
1038
|
+
"kind": "const",
|
|
1039
|
+
"value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
"kind": "account",
|
|
1043
|
+
"path": "pool_config.pool_id",
|
|
1044
|
+
"account": "PoolConfig"
|
|
1045
|
+
}
|
|
1046
|
+
]
|
|
1047
|
+
}
|
|
1048
|
+
},
|
|
1049
|
+
{
|
|
1050
|
+
"name": "pool_state",
|
|
1051
|
+
"pda": {
|
|
1052
|
+
"seeds": [
|
|
1053
|
+
{
|
|
1054
|
+
"kind": "const",
|
|
1055
|
+
"value": [112, 111, 111, 108, 95, 115, 116, 97, 116, 101]
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
"kind": "account",
|
|
1059
|
+
"path": "pool_config"
|
|
1060
|
+
}
|
|
1061
|
+
]
|
|
1062
|
+
}
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
"name": "strategy_manager_wallet",
|
|
1066
|
+
"pda": {
|
|
1067
|
+
"seeds": [
|
|
1068
|
+
{
|
|
1069
|
+
"kind": "const",
|
|
1070
|
+
"value": [
|
|
1071
|
+
115, 116, 114, 97, 116, 101, 103, 121, 95, 109, 97, 110, 97,
|
|
1072
|
+
103, 101, 114, 95, 119, 97, 108, 108, 101, 116
|
|
1073
|
+
]
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
"kind": "account",
|
|
1077
|
+
"path": "pool_config"
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
"kind": "account",
|
|
1081
|
+
"path": "strategy_manager_wallet.wallet",
|
|
1082
|
+
"account": "StrategyManagerWallet"
|
|
1083
|
+
}
|
|
1084
|
+
]
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
],
|
|
1088
|
+
"args": []
|
|
1089
|
+
},
|
|
1008
1090
|
{
|
|
1009
1091
|
"name": "close_lender_accounts",
|
|
1010
1092
|
"docs": [
|
|
@@ -1512,13 +1594,14 @@
|
|
|
1512
1594
|
{
|
|
1513
1595
|
"name": "declare_loss",
|
|
1514
1596
|
"docs": [
|
|
1515
|
-
"Declares loss on an investment.",
|
|
1597
|
+
"Declares loss on an investment. When the loss is on liquid assets, the strategy manager must",
|
|
1598
|
+
"also update `liquid_assets_deployed` accordingly.",
|
|
1516
1599
|
"",
|
|
1517
1600
|
"# Trigger Condition",
|
|
1518
1601
|
"When the protocol is on, and the pool is either on or in the pre-closure status.",
|
|
1519
1602
|
"",
|
|
1520
1603
|
"# Dev Notes",
|
|
1521
|
-
"It is possible for the strategy manager to deploy and
|
|
1604
|
+
"It is possible for the strategy manager to deploy and pay back liquidity after loss declaration.",
|
|
1522
1605
|
"",
|
|
1523
1606
|
"# Access Control",
|
|
1524
1607
|
"Only strategy manager wallets can call this instruction."
|
|
@@ -2451,11 +2534,13 @@
|
|
|
2451
2534
|
}
|
|
2452
2535
|
},
|
|
2453
2536
|
{
|
|
2454
|
-
"name": "deployment_config"
|
|
2537
|
+
"name": "deployment_config",
|
|
2538
|
+
"optional": true
|
|
2455
2539
|
},
|
|
2456
2540
|
{
|
|
2457
2541
|
"name": "deployment_state",
|
|
2458
2542
|
"writable": true,
|
|
2543
|
+
"optional": true,
|
|
2459
2544
|
"pda": {
|
|
2460
2545
|
"seeds": [
|
|
2461
2546
|
{
|
|
@@ -2686,11 +2771,13 @@
|
|
|
2686
2771
|
}
|
|
2687
2772
|
},
|
|
2688
2773
|
{
|
|
2689
|
-
"name": "deployment_config"
|
|
2774
|
+
"name": "deployment_config",
|
|
2775
|
+
"optional": true
|
|
2690
2776
|
},
|
|
2691
2777
|
{
|
|
2692
2778
|
"name": "deployment_state",
|
|
2693
2779
|
"writable": true,
|
|
2780
|
+
"optional": true,
|
|
2694
2781
|
"pda": {
|
|
2695
2782
|
"seeds": [
|
|
2696
2783
|
{
|
|
@@ -3240,7 +3327,8 @@
|
|
|
3240
3327
|
"account": "ModeConfig"
|
|
3241
3328
|
}
|
|
3242
3329
|
]
|
|
3243
|
-
}
|
|
3330
|
+
},
|
|
3331
|
+
"relations": ["redemption_request"]
|
|
3244
3332
|
},
|
|
3245
3333
|
{
|
|
3246
3334
|
"name": "mode_mint",
|
|
@@ -3437,7 +3525,8 @@
|
|
|
3437
3525
|
"name": "recover_loss",
|
|
3438
3526
|
"docs": [
|
|
3439
3527
|
"Recovers declared losses by transferring assets from the strategy manager wallet to the pool.",
|
|
3440
|
-
"The amount is
|
|
3528
|
+
"The transferred amount is applied to mode losses proportionally. When the recovery applies to",
|
|
3529
|
+
"losses on liquid assets, the strategy manager must also update `liquid_assets_deployed` accordingly.",
|
|
3441
3530
|
"",
|
|
3442
3531
|
"# Trigger Condition",
|
|
3443
3532
|
"When the protocol is on and the pool is not closed.",
|
|
@@ -4313,6 +4402,90 @@
|
|
|
4313
4402
|
}
|
|
4314
4403
|
]
|
|
4315
4404
|
},
|
|
4405
|
+
{
|
|
4406
|
+
"name": "set_instant_withdrawal_liquidity_source",
|
|
4407
|
+
"docs": [
|
|
4408
|
+
"Sets the deployment target from which liquidity will be pulled when the pool's available",
|
|
4409
|
+
"balance is insufficient to satisfy an instant withdrawal.",
|
|
4410
|
+
"",
|
|
4411
|
+
"# Trigger Condition",
|
|
4412
|
+
"When the protocol is on.",
|
|
4413
|
+
"",
|
|
4414
|
+
"# Access Control",
|
|
4415
|
+
"Only strategy manager wallets can call this instruction."
|
|
4416
|
+
],
|
|
4417
|
+
"discriminator": [104, 139, 161, 239, 40, 211, 26, 252],
|
|
4418
|
+
"accounts": [
|
|
4419
|
+
{
|
|
4420
|
+
"name": "wallet",
|
|
4421
|
+
"signer": true,
|
|
4422
|
+
"relations": ["strategy_manager_wallet"]
|
|
4423
|
+
},
|
|
4424
|
+
{
|
|
4425
|
+
"name": "huma_config",
|
|
4426
|
+
"relations": ["pool_config"]
|
|
4427
|
+
},
|
|
4428
|
+
{
|
|
4429
|
+
"name": "pool_config",
|
|
4430
|
+
"writable": true,
|
|
4431
|
+
"pda": {
|
|
4432
|
+
"seeds": [
|
|
4433
|
+
{
|
|
4434
|
+
"kind": "const",
|
|
4435
|
+
"value": [112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]
|
|
4436
|
+
},
|
|
4437
|
+
{
|
|
4438
|
+
"kind": "account",
|
|
4439
|
+
"path": "pool_config.pool_id",
|
|
4440
|
+
"account": "PoolConfig"
|
|
4441
|
+
}
|
|
4442
|
+
]
|
|
4443
|
+
}
|
|
4444
|
+
},
|
|
4445
|
+
{
|
|
4446
|
+
"name": "pool_state",
|
|
4447
|
+
"pda": {
|
|
4448
|
+
"seeds": [
|
|
4449
|
+
{
|
|
4450
|
+
"kind": "const",
|
|
4451
|
+
"value": [112, 111, 111, 108, 95, 115, 116, 97, 116, 101]
|
|
4452
|
+
},
|
|
4453
|
+
{
|
|
4454
|
+
"kind": "account",
|
|
4455
|
+
"path": "pool_config"
|
|
4456
|
+
}
|
|
4457
|
+
]
|
|
4458
|
+
}
|
|
4459
|
+
},
|
|
4460
|
+
{
|
|
4461
|
+
"name": "strategy_manager_wallet",
|
|
4462
|
+
"pda": {
|
|
4463
|
+
"seeds": [
|
|
4464
|
+
{
|
|
4465
|
+
"kind": "const",
|
|
4466
|
+
"value": [
|
|
4467
|
+
115, 116, 114, 97, 116, 101, 103, 121, 95, 109, 97, 110, 97,
|
|
4468
|
+
103, 101, 114, 95, 119, 97, 108, 108, 101, 116
|
|
4469
|
+
]
|
|
4470
|
+
},
|
|
4471
|
+
{
|
|
4472
|
+
"kind": "account",
|
|
4473
|
+
"path": "pool_config"
|
|
4474
|
+
},
|
|
4475
|
+
{
|
|
4476
|
+
"kind": "account",
|
|
4477
|
+
"path": "strategy_manager_wallet.wallet",
|
|
4478
|
+
"account": "StrategyManagerWallet"
|
|
4479
|
+
}
|
|
4480
|
+
]
|
|
4481
|
+
}
|
|
4482
|
+
},
|
|
4483
|
+
{
|
|
4484
|
+
"name": "deployment_config"
|
|
4485
|
+
}
|
|
4486
|
+
],
|
|
4487
|
+
"args": []
|
|
4488
|
+
},
|
|
4316
4489
|
{
|
|
4317
4490
|
"name": "set_instant_withdrawal_reserve_limit",
|
|
4318
4491
|
"docs": [
|
|
@@ -5379,6 +5552,14 @@
|
|
|
5379
5552
|
"name": "InstantWithdrawalLenderRemovedEvent",
|
|
5380
5553
|
"discriminator": [228, 255, 164, 26, 160, 125, 77, 227]
|
|
5381
5554
|
},
|
|
5555
|
+
{
|
|
5556
|
+
"name": "InstantWithdrawalLiquiditySourceClearedEvent",
|
|
5557
|
+
"discriminator": [244, 93, 188, 227, 190, 128, 85, 101]
|
|
5558
|
+
},
|
|
5559
|
+
{
|
|
5560
|
+
"name": "InstantWithdrawalLiquiditySourceSetEvent",
|
|
5561
|
+
"discriminator": [188, 167, 59, 236, 129, 19, 186, 11]
|
|
5562
|
+
},
|
|
5382
5563
|
{
|
|
5383
5564
|
"name": "InstantWithdrawalReserveLimitChangedEvent",
|
|
5384
5565
|
"discriminator": [163, 77, 62, 14, 42, 11, 32, 215]
|
|
@@ -5565,6 +5746,10 @@
|
|
|
5565
5746
|
"code": 6006,
|
|
5566
5747
|
"name": "InvalidBasisPointHigherThan10000"
|
|
5567
5748
|
},
|
|
5749
|
+
{
|
|
5750
|
+
"code": 6007,
|
|
5751
|
+
"name": "RequiredAccountsNotProvided"
|
|
5752
|
+
},
|
|
5568
5753
|
{
|
|
5569
5754
|
"code": 6101,
|
|
5570
5755
|
"name": "PoolOwnerRequired"
|
|
@@ -5737,6 +5922,14 @@
|
|
|
5737
5922
|
"code": 6332,
|
|
5738
5923
|
"name": "LiquidAssetsDeployedTooHigh"
|
|
5739
5924
|
},
|
|
5925
|
+
{
|
|
5926
|
+
"code": 6333,
|
|
5927
|
+
"name": "RedemptionRequestModeMismatch"
|
|
5928
|
+
},
|
|
5929
|
+
{
|
|
5930
|
+
"code": 6334,
|
|
5931
|
+
"name": "InstantWithdrawalLiquiditySourceMismatch"
|
|
5932
|
+
},
|
|
5740
5933
|
{
|
|
5741
5934
|
"code": 6401,
|
|
5742
5935
|
"name": "InvalidModeConfig"
|
|
@@ -5759,18 +5952,22 @@
|
|
|
5759
5952
|
},
|
|
5760
5953
|
{
|
|
5761
5954
|
"code": 6406,
|
|
5762
|
-
"name": "
|
|
5955
|
+
"name": "ModeAssetsStale"
|
|
5763
5956
|
},
|
|
5764
5957
|
{
|
|
5765
5958
|
"code": 6407,
|
|
5766
|
-
"name": "
|
|
5959
|
+
"name": "ModeTokenNotReadyToClose"
|
|
5767
5960
|
},
|
|
5768
5961
|
{
|
|
5769
5962
|
"code": 6408,
|
|
5770
|
-
"name": "
|
|
5963
|
+
"name": "LenderStateNotReadyToClose"
|
|
5771
5964
|
},
|
|
5772
5965
|
{
|
|
5773
5966
|
"code": 6409,
|
|
5967
|
+
"name": "ModeMintNotReadyToClose"
|
|
5968
|
+
},
|
|
5969
|
+
{
|
|
5970
|
+
"code": 6410,
|
|
5774
5971
|
"name": "ModeStateNotReadyToClose"
|
|
5775
5972
|
},
|
|
5776
5973
|
{
|
|
@@ -5787,7 +5984,19 @@
|
|
|
5787
5984
|
},
|
|
5788
5985
|
{
|
|
5789
5986
|
"code": 6504,
|
|
5790
|
-
"name": "
|
|
5987
|
+
"name": "NoLossToRecover"
|
|
5988
|
+
},
|
|
5989
|
+
{
|
|
5990
|
+
"code": 6505,
|
|
5991
|
+
"name": "TokenAccountOwnerMismatch"
|
|
5992
|
+
},
|
|
5993
|
+
{
|
|
5994
|
+
"code": 6506,
|
|
5995
|
+
"name": "ManualStrategyNotAllowedAsLiquiditySource"
|
|
5996
|
+
},
|
|
5997
|
+
{
|
|
5998
|
+
"code": 6507,
|
|
5999
|
+
"name": "DeploymentTargetIsActiveLiquiditySource"
|
|
5791
6000
|
}
|
|
5792
6001
|
],
|
|
5793
6002
|
"types": [
|
|
@@ -5857,6 +6066,9 @@
|
|
|
5857
6066
|
},
|
|
5858
6067
|
{
|
|
5859
6068
|
"name": "JupLend"
|
|
6069
|
+
},
|
|
6070
|
+
{
|
|
6071
|
+
"name": "KaminoLend"
|
|
5860
6072
|
}
|
|
5861
6073
|
]
|
|
5862
6074
|
}
|
|
@@ -5923,7 +6135,10 @@
|
|
|
5923
6135
|
"",
|
|
5924
6136
|
"# Fields",
|
|
5925
6137
|
"* `instant_withdrawal_reserve_limit` - The maximum amount of assets that can be withdrawn instantly.",
|
|
5926
|
-
"* `instant_withdrawal_fee_configs` - The fee configurations for instant withdrawal."
|
|
6138
|
+
"* `instant_withdrawal_fee_configs` - The fee configurations for instant withdrawal.",
|
|
6139
|
+
"* `liquidity_source` - The `DeploymentConfig` account key identifying the deployment target",
|
|
6140
|
+
"from which liquidity will be pulled if the pool's available balance is insufficient to",
|
|
6141
|
+
"satisfy an instant withdrawal."
|
|
5927
6142
|
],
|
|
5928
6143
|
"type": {
|
|
5929
6144
|
"kind": "struct",
|
|
@@ -5942,10 +6157,16 @@
|
|
|
5942
6157
|
}
|
|
5943
6158
|
}
|
|
5944
6159
|
},
|
|
6160
|
+
{
|
|
6161
|
+
"name": "liquidity_source",
|
|
6162
|
+
"type": {
|
|
6163
|
+
"option": "pubkey"
|
|
6164
|
+
}
|
|
6165
|
+
},
|
|
5945
6166
|
{
|
|
5946
6167
|
"name": "reserved",
|
|
5947
6168
|
"type": {
|
|
5948
|
-
"array": ["u8",
|
|
6169
|
+
"array": ["u8", 127]
|
|
5949
6170
|
}
|
|
5950
6171
|
}
|
|
5951
6172
|
]
|
|
@@ -6086,6 +6307,69 @@
|
|
|
6086
6307
|
]
|
|
6087
6308
|
}
|
|
6088
6309
|
},
|
|
6310
|
+
{
|
|
6311
|
+
"name": "InstantWithdrawalLiquiditySourceClearedEvent",
|
|
6312
|
+
"docs": [
|
|
6313
|
+
"The strategy manager has cleared the liquidity source for instant withdrawals.",
|
|
6314
|
+
"",
|
|
6315
|
+
"# Fields",
|
|
6316
|
+
"* `pool_id` - The pool ID.",
|
|
6317
|
+
"* `wallet` - The strategy manager wallet address.",
|
|
6318
|
+
"* `old_liquidity_source` - The previous `DeploymentConfig` key."
|
|
6319
|
+
],
|
|
6320
|
+
"type": {
|
|
6321
|
+
"kind": "struct",
|
|
6322
|
+
"fields": [
|
|
6323
|
+
{
|
|
6324
|
+
"name": "pool_id",
|
|
6325
|
+
"type": "pubkey"
|
|
6326
|
+
},
|
|
6327
|
+
{
|
|
6328
|
+
"name": "wallet",
|
|
6329
|
+
"type": "pubkey"
|
|
6330
|
+
},
|
|
6331
|
+
{
|
|
6332
|
+
"name": "old_liquidity_source",
|
|
6333
|
+
"type": "pubkey"
|
|
6334
|
+
}
|
|
6335
|
+
]
|
|
6336
|
+
}
|
|
6337
|
+
},
|
|
6338
|
+
{
|
|
6339
|
+
"name": "InstantWithdrawalLiquiditySourceSetEvent",
|
|
6340
|
+
"docs": [
|
|
6341
|
+
"The strategy manager has set the liquidity source for instant withdrawals.",
|
|
6342
|
+
"",
|
|
6343
|
+
"# Fields",
|
|
6344
|
+
"* `pool_id` - The pool ID.",
|
|
6345
|
+
"* `wallet` - The strategy manager wallet address.",
|
|
6346
|
+
"* `old_liquidity_source` - The previous `DeploymentConfig` key.",
|
|
6347
|
+
"* `new_liquidity_source` - The new `DeploymentConfig` key."
|
|
6348
|
+
],
|
|
6349
|
+
"type": {
|
|
6350
|
+
"kind": "struct",
|
|
6351
|
+
"fields": [
|
|
6352
|
+
{
|
|
6353
|
+
"name": "pool_id",
|
|
6354
|
+
"type": "pubkey"
|
|
6355
|
+
},
|
|
6356
|
+
{
|
|
6357
|
+
"name": "wallet",
|
|
6358
|
+
"type": "pubkey"
|
|
6359
|
+
},
|
|
6360
|
+
{
|
|
6361
|
+
"name": "old_liquidity_source",
|
|
6362
|
+
"type": {
|
|
6363
|
+
"option": "pubkey"
|
|
6364
|
+
}
|
|
6365
|
+
},
|
|
6366
|
+
{
|
|
6367
|
+
"name": "new_liquidity_source",
|
|
6368
|
+
"type": "pubkey"
|
|
6369
|
+
}
|
|
6370
|
+
]
|
|
6371
|
+
}
|
|
6372
|
+
},
|
|
6089
6373
|
{
|
|
6090
6374
|
"name": "InstantWithdrawalReserveLimitChangedEvent",
|
|
6091
6375
|
"docs": [
|