@kamino-finance/klend-sdk 5.2.9 → 5.2.10
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/README.md +9 -32
- package/dist/classes/action.d.ts +3 -4
- package/dist/classes/action.d.ts.map +1 -1
- package/dist/classes/action.js +35 -47
- package/dist/classes/action.js.map +1 -1
- package/dist/classes/vault.d.ts.map +1 -1
- package/dist/classes/vault.js +2 -1
- package/dist/classes/vault.js.map +1 -1
- package/dist/lending_operations/repay_with_collateral_operations.d.ts.map +1 -1
- package/dist/lending_operations/repay_with_collateral_operations.js +1 -3
- package/dist/lending_operations/repay_with_collateral_operations.js.map +1 -1
- package/dist/leverage/operations.d.ts.map +1 -1
- package/dist/leverage/operations.js +1 -1
- package/dist/leverage/operations.js.map +1 -1
- package/package.json +1 -2
- package/src/classes/action.ts +32 -66
- package/src/classes/vault.ts +5 -1
- package/src/lending_operations/repay_with_collateral_operations.ts +0 -3
- package/src/leverage/operations.ts +0 -1
package/README.md
CHANGED
|
@@ -53,37 +53,6 @@ const env = await initEnv('mainnet-beta');
|
|
|
53
53
|
await sendTransactionFromAction(env, sendTransaction); // sendTransaction from wallet adapter or custom
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
## FAQ
|
|
57
|
-
|
|
58
|
-
## Client
|
|
59
|
-
* npx tsx src/client.ts deposit --url <RPC> --owner ./keypair.json --token USDH --amount 10
|
|
60
|
-
* npx tsx src/client.ts deposit --url <RPC> --owner ./keypair.json --token SOL --amount 10
|
|
61
|
-
|
|
62
|
-
## Codegen
|
|
63
|
-
* Copy the new `idl` from the kamino-lending program to `src/idl.json`
|
|
64
|
-
* `yarn codegen`
|
|
65
|
-
|
|
66
|
-
## Setup localnet
|
|
67
|
-
* Ensure `deps` contains the correct `.so` you want to test against. Either build it from the main repo or dump it from mainnet
|
|
68
|
-
* `yarn start-validator`
|
|
69
|
-
|
|
70
|
-
## Run tests
|
|
71
|
-
* `yarn start-validator-and-test`
|
|
72
|
-
* Or, if the local validator is already running, `yarn test`
|
|
73
|
-
|
|
74
|
-
## TODO:
|
|
75
|
-
|
|
76
|
-
Better sdk documentation
|
|
77
|
-
|
|
78
|
-
## Sync with smart contracts
|
|
79
|
-
* Copy the program .so, idl and codegen
|
|
80
|
-
```sh
|
|
81
|
-
$ yarn
|
|
82
|
-
$ cp ../kamino-lending/target/deploy/kamino_lending.so deps/programs/kamino_lending.so
|
|
83
|
-
$ cp ../kamino-lending/target/idl/kamino_lending.json src/idl.json
|
|
84
|
-
$ yarn codegen
|
|
85
|
-
```
|
|
86
|
-
|
|
87
56
|
### Getting a vanilla obligation for a user
|
|
88
57
|
```ts
|
|
89
58
|
const kaminoMarket = await KaminoMarket.load(env.provider.connection, marketAddress, DEFAULT_RECENT_SLOT_DURATION_MS, programId);
|
|
@@ -124,4 +93,12 @@ $ yarn codegen
|
|
|
124
93
|
}
|
|
125
94
|
}
|
|
126
95
|
});
|
|
127
|
-
```
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## CLI
|
|
99
|
+
* npx tsx src/client.ts deposit --url <RPC> --owner ./keypair.json --token USDH --amount 10
|
|
100
|
+
* npx tsx src/client.ts deposit --url <RPC> --owner ./keypair.json --token SOL --amount 10
|
|
101
|
+
|
|
102
|
+
## Codegen
|
|
103
|
+
* Copy the new `idl` from the kamino-lending program to `src/idl.json`
|
|
104
|
+
* `yarn codegen`
|
package/dist/classes/action.d.ts
CHANGED
|
@@ -48,7 +48,6 @@ export declare class KaminoAction {
|
|
|
48
48
|
depositReserves: Array<PublicKey>;
|
|
49
49
|
borrowReserves: Array<PublicKey>;
|
|
50
50
|
preLoadedDepositReservesSameTx: Array<PublicKey>;
|
|
51
|
-
preLoadedBorrowReservesSameTx: Array<PublicKey>;
|
|
52
51
|
currentSlot: number;
|
|
53
52
|
private constructor();
|
|
54
53
|
static initialize(action: ActionType, amount: string | BN, mint: PublicKey, owner: PublicKey, kaminoMarket: KaminoMarket, obligation: KaminoObligation | ObligationType, referrer?: PublicKey, currentSlot?: number, payer?: PublicKey): Promise<KaminoAction>;
|
|
@@ -87,7 +86,7 @@ export declare class KaminoAction {
|
|
|
87
86
|
static buildRepayAndWithdrawTxns(kaminoMarket: KaminoMarket, repayAmount: string | BN, repayMint: PublicKey, withdrawAmount: string | BN, withdrawMint: PublicKey, payer: PublicKey, currentSlot: number, obligation: KaminoObligation | ObligationType, extraComputeBudget?: number, // if > 0 then adds the ixn
|
|
88
87
|
includeAtaIxns?: boolean, // if true it includes create and close wsol and token atas,
|
|
89
88
|
requestElevationGroup?: boolean, includeUserMetadata?: boolean, // if true it includes user metadata,
|
|
90
|
-
|
|
89
|
+
referrer?: PublicKey, scopeRefresh?: ScopeRefresh): Promise<KaminoAction>;
|
|
91
90
|
static buildWithdrawTxns(kaminoMarket: KaminoMarket, amount: string | BN, mint: PublicKey, owner: PublicKey, obligation: KaminoObligation | ObligationType, extraComputeBudget?: number, // if > 0 then adds the ixn
|
|
92
91
|
includeAtaIxns?: boolean, // if true it includes create and close wsol and token atas,
|
|
93
92
|
requestElevationGroup?: boolean, includeUserMetadata?: boolean, // if true it includes user metadata
|
|
@@ -132,9 +131,9 @@ export declare class KaminoAction {
|
|
|
132
131
|
addWithdrawIx(): Promise<void>;
|
|
133
132
|
addRepayIx(): Promise<void>;
|
|
134
133
|
addLiquidateIx(maxAllowedLtvOverridePercent?: number): Promise<void>;
|
|
135
|
-
addInBetweenIxs(action: ActionType, includeAtaIxns: boolean, requestElevationGroup: boolean, addInitObligationForFarm: boolean
|
|
134
|
+
addInBetweenIxs(action: ActionType, includeAtaIxns: boolean, requestElevationGroup: boolean, addInitObligationForFarm: boolean): Promise<void>;
|
|
136
135
|
addRefreshObligation(crank: PublicKey): void;
|
|
137
|
-
addSupportIxsWithoutInitObligation(action: ActionType, includeAtaIxns: boolean, addAsSupportIx?: AuxiliaryIx, requestElevationGroup?: boolean, addInitObligationForFarm?: boolean,
|
|
136
|
+
addSupportIxsWithoutInitObligation(action: ActionType, includeAtaIxns: boolean, addAsSupportIx?: AuxiliaryIx, requestElevationGroup?: boolean, addInitObligationForFarm?: boolean, twoTokenAction?: boolean, overrideElevationGroupRequest?: number): Promise<void>;
|
|
138
137
|
addSupportIxs(action: ActionType, includeAtaIxns: boolean, requestElevationGroup: boolean, includeUserMetadata: boolean, addInitObligationForFarm: boolean, twoTokenAction?: boolean, overrideElevationGroupRequest?: number): Promise<void>;
|
|
139
138
|
private static optionalAccount;
|
|
140
139
|
private addRefreshReserveIxs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../../src/classes/action.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,SAAS,EACT,qBAAqB,EACrB,4BAA4B,EAI5B,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACrB,MAAM,iBAAiB,CAAC;AAQzB,OAAO,EAAE,MAAM,OAAO,CAAC;AA2BvB,OAAO,EAGL,cAAc,EASd,YAAY,EAEb,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAQ1C,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,cAAc,IAAI,CAAC;AAIhC,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,QAAQ,GACR,UAAU,GACV,OAAO,GACP,MAAM,GACN,QAAQ,GACR,mBAAmB,GACnB,WAAW,GACX,kBAAkB,GAClB,kBAAkB,GAClB,mBAAmB,GACnB,uBAAuB,GACvB,sBAAsB,CAAC;AAE3B,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC;AAE5D,qBAAa,YAAY;IACvB,YAAY,EAAE,YAAY,CAAC;IAE3B,OA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B,YAAY,EAAE,YAAY,EAC1B,WAAW,GAAE,MAAU;;;;IAwCzB,gBAAgB,IAAI,SAAS;IAM7B,gCAAgC,IAAI,SAAS,EAAE;mBAsB1B,cAAc;WAoBrB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,KAAK,CAAC,sBAAsB,CAAC;WAOhE,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,KAAK,CAAC,sBAAsB,CAAC;WAWvE,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC;WAOrD,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC;CAU3E"}
|
package/dist/classes/action.js
CHANGED
|
@@ -59,7 +59,6 @@ class KaminoAction {
|
|
|
59
59
|
depositReserves;
|
|
60
60
|
borrowReserves;
|
|
61
61
|
preLoadedDepositReservesSameTx;
|
|
62
|
-
preLoadedBorrowReservesSameTx;
|
|
63
62
|
currentSlot;
|
|
64
63
|
constructor(kaminoMarket, owner, obligation, userTokenAccountAddress, userCollateralAccountAddress, mint, positions, amount, depositReserves, borrowReserves, reserveState, currentSlot, secondaryMint, additionalTokenAccountAddress, outflowReserveState, outflowAmount, referrer, payer) {
|
|
65
64
|
if (obligation instanceof obligation_1.KaminoObligation) {
|
|
@@ -100,7 +99,6 @@ class KaminoAction {
|
|
|
100
99
|
this.outflowReserve = outflowReserveState;
|
|
101
100
|
this.outflowAmount = outflowAmount ? new bn_js_1.default(outflowAmount) : undefined;
|
|
102
101
|
this.preLoadedDepositReservesSameTx = [];
|
|
103
|
-
this.preLoadedBorrowReservesSameTx = [];
|
|
104
102
|
this.referrer = referrer ? referrer : web3_js_1.PublicKey.default;
|
|
105
103
|
this.currentSlot = currentSlot;
|
|
106
104
|
}
|
|
@@ -363,7 +361,7 @@ class KaminoAction {
|
|
|
363
361
|
static async buildRepayAndWithdrawTxns(kaminoMarket, repayAmount, repayMint, withdrawAmount, withdrawMint, payer, currentSlot, obligation, extraComputeBudget = 1_000_000, // if > 0 then adds the ixn
|
|
364
362
|
includeAtaIxns = true, // if true it includes create and close wsol and token atas,
|
|
365
363
|
requestElevationGroup = false, includeUserMetadata = true, // if true it includes user metadata,
|
|
366
|
-
|
|
364
|
+
referrer = web3_js_1.PublicKey.default, scopeRefresh = { includeScopeRefresh: false, scopeFeed: 'hubble' }) {
|
|
367
365
|
const axn = await KaminoAction.initializeMultiTokenAction(kaminoMarket, 'repayAndWithdraw', repayAmount, repayMint, withdrawMint, payer, payer, obligation, withdrawAmount, referrer, currentSlot);
|
|
368
366
|
const addInitObligationForFarmForRepay = true;
|
|
369
367
|
const addInitObligationForFarmForWithdraw = false;
|
|
@@ -383,7 +381,7 @@ class KaminoAction {
|
|
|
383
381
|
}
|
|
384
382
|
await axn.addSupportIxs('repay', includeAtaIxns, requestElevationGroup, includeUserMetadata, addInitObligationForFarmForRepay, twoTokenAction);
|
|
385
383
|
await axn.addRepayAndWithdrawIxs();
|
|
386
|
-
await axn.addInBetweenIxs('repayAndWithdraw', includeAtaIxns, requestElevationGroup, addInitObligationForFarmForWithdraw
|
|
384
|
+
await axn.addInBetweenIxs('repayAndWithdraw', includeAtaIxns, requestElevationGroup, addInitObligationForFarmForWithdraw);
|
|
387
385
|
axn.addRefreshFarmsCleanupTxnIxsToCleanupIxs();
|
|
388
386
|
return axn;
|
|
389
387
|
}
|
|
@@ -839,8 +837,8 @@ class KaminoAction {
|
|
|
839
837
|
: liquidateIx.keys;
|
|
840
838
|
this.lendingIxs.push(liquidateIx);
|
|
841
839
|
}
|
|
842
|
-
async addInBetweenIxs(action, includeAtaIxns, requestElevationGroup, addInitObligationForFarm
|
|
843
|
-
await this.addSupportIxsWithoutInitObligation(action, includeAtaIxns, 'inBetween', requestElevationGroup, addInitObligationForFarm
|
|
840
|
+
async addInBetweenIxs(action, includeAtaIxns, requestElevationGroup, addInitObligationForFarm) {
|
|
841
|
+
await this.addSupportIxsWithoutInitObligation(action, includeAtaIxns, 'inBetween', requestElevationGroup, addInitObligationForFarm);
|
|
844
842
|
}
|
|
845
843
|
addRefreshObligation(crank) {
|
|
846
844
|
const uniqueReserveAddresses = new utils_1.PublicKeySet(this.depositReserves.concat(this.borrowReserves)).toArray();
|
|
@@ -850,9 +848,9 @@ class KaminoAction {
|
|
|
850
848
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, addAllToSetupIxns);
|
|
851
849
|
this.addRefreshFarmsForReserve(this.depositReserves.map((r) => this.kaminoMarket.getReserveByAddress(r)), addAllToSetupIxns, types_1.ReserveFarmKind.Collateral, crank);
|
|
852
850
|
this.addRefreshFarmsForReserve(this.borrowReserves.map((r) => this.kaminoMarket.getReserveByAddress(r)), addAllToSetupIxns, types_1.ReserveFarmKind.Debt, crank);
|
|
853
|
-
this.addRefreshObligationIx(addAllToSetupIxns
|
|
851
|
+
this.addRefreshObligationIx(addAllToSetupIxns);
|
|
854
852
|
}
|
|
855
|
-
async addSupportIxsWithoutInitObligation(action, includeAtaIxns, addAsSupportIx = 'setup', requestElevationGroup = false, addInitObligationForFarm = false,
|
|
853
|
+
async addSupportIxsWithoutInitObligation(action, includeAtaIxns, addAsSupportIx = 'setup', requestElevationGroup = false, addInitObligationForFarm = false, twoTokenAction = false, overrideElevationGroupRequest) {
|
|
856
854
|
// TODO: why are we not doing this first?
|
|
857
855
|
if (includeAtaIxns) {
|
|
858
856
|
await this.addAtaIxs(action);
|
|
@@ -887,33 +885,18 @@ class KaminoAction {
|
|
|
887
885
|
}
|
|
888
886
|
if (action === 'depositAndBorrow' || action === 'repayAndWithdraw') {
|
|
889
887
|
currentReserves = [this.reserve, this.outflowReserve];
|
|
890
|
-
if (
|
|
891
|
-
if (
|
|
892
|
-
const deposit = this.obligation.
|
|
888
|
+
if (action === 'depositAndBorrow') {
|
|
889
|
+
if (this.obligation) {
|
|
890
|
+
const deposit = this.obligation.getDepositByReserve(this.reserve.address);
|
|
893
891
|
if (!deposit) {
|
|
894
892
|
this.preLoadedDepositReservesSameTx.push(this.reserve.address);
|
|
895
893
|
}
|
|
896
894
|
}
|
|
897
895
|
else {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
throw Error(`Unable to find obligation borrow to repay for ${this.obligation.state.owner.toBase58()}`);
|
|
901
|
-
}
|
|
902
|
-
const cumulativeBorrowRateObligation = obligation_1.KaminoObligation.getCumulativeBorrowRate(borrow);
|
|
903
|
-
const cumulativeBorrowRateReserve = this.reserve.getEstimatedCumulativeBorrowRate(this.currentSlot, this.kaminoMarket.state.referralFeeBps);
|
|
904
|
-
const fullRepay = obligation_1.KaminoObligation.getBorrowAmount(borrow)
|
|
905
|
-
.mul(cumulativeBorrowRateReserve)
|
|
906
|
-
.div(cumulativeBorrowRateObligation);
|
|
907
|
-
const amountDecimal = new decimal_js_1.default(this.amount.toString());
|
|
908
|
-
if (fullRepay.lte(amountDecimal)) {
|
|
909
|
-
this.preLoadedBorrowReservesSameTx.push(this.reserve.address);
|
|
910
|
-
}
|
|
896
|
+
// Obligation doesn't exist yet, so we have to preload the deposit reserve
|
|
897
|
+
this.preLoadedDepositReservesSameTx.push(this.reserve.address);
|
|
911
898
|
}
|
|
912
899
|
}
|
|
913
|
-
else {
|
|
914
|
-
// Obligation doesn't exist yet, so we have to preload the deposit reserve
|
|
915
|
-
this.preLoadedDepositReservesSameTx.push(this.reserve.address);
|
|
916
|
-
}
|
|
917
900
|
}
|
|
918
901
|
else if (action === 'liquidate' && !this.outflowReserve.address.equals(this.reserve.address)) {
|
|
919
902
|
currentReserves = [this.outflowReserve, this.reserve];
|
|
@@ -961,15 +944,18 @@ class KaminoAction {
|
|
|
961
944
|
}
|
|
962
945
|
}
|
|
963
946
|
this.addRefreshReserveIxs(currentReserveAddresses.toArray(), addAsSupportIx);
|
|
964
|
-
if (action === 'repayAndWithdraw' && addAsSupportIx === 'inBetween'
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
this.
|
|
947
|
+
if (action === 'repayAndWithdraw' && addAsSupportIx === 'inBetween') {
|
|
948
|
+
const repayObligationLiquidity = this.obligation.getBorrowByReserve(this.reserve.address);
|
|
949
|
+
if (!repayObligationLiquidity) {
|
|
950
|
+
throw new Error(`Could not find debt reserve ${this.reserve.address} in obligation`);
|
|
951
|
+
}
|
|
952
|
+
const repaidBorrowReservesToSkip = repayObligationLiquidity.amount.lte(new decimal_js_1.default(this.amount.toString()))
|
|
953
|
+
? [repayObligationLiquidity.reserveAddress]
|
|
954
|
+
: [];
|
|
955
|
+
this.addRefreshObligationIx(addAsSupportIx, repaidBorrowReservesToSkip);
|
|
970
956
|
}
|
|
971
957
|
else {
|
|
972
|
-
this.addRefreshObligationIx(addAsSupportIx
|
|
958
|
+
this.addRefreshObligationIx(addAsSupportIx);
|
|
973
959
|
}
|
|
974
960
|
if (requestElevationGroup) {
|
|
975
961
|
if (action === 'repay') {
|
|
@@ -977,13 +963,13 @@ class KaminoAction {
|
|
|
977
963
|
if (!repayObligationLiquidity) {
|
|
978
964
|
throw new Error(`Could not find debt reserve ${this.reserve.address} in obligation`);
|
|
979
965
|
}
|
|
980
|
-
if (
|
|
966
|
+
if (repayObligationLiquidity.amount.lte(new decimal_js_1.default(this.amount.toString())) &&
|
|
981
967
|
this.obligation.borrows.size === 1 &&
|
|
982
968
|
this.obligation?.state.elevationGroup !== 0) {
|
|
983
969
|
this.addRefreshReserveIxs(allReservesExcludingCurrent, 'cleanup');
|
|
984
970
|
// Skip the borrow reserve, since we repay in the same tx
|
|
985
|
-
this.addRefreshObligationIx('cleanup',
|
|
986
|
-
this.addRequestElevationIx(overrideElevationGroupRequest ?? 0, 'cleanup',
|
|
971
|
+
this.addRefreshObligationIx('cleanup', [this.reserve.address]);
|
|
972
|
+
this.addRequestElevationIx(overrideElevationGroupRequest ?? 0, 'cleanup', [this.reserve.address]);
|
|
987
973
|
}
|
|
988
974
|
}
|
|
989
975
|
else if (action === 'depositAndBorrow' || action === 'borrow') {
|
|
@@ -1099,7 +1085,7 @@ class KaminoAction {
|
|
|
1099
1085
|
}
|
|
1100
1086
|
await this.addInitObligationIxs();
|
|
1101
1087
|
}
|
|
1102
|
-
await this.addSupportIxsWithoutInitObligation(action, includeAtaIxns, 'setup', requestElevationGroup, addInitObligationForFarm,
|
|
1088
|
+
await this.addSupportIxsWithoutInitObligation(action, includeAtaIxns, 'setup', requestElevationGroup, addInitObligationForFarm, twoTokenAction, overrideElevationGroupRequest);
|
|
1103
1089
|
}
|
|
1104
1090
|
static optionalAccount(pubkey, programId = lib_1.PROGRAM_ID) {
|
|
1105
1091
|
if ((0, utils_1.isNotNullPubkey)(pubkey)) {
|
|
@@ -1155,7 +1141,7 @@ class KaminoAction {
|
|
|
1155
1141
|
}, kaminoMarket.programId);
|
|
1156
1142
|
});
|
|
1157
1143
|
}
|
|
1158
|
-
addRefreshObligationIx(addAsSupportIx = 'setup',
|
|
1144
|
+
addRefreshObligationIx(addAsSupportIx = 'setup', borrowReservesToSkip = []) {
|
|
1159
1145
|
const marketAddress = this.kaminoMarket.getAddress();
|
|
1160
1146
|
const obligationPda = this.getObligationPda();
|
|
1161
1147
|
const refreshObligationIx = (0, instructions_1.refreshObligation)({
|
|
@@ -1166,8 +1152,8 @@ class KaminoAction {
|
|
|
1166
1152
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1167
1153
|
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1168
1154
|
});
|
|
1169
|
-
const
|
|
1170
|
-
const borrowReservesList = this.borrowReserves.filter((reserve) => !
|
|
1155
|
+
const skipBorrowsSet = new utils_1.PublicKeySet(borrowReservesToSkip);
|
|
1156
|
+
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipBorrowsSet.contains(reserve));
|
|
1171
1157
|
const borrowReserveAccountMetas = borrowReservesList.map((reserve) => {
|
|
1172
1158
|
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1173
1159
|
});
|
|
@@ -1182,7 +1168,8 @@ class KaminoAction {
|
|
|
1182
1168
|
.filter((x) => !x.pubkey.equals(this.kaminoMarket.programId));
|
|
1183
1169
|
refreshObligationIx.keys = refreshObligationIx.keys.concat([
|
|
1184
1170
|
...depositReserveAccountMetas,
|
|
1185
|
-
...
|
|
1171
|
+
...borrowReserveAccountMetas,
|
|
1172
|
+
...borrowReservesReferrerTokenStates,
|
|
1186
1173
|
]);
|
|
1187
1174
|
if (addAsSupportIx === 'setup') {
|
|
1188
1175
|
this.setupIxs.push(refreshObligationIx);
|
|
@@ -1197,7 +1184,7 @@ class KaminoAction {
|
|
|
1197
1184
|
this.cleanupIxsLabels.push(`RefreshObligation[${obligationPda.toString()}]`);
|
|
1198
1185
|
}
|
|
1199
1186
|
}
|
|
1200
|
-
addRequestElevationIx(elevationGroup, addAsSupportIx,
|
|
1187
|
+
addRequestElevationIx(elevationGroup, addAsSupportIx, skipBorrowReserves = []) {
|
|
1201
1188
|
const obligationPda = this.getObligationPda();
|
|
1202
1189
|
const args = {
|
|
1203
1190
|
elevationGroup,
|
|
@@ -1212,8 +1199,8 @@ class KaminoAction {
|
|
|
1212
1199
|
const depositReserveAccountMetas = depositReservesList.map((reserve) => {
|
|
1213
1200
|
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1214
1201
|
});
|
|
1215
|
-
const
|
|
1216
|
-
const borrowReservesList = this.borrowReserves.filter((reserve) => !
|
|
1202
|
+
const skipBorrowReservesSet = new utils_1.PublicKeySet(skipBorrowReserves);
|
|
1203
|
+
const borrowReservesList = this.borrowReserves.filter((reserve) => !skipBorrowReservesSet.contains(reserve));
|
|
1217
1204
|
const borrowReserveAccountMetas = borrowReservesList.map((reserve) => {
|
|
1218
1205
|
return { pubkey: reserve, isSigner: false, isWritable: true };
|
|
1219
1206
|
});
|
|
@@ -1229,7 +1216,8 @@ class KaminoAction {
|
|
|
1229
1216
|
.filter((x) => !x.pubkey.equals(this.kaminoMarket.programId));
|
|
1230
1217
|
requestElevationGroupIx.keys = requestElevationGroupIx.keys.concat([
|
|
1231
1218
|
...depositReserveAccountMetas,
|
|
1232
|
-
...
|
|
1219
|
+
...borrowReserveAccountMetas,
|
|
1220
|
+
...borrowReservesReferrerTokenStates,
|
|
1233
1221
|
]);
|
|
1234
1222
|
if (addAsSupportIx === 'setup') {
|
|
1235
1223
|
this.setupIxs.push(requestElevationGroupIx);
|