punkkit-sdk 1.0.21 → 1.0.24
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 +16 -2
- package/dist/index.d.ts +16 -2
- package/dist/index.js +971 -243
- package/dist/index.mjs +971 -243
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -107,7 +107,7 @@ declare function getAuctionLockInfo(lockId: string): Promise<{
|
|
|
107
107
|
}>;
|
|
108
108
|
declare function getActiveAuctionsCount(): Promise<bigint>;
|
|
109
109
|
|
|
110
|
-
declare function swap(wallet: Wallet, amountIn: bigint, zeroForOne: boolean, hookData: string): Promise<
|
|
110
|
+
declare function swap(wallet: Wallet, amountIn: bigint, zeroForOne: boolean, hookData: string): Promise<providers.TransactionReceipt>;
|
|
111
111
|
declare function main(): Promise<void>;
|
|
112
112
|
|
|
113
113
|
interface PoolKey {
|
|
@@ -131,6 +131,20 @@ interface ModifyPositionParams {
|
|
|
131
131
|
|
|
132
132
|
declare function addLiq(wallet: Wallet, priceLower: number, priceUpper: number, amount0: bigint | number, amount1: bigint | number, poolKey: PoolKey): Promise<ethers.providers.TransactionReceipt>;
|
|
133
133
|
|
|
134
|
+
interface UserPosition {
|
|
135
|
+
tokenId: number;
|
|
136
|
+
tickLower: number;
|
|
137
|
+
tickUpper: number;
|
|
138
|
+
liquidity: string;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Fetch all liquidity positions for a specific user from the LiquidPool contract.
|
|
142
|
+
* @param wallet The user's wallet or signer instance.
|
|
143
|
+
* @param userAddress Addres of the user to fetch positions for. If not provided, it uses the wallet's address.
|
|
144
|
+
* @returns An array of UserPosition objects containing the position details.
|
|
145
|
+
*/
|
|
146
|
+
declare function getUserPositions(wallet: Wallet, userAddress?: string): Promise<UserPosition[]>;
|
|
147
|
+
|
|
134
148
|
declare function getContract(wallet: Wallet, name: string): Promise<Contract>;
|
|
135
149
|
|
|
136
150
|
declare function modifyPosition(contract: Contract, modifyPositionParams: ModifyPositionParams, hookData: string): Promise<any>;
|
|
@@ -190,4 +204,4 @@ declare function balanceOf(contractAddress: string, provider: SignerOrProvider,
|
|
|
190
204
|
declare function getAllVouchers(contractAddress: string, provider: SignerOrProvider): Promise<string[]>;
|
|
191
205
|
declare function BuildUseVoucherTx(tx: providers.TransactionRequest, voucherName: string): providers.TransactionRequest;
|
|
192
206
|
|
|
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 };
|
|
207
|
+
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 UserPosition, 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, getUserPositions, getVoucherContract, getVoucherInfo, liquidity0, liquidity1, main, modifyPosition, mutiVoucherABI, placeBid, priceToSqrtPrice, revealBid, revealLock, submitMatchResults, swap, toWei, unlockTokens, useVoucher, withdrawMatchResult };
|
package/dist/index.d.ts
CHANGED
|
@@ -107,7 +107,7 @@ declare function getAuctionLockInfo(lockId: string): Promise<{
|
|
|
107
107
|
}>;
|
|
108
108
|
declare function getActiveAuctionsCount(): Promise<bigint>;
|
|
109
109
|
|
|
110
|
-
declare function swap(wallet: Wallet, amountIn: bigint, zeroForOne: boolean, hookData: string): Promise<
|
|
110
|
+
declare function swap(wallet: Wallet, amountIn: bigint, zeroForOne: boolean, hookData: string): Promise<providers.TransactionReceipt>;
|
|
111
111
|
declare function main(): Promise<void>;
|
|
112
112
|
|
|
113
113
|
interface PoolKey {
|
|
@@ -131,6 +131,20 @@ interface ModifyPositionParams {
|
|
|
131
131
|
|
|
132
132
|
declare function addLiq(wallet: Wallet, priceLower: number, priceUpper: number, amount0: bigint | number, amount1: bigint | number, poolKey: PoolKey): Promise<ethers.providers.TransactionReceipt>;
|
|
133
133
|
|
|
134
|
+
interface UserPosition {
|
|
135
|
+
tokenId: number;
|
|
136
|
+
tickLower: number;
|
|
137
|
+
tickUpper: number;
|
|
138
|
+
liquidity: string;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Fetch all liquidity positions for a specific user from the LiquidPool contract.
|
|
142
|
+
* @param wallet The user's wallet or signer instance.
|
|
143
|
+
* @param userAddress Addres of the user to fetch positions for. If not provided, it uses the wallet's address.
|
|
144
|
+
* @returns An array of UserPosition objects containing the position details.
|
|
145
|
+
*/
|
|
146
|
+
declare function getUserPositions(wallet: Wallet, userAddress?: string): Promise<UserPosition[]>;
|
|
147
|
+
|
|
134
148
|
declare function getContract(wallet: Wallet, name: string): Promise<Contract>;
|
|
135
149
|
|
|
136
150
|
declare function modifyPosition(contract: Contract, modifyPositionParams: ModifyPositionParams, hookData: string): Promise<any>;
|
|
@@ -190,4 +204,4 @@ declare function balanceOf(contractAddress: string, provider: SignerOrProvider,
|
|
|
190
204
|
declare function getAllVouchers(contractAddress: string, provider: SignerOrProvider): Promise<string[]>;
|
|
191
205
|
declare function BuildUseVoucherTx(tx: providers.TransactionRequest, voucherName: string): providers.TransactionRequest;
|
|
192
206
|
|
|
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 };
|
|
207
|
+
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 UserPosition, 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, getUserPositions, getVoucherContract, getVoucherInfo, liquidity0, liquidity1, main, modifyPosition, mutiVoucherABI, placeBid, priceToSqrtPrice, revealBid, revealLock, submitMatchResults, swap, toWei, unlockTokens, useVoucher, withdrawMatchResult };
|