@liquid-af/sdk 0.3.1 → 0.4.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/accounts/liquid.d.ts +2 -3
- package/dist/accounts/liquid.d.ts.map +1 -1
- package/dist/accounts/liquid.js +3 -4
- package/dist/accounts/liquid.js.map +1 -1
- package/dist/client.d.ts +4 -4
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +6 -6
- package/dist/client.js.map +1 -1
- package/dist/helpers/preview.d.ts.map +1 -1
- package/dist/helpers/preview.js +1 -1
- package/dist/helpers/preview.js.map +1 -1
- package/dist/idl/liquid.d.ts +1360 -1380
- package/dist/idl/liquid.d.ts.map +1 -1
- package/dist/idl/liquid.json +1360 -1380
- package/dist/idl/liquid_fees.d.ts +1 -1
- package/dist/idl/liquid_fees.json +1 -1
- package/dist/idl/liquid_state.d.ts +62 -62
- package/dist/idl/liquid_state.d.ts.map +1 -1
- package/dist/idl/liquid_state.json +62 -62
- package/dist/idl/liquid_swap.d.ts +494 -494
- package/dist/idl/liquid_swap.d.ts.map +1 -1
- package/dist/idl/liquid_swap.json +494 -494
- package/dist/instructions/liquid.d.ts.map +1 -1
- package/dist/instructions/liquid.js +3 -3
- package/dist/instructions/liquid.js.map +1 -1
- package/dist/pda/index.d.ts.map +1 -1
- package/dist/pda/index.js +1 -1
- package/dist/pda/index.js.map +1 -1
- package/dist/pda/liquid.d.ts +2 -3
- package/dist/pda/liquid.d.ts.map +1 -1
- package/dist/pda/liquid.js +3 -4
- package/dist/pda/liquid.js.map +1 -1
- package/package.json +1 -1
- package/src/accounts/liquid.ts +1 -4
- package/src/client.ts +3 -6
- package/src/helpers/preview.ts +0 -1
- package/src/idl/liquid.json +1360 -1380
- package/src/idl/liquid.ts +1360 -1380
- package/src/idl/liquid_fees.json +1 -1
- package/src/idl/liquid_fees.ts +1 -1
- package/src/idl/liquid_state.json +62 -62
- package/src/idl/liquid_state.ts +62 -62
- package/src/idl/liquid_swap.json +494 -494
- package/src/idl/liquid_swap.ts +494 -494
- package/src/instructions/liquid.ts +0 -3
- package/src/pda/index.ts +0 -1
- package/src/pda/liquid.ts +2 -4
|
@@ -590,7 +590,6 @@ export async function buildBuyStableAutoResolve(
|
|
|
590
590
|
const curve = await fetchStableBondingCurve(
|
|
591
591
|
connection,
|
|
592
592
|
params.mint,
|
|
593
|
-
params.quoteMint,
|
|
594
593
|
params.config,
|
|
595
594
|
);
|
|
596
595
|
return buildBuyStable({ ...params, creator: curve.creator });
|
|
@@ -681,7 +680,6 @@ export async function buildSellStableAutoResolve(
|
|
|
681
680
|
const curve = await fetchStableBondingCurve(
|
|
682
681
|
connection,
|
|
683
682
|
params.mint,
|
|
684
|
-
params.quoteMint,
|
|
685
683
|
params.config,
|
|
686
684
|
);
|
|
687
685
|
return buildSellStable({ ...params, creator: curve.creator });
|
|
@@ -710,7 +708,6 @@ export function buildMigrateStable(
|
|
|
710
708
|
// Derive AMM PDAs
|
|
711
709
|
const [bondingCurve] = getStableBondingCurvePDA(
|
|
712
710
|
mint,
|
|
713
|
-
quoteMint,
|
|
714
711
|
config.liquidProgramId,
|
|
715
712
|
);
|
|
716
713
|
const [ammPoolState] = getPoolPDA(
|
package/src/pda/index.ts
CHANGED
package/src/pda/liquid.ts
CHANGED
|
@@ -112,20 +112,18 @@ export const getBuybackVaultPDA = (
|
|
|
112
112
|
};
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
|
-
* Derives the token-based bonding curve PDA for a token mint
|
|
115
|
+
* Derives the token-based bonding curve PDA for a token mint.
|
|
116
116
|
*
|
|
117
117
|
* @param mint - Token mint address
|
|
118
|
-
* @param quoteMint - Quote token mint address
|
|
119
118
|
* @param programId - Liquid program ID
|
|
120
119
|
* @returns Tuple of [PDA address, bump seed]
|
|
121
120
|
*/
|
|
122
121
|
export const getStableBondingCurvePDA = (
|
|
123
122
|
mint: PublicKey,
|
|
124
|
-
quoteMint: PublicKey,
|
|
125
123
|
programId: PublicKey,
|
|
126
124
|
): [PublicKey, number] => {
|
|
127
125
|
return PublicKey.findProgramAddressSync(
|
|
128
|
-
[SEED_TOKEN_BONDING_CURVE, mint.toBuffer()
|
|
126
|
+
[SEED_TOKEN_BONDING_CURVE, mint.toBuffer()],
|
|
129
127
|
programId,
|
|
130
128
|
);
|
|
131
129
|
};
|