@liquid-af/sdk 0.3.1 → 0.4.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.
Files changed (49) hide show
  1. package/dist/accounts/liquid-swap.d.ts +4 -6
  2. package/dist/accounts/liquid-swap.d.ts.map +1 -1
  3. package/dist/accounts/liquid.d.ts +2 -3
  4. package/dist/accounts/liquid.d.ts.map +1 -1
  5. package/dist/accounts/liquid.js +3 -4
  6. package/dist/accounts/liquid.js.map +1 -1
  7. package/dist/client.d.ts +8 -10
  8. package/dist/client.d.ts.map +1 -1
  9. package/dist/client.js +6 -6
  10. package/dist/client.js.map +1 -1
  11. package/dist/helpers/preview.d.ts.map +1 -1
  12. package/dist/helpers/preview.js +1 -1
  13. package/dist/helpers/preview.js.map +1 -1
  14. package/dist/idl/liquid.d.ts +1360 -1380
  15. package/dist/idl/liquid.d.ts.map +1 -1
  16. package/dist/idl/liquid.json +1360 -1380
  17. package/dist/idl/liquid_fees.d.ts +1 -1
  18. package/dist/idl/liquid_fees.json +1 -1
  19. package/dist/idl/liquid_state.d.ts +62 -62
  20. package/dist/idl/liquid_state.d.ts.map +1 -1
  21. package/dist/idl/liquid_state.json +62 -62
  22. package/dist/idl/liquid_swap.d.ts +513 -607
  23. package/dist/idl/liquid_swap.d.ts.map +1 -1
  24. package/dist/idl/liquid_swap.json +513 -607
  25. package/dist/instructions/liquid.d.ts.map +1 -1
  26. package/dist/instructions/liquid.js +3 -3
  27. package/dist/instructions/liquid.js.map +1 -1
  28. package/dist/pda/index.d.ts.map +1 -1
  29. package/dist/pda/index.js +1 -1
  30. package/dist/pda/index.js.map +1 -1
  31. package/dist/pda/liquid.d.ts +2 -3
  32. package/dist/pda/liquid.d.ts.map +1 -1
  33. package/dist/pda/liquid.js +3 -4
  34. package/dist/pda/liquid.js.map +1 -1
  35. package/package.json +1 -1
  36. package/src/accounts/liquid.ts +2 -8
  37. package/src/client.ts +6 -18
  38. package/src/helpers/preview.ts +1 -6
  39. package/src/idl/liquid.json +1360 -1380
  40. package/src/idl/liquid.ts +1360 -1380
  41. package/src/idl/liquid_fees.json +1 -1
  42. package/src/idl/liquid_fees.ts +1 -1
  43. package/src/idl/liquid_state.json +62 -62
  44. package/src/idl/liquid_state.ts +62 -62
  45. package/src/idl/liquid_swap.json +513 -607
  46. package/src/idl/liquid_swap.ts +513 -607
  47. package/src/instructions/liquid.ts +0 -3
  48. package/src/pda/index.ts +0 -1
  49. 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
@@ -283,7 +283,6 @@ export const getStableMigrationPDAs = (
283
283
  ): StableMigrationPDAs => {
284
284
  const [bondingCurve] = getStableBondingCurvePDA(
285
285
  tokenMint,
286
- quoteMint,
287
286
  config.liquidProgramId,
288
287
  );
289
288
  const [ammPoolState] = getPoolPDA(
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 and quote 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(), quoteMint.toBuffer()],
126
+ [SEED_TOKEN_BONDING_CURVE, mint.toBuffer()],
129
127
  programId,
130
128
  );
131
129
  };