@0dotxyz/p0-ts-sdk 2.2.0-alpha.1 → 2.2.0-alpha.3
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.cjs +619 -769
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +388 -497
- package/dist/index.d.ts +388 -497
- package/dist/index.js +619 -769
- package/dist/index.js.map +1 -1
- package/dist/vendor.cjs +6 -2
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +1 -1
- package/dist/vendor.d.ts +1 -1
- package/dist/vendor.js +6 -2
- package/dist/vendor.js.map +1 -1
- package/package.json +1 -1
package/dist/vendor.d.cts
CHANGED
|
@@ -23271,7 +23271,7 @@ declare const SEED_RATE_MODEL = "rate_model";
|
|
|
23271
23271
|
declare const SEED_USER_SUPPLY_POSITION = "user_supply_position";
|
|
23272
23272
|
declare const SEED_USER_CLAIM = "user_claim";
|
|
23273
23273
|
declare const SEED_LENDING_REWARDS_RATE_MODEL = "lending_rewards_rate_model";
|
|
23274
|
-
declare function getAllDerivedJupLendAccounts(mint: PublicKey): {
|
|
23274
|
+
declare function getAllDerivedJupLendAccounts(mint: PublicKey, tokenProgram?: PublicKey): {
|
|
23275
23275
|
fTokenMint: PublicKey;
|
|
23276
23276
|
lendingAdmin: PublicKey;
|
|
23277
23277
|
supplyTokenReservesLiquidity: PublicKey;
|
package/dist/vendor.d.ts
CHANGED
|
@@ -23271,7 +23271,7 @@ declare const SEED_RATE_MODEL = "rate_model";
|
|
|
23271
23271
|
declare const SEED_USER_SUPPLY_POSITION = "user_supply_position";
|
|
23272
23272
|
declare const SEED_USER_CLAIM = "user_claim";
|
|
23273
23273
|
declare const SEED_LENDING_REWARDS_RATE_MODEL = "lending_rewards_rate_model";
|
|
23274
|
-
declare function getAllDerivedJupLendAccounts(mint: PublicKey): {
|
|
23274
|
+
declare function getAllDerivedJupLendAccounts(mint: PublicKey, tokenProgram?: PublicKey): {
|
|
23275
23275
|
fTokenMint: PublicKey;
|
|
23276
23276
|
lendingAdmin: PublicKey;
|
|
23277
23277
|
supplyTokenReservesLiquidity: PublicKey;
|
package/dist/vendor.js
CHANGED
|
@@ -668,6 +668,7 @@ var SinglePoolInstruction = {
|
|
|
668
668
|
},
|
|
669
669
|
depositStake: async (pool, userStakeAccount, userTokenAccount, userLamportAccount) => {
|
|
670
670
|
const stake = findPoolStakeAddress(pool);
|
|
671
|
+
const onRamp = findPoolOnRampAddress(pool);
|
|
671
672
|
const mint = findPoolMintAddress(pool);
|
|
672
673
|
const stakeAuthority = findPoolStakeAuthorityAddress(pool);
|
|
673
674
|
const mintAuthority = findPoolMintAuthorityAddress(pool);
|
|
@@ -676,6 +677,7 @@ var SinglePoolInstruction = {
|
|
|
676
677
|
[
|
|
677
678
|
{ pubkey: pool, isSigner: false, isWritable: false },
|
|
678
679
|
{ pubkey: stake, isSigner: false, isWritable: true },
|
|
680
|
+
{ pubkey: onRamp, isSigner: false, isWritable: false },
|
|
679
681
|
{ pubkey: mint, isSigner: false, isWritable: true },
|
|
680
682
|
{ pubkey: stakeAuthority, isSigner: false, isWritable: false },
|
|
681
683
|
{ pubkey: mintAuthority, isSigner: false, isWritable: false },
|
|
@@ -692,6 +694,7 @@ var SinglePoolInstruction = {
|
|
|
692
694
|
},
|
|
693
695
|
withdrawStake: async (pool, userStakeAccount, userStakeAuthority, userTokenAccount, tokenAmount) => {
|
|
694
696
|
const stake = findPoolStakeAddress(pool);
|
|
697
|
+
const onRamp = findPoolOnRampAddress(pool);
|
|
695
698
|
const mint = findPoolMintAddress(pool);
|
|
696
699
|
const stakeAuthority = findPoolStakeAuthorityAddress(pool);
|
|
697
700
|
const mintAuthority = findPoolMintAuthorityAddress(pool);
|
|
@@ -706,6 +709,7 @@ var SinglePoolInstruction = {
|
|
|
706
709
|
[
|
|
707
710
|
{ pubkey: pool, isSigner: false, isWritable: false },
|
|
708
711
|
{ pubkey: stake, isSigner: false, isWritable: true },
|
|
712
|
+
{ pubkey: onRamp, isSigner: false, isWritable: false },
|
|
709
713
|
{ pubkey: mint, isSigner: false, isWritable: true },
|
|
710
714
|
{ pubkey: stakeAuthority, isSigner: false, isWritable: false },
|
|
711
715
|
{ pubkey: mintAuthority, isSigner: false, isWritable: false },
|
|
@@ -28840,7 +28844,7 @@ var SEED_RATE_MODEL = "rate_model";
|
|
|
28840
28844
|
var SEED_USER_SUPPLY_POSITION = "user_supply_position";
|
|
28841
28845
|
var SEED_USER_CLAIM = "user_claim";
|
|
28842
28846
|
var SEED_LENDING_REWARDS_RATE_MODEL = "lending_rewards_rate_model";
|
|
28843
|
-
function getAllDerivedJupLendAccounts(mint) {
|
|
28847
|
+
function getAllDerivedJupLendAccounts(mint, tokenProgram) {
|
|
28844
28848
|
const [fTokenMint] = deriveJupLendFTokenMint(mint);
|
|
28845
28849
|
const [lending] = deriveJupLendLending(mint, fTokenMint);
|
|
28846
28850
|
const [liquidity] = deriveJupLendLiquidity();
|
|
@@ -28850,7 +28854,7 @@ function getAllDerivedJupLendAccounts(mint) {
|
|
|
28850
28854
|
supplyTokenReservesLiquidity: deriveJupLendTokenReserve(mint)[0],
|
|
28851
28855
|
lendingSupplyPositionOnLiquidity: deriveJupLendLiquiditySupplyPositionPda(mint, lending)[0],
|
|
28852
28856
|
rateModel: deriveJupLendRateModel(mint)[0],
|
|
28853
|
-
vault: deriveJupLendLiquidityVaultAta(mint, liquidity),
|
|
28857
|
+
vault: deriveJupLendLiquidityVaultAta(mint, liquidity, tokenProgram),
|
|
28854
28858
|
liquidity,
|
|
28855
28859
|
rewardsRateModel: deriveJupLendLendingRewardsRateModel(mint)[0]
|
|
28856
28860
|
};
|