punkkit-sdk 1.0.13 → 1.0.16

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
@@ -140,6 +140,17 @@ declare function getPoolSqrtPrice(liqPool: Contract): Promise<bigint>;
140
140
  declare function getPoolPrice(liqPool: Contract): Promise<number>;
141
141
  declare function getCurrentTick(liqPool: Contract): Promise<number>;
142
142
 
143
+ declare function calculateTickFromPriceWithSpacing(price: number, tickSpacing?: number): number;
144
+ declare function calculateTickFromPrice(price: number): number;
145
+ declare function getSqrtPriceAtTick(tick: number): bigint;
146
+ declare function calculatePriceFromTick(tick: number): number;
147
+ declare function priceToSqrtPrice(price: number): bigint;
148
+ declare function liquidity0(amount: bigint, pa: bigint, pb: bigint): bigint;
149
+ declare function liquidity1(amount: bigint, pa: bigint, pb: bigint): bigint;
150
+ declare function amount0(liquidity0: bigint, pa: bigint, pb: bigint): bigint;
151
+ declare function amount1(liquidity1: bigint, pa: bigint, pb: bigint): bigint;
152
+ declare function calculateLiqDelta(ticklow: number, sqrt_cur: bigint, tickupp: number, amt0: bigint, amt1: bigint): [bigint, bigint, bigint];
153
+
143
154
  declare const mutiVoucherABI: ({
144
155
  anonymous: boolean;
145
156
  inputs: {
@@ -179,4 +190,4 @@ declare function balanceOf(contractAddress: string, provider: SignerOrProvider,
179
190
  declare function getAllVouchers(contractAddress: string, provider: SignerOrProvider): Promise<string[]>;
180
191
  declare function BuildUseVoucherTx(tx: providers.TransactionRequest, voucherName: string): providers.TransactionRequest;
181
192
 
182
- export { BuildUseVoucherTx, type ChallengeMatchResultParams, type CreateAuctionConfigParams, type CreateAuctionParams, type ModifyPositionParams, type PlaceBidParams, type PoolKey, type RevealBidParams, type RevealLockParams, type SetUnlockStrategyParams, type SignerOrProvider, type SubmitMatchResultsParams, type SwapParams, type UnlockTokensParams, type WithdrawMatchResultParams, addLiq, balanceOf, buyVoucher, buyVoucherWithEth, createAuction$1 as createAuction, createAuctionConfig, createAuction as createAuctionOnVault, createVoucher, getActiveAuctionsCount, getAllVouchers, getAuctionContract, getAuctionInfo, getAuctionLockInfo, getContract, getCurrentTick, getLiquidity, getLockInfo, getMatchResult, getPoolId, getPoolPrice, getPoolSqrtPrice, getProvider, getVoucherContract, getVoucherInfo, main, modifyPosition, mutiVoucherABI, placeBid, revealBid, revealLock, submitMatchResults, swap, toWei, unlockTokens, useVoucher, withdrawMatchResult };
193
+ export { BuildUseVoucherTx, type ChallengeMatchResultParams, type CreateAuctionConfigParams, type CreateAuctionParams, type ModifyPositionParams, type PlaceBidParams, type PoolKey, type RevealBidParams, type RevealLockParams, type SetUnlockStrategyParams, type SignerOrProvider, type SubmitMatchResultsParams, type SwapParams, type UnlockTokensParams, type WithdrawMatchResultParams, addLiq, amount0, amount1, balanceOf, buyVoucher, buyVoucherWithEth, calculateLiqDelta, calculatePriceFromTick, calculateTickFromPrice, calculateTickFromPriceWithSpacing, createAuction$1 as createAuction, createAuctionConfig, createAuction as createAuctionOnVault, createVoucher, getActiveAuctionsCount, getAllVouchers, getAuctionContract, getAuctionInfo, getAuctionLockInfo, getContract, getCurrentTick, getLiquidity, getLockInfo, getMatchResult, getPoolId, getPoolPrice, getPoolSqrtPrice, getProvider, getSqrtPriceAtTick, getVoucherContract, getVoucherInfo, liquidity0, liquidity1, main, modifyPosition, mutiVoucherABI, placeBid, priceToSqrtPrice, revealBid, revealLock, submitMatchResults, swap, toWei, unlockTokens, useVoucher, withdrawMatchResult };
package/dist/index.d.ts CHANGED
@@ -140,6 +140,17 @@ declare function getPoolSqrtPrice(liqPool: Contract): Promise<bigint>;
140
140
  declare function getPoolPrice(liqPool: Contract): Promise<number>;
141
141
  declare function getCurrentTick(liqPool: Contract): Promise<number>;
142
142
 
143
+ declare function calculateTickFromPriceWithSpacing(price: number, tickSpacing?: number): number;
144
+ declare function calculateTickFromPrice(price: number): number;
145
+ declare function getSqrtPriceAtTick(tick: number): bigint;
146
+ declare function calculatePriceFromTick(tick: number): number;
147
+ declare function priceToSqrtPrice(price: number): bigint;
148
+ declare function liquidity0(amount: bigint, pa: bigint, pb: bigint): bigint;
149
+ declare function liquidity1(amount: bigint, pa: bigint, pb: bigint): bigint;
150
+ declare function amount0(liquidity0: bigint, pa: bigint, pb: bigint): bigint;
151
+ declare function amount1(liquidity1: bigint, pa: bigint, pb: bigint): bigint;
152
+ declare function calculateLiqDelta(ticklow: number, sqrt_cur: bigint, tickupp: number, amt0: bigint, amt1: bigint): [bigint, bigint, bigint];
153
+
143
154
  declare const mutiVoucherABI: ({
144
155
  anonymous: boolean;
145
156
  inputs: {
@@ -179,4 +190,4 @@ declare function balanceOf(contractAddress: string, provider: SignerOrProvider,
179
190
  declare function getAllVouchers(contractAddress: string, provider: SignerOrProvider): Promise<string[]>;
180
191
  declare function BuildUseVoucherTx(tx: providers.TransactionRequest, voucherName: string): providers.TransactionRequest;
181
192
 
182
- export { BuildUseVoucherTx, type ChallengeMatchResultParams, type CreateAuctionConfigParams, type CreateAuctionParams, type ModifyPositionParams, type PlaceBidParams, type PoolKey, type RevealBidParams, type RevealLockParams, type SetUnlockStrategyParams, type SignerOrProvider, type SubmitMatchResultsParams, type SwapParams, type UnlockTokensParams, type WithdrawMatchResultParams, addLiq, balanceOf, buyVoucher, buyVoucherWithEth, createAuction$1 as createAuction, createAuctionConfig, createAuction as createAuctionOnVault, createVoucher, getActiveAuctionsCount, getAllVouchers, getAuctionContract, getAuctionInfo, getAuctionLockInfo, getContract, getCurrentTick, getLiquidity, getLockInfo, getMatchResult, getPoolId, getPoolPrice, getPoolSqrtPrice, getProvider, getVoucherContract, getVoucherInfo, main, modifyPosition, mutiVoucherABI, placeBid, revealBid, revealLock, submitMatchResults, swap, toWei, unlockTokens, useVoucher, withdrawMatchResult };
193
+ export { BuildUseVoucherTx, type ChallengeMatchResultParams, type CreateAuctionConfigParams, type CreateAuctionParams, type ModifyPositionParams, type PlaceBidParams, type PoolKey, type RevealBidParams, type RevealLockParams, type SetUnlockStrategyParams, type SignerOrProvider, type SubmitMatchResultsParams, type SwapParams, type UnlockTokensParams, type WithdrawMatchResultParams, addLiq, amount0, amount1, balanceOf, buyVoucher, buyVoucherWithEth, calculateLiqDelta, calculatePriceFromTick, calculateTickFromPrice, calculateTickFromPriceWithSpacing, createAuction$1 as createAuction, createAuctionConfig, createAuction as createAuctionOnVault, createVoucher, getActiveAuctionsCount, getAllVouchers, getAuctionContract, getAuctionInfo, getAuctionLockInfo, getContract, getCurrentTick, getLiquidity, getLockInfo, getMatchResult, getPoolId, getPoolPrice, getPoolSqrtPrice, getProvider, getSqrtPriceAtTick, getVoucherContract, getVoucherInfo, liquidity0, liquidity1, main, modifyPosition, mutiVoucherABI, placeBid, priceToSqrtPrice, revealBid, revealLock, submitMatchResults, swap, toWei, unlockTokens, useVoucher, withdrawMatchResult };