@minswap/noodles-sdk 0.0.11 → 0.0.13

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.ts CHANGED
@@ -7,7 +7,7 @@ import type { Quote } from '@naviprotocol/astros-aggregator-sdk';
7
7
  import type { QuoteResponse } from '@7kprotocol/sdk-ts';
8
8
  import type { RouterCompleteTradeRoute } from 'aftermath-ts-sdk';
9
9
  import type { RouterDataV3 } from '@cetusprotocol/aggregator-sdk';
10
- import { SuiClient } from '@mysten/sui/client';
10
+ import type { SuiClient } from '@mysten/sui/client';
11
11
  import { Transaction } from '@mysten/sui/transactions';
12
12
  import type { TransactionArgument } from '@mysten/sui/transactions';
13
13
  import { TransactionObjectArgument } from '@mysten/sui/transactions';
@@ -30,7 +30,7 @@ export declare function addGasFee(params: {
30
30
  sender: string;
31
31
  feeAmount: bigint;
32
32
  suiInputAmount?: bigint;
33
- }): Promise<Transaction>;
33
+ }, suiClient: SuiClient): Promise<Transaction>;
34
34
 
35
35
  /**
36
36
  * Aftermath DEX aggregator client for routing trades across multiple pools
@@ -208,8 +208,8 @@ export declare namespace BlastFunConstants {
208
208
  * @deprecated Use `BlastFunSDKCalculation` instead.
209
209
  */
210
210
  export declare namespace BlastFunCustomCalculation {
211
- export function getCurveAmountAfterBuy(params: GetCurveAmountAfterBuyParams): Promise<bigint>;
212
- export function getSuiAmountAfterSell(params: GetSuiAmountAfterSellParams): Promise<bigint>;
211
+ export function getCurveAmountAfterBuy(params: GetCurveAmountAfterBuyParams, suiClient: SuiClient): Promise<bigint>;
212
+ export function getSuiAmountAfterSell(params: GetSuiAmountAfterSellParams, suiClient: SuiClient): Promise<bigint>;
213
213
  }
214
214
 
215
215
  /**
@@ -217,8 +217,8 @@ export declare namespace BlastFunCustomCalculation {
217
217
  */
218
218
  export declare namespace BlastFunCustomTransaction {
219
219
  export function getAllowedVersions(_tx?: Transaction): Promise<TransactionResult>;
220
- export function buildBuyTx(params: BuildSwapTxParams): Promise<BuildTxResult>;
221
- export function buildSellTx(params: BuildSwapTxParams): Promise<BuildTxResult>;
220
+ export function buildBuyTx(params: BuildSwapTxParams, suiClient: SuiClient): Promise<BuildTxResult>;
221
+ export function buildSellTx(params: BuildSwapTxParams, suiClient: SuiClient): Promise<BuildTxResult>;
222
222
  }
223
223
 
224
224
  export declare namespace BlastFunPackage {
@@ -228,7 +228,7 @@ export declare namespace BlastFunPackage {
228
228
  public_key: number[];
229
229
  ipx_meme_coin_treasury: string;
230
230
  };
231
- export function isSniperProtectedMemezFun(poolId: string): Promise<boolean>;
231
+ export function isSniperProtectedMemezFun(suiClient: SuiClient, poolId: string): Promise<boolean>;
232
232
  }
233
233
  export namespace MemezDistributor {
234
234
  export type Recipient = {
@@ -275,7 +275,7 @@ export declare namespace BlastFunPackage {
275
275
  export type PumpState = {
276
276
  constant_product: MoveObjectStruct<MemezConstantProduct.MemezConstantProduct>;
277
277
  };
278
- export function getPumpState(memezFun: MemezFun.MemezFun): Promise<PumpState>;
278
+ export function getPumpState(suiClient: SuiClient, memezFun: MemezFun.MemezFun): Promise<PumpState>;
279
279
  export function pump(pumpState: PumpState, quoteAmount: bigint): bigint;
280
280
  export function dump(pumpState: PumpState, memeAmount: bigint): bigint;
281
281
  }
@@ -287,8 +287,8 @@ export declare namespace BlastFunSDKCalculation {
287
287
  }
288
288
 
289
289
  export declare namespace BlastFunSDKTransaction {
290
- export function buildBuyTx(params: BuildSwapTxParams): Promise<BuildTxResult>;
291
- export function buildSellTx(params: BuildSwapTxParams): Promise<BuildTxResult>;
290
+ export function buildBuyTx(params: BuildSwapTxParams, suiClient: SuiClient): Promise<BuildTxResult>;
291
+ export function buildSellTx(params: BuildSwapTxParams, suiClient: SuiClient): Promise<BuildTxResult>;
292
292
  export function getBuyTransaction({ coinInAmount, coinInType, coinOutType, poolId, slippage, walletAddress, tradeFee }: GetTradeTransactionRequest, suiClient: SuiClient): Promise<Uint8Array>;
293
293
  export function getSellTransaction({ coinInAmount, coinInType, coinOutType, poolId, slippage, walletAddress, tradeFee }: GetTradeTransactionRequest, suiClient: SuiClient): Promise<Uint8Array>;
294
294
  }
@@ -546,7 +546,7 @@ export declare type FlowXAggregatorConfig = {
546
546
 
547
547
  export declare function getAmountAfterFee(amount: bigint | string, fee?: string | number): bigint;
548
548
 
549
- export declare const getCoinObjectIdsByAmount: (address: string, amount: string, coinType: string) => Promise<{
549
+ export declare const getCoinObjectIdsByAmount: (suiClient: SuiClient, address: string, amount: string, coinType: string) => Promise<{
550
550
  objectIds: string[];
551
551
  objectCoins: CoinStruct[];
552
552
  balance: string;
@@ -560,11 +560,11 @@ export declare type GetCurveAmountAfterBuyParams = {
560
560
 
561
561
  export declare function getMemezPumpSDK(): MemezPumpSDK;
562
562
 
563
- export declare function getMoveObject(objectId: string): Promise<MoveObject>;
563
+ export declare function getMoveObject(suiClient: SuiClient, objectId: string): Promise<MoveObject>;
564
564
 
565
- export declare function getMoveObjectContent(objectId: string): Promise<MoveStruct>;
565
+ export declare function getMoveObjectContent(suiClient: SuiClient, objectId: string): Promise<MoveStruct>;
566
566
 
567
- export declare function getNeededGasFee(tx: Transaction, sender: string, bufferPercent: number): Promise<bigint>;
567
+ export declare function getNeededGasFee(suiClient: SuiClient, tx: Transaction, sender: string, bufferPercent: number): Promise<bigint>;
568
568
 
569
569
  declare type GetSplitCoinForTx = {
570
570
  account: string;
@@ -576,7 +576,7 @@ declare type GetSplitCoinForTx = {
576
576
  isSponsored?: boolean;
577
577
  };
578
578
 
579
- export declare function getSplitCoinForTx(params: GetSplitCoinForTx): Promise<{
579
+ export declare function getSplitCoinForTx(params: GetSplitCoinForTx, suiClient: SuiClient): Promise<{
580
580
  tx: Transaction;
581
581
  coinData: TransactionResult;
582
582
  }>;
@@ -589,8 +589,6 @@ export declare type GetSuiAmountAfterSellParams = {
589
589
  frontendFee?: number | string;
590
590
  };
591
591
 
592
- export declare function getSuiClient(): SuiClient;
593
-
594
592
  /**
595
593
  * Request parameters for getting a trade route
596
594
  */
@@ -755,12 +753,12 @@ export declare namespace MathUtils {
755
753
  }
756
754
 
757
755
  export declare namespace MoonbagsCalculation {
758
- export function getCurveAmountAfterBuy(params: GetCurveAmountAfterBuyParams): Promise<bigint>;
759
- export function getSuiAmountAfterSell(params: GetSuiAmountAfterSellParams): Promise<bigint>;
756
+ export function getCurveAmountAfterBuy(params: GetCurveAmountAfterBuyParams, suiClient: SuiClient): Promise<bigint>;
757
+ export function getSuiAmountAfterSell(params: GetSuiAmountAfterSellParams, suiClient: SuiClient): Promise<bigint>;
760
758
  export function getUsedSuiForTx(params: {
761
759
  suiAmount: bigint;
762
760
  frontendFee?: number | string;
763
- }): Promise<bigint>;
761
+ }, suiClient: SuiClient): Promise<bigint>;
764
762
  }
765
763
 
766
764
  export declare namespace MoonbagsConstants {
@@ -799,7 +797,7 @@ export declare namespace MoonbagsPackage {
799
797
  name: number[];
800
798
  value: string;
801
799
  };
802
- export function getDynamicVirtualTokenReserves(poolId: string): Promise<bigint | undefined>;
800
+ export function getDynamicVirtualTokenReserves(suiClient: SuiClient, poolId: string): Promise<bigint | undefined>;
803
801
  export function buyExactInReturnsWithLock(params: {
804
802
  inputAmount: bigint;
805
803
  amountIn: bigint;
@@ -822,8 +820,8 @@ export declare namespace MoonbagsPackage {
822
820
  }
823
821
 
824
822
  export declare namespace MoonbagsTransaction {
825
- export function buildBuyTx(params: BuildSwapTxParams): Promise<BuildTxResult>;
826
- export function buildSellTx(params: BuildSwapTxParams): Promise<BuildTxResult>;
823
+ export function buildBuyTx(params: BuildSwapTxParams, suiClient: SuiClient): Promise<BuildTxResult>;
824
+ export function buildSellTx(params: BuildSwapTxParams, suiClient: SuiClient): Promise<BuildTxResult>;
827
825
  export function getBuyTransaction({ coinInAmount, coinInType, coinOutType, poolId, slippage, walletAddress, tradeFee }: GetTradeTransactionRequest, suiClient: SuiClient): Promise<Uint8Array>;
828
826
  export function getSellTransaction({ coinInAmount, coinInType, coinOutType, poolId, slippage, walletAddress, tradeFee }: GetTradeTransactionRequest, suiClient: SuiClient): Promise<Uint8Array>;
829
827
  }
@@ -895,7 +893,7 @@ export declare type SevenKAggregatorConfig = {
895
893
  sevenKApiKey?: string;
896
894
  };
897
895
 
898
- export declare function splitSuiCoinAfterFeeFromBuyTx(params: BuildSwapTxParams): Promise<BuildTxResult>;
896
+ export declare function splitSuiCoinAfterFeeFromBuyTx(params: BuildSwapTxParams, suiClient: SuiClient): Promise<BuildTxResult>;
899
897
 
900
898
  export declare function splitSuiCoinAfterFeeFromSellTx(tx: Transaction, params: BuildSwapTxParams, suiCoin: TransactionObjectArgument): Promise<BuildTxResult>;
901
899