@jup-ag/lend 0.2.0-beta.3 → 0.2.0-beta.4
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/borrow/index.d.mts +2 -2
- package/dist/borrow/index.d.ts +2 -2
- package/dist/borrow/index.mjs +5 -5
- package/dist/dex/index.mjs +1 -1
- package/dist/earn/index.d.mts +131 -1
- package/dist/earn/index.d.ts +131 -1
- package/dist/earn/index.mjs +2 -2
- package/dist/flashloan/index.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/refinance/index.d.mts +1 -1
- package/dist/refinance/index.d.ts +1 -1
- package/dist/refinance/index.mjs +3 -3
- package/dist/shared/{lend.CS-bkwRq.mjs → lend.BFWi2x2e.mjs} +2 -2
- package/dist/shared/{lend.B80NmXTG.mjs → lend.BR8HvUg-.mjs} +147 -1
- package/dist/shared/{lend.CdoFqRFx.d.ts → lend.CZaDpI67.d.mts} +1 -1
- package/dist/shared/{lend.CdoFqRFx.d.mts → lend.CZaDpI67.d.ts} +1 -1
- package/dist/shared/{lend.CVtn-ehf.mjs → lend.TR2SYmUo.mjs} +2 -2
- package/package.json +1 -1
package/dist/borrow/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as Vaults, L as LiquidateParams } from '../shared/lend.
|
|
2
|
-
export { C as ConnectionParams, I as InitPositionIxParams, a as LiquidateContextParams, O as OperateContextParams, b as OperateParams, g as getInitPositionContext, c as getInitPositionIx, d as getLiquidateContext, e as getLiquidateIx, f as getOperateContext, h as getOperateIx } from '../shared/lend.
|
|
1
|
+
import { V as Vaults, L as LiquidateParams } from '../shared/lend.CZaDpI67.mjs';
|
|
2
|
+
export { C as ConnectionParams, I as InitPositionIxParams, a as LiquidateContextParams, O as OperateContextParams, b as OperateParams, g as getInitPositionContext, c as getInitPositionIx, d as getLiquidateContext, e as getLiquidateIx, f as getOperateContext, h as getOperateIx } from '../shared/lend.CZaDpI67.mjs';
|
|
3
3
|
import { Program } from '@coral-xyz/anchor';
|
|
4
4
|
import BN__default from 'bn.js';
|
|
5
5
|
import * as _solana_web3_js from '@solana/web3.js';
|
package/dist/borrow/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { V as Vaults, L as LiquidateParams } from '../shared/lend.
|
|
2
|
-
export { C as ConnectionParams, I as InitPositionIxParams, a as LiquidateContextParams, O as OperateContextParams, b as OperateParams, g as getInitPositionContext, c as getInitPositionIx, d as getLiquidateContext, e as getLiquidateIx, f as getOperateContext, h as getOperateIx } from '../shared/lend.
|
|
1
|
+
import { V as Vaults, L as LiquidateParams } from '../shared/lend.CZaDpI67.js';
|
|
2
|
+
export { C as ConnectionParams, I as InitPositionIxParams, a as LiquidateContextParams, O as OperateContextParams, b as OperateParams, g as getInitPositionContext, c as getInitPositionIx, d as getLiquidateContext, e as getLiquidateIx, f as getOperateContext, h as getOperateIx } from '../shared/lend.CZaDpI67.js';
|
|
3
3
|
import { Program } from '@coral-xyz/anchor';
|
|
4
4
|
import BN__default from 'bn.js';
|
|
5
5
|
import * as _solana_web3_js from '@solana/web3.js';
|
package/dist/borrow/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { g as getLiquidateIx } from '../shared/lend.
|
|
2
|
-
export { a as getInitPositionContext, b as getInitPositionIx, c as getLiquidateContext, d as getOperateContext, e as getOperateIx } from '../shared/lend.
|
|
3
|
-
import { g as getVaultsProgram } from '../shared/lend.
|
|
4
|
-
export { I as INIT_TICK, M as MAX_REPAY_AMOUNT, a as MAX_TICK, b as MAX_WITHDRAW_AMOUNT, c as MIN_I128, d as MIN_TICK, T as TICKS_PER_TICK_HAS_DEBT, e as TICK_HAS_DEBT_ARRAY_SIZE, f as TICK_HAS_DEBT_CHILDREN_SIZE, h as TICK_HAS_DEBT_CHILDREN_SIZE_IN_BITS, i as TOTAL_INDICES_NEEDED, Z as ZERO_TICK_SCALED_RATIO, j as findNextTickWithDebt, k as getAccountOwner, l as getCurrentPosition, m as getCurrentPositionState, n as getFinalPosition, o as getFirstTickForIndex, p as getLiquidityProgramId, q as getMinimumDebt, r as getOracleSources, s as getRatioAtTick, t as getTickAtRatio, u as getTickIndices, v as loadRelevantBranches, w as loadRelevantBranchesForLiquidate, x as loadRelevantTicksHasDebtArrays, y as loadRelevantTicksHasDebtArraysLiquidate, z as readOraclePrice, A as readTickHasDebtArray, B as reconcileLiquidatedDust } from '../shared/lend.
|
|
1
|
+
import { g as getLiquidateIx } from '../shared/lend.BFWi2x2e.mjs';
|
|
2
|
+
export { a as getInitPositionContext, b as getInitPositionIx, c as getLiquidateContext, d as getOperateContext, e as getOperateIx } from '../shared/lend.BFWi2x2e.mjs';
|
|
3
|
+
import { g as getVaultsProgram } from '../shared/lend.TR2SYmUo.mjs';
|
|
4
|
+
export { I as INIT_TICK, M as MAX_REPAY_AMOUNT, a as MAX_TICK, b as MAX_WITHDRAW_AMOUNT, c as MIN_I128, d as MIN_TICK, T as TICKS_PER_TICK_HAS_DEBT, e as TICK_HAS_DEBT_ARRAY_SIZE, f as TICK_HAS_DEBT_CHILDREN_SIZE, h as TICK_HAS_DEBT_CHILDREN_SIZE_IN_BITS, i as TOTAL_INDICES_NEEDED, Z as ZERO_TICK_SCALED_RATIO, j as findNextTickWithDebt, k as getAccountOwner, l as getCurrentPosition, m as getCurrentPositionState, n as getFinalPosition, o as getFirstTickForIndex, p as getLiquidityProgramId, q as getMinimumDebt, r as getOracleSources, s as getRatioAtTick, t as getTickAtRatio, u as getTickIndices, v as loadRelevantBranches, w as loadRelevantBranchesForLiquidate, x as loadRelevantTicksHasDebtArrays, y as loadRelevantTicksHasDebtArraysLiquidate, z as readOraclePrice, A as readTickHasDebtArray, B as reconcileLiquidatedDust } from '../shared/lend.TR2SYmUo.mjs';
|
|
5
5
|
import { PublicKey, TransactionMessage, ComputeBudgetProgram, VersionedTransaction } from '@solana/web3.js';
|
|
6
6
|
import BN from 'bn.js';
|
|
7
7
|
import { g as getVaultAdmin } from '../shared/lend.a53XYkl5.mjs';
|
|
8
8
|
import '@coral-xyz/anchor';
|
|
9
9
|
import '@solana/spl-token';
|
|
10
|
-
import '../shared/lend.
|
|
10
|
+
import '../shared/lend.BR8HvUg-.mjs';
|
|
11
11
|
import '../shared/lend.C3XdrR6R.mjs';
|
|
12
12
|
|
|
13
13
|
const simulateLiquidate = async (params) => {
|
package/dist/dex/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PublicKey } from '@solana/web3.js';
|
|
2
2
|
import { Program } from '@coral-xyz/anchor';
|
|
3
3
|
import { getAssociatedTokenAddressSync, ASSOCIATED_TOKEN_PROGRAM_ID } from '@solana/spl-token';
|
|
4
|
-
import { r as getOracleSources } from '../shared/lend.
|
|
4
|
+
import { r as getOracleSources } from '../shared/lend.TR2SYmUo.mjs';
|
|
5
5
|
import { g as getLiquidityProgramId, a as getLiquidity, b as getUserBorrowPosition, c as getUserSupplyPosition, d as getRateModel, e as getReserve } from '../shared/lend.C3XdrR6R.mjs';
|
|
6
6
|
import { g as getDex, a as getDexMetadata } from '../shared/lend.s0kjiHy3.mjs';
|
|
7
7
|
import 'bn.js';
|
package/dist/earn/index.d.mts
CHANGED
|
@@ -125,7 +125,7 @@ type Lending = {
|
|
|
125
125
|
address: "jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9";
|
|
126
126
|
metadata: {
|
|
127
127
|
name: "lending";
|
|
128
|
-
version: "0.1.
|
|
128
|
+
version: "0.1.4";
|
|
129
129
|
spec: "0.1.0";
|
|
130
130
|
description: "Created with Anchor";
|
|
131
131
|
};
|
|
@@ -825,6 +825,136 @@ type Lending = {
|
|
|
825
825
|
];
|
|
826
826
|
args: [];
|
|
827
827
|
},
|
|
828
|
+
{
|
|
829
|
+
name: "rebalanceWithAmounts";
|
|
830
|
+
discriminator: [190, 33, 144, 182, 86, 4, 141, 73];
|
|
831
|
+
accounts: [
|
|
832
|
+
{
|
|
833
|
+
name: "signer";
|
|
834
|
+
writable: true;
|
|
835
|
+
signer: true;
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
name: "depositorTokenAccount";
|
|
839
|
+
writable: true;
|
|
840
|
+
pda: {
|
|
841
|
+
seeds: [
|
|
842
|
+
{
|
|
843
|
+
kind: "account";
|
|
844
|
+
path: "signer";
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
kind: "account";
|
|
848
|
+
path: "tokenProgram";
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
kind: "account";
|
|
852
|
+
path: "mint";
|
|
853
|
+
}
|
|
854
|
+
];
|
|
855
|
+
program: {
|
|
856
|
+
kind: "const";
|
|
857
|
+
value: [
|
|
858
|
+
140,
|
|
859
|
+
151,
|
|
860
|
+
37,
|
|
861
|
+
143,
|
|
862
|
+
78,
|
|
863
|
+
36,
|
|
864
|
+
137,
|
|
865
|
+
241,
|
|
866
|
+
187,
|
|
867
|
+
61,
|
|
868
|
+
16,
|
|
869
|
+
41,
|
|
870
|
+
20,
|
|
871
|
+
142,
|
|
872
|
+
13,
|
|
873
|
+
131,
|
|
874
|
+
11,
|
|
875
|
+
90,
|
|
876
|
+
19,
|
|
877
|
+
153,
|
|
878
|
+
218,
|
|
879
|
+
255,
|
|
880
|
+
16,
|
|
881
|
+
132,
|
|
882
|
+
4,
|
|
883
|
+
142,
|
|
884
|
+
123,
|
|
885
|
+
216,
|
|
886
|
+
219,
|
|
887
|
+
233,
|
|
888
|
+
248,
|
|
889
|
+
89
|
|
890
|
+
];
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
name: "lendingAdmin";
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
name: "lending";
|
|
899
|
+
writable: true;
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
name: "mint";
|
|
903
|
+
relations: ["lending", "rewardsRateModel"];
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
name: "fTokenMint";
|
|
907
|
+
writable: true;
|
|
908
|
+
relations: ["lending"];
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
name: "supplyTokenReservesLiquidity";
|
|
912
|
+
writable: true;
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
name: "lendingSupplyPositionOnLiquidity";
|
|
916
|
+
writable: true;
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
name: "rateModel";
|
|
920
|
+
writable: true;
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
name: "vault";
|
|
924
|
+
writable: true;
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
name: "liquidity";
|
|
928
|
+
writable: true;
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
name: "liquidityProgram";
|
|
932
|
+
relations: ["lendingAdmin"];
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
name: "rewardsRateModel";
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
name: "tokenProgram";
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
name: "associatedTokenProgram";
|
|
942
|
+
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
name: "systemProgram";
|
|
946
|
+
address: "11111111111111111111111111111111";
|
|
947
|
+
}
|
|
948
|
+
];
|
|
949
|
+
args: [
|
|
950
|
+
{
|
|
951
|
+
name: "amount";
|
|
952
|
+
type: {
|
|
953
|
+
option: "u64";
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
];
|
|
957
|
+
},
|
|
828
958
|
{
|
|
829
959
|
name: "redeem";
|
|
830
960
|
discriminator: [184, 12, 86, 149, 70, 196, 97, 225];
|
package/dist/earn/index.d.ts
CHANGED
|
@@ -125,7 +125,7 @@ type Lending = {
|
|
|
125
125
|
address: "jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9";
|
|
126
126
|
metadata: {
|
|
127
127
|
name: "lending";
|
|
128
|
-
version: "0.1.
|
|
128
|
+
version: "0.1.4";
|
|
129
129
|
spec: "0.1.0";
|
|
130
130
|
description: "Created with Anchor";
|
|
131
131
|
};
|
|
@@ -825,6 +825,136 @@ type Lending = {
|
|
|
825
825
|
];
|
|
826
826
|
args: [];
|
|
827
827
|
},
|
|
828
|
+
{
|
|
829
|
+
name: "rebalanceWithAmounts";
|
|
830
|
+
discriminator: [190, 33, 144, 182, 86, 4, 141, 73];
|
|
831
|
+
accounts: [
|
|
832
|
+
{
|
|
833
|
+
name: "signer";
|
|
834
|
+
writable: true;
|
|
835
|
+
signer: true;
|
|
836
|
+
},
|
|
837
|
+
{
|
|
838
|
+
name: "depositorTokenAccount";
|
|
839
|
+
writable: true;
|
|
840
|
+
pda: {
|
|
841
|
+
seeds: [
|
|
842
|
+
{
|
|
843
|
+
kind: "account";
|
|
844
|
+
path: "signer";
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
kind: "account";
|
|
848
|
+
path: "tokenProgram";
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
kind: "account";
|
|
852
|
+
path: "mint";
|
|
853
|
+
}
|
|
854
|
+
];
|
|
855
|
+
program: {
|
|
856
|
+
kind: "const";
|
|
857
|
+
value: [
|
|
858
|
+
140,
|
|
859
|
+
151,
|
|
860
|
+
37,
|
|
861
|
+
143,
|
|
862
|
+
78,
|
|
863
|
+
36,
|
|
864
|
+
137,
|
|
865
|
+
241,
|
|
866
|
+
187,
|
|
867
|
+
61,
|
|
868
|
+
16,
|
|
869
|
+
41,
|
|
870
|
+
20,
|
|
871
|
+
142,
|
|
872
|
+
13,
|
|
873
|
+
131,
|
|
874
|
+
11,
|
|
875
|
+
90,
|
|
876
|
+
19,
|
|
877
|
+
153,
|
|
878
|
+
218,
|
|
879
|
+
255,
|
|
880
|
+
16,
|
|
881
|
+
132,
|
|
882
|
+
4,
|
|
883
|
+
142,
|
|
884
|
+
123,
|
|
885
|
+
216,
|
|
886
|
+
219,
|
|
887
|
+
233,
|
|
888
|
+
248,
|
|
889
|
+
89
|
|
890
|
+
];
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
name: "lendingAdmin";
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
name: "lending";
|
|
899
|
+
writable: true;
|
|
900
|
+
},
|
|
901
|
+
{
|
|
902
|
+
name: "mint";
|
|
903
|
+
relations: ["lending", "rewardsRateModel"];
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
name: "fTokenMint";
|
|
907
|
+
writable: true;
|
|
908
|
+
relations: ["lending"];
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
name: "supplyTokenReservesLiquidity";
|
|
912
|
+
writable: true;
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
name: "lendingSupplyPositionOnLiquidity";
|
|
916
|
+
writable: true;
|
|
917
|
+
},
|
|
918
|
+
{
|
|
919
|
+
name: "rateModel";
|
|
920
|
+
writable: true;
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
name: "vault";
|
|
924
|
+
writable: true;
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
name: "liquidity";
|
|
928
|
+
writable: true;
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
name: "liquidityProgram";
|
|
932
|
+
relations: ["lendingAdmin"];
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
name: "rewardsRateModel";
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
name: "tokenProgram";
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
name: "associatedTokenProgram";
|
|
942
|
+
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
name: "systemProgram";
|
|
946
|
+
address: "11111111111111111111111111111111";
|
|
947
|
+
}
|
|
948
|
+
];
|
|
949
|
+
args: [
|
|
950
|
+
{
|
|
951
|
+
name: "amount";
|
|
952
|
+
type: {
|
|
953
|
+
option: "u64";
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
];
|
|
957
|
+
},
|
|
828
958
|
{
|
|
829
959
|
name: "redeem";
|
|
830
960
|
discriminator: [184, 12, 86, 149, 70, 196, 97, 225];
|
package/dist/earn/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SYSVAR_INSTRUCTIONS_PUBKEY, SystemProgram, PublicKey } from '@solana/web3.js';
|
|
2
2
|
import { getAssociatedTokenAddressSync } from '@solana/spl-token';
|
|
3
|
-
import { g as getAccountOwner, a as getLiquidityProgramId, b as getLendingProgram, c as getOrCreateATAInstruction } from '../shared/lend.
|
|
4
|
-
export { M as MAX_DEPOSIT, d as MAX_WITHDRAW, U as U64_MAX } from '../shared/lend.
|
|
3
|
+
import { g as getAccountOwner, a as getLiquidityProgramId, b as getLendingProgram, c as getOrCreateATAInstruction } from '../shared/lend.BR8HvUg-.mjs';
|
|
4
|
+
export { M as MAX_DEPOSIT, d as MAX_WITHDRAW, U as U64_MAX } from '../shared/lend.BR8HvUg-.mjs';
|
|
5
5
|
import { g as getLendingToken, a as getLending, b as getLendingRewardsRateModel, c as getClaimAccount, d as getLendingAdmin } from '../shared/lend.BQkL9C4i.mjs';
|
|
6
6
|
import { a as getLiquidity, d as getRateModel, b as getUserBorrowPosition, c as getUserSupplyPosition, f as getTokenReserveFromAsset, e as getReserve } from '../shared/lend.C3XdrR6R.mjs';
|
|
7
7
|
import BN from 'bn.js';
|
package/dist/flashloan/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { g as getLiquidity, a as getRateModel, b as getFlashloanBorrowPosition,
|
|
|
7
7
|
const address = "jupgfSgfuAXv4B6R2Uxu85Z1qdzgju79s6MfZekN6XS";
|
|
8
8
|
const metadata = {
|
|
9
9
|
name: "flashloan",
|
|
10
|
-
version: "0.1.
|
|
10
|
+
version: "0.1.4",
|
|
11
11
|
spec: "0.1.0",
|
|
12
12
|
description: "Created with Anchor"
|
|
13
13
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
2
2
|
import { PublicKey } from '@solana/web3.js';
|
|
3
|
-
import { O as OperateContextParams } from '../shared/lend.
|
|
3
|
+
import { O as OperateContextParams } from '../shared/lend.CZaDpI67.mjs';
|
|
4
4
|
import 'bn.js';
|
|
5
5
|
import '@coral-xyz/anchor';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
2
2
|
import { PublicKey } from '@solana/web3.js';
|
|
3
|
-
import { O as OperateContextParams } from '../shared/lend.
|
|
3
|
+
import { O as OperateContextParams } from '../shared/lend.CZaDpI67.js';
|
|
4
4
|
import 'bn.js';
|
|
5
5
|
import '@coral-xyz/anchor';
|
|
6
6
|
|
package/dist/refinance/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { C as vaultsIdl } from '../shared/lend.
|
|
2
|
-
import { e as getOperateIx } from '../shared/lend.
|
|
1
|
+
import { C as vaultsIdl } from '../shared/lend.TR2SYmUo.mjs';
|
|
2
|
+
import { e as getOperateIx } from '../shared/lend.BFWi2x2e.mjs';
|
|
3
3
|
import { PublicKey } from '@solana/web3.js';
|
|
4
4
|
import { Program } from '@coral-xyz/anchor';
|
|
5
5
|
import 'bn.js';
|
|
6
6
|
import '../shared/lend.a53XYkl5.mjs';
|
|
7
7
|
import '@solana/spl-token';
|
|
8
8
|
import '../shared/lend.C3XdrR6R.mjs';
|
|
9
|
-
import '../shared/lend.
|
|
9
|
+
import '../shared/lend.BR8HvUg-.mjs';
|
|
10
10
|
|
|
11
11
|
const address = "jup8QcdtqecBGw1iXHW3hQAsHQbTgEqbLbNMvvULmeK";
|
|
12
12
|
const metadata = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { SYSVAR_RENT_PUBKEY, PublicKey, SYSVAR_INSTRUCTIONS_PUBKEY, SystemProgram } from '@solana/web3.js';
|
|
2
2
|
import BN from 'bn.js';
|
|
3
3
|
import { Program } from '@coral-xyz/anchor';
|
|
4
|
-
import { g as getVaultsProgram, k as getAccountOwner, u as getTickIndices, p as getLiquidityProgramId, c as MIN_I128, m as getCurrentPositionState, n as getFinalPosition, z as readOraclePrice, t as getTickAtRatio, w as loadRelevantBranchesForLiquidate, y as loadRelevantTicksHasDebtArraysLiquidate, D as oracle, v as loadRelevantBranches, x as loadRelevantTicksHasDebtArrays, d as MIN_TICK, j as findNextTickWithDebt, I as INIT_TICK } from './lend.
|
|
4
|
+
import { g as getVaultsProgram, k as getAccountOwner, u as getTickIndices, p as getLiquidityProgramId, c as MIN_I128, m as getCurrentPositionState, n as getFinalPosition, z as readOraclePrice, t as getTickAtRatio, w as loadRelevantBranchesForLiquidate, y as loadRelevantTicksHasDebtArraysLiquidate, D as oracle, v as loadRelevantBranches, x as loadRelevantTicksHasDebtArrays, d as MIN_TICK, j as findNextTickWithDebt, I as INIT_TICK } from './lend.TR2SYmUo.mjs';
|
|
5
5
|
import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync, NATIVE_MINT } from '@solana/spl-token';
|
|
6
|
-
import { c as getOrCreateATAInstruction } from './lend.
|
|
6
|
+
import { c as getOrCreateATAInstruction } from './lend.BR8HvUg-.mjs';
|
|
7
7
|
import { a as getPositionMetadata, c as getPositionTokenAccount, d as getPositionMint, e as getPosition, f as getVaultState, g as getVaultAdmin, h as getVaultConfig, i as getVaultMetadata, j as getLiquidity, k as getClaimAccount, l as getRateModel, m as getUserBorrowPosition, n as getUserSupplyPosition, o as getLiquidityReserve, p as getTickHasDebt, q as getTick, r as getBranch, s as getTickIdLiquidation } from './lend.a53XYkl5.mjs';
|
|
8
8
|
|
|
9
9
|
const MPL_TOKEN_METADATA_PROGRAM_ID = new PublicKey(
|
|
@@ -6,7 +6,7 @@ import { BN } from 'bn.js';
|
|
|
6
6
|
const address = "jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9";
|
|
7
7
|
const metadata = {
|
|
8
8
|
name: "lending",
|
|
9
|
-
version: "0.1.
|
|
9
|
+
version: "0.1.4",
|
|
10
10
|
spec: "0.1.0",
|
|
11
11
|
description: "Created with Anchor"
|
|
12
12
|
};
|
|
@@ -824,6 +824,152 @@ const instructions = [
|
|
|
824
824
|
args: [
|
|
825
825
|
]
|
|
826
826
|
},
|
|
827
|
+
{
|
|
828
|
+
name: "rebalance_with_amounts",
|
|
829
|
+
discriminator: [
|
|
830
|
+
190,
|
|
831
|
+
33,
|
|
832
|
+
144,
|
|
833
|
+
182,
|
|
834
|
+
86,
|
|
835
|
+
4,
|
|
836
|
+
141,
|
|
837
|
+
73
|
|
838
|
+
],
|
|
839
|
+
accounts: [
|
|
840
|
+
{
|
|
841
|
+
name: "signer",
|
|
842
|
+
writable: true,
|
|
843
|
+
signer: true
|
|
844
|
+
},
|
|
845
|
+
{
|
|
846
|
+
name: "depositor_token_account",
|
|
847
|
+
writable: true,
|
|
848
|
+
pda: {
|
|
849
|
+
seeds: [
|
|
850
|
+
{
|
|
851
|
+
kind: "account",
|
|
852
|
+
path: "signer"
|
|
853
|
+
},
|
|
854
|
+
{
|
|
855
|
+
kind: "account",
|
|
856
|
+
path: "token_program"
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
kind: "account",
|
|
860
|
+
path: "mint"
|
|
861
|
+
}
|
|
862
|
+
],
|
|
863
|
+
program: {
|
|
864
|
+
kind: "const",
|
|
865
|
+
value: [
|
|
866
|
+
140,
|
|
867
|
+
151,
|
|
868
|
+
37,
|
|
869
|
+
143,
|
|
870
|
+
78,
|
|
871
|
+
36,
|
|
872
|
+
137,
|
|
873
|
+
241,
|
|
874
|
+
187,
|
|
875
|
+
61,
|
|
876
|
+
16,
|
|
877
|
+
41,
|
|
878
|
+
20,
|
|
879
|
+
142,
|
|
880
|
+
13,
|
|
881
|
+
131,
|
|
882
|
+
11,
|
|
883
|
+
90,
|
|
884
|
+
19,
|
|
885
|
+
153,
|
|
886
|
+
218,
|
|
887
|
+
255,
|
|
888
|
+
16,
|
|
889
|
+
132,
|
|
890
|
+
4,
|
|
891
|
+
142,
|
|
892
|
+
123,
|
|
893
|
+
216,
|
|
894
|
+
219,
|
|
895
|
+
233,
|
|
896
|
+
248,
|
|
897
|
+
89
|
|
898
|
+
]
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
},
|
|
902
|
+
{
|
|
903
|
+
name: "lending_admin"
|
|
904
|
+
},
|
|
905
|
+
{
|
|
906
|
+
name: "lending",
|
|
907
|
+
writable: true
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
name: "mint",
|
|
911
|
+
relations: [
|
|
912
|
+
"lending",
|
|
913
|
+
"rewards_rate_model"
|
|
914
|
+
]
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
name: "f_token_mint",
|
|
918
|
+
writable: true,
|
|
919
|
+
relations: [
|
|
920
|
+
"lending"
|
|
921
|
+
]
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
name: "supply_token_reserves_liquidity",
|
|
925
|
+
writable: true
|
|
926
|
+
},
|
|
927
|
+
{
|
|
928
|
+
name: "lending_supply_position_on_liquidity",
|
|
929
|
+
writable: true
|
|
930
|
+
},
|
|
931
|
+
{
|
|
932
|
+
name: "rate_model",
|
|
933
|
+
writable: true
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
name: "vault",
|
|
937
|
+
writable: true
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
name: "liquidity",
|
|
941
|
+
writable: true
|
|
942
|
+
},
|
|
943
|
+
{
|
|
944
|
+
name: "liquidity_program",
|
|
945
|
+
relations: [
|
|
946
|
+
"lending_admin"
|
|
947
|
+
]
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
name: "rewards_rate_model"
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
name: "token_program"
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
name: "associated_token_program",
|
|
957
|
+
address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
958
|
+
},
|
|
959
|
+
{
|
|
960
|
+
name: "system_program",
|
|
961
|
+
address: "11111111111111111111111111111111"
|
|
962
|
+
}
|
|
963
|
+
],
|
|
964
|
+
args: [
|
|
965
|
+
{
|
|
966
|
+
name: "amount",
|
|
967
|
+
type: {
|
|
968
|
+
option: "u64"
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
]
|
|
972
|
+
},
|
|
827
973
|
{
|
|
828
974
|
name: "redeem",
|
|
829
975
|
discriminator: [
|
|
@@ -7,7 +7,7 @@ import { e as getReserve } from './lend.C3XdrR6R.mjs';
|
|
|
7
7
|
const address$1 = "jupnw4B6Eqs7ft6rxpzYLJZYSnrpRgPcr589n5Kv4oc";
|
|
8
8
|
const metadata$1 = {
|
|
9
9
|
name: "oracle",
|
|
10
|
-
version: "0.1.
|
|
10
|
+
version: "0.1.4",
|
|
11
11
|
spec: "0.1.0",
|
|
12
12
|
description: "Created with Anchor"
|
|
13
13
|
};
|
|
@@ -1727,7 +1727,7 @@ function mulBigNumber(bigNumber1, bigNumber2) {
|
|
|
1727
1727
|
const address = "jupr81YtYssSyPt8jbnGuiWon5f6x9TcDEFxYe3Bdzi";
|
|
1728
1728
|
const metadata = {
|
|
1729
1729
|
name: "vaults",
|
|
1730
|
-
version: "0.1.
|
|
1730
|
+
version: "0.1.4",
|
|
1731
1731
|
spec: "0.1.0",
|
|
1732
1732
|
description: "Created with Anchor"
|
|
1733
1733
|
};
|