@lavarage/sdk 6.9.5 → 7.0.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.
- package/dist/index.d.mts +270 -3
- package/dist/index.d.ts +270 -3
- package/dist/index.js +305 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +305 -2
- package/dist/index.mjs.map +1 -1
- package/idl/lavarage.ts +270 -4
- package/idl/lavaragev2.ts +236 -0
- package/lending.ts +84 -0
- package/package.json +1 -1
- package/release-notes.md +19 -0
package/dist/index.d.mts
CHANGED
|
@@ -106,6 +106,11 @@ type Lavarage$1 = {
|
|
|
106
106
|
"name": "systemProgram";
|
|
107
107
|
"isMut": false;
|
|
108
108
|
"isSigner": false;
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"name": "withdrawalAccessList";
|
|
112
|
+
"isMut": false;
|
|
113
|
+
"isSigner": false;
|
|
109
114
|
}
|
|
110
115
|
];
|
|
111
116
|
"args": [
|
|
@@ -238,7 +243,7 @@ type Lavarage$1 = {
|
|
|
238
243
|
},
|
|
239
244
|
{
|
|
240
245
|
"name": "toTokenAccount";
|
|
241
|
-
"isMut":
|
|
246
|
+
"isMut": false;
|
|
242
247
|
"isSigner": false;
|
|
243
248
|
},
|
|
244
249
|
{
|
|
@@ -309,7 +314,7 @@ type Lavarage$1 = {
|
|
|
309
314
|
},
|
|
310
315
|
{
|
|
311
316
|
"name": "toTokenAccount";
|
|
312
|
-
"isMut":
|
|
317
|
+
"isMut": false;
|
|
313
318
|
"isSigner": false;
|
|
314
319
|
},
|
|
315
320
|
{
|
|
@@ -802,6 +807,11 @@ type Lavarage$1 = {
|
|
|
802
807
|
"name": "systemProgram";
|
|
803
808
|
"isMut": false;
|
|
804
809
|
"isSigner": false;
|
|
810
|
+
},
|
|
811
|
+
{
|
|
812
|
+
"name": "mint";
|
|
813
|
+
"isMut": false;
|
|
814
|
+
"isSigner": false;
|
|
805
815
|
}
|
|
806
816
|
];
|
|
807
817
|
"args": [
|
|
@@ -868,6 +878,11 @@ type Lavarage$1 = {
|
|
|
868
878
|
"name": "systemProgram";
|
|
869
879
|
"isMut": false;
|
|
870
880
|
"isSigner": false;
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"name": "qtMint";
|
|
884
|
+
"isMut": false;
|
|
885
|
+
"isSigner": false;
|
|
871
886
|
}
|
|
872
887
|
];
|
|
873
888
|
"args": [
|
|
@@ -945,6 +960,74 @@ type Lavarage$1 = {
|
|
|
945
960
|
"type": "publicKey";
|
|
946
961
|
}
|
|
947
962
|
];
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
"name": "initWithdrawalAccessList";
|
|
966
|
+
"accounts": [
|
|
967
|
+
{
|
|
968
|
+
"name": "withdrawalAccessList";
|
|
969
|
+
"isMut": true;
|
|
970
|
+
"isSigner": false;
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"name": "authority";
|
|
974
|
+
"isMut": true;
|
|
975
|
+
"isSigner": true;
|
|
976
|
+
},
|
|
977
|
+
{
|
|
978
|
+
"name": "systemProgram";
|
|
979
|
+
"isMut": false;
|
|
980
|
+
"isSigner": false;
|
|
981
|
+
}
|
|
982
|
+
];
|
|
983
|
+
"args": [];
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
"name": "addWithdrawalAccess";
|
|
987
|
+
"accounts": [
|
|
988
|
+
{
|
|
989
|
+
"name": "withdrawalAccessList";
|
|
990
|
+
"isMut": true;
|
|
991
|
+
"isSigner": false;
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"name": "nodeWallet";
|
|
995
|
+
"isMut": false;
|
|
996
|
+
"isSigner": false;
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
"name": "authority";
|
|
1000
|
+
"isMut": false;
|
|
1001
|
+
"isSigner": true;
|
|
1002
|
+
}
|
|
1003
|
+
];
|
|
1004
|
+
"args": [
|
|
1005
|
+
{
|
|
1006
|
+
"name": "toPubkey";
|
|
1007
|
+
"type": "publicKey";
|
|
1008
|
+
}
|
|
1009
|
+
];
|
|
1010
|
+
},
|
|
1011
|
+
{
|
|
1012
|
+
"name": "removeWithdrawalAccess";
|
|
1013
|
+
"accounts": [
|
|
1014
|
+
{
|
|
1015
|
+
"name": "withdrawalAccessList";
|
|
1016
|
+
"isMut": true;
|
|
1017
|
+
"isSigner": false;
|
|
1018
|
+
},
|
|
1019
|
+
{
|
|
1020
|
+
"name": "authority";
|
|
1021
|
+
"isMut": false;
|
|
1022
|
+
"isSigner": true;
|
|
1023
|
+
}
|
|
1024
|
+
];
|
|
1025
|
+
"args": [
|
|
1026
|
+
{
|
|
1027
|
+
"name": "fromPubkey";
|
|
1028
|
+
"type": "string";
|
|
1029
|
+
}
|
|
1030
|
+
];
|
|
948
1031
|
}
|
|
949
1032
|
];
|
|
950
1033
|
"accounts": [
|
|
@@ -1107,9 +1190,45 @@ type Lavarage$1 = {
|
|
|
1107
1190
|
}
|
|
1108
1191
|
];
|
|
1109
1192
|
};
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
"name": "withdrawalAccessList";
|
|
1196
|
+
"type": {
|
|
1197
|
+
"kind": "struct";
|
|
1198
|
+
"fields": [
|
|
1199
|
+
{
|
|
1200
|
+
"name": "authority";
|
|
1201
|
+
"type": "publicKey";
|
|
1202
|
+
},
|
|
1203
|
+
{
|
|
1204
|
+
"name": "accessEntries";
|
|
1205
|
+
"type": {
|
|
1206
|
+
"vec": {
|
|
1207
|
+
"defined": "WithdrawalAccessEntry";
|
|
1208
|
+
};
|
|
1209
|
+
};
|
|
1210
|
+
}
|
|
1211
|
+
];
|
|
1212
|
+
};
|
|
1110
1213
|
}
|
|
1111
1214
|
];
|
|
1112
1215
|
"types": [
|
|
1216
|
+
{
|
|
1217
|
+
"name": "WithdrawalAccessEntry";
|
|
1218
|
+
"type": {
|
|
1219
|
+
"kind": "struct";
|
|
1220
|
+
"fields": [
|
|
1221
|
+
{
|
|
1222
|
+
"name": "fromPubkey";
|
|
1223
|
+
"type": "string";
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
"name": "toPubkey";
|
|
1227
|
+
"type": "publicKey";
|
|
1228
|
+
}
|
|
1229
|
+
];
|
|
1230
|
+
};
|
|
1231
|
+
},
|
|
1113
1232
|
{
|
|
1114
1233
|
"name": "LendingErrors";
|
|
1115
1234
|
"docs": [
|
|
@@ -1141,6 +1260,15 @@ type Lavarage$1 = {
|
|
|
1141
1260
|
},
|
|
1142
1261
|
{
|
|
1143
1262
|
"name": "ExpectedCollateralNotEnough";
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
"name": "AccessEntryAlreadyExists";
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
"name": "AccessEntryNotFound";
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
"name": "UnauthorizedWithdrawal";
|
|
1144
1272
|
}
|
|
1145
1273
|
];
|
|
1146
1274
|
};
|
|
@@ -1337,6 +1465,11 @@ type Lavarage$1 = {
|
|
|
1337
1465
|
"code": 6008;
|
|
1338
1466
|
"name": "ForTesting";
|
|
1339
1467
|
"msg": "TestError";
|
|
1468
|
+
},
|
|
1469
|
+
{
|
|
1470
|
+
"code": 6009;
|
|
1471
|
+
"name": "BlacklistedAccount";
|
|
1472
|
+
"msg": "Account is blacklisted";
|
|
1340
1473
|
}
|
|
1341
1474
|
];
|
|
1342
1475
|
};
|
|
@@ -1450,6 +1583,11 @@ type Lavarage = {
|
|
|
1450
1583
|
"name": "tokenProgram";
|
|
1451
1584
|
"isMut": false;
|
|
1452
1585
|
"isSigner": false;
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
"name": "withdrawalAccessList";
|
|
1589
|
+
"isMut": false;
|
|
1590
|
+
"isSigner": false;
|
|
1453
1591
|
}
|
|
1454
1592
|
];
|
|
1455
1593
|
"args": [
|
|
@@ -2424,6 +2562,74 @@ type Lavarage = {
|
|
|
2424
2562
|
"type": "publicKey";
|
|
2425
2563
|
}
|
|
2426
2564
|
];
|
|
2565
|
+
},
|
|
2566
|
+
{
|
|
2567
|
+
"name": "initWithdrawalAccessList";
|
|
2568
|
+
"accounts": [
|
|
2569
|
+
{
|
|
2570
|
+
"name": "withdrawalAccessList";
|
|
2571
|
+
"isMut": true;
|
|
2572
|
+
"isSigner": false;
|
|
2573
|
+
},
|
|
2574
|
+
{
|
|
2575
|
+
"name": "authority";
|
|
2576
|
+
"isMut": true;
|
|
2577
|
+
"isSigner": true;
|
|
2578
|
+
},
|
|
2579
|
+
{
|
|
2580
|
+
"name": "systemProgram";
|
|
2581
|
+
"isMut": false;
|
|
2582
|
+
"isSigner": false;
|
|
2583
|
+
}
|
|
2584
|
+
];
|
|
2585
|
+
"args": [];
|
|
2586
|
+
},
|
|
2587
|
+
{
|
|
2588
|
+
"name": "addWithdrawalAccess";
|
|
2589
|
+
"accounts": [
|
|
2590
|
+
{
|
|
2591
|
+
"name": "withdrawalAccessList";
|
|
2592
|
+
"isMut": true;
|
|
2593
|
+
"isSigner": false;
|
|
2594
|
+
},
|
|
2595
|
+
{
|
|
2596
|
+
"name": "nodeWallet";
|
|
2597
|
+
"isMut": false;
|
|
2598
|
+
"isSigner": false;
|
|
2599
|
+
},
|
|
2600
|
+
{
|
|
2601
|
+
"name": "authority";
|
|
2602
|
+
"isMut": false;
|
|
2603
|
+
"isSigner": true;
|
|
2604
|
+
}
|
|
2605
|
+
];
|
|
2606
|
+
"args": [
|
|
2607
|
+
{
|
|
2608
|
+
"name": "toPubkey";
|
|
2609
|
+
"type": "publicKey";
|
|
2610
|
+
}
|
|
2611
|
+
];
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
"name": "removeWithdrawalAccess";
|
|
2615
|
+
"accounts": [
|
|
2616
|
+
{
|
|
2617
|
+
"name": "withdrawalAccessList";
|
|
2618
|
+
"isMut": true;
|
|
2619
|
+
"isSigner": false;
|
|
2620
|
+
},
|
|
2621
|
+
{
|
|
2622
|
+
"name": "authority";
|
|
2623
|
+
"isMut": false;
|
|
2624
|
+
"isSigner": true;
|
|
2625
|
+
}
|
|
2626
|
+
];
|
|
2627
|
+
"args": [
|
|
2628
|
+
{
|
|
2629
|
+
"name": "fromPubkey";
|
|
2630
|
+
"type": "string";
|
|
2631
|
+
}
|
|
2632
|
+
];
|
|
2427
2633
|
}
|
|
2428
2634
|
];
|
|
2429
2635
|
"accounts": [
|
|
@@ -2594,9 +2800,45 @@ type Lavarage = {
|
|
|
2594
2800
|
}
|
|
2595
2801
|
];
|
|
2596
2802
|
};
|
|
2803
|
+
},
|
|
2804
|
+
{
|
|
2805
|
+
"name": "withdrawalAccessList";
|
|
2806
|
+
"type": {
|
|
2807
|
+
"kind": "struct";
|
|
2808
|
+
"fields": [
|
|
2809
|
+
{
|
|
2810
|
+
"name": "authority";
|
|
2811
|
+
"type": "publicKey";
|
|
2812
|
+
},
|
|
2813
|
+
{
|
|
2814
|
+
"name": "accessEntries";
|
|
2815
|
+
"type": {
|
|
2816
|
+
"vec": {
|
|
2817
|
+
"defined": "WithdrawalAccessEntry";
|
|
2818
|
+
};
|
|
2819
|
+
};
|
|
2820
|
+
}
|
|
2821
|
+
];
|
|
2822
|
+
};
|
|
2597
2823
|
}
|
|
2598
2824
|
];
|
|
2599
2825
|
"types": [
|
|
2826
|
+
{
|
|
2827
|
+
"name": "WithdrawalAccessEntry";
|
|
2828
|
+
"type": {
|
|
2829
|
+
"kind": "struct";
|
|
2830
|
+
"fields": [
|
|
2831
|
+
{
|
|
2832
|
+
"name": "fromPubkey";
|
|
2833
|
+
"type": "string";
|
|
2834
|
+
},
|
|
2835
|
+
{
|
|
2836
|
+
"name": "toPubkey";
|
|
2837
|
+
"type": "publicKey";
|
|
2838
|
+
}
|
|
2839
|
+
];
|
|
2840
|
+
};
|
|
2841
|
+
},
|
|
2600
2842
|
{
|
|
2601
2843
|
"name": "LendingErrors";
|
|
2602
2844
|
"docs": [
|
|
@@ -2628,6 +2870,15 @@ type Lavarage = {
|
|
|
2628
2870
|
},
|
|
2629
2871
|
{
|
|
2630
2872
|
"name": "ExpectedCollateralNotEnough";
|
|
2873
|
+
},
|
|
2874
|
+
{
|
|
2875
|
+
"name": "AccessEntryAlreadyExists";
|
|
2876
|
+
},
|
|
2877
|
+
{
|
|
2878
|
+
"name": "AccessEntryNotFound";
|
|
2879
|
+
},
|
|
2880
|
+
{
|
|
2881
|
+
"name": "UnauthorizedWithdrawal";
|
|
2631
2882
|
}
|
|
2632
2883
|
];
|
|
2633
2884
|
};
|
|
@@ -3054,6 +3305,7 @@ declare const updateMaxLendPerTokenBatchEvm: (provider: Provider, tokenHolderCon
|
|
|
3054
3305
|
|
|
3055
3306
|
declare function getNodeWalletPDA(operatorPublicKey: PublicKey, mintPublicKey: PublicKey, programId: PublicKey): PublicKey;
|
|
3056
3307
|
declare function getTradingPoolPDA(poolOwnerPublicKey: PublicKey, tokenPublicKey: PublicKey, programId: PublicKey): PublicKey;
|
|
3308
|
+
declare function getWithdrawalAccessListPDA(programId: PublicKey): PublicKey;
|
|
3057
3309
|
declare function depositFunds(lavarageProgram: Program<Lavarage$1>, params: {
|
|
3058
3310
|
nodeWallet: PublicKey;
|
|
3059
3311
|
mint?: string;
|
|
@@ -3124,11 +3376,26 @@ declare function updateMaxBorrow(lavarageProgram: Program<Lavarage$1> | Program<
|
|
|
3124
3376
|
maxBorrow: number;
|
|
3125
3377
|
computeBudgetMicroLamports?: number;
|
|
3126
3378
|
}): Promise<VersionedTransaction>;
|
|
3379
|
+
declare function addToWithdrawalAccessList(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
|
|
3380
|
+
nodeWallet: PublicKey;
|
|
3381
|
+
authority: PublicKey;
|
|
3382
|
+
toPubkey: PublicKey;
|
|
3383
|
+
computeBudgetMicroLamports?: number;
|
|
3384
|
+
}): Promise<VersionedTransaction>;
|
|
3385
|
+
declare function removeFromWithdrawalAccessList(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
|
|
3386
|
+
withdrawalAccessList: PublicKey;
|
|
3387
|
+
authority: PublicKey;
|
|
3388
|
+
nodeWallet: string;
|
|
3389
|
+
computeBudgetMicroLamports?: number;
|
|
3390
|
+
}): Promise<VersionedTransaction>;
|
|
3127
3391
|
|
|
3392
|
+
declare const lending_addToWithdrawalAccessList: typeof addToWithdrawalAccessList;
|
|
3128
3393
|
declare const lending_createOffer: typeof createOffer;
|
|
3129
3394
|
declare const lending_depositFunds: typeof depositFunds;
|
|
3130
3395
|
declare const lending_getNodeWalletPDA: typeof getNodeWalletPDA;
|
|
3131
3396
|
declare const lending_getTradingPoolPDA: typeof getTradingPoolPDA;
|
|
3397
|
+
declare const lending_getWithdrawalAccessListPDA: typeof getWithdrawalAccessListPDA;
|
|
3398
|
+
declare const lending_removeFromWithdrawalAccessList: typeof removeFromWithdrawalAccessList;
|
|
3132
3399
|
declare const lending_updateInterestRate: typeof updateInterestRate;
|
|
3133
3400
|
declare const lending_updateMaxBorrow: typeof updateMaxBorrow;
|
|
3134
3401
|
declare const lending_updateMaxExposure: typeof updateMaxExposure;
|
|
@@ -3137,7 +3404,7 @@ declare const lending_withdrawFunds: typeof withdrawFunds;
|
|
|
3137
3404
|
declare const lending_withdrawFundsV1: typeof withdrawFundsV1;
|
|
3138
3405
|
declare const lending_withdrawFundsV2: typeof withdrawFundsV2;
|
|
3139
3406
|
declare namespace lending {
|
|
3140
|
-
export { lending_createOffer as createOffer, lending_depositFunds as depositFunds, lending_getNodeWalletPDA as getNodeWalletPDA, lending_getTradingPoolPDA as getTradingPoolPDA, lending_updateInterestRate as updateInterestRate, lending_updateMaxBorrow as updateMaxBorrow, lending_updateMaxExposure as updateMaxExposure, lending_updateOffer as updateOffer, lending_withdrawFunds as withdrawFunds, lending_withdrawFundsV1 as withdrawFundsV1, lending_withdrawFundsV2 as withdrawFundsV2 };
|
|
3407
|
+
export { lending_addToWithdrawalAccessList as addToWithdrawalAccessList, lending_createOffer as createOffer, lending_depositFunds as depositFunds, lending_getNodeWalletPDA as getNodeWalletPDA, lending_getTradingPoolPDA as getTradingPoolPDA, lending_getWithdrawalAccessListPDA as getWithdrawalAccessListPDA, lending_removeFromWithdrawalAccessList as removeFromWithdrawalAccessList, lending_updateInterestRate as updateInterestRate, lending_updateMaxBorrow as updateMaxBorrow, lending_updateMaxExposure as updateMaxExposure, lending_updateOffer as updateOffer, lending_withdrawFunds as withdrawFunds, lending_withdrawFundsV1 as withdrawFundsV1, lending_withdrawFundsV2 as withdrawFundsV2 };
|
|
3141
3408
|
}
|
|
3142
3409
|
|
|
3143
3410
|
declare function getPda(seed: Buffer | Buffer[], programId: PublicKey): PublicKey;
|