punkkit-sdk 1.0.19 → 1.0.20

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.d.mts CHANGED
@@ -129,7 +129,7 @@ interface ModifyPositionParams {
129
129
  salt?: string;
130
130
  }
131
131
 
132
- declare function addLiq(wallet: Wallet, priceLower: number, priceUpper: number, amount0: bigint, amount1: bigint, poolKey: PoolKey): Promise<void>;
132
+ declare function addLiq(wallet: Wallet, priceLower: number, priceUpper: number, amount0: bigint | number, amount1: bigint | number, poolKey: PoolKey): Promise<void>;
133
133
 
134
134
  declare function getContract(wallet: Wallet, name: string): Promise<Contract>;
135
135
 
package/dist/index.d.ts CHANGED
@@ -129,7 +129,7 @@ interface ModifyPositionParams {
129
129
  salt?: string;
130
130
  }
131
131
 
132
- declare function addLiq(wallet: Wallet, priceLower: number, priceUpper: number, amount0: bigint, amount1: bigint, poolKey: PoolKey): Promise<void>;
132
+ declare function addLiq(wallet: Wallet, priceLower: number, priceUpper: number, amount0: bigint | number, amount1: bigint | number, poolKey: PoolKey): Promise<void>;
133
133
 
134
134
  declare function getContract(wallet: Wallet, name: string): Promise<Contract>;
135
135
 
package/dist/index.js CHANGED
@@ -38017,6 +38017,8 @@ async function addLiq(wallet, priceLower, priceUpper, amount02, amount12, poolKe
38017
38017
  const token0 = await getContract(wallet, "Token0");
38018
38018
  const token1 = await getContract(wallet, "Token1");
38019
38019
  const liqPool = await getContract(wallet, "LiquidPool");
38020
+ const amount0Big = BigInt(amount02);
38021
+ const amount1Big = BigInt(amount12);
38020
38022
  console.log(`[SDK] Validating network and wallet...`);
38021
38023
  if (wallet.provider) {
38022
38024
  const net = await wallet.provider.getNetwork();
@@ -38037,7 +38039,7 @@ async function addLiq(wallet, priceLower, priceUpper, amount02, amount12, poolKe
38037
38039
  console.log(`[SDK] Code length at ${liqPool.address}: ${code.length}`);
38038
38040
  throw e;
38039
38041
  }
38040
- const [liqDelta, amount0Add, amount1Add] = calculateLiqDelta(ticklow, sqrtCurrent, tickhigh, amount02, amount12);
38042
+ const [liqDelta, amount0Add, amount1Add] = calculateLiqDelta(ticklow, sqrtCurrent, tickhigh, amount0Big, amount1Big);
38041
38043
  let modifyPositionParams = {
38042
38044
  tickLower: ticklow,
38043
38045
  tickUpper: tickhigh,
package/dist/index.mjs CHANGED
@@ -38020,6 +38020,8 @@ async function addLiq(wallet, priceLower, priceUpper, amount02, amount12, poolKe
38020
38020
  const token0 = await getContract(wallet, "Token0");
38021
38021
  const token1 = await getContract(wallet, "Token1");
38022
38022
  const liqPool = await getContract(wallet, "LiquidPool");
38023
+ const amount0Big = BigInt(amount02);
38024
+ const amount1Big = BigInt(amount12);
38023
38025
  console.log(`[SDK] Validating network and wallet...`);
38024
38026
  if (wallet.provider) {
38025
38027
  const net = await wallet.provider.getNetwork();
@@ -38040,7 +38042,7 @@ async function addLiq(wallet, priceLower, priceUpper, amount02, amount12, poolKe
38040
38042
  console.log(`[SDK] Code length at ${liqPool.address}: ${code.length}`);
38041
38043
  throw e;
38042
38044
  }
38043
- const [liqDelta, amount0Add, amount1Add] = calculateLiqDelta(ticklow, sqrtCurrent, tickhigh, amount02, amount12);
38045
+ const [liqDelta, amount0Add, amount1Add] = calculateLiqDelta(ticklow, sqrtCurrent, tickhigh, amount0Big, amount1Big);
38044
38046
  let modifyPositionParams = {
38045
38047
  tickLower: ticklow,
38046
38048
  tickUpper: tickhigh,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "punkkit-sdk",
3
- "version": "1.0.19",
3
+ "version": "1.0.20",
4
4
  "devDependencies": {
5
5
  "@nomicfoundation/hardhat-chai-matchers": "1.0.2",
6
6
  "@nomicfoundation/hardhat-network-helpers": "^1.1.2",