@jup-ag/lend 0.1.10 → 0.2.0-beta.1
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.mjs +3 -3
- package/dist/dex/index.d.mts +4506 -0
- package/dist/dex/index.d.ts +4506 -0
- package/dist/dex/index.mjs +5460 -0
- package/dist/earn/index.mjs +1 -1
- package/dist/index.d.mts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.mjs +3 -2
- package/dist/refinance/index.mjs +2 -2
- package/dist/shared/lend.BC5Y1398.mjs +18 -0
- package/dist/shared/{lend.BhQGaP3o.mjs → lend.C3XdrR6R.mjs} +1 -1
- package/dist/shared/{lend.B03stRz0.mjs → lend.CTcB5yyK.mjs} +1 -1
- package/package.json +5 -1
package/dist/earn/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { getAssociatedTokenAddress, getAccount, createAssociatedTokenAccountInst
|
|
|
3
3
|
import { Program } from '@coral-xyz/anchor';
|
|
4
4
|
import BN$1, { BN } from 'bn.js';
|
|
5
5
|
import { g as getLendingToken, a as getLending, b as getLendingRewardsRateModel, c as getClaimAccount, d as getLendingAdmin } from '../shared/lend.BQkL9C4i.mjs';
|
|
6
|
-
import {
|
|
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
|
|
|
8
8
|
const address = "jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9";
|
|
9
9
|
const metadata = {
|
package/dist/index.d.mts
CHANGED
|
@@ -118,6 +118,15 @@ declare namespace borrow {
|
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
declare const getDex: (dexId: number) => PublicKey;
|
|
122
|
+
|
|
123
|
+
declare const dex_getDex: typeof getDex;
|
|
124
|
+
declare namespace dex {
|
|
125
|
+
export {
|
|
126
|
+
dex_getDex as getDex,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
121
130
|
declare const getFlashloanProgramId: (market: "main" | "ethena") => PublicKey;
|
|
122
131
|
declare const getFlashloanAdmin: (market: "main" | "ethena") => PublicKey;
|
|
123
132
|
declare const getLiquidityReserve: (asset: PublicKey, market: "main" | "ethena") => PublicKey;
|
|
@@ -169,4 +178,4 @@ declare namespace merkleDistributor {
|
|
|
169
178
|
|
|
170
179
|
declare const version: string;
|
|
171
180
|
|
|
172
|
-
export { borrow as borrowPda, flashloan as flashloanPda, lending as lendingPda, lendingRewardRateModel as lendingRewardRateModelPda, liquidity as liquidityPda, merkleDistributor as merkleDistributorPda, version };
|
|
181
|
+
export { borrow as borrowPda, dex as dexPda, flashloan as flashloanPda, lending as lendingPda, lendingRewardRateModel as lendingRewardRateModelPda, liquidity as liquidityPda, merkleDistributor as merkleDistributorPda, version };
|
package/dist/index.d.ts
CHANGED
|
@@ -118,6 +118,15 @@ declare namespace borrow {
|
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
declare const getDex: (dexId: number) => PublicKey;
|
|
122
|
+
|
|
123
|
+
declare const dex_getDex: typeof getDex;
|
|
124
|
+
declare namespace dex {
|
|
125
|
+
export {
|
|
126
|
+
dex_getDex as getDex,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
121
130
|
declare const getFlashloanProgramId: (market: "main" | "ethena") => PublicKey;
|
|
122
131
|
declare const getFlashloanAdmin: (market: "main" | "ethena") => PublicKey;
|
|
123
132
|
declare const getLiquidityReserve: (asset: PublicKey, market: "main" | "ethena") => PublicKey;
|
|
@@ -169,4 +178,4 @@ declare namespace merkleDistributor {
|
|
|
169
178
|
|
|
170
179
|
declare const version: string;
|
|
171
180
|
|
|
172
|
-
export { borrow as borrowPda, flashloan as flashloanPda, lending as lendingPda, lendingRewardRateModel as lendingRewardRateModelPda, liquidity as liquidityPda, merkleDistributor as merkleDistributorPda, version };
|
|
181
|
+
export { borrow as borrowPda, dex as dexPda, flashloan as flashloanPda, lending as lendingPda, lendingRewardRateModel as lendingRewardRateModelPda, liquidity as liquidityPda, merkleDistributor as merkleDistributorPda, version };
|
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
export { b as borrowPda } from './shared/lend.ByiEG4eI.mjs';
|
|
2
|
+
export { d as dexPda } from './shared/lend.BC5Y1398.mjs';
|
|
2
3
|
export { f as flashloanPda } from './shared/lend.BXNM1zms.mjs';
|
|
3
4
|
export { l as lendingPda, e as lendingRewardRateModelPda } from './shared/lend.BQkL9C4i.mjs';
|
|
4
|
-
export { l as liquidityPda } from './shared/lend.
|
|
5
|
+
export { l as liquidityPda } from './shared/lend.C3XdrR6R.mjs';
|
|
5
6
|
export { m as merkleDistributorPda } from './shared/lend.CeAr0e-D.mjs';
|
|
6
7
|
import '@solana/web3.js';
|
|
7
8
|
import '@solana/spl-token';
|
|
8
9
|
import 'bn.js';
|
|
9
10
|
|
|
10
|
-
const version = "0.1
|
|
11
|
+
const version = "0.2.0-beta.1";
|
|
11
12
|
|
|
12
13
|
export { version };
|
package/dist/refinance/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { v as getOperateIx, F as vaultsIdl } from '../shared/lend.
|
|
1
|
+
import { v as getOperateIx, F as vaultsIdl } from '../shared/lend.CTcB5yyK.mjs';
|
|
2
2
|
import { PublicKey } from '@solana/web3.js';
|
|
3
3
|
import { Program } from '@coral-xyz/anchor';
|
|
4
4
|
import 'bn.js';
|
|
5
5
|
import '@solana/spl-token';
|
|
6
6
|
import '../shared/lend.ByiEG4eI.mjs';
|
|
7
|
-
import '../shared/lend.
|
|
7
|
+
import '../shared/lend.C3XdrR6R.mjs';
|
|
8
8
|
|
|
9
9
|
const address = "jup8QcdtqecBGw1iXHW3hQAsHQbTgEqbLbNMvvULmeK";
|
|
10
10
|
const metadata = {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
|
2
|
+
|
|
3
|
+
const DEX_PROGRAM_ID = new PublicKey("'jupZ4m2GqUCJ5iueMfzQf8khFfH31d4XAQt3RzCT9Vd");
|
|
4
|
+
const getDex = (dexId) => {
|
|
5
|
+
const id = Buffer.alloc(2);
|
|
6
|
+
id.writeUInt16LE(dexId);
|
|
7
|
+
return PublicKey.findProgramAddressSync(
|
|
8
|
+
[Buffer.from("dex"), id],
|
|
9
|
+
DEX_PROGRAM_ID
|
|
10
|
+
)[0];
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const dex = {
|
|
14
|
+
__proto__: null,
|
|
15
|
+
getDex: getDex
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { dex as d, getDex as g };
|
|
@@ -66,4 +66,4 @@ const liquidity = {
|
|
|
66
66
|
getUserSupplyPosition: getUserSupplyPosition
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
export {
|
|
69
|
+
export { getLiquidity as a, getUserBorrowPosition as b, getUserSupplyPosition as c, getRateModel as d, getReserve as e, getTokenReserveFromAsset as f, getLiquidityProgramId as g, liquidity as l };
|
|
@@ -3,7 +3,7 @@ import BN from 'bn.js';
|
|
|
3
3
|
import { Program, AnchorProvider } from '@coral-xyz/anchor';
|
|
4
4
|
import { ASSOCIATED_TOKEN_PROGRAM_ID, TOKEN_PROGRAM_ID, getAssociatedTokenAddressSync, NATIVE_MINT } from '@solana/spl-token';
|
|
5
5
|
import { a as getTickHasDebt, c as getPosition, d as getTick, e as getTickIdLiquidation, f as getVaultConfig, h as getBranch, i as getVaultState, j as getPositionMetadata, k as getPositionTokenAccount, l as getPositionMint, g as getVaultAdmin, m as getVaultMetadata, n as getLiquidity, o as getClaimAccount, p as getRateModel, q as getUserBorrowPosition, r as getUserSupplyPosition, s as getLiquidityReserve } from './lend.ByiEG4eI.mjs';
|
|
6
|
-
import { e as getReserve } from './lend.
|
|
6
|
+
import { e as getReserve } from './lend.C3XdrR6R.mjs';
|
|
7
7
|
|
|
8
8
|
const address$1 = "jupnw4B6Eqs7ft6rxpzYLJZYSnrpRgPcr589n5Kv4oc";
|
|
9
9
|
const metadata$1 = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jup-ag/lend",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.0-beta.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"types": "./dist/borrow/index.d.mts",
|
|
19
19
|
"default": "./dist/borrow/index.mjs"
|
|
20
20
|
},
|
|
21
|
+
"./dex": {
|
|
22
|
+
"types": "./dist/dex/index.d.mts",
|
|
23
|
+
"default": "./dist/dex/index.mjs"
|
|
24
|
+
},
|
|
21
25
|
"./flashloan": {
|
|
22
26
|
"types": "./dist/flashloan/index.d.mts",
|
|
23
27
|
"default": "./dist/flashloan/index.mjs"
|