@minswap/noodles-sdk 0.0.65-beta.1 → 0.0.65-beta.2
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/832.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +78 -46
- package/dist/index.js +1 -1
- package/dist/pay.cjs +1 -1
- package/dist/pay.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { Coin } from '@flowx-finance/sdk';
|
|
2
2
|
import type { Coin as Coin_2 } from '@flowx-finance/sdk/src/core';
|
|
3
|
-
import type { CoinStruct } from '@mysten/sui/jsonRpc';
|
|
4
|
-
import type { DevInspectResults } from '@mysten/sui/jsonRpc';
|
|
5
3
|
import { GetRoutesResult } from '@flowx-finance/sdk';
|
|
6
4
|
import type { MemezPumpSDK } from '@interest-protocol/memez-fun-sdk';
|
|
7
|
-
import type { MoveStruct } from '@mysten/sui/jsonRpc';
|
|
8
5
|
import { Path } from '@cetusprotocol/aggregator-sdk';
|
|
9
6
|
import type { PreSwapLpChangeParams } from '@cetusprotocol/aggregator-sdk';
|
|
10
7
|
import { Protocol } from '@flowx-finance/sdk';
|
|
@@ -14,6 +11,8 @@ import type { Route } from '@flowx-finance/sdk/src/universal-router/entities';
|
|
|
14
11
|
import type { RouterCompleteTradeRoute } from 'aftermath-ts-sdk';
|
|
15
12
|
import { RouterDataV3 } from '@cetusprotocol/aggregator-sdk';
|
|
16
13
|
import { SourceDex } from '@bluefin-exchange/bluefin7k-aggregator-sdk';
|
|
14
|
+
import type { SuiClientTypes } from '@mysten/sui/client';
|
|
15
|
+
import { SuiGrpcClient } from '@mysten/sui/grpc';
|
|
17
16
|
import { SuiJsonRpcClient } from '@mysten/sui/jsonRpc';
|
|
18
17
|
import { SuiPriceServiceConnection } from '@pythnetwork/pyth-sui-js';
|
|
19
18
|
import { SuiPythClient } from '@pythnetwork/pyth-sui-js';
|
|
@@ -24,10 +23,10 @@ import { TransactionResult } from '@mysten/sui/transactions';
|
|
|
24
23
|
import type { TxSorSwap } from '@bluefin-exchange/bluefin7k-aggregator-sdk';
|
|
25
24
|
|
|
26
25
|
/**
|
|
27
|
-
* Adapter to make
|
|
26
|
+
* Adapter to make SuiGrpcClient v1.38 compatible with libraries expecting v1.34
|
|
28
27
|
* This works around TypeScript type incompatibilities between versions
|
|
29
28
|
*/
|
|
30
|
-
export declare function adaptSuiClient(client:
|
|
29
|
+
export declare function adaptSuiClient(client: SuiGrpcClient): SuiGrpcClient;
|
|
31
30
|
|
|
32
31
|
/**
|
|
33
32
|
* Adapter to make Transaction v1.38 compatible with libraries expecting v1.34
|
|
@@ -40,7 +39,7 @@ export declare function addGasFee(params: {
|
|
|
40
39
|
sender: string;
|
|
41
40
|
feeAmount: bigint;
|
|
42
41
|
suiInputAmount?: bigint;
|
|
43
|
-
}, suiClient:
|
|
42
|
+
}, suiClient: SuiGrpcClient): Promise<Transaction>;
|
|
44
43
|
|
|
45
44
|
/**
|
|
46
45
|
* Parameters for adding a new subscription plan (admin only).
|
|
@@ -441,8 +440,8 @@ export declare namespace BlastFunConstants {
|
|
|
441
440
|
* @deprecated Use `BlastFunSDKCalculation` instead.
|
|
442
441
|
*/
|
|
443
442
|
export declare namespace BlastFunCustomCalculation {
|
|
444
|
-
export function getCurveAmountAfterBuy(params: GetCurveAmountAfterBuyParams, suiClient:
|
|
445
|
-
export function getSuiAmountAfterSell(params: GetSuiAmountAfterSellParams, suiClient:
|
|
443
|
+
export function getCurveAmountAfterBuy(params: GetCurveAmountAfterBuyParams, suiClient: SuiGrpcClient): Promise<bigint>;
|
|
444
|
+
export function getSuiAmountAfterSell(params: GetSuiAmountAfterSellParams, suiClient: SuiGrpcClient): Promise<bigint>;
|
|
446
445
|
}
|
|
447
446
|
|
|
448
447
|
/**
|
|
@@ -450,8 +449,8 @@ export declare namespace BlastFunCustomCalculation {
|
|
|
450
449
|
*/
|
|
451
450
|
export declare namespace BlastFunCustomTransaction {
|
|
452
451
|
export function getAllowedVersions(_tx?: Transaction): Promise<TransactionResult>;
|
|
453
|
-
export function buildBuyTx(params: BuildSwapTxParams, suiClient:
|
|
454
|
-
export function buildSellTx(params: BuildSwapTxParams, suiClient:
|
|
452
|
+
export function buildBuyTx(params: BuildSwapTxParams, suiClient: SuiGrpcClient): Promise<BuildTxResult>;
|
|
453
|
+
export function buildSellTx(params: BuildSwapTxParams, suiClient: SuiGrpcClient): Promise<BuildTxResult>;
|
|
455
454
|
}
|
|
456
455
|
|
|
457
456
|
export declare namespace BlastFunPackage {
|
|
@@ -461,7 +460,7 @@ export declare namespace BlastFunPackage {
|
|
|
461
460
|
public_key: number[];
|
|
462
461
|
ipx_meme_coin_treasury: string;
|
|
463
462
|
};
|
|
464
|
-
export function isSniperProtectedMemezFun(suiClient:
|
|
463
|
+
export function isSniperProtectedMemezFun(suiClient: SuiGrpcClient, poolId: string): Promise<boolean>;
|
|
465
464
|
}
|
|
466
465
|
export namespace MemezDistributor {
|
|
467
466
|
export type Recipient = {
|
|
@@ -508,7 +507,7 @@ export declare namespace BlastFunPackage {
|
|
|
508
507
|
export type PumpState = {
|
|
509
508
|
constant_product: MoveObjectStruct<MemezConstantProduct.MemezConstantProduct>;
|
|
510
509
|
};
|
|
511
|
-
export function getPumpState(suiClient:
|
|
510
|
+
export function getPumpState(suiClient: SuiGrpcClient, memezFun: MemezFun.MemezFun): Promise<PumpState>;
|
|
512
511
|
export function pump(pumpState: PumpState, quoteAmount: bigint): bigint;
|
|
513
512
|
export function dump(pumpState: PumpState, memeAmount: bigint): bigint;
|
|
514
513
|
}
|
|
@@ -520,16 +519,16 @@ export declare namespace BlastFunSDKCalculation {
|
|
|
520
519
|
}
|
|
521
520
|
|
|
522
521
|
export declare namespace BlastFunSDKTransaction {
|
|
523
|
-
export function buildBuyTx(params: BuildSwapTxParams, suiClient:
|
|
524
|
-
export function buildSellTx(params: BuildSwapTxParams, suiClient:
|
|
525
|
-
export function getBuyTransaction({ coinInAmount, coinInType, coinOutType, poolId, slippage, walletAddress, tradeFee, }: GetCurveTradeTransactionRequest, suiClient:
|
|
526
|
-
export function getSellTransaction({ coinInAmount, coinInType, coinOutType, poolId, slippage, walletAddress, tradeFee, }: GetCurveTradeTransactionRequest, suiClient:
|
|
522
|
+
export function buildBuyTx(params: BuildSwapTxParams, suiClient: SuiGrpcClient): Promise<BuildTxResult>;
|
|
523
|
+
export function buildSellTx(params: BuildSwapTxParams, suiClient: SuiGrpcClient): Promise<BuildTxResult>;
|
|
524
|
+
export function getBuyTransaction({ coinInAmount, coinInType, coinOutType, poolId, slippage, walletAddress, tradeFee, }: GetCurveTradeTransactionRequest, suiClient: SuiGrpcClient): Promise<Uint8Array>;
|
|
525
|
+
export function getSellTransaction({ coinInAmount, coinInType, coinOutType, poolId, slippage, walletAddress, tradeFee, }: GetCurveTradeTransactionRequest, suiClient: SuiGrpcClient): Promise<Uint8Array>;
|
|
527
526
|
}
|
|
528
527
|
|
|
529
528
|
export declare class Bluefin7kClient implements QuoteClient {
|
|
530
529
|
private readonly options;
|
|
531
530
|
readonly kind = SourceAggregatorRoute.SEVENK;
|
|
532
|
-
constructor(options: Bluefin7kClientOptions, client:
|
|
531
|
+
constructor(options: Bluefin7kClientOptions, client: SuiGrpcClient);
|
|
533
532
|
quote(quoteOptions: MetaQuoteOptions): Promise<MetaQuote>;
|
|
534
533
|
}
|
|
535
534
|
|
|
@@ -826,6 +825,13 @@ export declare function checkIsSui(type: string): type is "0x2::sui::SUI" | "0x0
|
|
|
826
825
|
|
|
827
826
|
export declare const CLOCK_OBJECT_ID = "0x0000000000000000000000000000000000000000000000000000000000000006";
|
|
828
827
|
|
|
828
|
+
declare type CoinStruct = {
|
|
829
|
+
coinObjectId: string;
|
|
830
|
+
version: string;
|
|
831
|
+
digest: string;
|
|
832
|
+
balance: string;
|
|
833
|
+
};
|
|
834
|
+
|
|
829
835
|
export declare interface CommonTxParams {
|
|
830
836
|
/** User address */
|
|
831
837
|
accountAddress: string;
|
|
@@ -874,7 +880,7 @@ export declare const CONFIG_ID = "0x8b1a8ac6e34688cd8f8f8e5fefa9d5fb9e1ff74d2f13
|
|
|
874
880
|
/**
|
|
875
881
|
* Alternative: Create a proxy that ensures compatibility
|
|
876
882
|
*/
|
|
877
|
-
export declare function createCompatibleSuiClient(client:
|
|
883
|
+
export declare function createCompatibleSuiClient(client: SuiGrpcClient): LegacySuiClient;
|
|
878
884
|
|
|
879
885
|
export declare class CurveModule implements IModule {
|
|
880
886
|
readonly sdk: NoodlesSdk;
|
|
@@ -906,7 +912,7 @@ export declare type DraftTransaction = {
|
|
|
906
912
|
|
|
907
913
|
export declare class DraftTransferTx {
|
|
908
914
|
private readonly suiClient;
|
|
909
|
-
constructor(suiClient:
|
|
915
|
+
constructor(suiClient: SuiGrpcClient);
|
|
910
916
|
/**
|
|
911
917
|
* Validates private key against expected sender address
|
|
912
918
|
* @private
|
|
@@ -1078,7 +1084,7 @@ export declare class FlowXAggregator {
|
|
|
1078
1084
|
* @param config - Aggregator configuration including fee settings and optional API key
|
|
1079
1085
|
* @param suiClient - Sui client for blockchain interactions
|
|
1080
1086
|
*/
|
|
1081
|
-
constructor(config: FlowXAggregatorConfig, suiClient:
|
|
1087
|
+
constructor(config: FlowXAggregatorConfig, suiClient: SuiGrpcClient);
|
|
1082
1088
|
/**
|
|
1083
1089
|
* Creates a commission configuration for FlowX trades
|
|
1084
1090
|
* @param coinInType - Type/address of the input coin for commission calculation
|
|
@@ -1233,7 +1239,7 @@ export declare namespace FullsailClmm {
|
|
|
1233
1239
|
|
|
1234
1240
|
export declare function getAmountAfterFee(amount: bigint | string, fee?: string | number): bigint;
|
|
1235
1241
|
|
|
1236
|
-
export declare const getCoinObjectIdsByAmount: (suiClient:
|
|
1242
|
+
export declare const getCoinObjectIdsByAmount: (suiClient: SuiGrpcClient, address: string, amount: string, coinType: string) => Promise<{
|
|
1237
1243
|
objectIds: string[];
|
|
1238
1244
|
objectCoins: CoinStruct[];
|
|
1239
1245
|
balance: string;
|
|
@@ -1290,13 +1296,17 @@ export declare const getExpectedReturn: (returnAmount: string, slippageBps: numb
|
|
|
1290
1296
|
expectedAmount: string;
|
|
1291
1297
|
};
|
|
1292
1298
|
|
|
1299
|
+
export declare function getGrpcFullnodeUrl(network: SuiNetwork): string;
|
|
1300
|
+
|
|
1301
|
+
export declare function getJsonRpcFullnodeUrl(network: SuiNetwork): string;
|
|
1302
|
+
|
|
1293
1303
|
export declare function getMemezPumpSDK(): Promise<MemezPumpSDK>;
|
|
1294
1304
|
|
|
1295
|
-
export declare function getMoveObject(suiClient:
|
|
1305
|
+
export declare function getMoveObject(suiClient: SuiGrpcClient, objectId: string): Promise<MoveObject>;
|
|
1296
1306
|
|
|
1297
|
-
export declare function getMoveObjectContent(suiClient:
|
|
1307
|
+
export declare function getMoveObjectContent(suiClient: SuiGrpcClient, objectId: string): Promise<MoveStruct>;
|
|
1298
1308
|
|
|
1299
|
-
export declare function getNeededGasFee(suiClient:
|
|
1309
|
+
export declare function getNeededGasFee(suiClient: SuiGrpcClient, tx: Transaction, sender: string, bufferPercent: number): Promise<bigint>;
|
|
1300
1310
|
|
|
1301
1311
|
declare type GetSplitCoinForTx = {
|
|
1302
1312
|
account: string;
|
|
@@ -1308,7 +1318,7 @@ declare type GetSplitCoinForTx = {
|
|
|
1308
1318
|
isSponsored?: boolean;
|
|
1309
1319
|
};
|
|
1310
1320
|
|
|
1311
|
-
export declare function getSplitCoinForTx(params: GetSplitCoinForTx, suiClient:
|
|
1321
|
+
export declare function getSplitCoinForTx(params: GetSplitCoinForTx, suiClient: SuiGrpcClient): Promise<{
|
|
1312
1322
|
tx: Transaction;
|
|
1313
1323
|
coinData: TransactionResult;
|
|
1314
1324
|
}>;
|
|
@@ -1536,6 +1546,8 @@ declare type GetTransactionRequest_5 = {
|
|
|
1536
1546
|
tradeFee?: TradeFeeOptions;
|
|
1537
1547
|
};
|
|
1538
1548
|
|
|
1549
|
+
export declare function getTransactionResultDigest(result: SuiClientTypes.TransactionResult): string;
|
|
1550
|
+
|
|
1539
1551
|
export declare namespace HaedalLsdWal {
|
|
1540
1552
|
const VALIDATOR_ID = "0x7b3ba6de2ae58283f60d5b8dc04bb9e90e4796b3b2e0dea75569f491275242e7";
|
|
1541
1553
|
}
|
|
@@ -1554,7 +1566,7 @@ export declare namespace KriyaClmm {
|
|
|
1554
1566
|
const VERSION_OBJ_ID = "0xf5145a7ac345ca8736cf8c76047d00d6d378f30e81be6f6eb557184d9de93c78";
|
|
1555
1567
|
}
|
|
1556
1568
|
|
|
1557
|
-
declare type LegacySuiClient =
|
|
1569
|
+
declare type LegacySuiClient = SuiGrpcClient;
|
|
1558
1570
|
|
|
1559
1571
|
export declare namespace MagmaAlmm {
|
|
1560
1572
|
const FACTORY_OBJ_ID = "0xedb456e93e423dd75a8ddebedd9974bb661195043027e32ce01649d6ccee74cf";
|
|
@@ -1618,7 +1630,7 @@ export declare type MetaAgErrorDetailsMap = {
|
|
|
1618
1630
|
provider: SourceAggregatorRoute;
|
|
1619
1631
|
};
|
|
1620
1632
|
[MetaAgErrorCode.SIMULATION_FAILED]: {
|
|
1621
|
-
error:
|
|
1633
|
+
error: unknown;
|
|
1622
1634
|
};
|
|
1623
1635
|
};
|
|
1624
1636
|
|
|
@@ -1654,10 +1666,11 @@ export declare type MetaAggregatorBasePath = {
|
|
|
1654
1666
|
export declare type MetaAggregatorPath = MetaAggregatorBasePath & ExtendAggregatorSwapParam;
|
|
1655
1667
|
|
|
1656
1668
|
export declare class MetaClient {
|
|
1657
|
-
client:
|
|
1669
|
+
client: SuiGrpcClient;
|
|
1670
|
+
jsonRpcClient: SuiJsonRpcClient;
|
|
1658
1671
|
private providers;
|
|
1659
1672
|
private readonly options;
|
|
1660
|
-
constructor(options
|
|
1673
|
+
constructor(options: MetaClientOptions);
|
|
1661
1674
|
private getQuoteClient;
|
|
1662
1675
|
private getQuoteByClient;
|
|
1663
1676
|
/**
|
|
@@ -1670,14 +1683,13 @@ export declare class MetaClient {
|
|
|
1670
1683
|
}
|
|
1671
1684
|
|
|
1672
1685
|
export declare interface MetaClientOptions {
|
|
1686
|
+
clients: SuiClients;
|
|
1673
1687
|
/**If not specified, all providers will be used */
|
|
1674
1688
|
providers?: {
|
|
1675
1689
|
[SourceAggregatorRoute.SEVENK]?: Bluefin7kClientOptions;
|
|
1676
1690
|
[SourceAggregatorRoute.FLOWX]?: FlowxClientOptions;
|
|
1677
1691
|
[SourceAggregatorRoute.CETUS]?: CetusClientOptions;
|
|
1678
1692
|
};
|
|
1679
|
-
/**Mainnet Json Rpc url, if not specified, the default mainnet url will be used */
|
|
1680
|
-
fullnodeUrl?: string;
|
|
1681
1693
|
/**Hermes Api url, if not specified, the default hermes api url will be used */
|
|
1682
1694
|
hermesApi?: string[];
|
|
1683
1695
|
/**Address to receive commission, if not specified, the commission will not be used */
|
|
@@ -1770,12 +1782,12 @@ export declare namespace MomentumClmm {
|
|
|
1770
1782
|
}
|
|
1771
1783
|
|
|
1772
1784
|
export declare namespace MoonbagsCalculation {
|
|
1773
|
-
export function getCurveAmountAfterBuy(params: GetCurveAmountAfterBuyParams, suiClient:
|
|
1774
|
-
export function getSuiAmountAfterSell(params: GetSuiAmountAfterSellParams, suiClient:
|
|
1785
|
+
export function getCurveAmountAfterBuy(params: GetCurveAmountAfterBuyParams, suiClient: SuiGrpcClient): Promise<bigint>;
|
|
1786
|
+
export function getSuiAmountAfterSell(params: GetSuiAmountAfterSellParams, suiClient: SuiGrpcClient): Promise<bigint>;
|
|
1775
1787
|
export function getUsedSuiForTx(params: {
|
|
1776
1788
|
suiAmount: bigint;
|
|
1777
1789
|
frontendFee?: number | string;
|
|
1778
|
-
}, suiClient:
|
|
1790
|
+
}, suiClient: SuiGrpcClient): Promise<bigint>;
|
|
1779
1791
|
}
|
|
1780
1792
|
|
|
1781
1793
|
export declare namespace MoonbagsConstants {
|
|
@@ -1814,7 +1826,7 @@ export declare namespace MoonbagsPackage {
|
|
|
1814
1826
|
name: number[];
|
|
1815
1827
|
value: string;
|
|
1816
1828
|
};
|
|
1817
|
-
export function getDynamicVirtualTokenReserves(suiClient:
|
|
1829
|
+
export function getDynamicVirtualTokenReserves(suiClient: SuiGrpcClient, poolId: string): Promise<bigint | undefined>;
|
|
1818
1830
|
export function buyExactInReturnsWithLock(params: {
|
|
1819
1831
|
inputAmount: bigint;
|
|
1820
1832
|
amountIn: bigint;
|
|
@@ -1837,10 +1849,10 @@ export declare namespace MoonbagsPackage {
|
|
|
1837
1849
|
}
|
|
1838
1850
|
|
|
1839
1851
|
export declare namespace MoonbagsTransaction {
|
|
1840
|
-
export function buildBuyTx(params: BuildSwapTxParams, suiClient:
|
|
1841
|
-
export function buildSellTx(params: BuildSwapTxParams, suiClient:
|
|
1842
|
-
export function getBuyTransaction({ coinInAmount, coinInType, coinOutType, poolId, slippage, walletAddress, tradeFee, }: GetCurveTradeTransactionRequest, suiClient:
|
|
1843
|
-
export function getSellTransaction({ coinInAmount, coinInType, coinOutType, poolId, slippage, walletAddress, tradeFee, }: GetCurveTradeTransactionRequest, suiClient:
|
|
1852
|
+
export function buildBuyTx(params: BuildSwapTxParams, suiClient: SuiGrpcClient): Promise<BuildTxResult>;
|
|
1853
|
+
export function buildSellTx(params: BuildSwapTxParams, suiClient: SuiGrpcClient): Promise<BuildTxResult>;
|
|
1854
|
+
export function getBuyTransaction({ coinInAmount, coinInType, coinOutType, poolId, slippage, walletAddress, tradeFee, }: GetCurveTradeTransactionRequest, suiClient: SuiGrpcClient): Promise<Uint8Array>;
|
|
1855
|
+
export function getSellTransaction({ coinInAmount, coinInType, coinOutType, poolId, slippage, walletAddress, tradeFee, }: GetCurveTradeTransactionRequest, suiClient: SuiGrpcClient): Promise<Uint8Array>;
|
|
1844
1856
|
}
|
|
1845
1857
|
|
|
1846
1858
|
export declare type MoveEnumObjectStruct<Content, Variant extends string = string> = MoveObjectStruct<Content> & {
|
|
@@ -1863,6 +1875,8 @@ export declare namespace Movepump {
|
|
|
1863
1875
|
const CONFIGURATION_OBJ_ID = "0xd746495d04a6119987c2b9334c5fefd7d8cff52a8a02a3ea4e3995b9a041ace4";
|
|
1864
1876
|
}
|
|
1865
1877
|
|
|
1878
|
+
declare type MoveStruct = Record<string, unknown>;
|
|
1879
|
+
|
|
1866
1880
|
export declare const NATIVE_USDC_TOKEN_TYPE = "0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC";
|
|
1867
1881
|
|
|
1868
1882
|
declare enum Network {
|
|
@@ -1876,19 +1890,21 @@ export declare class NoodlesPaySdk {
|
|
|
1876
1890
|
private _suiClient;
|
|
1877
1891
|
readonly boostingModule: BoostingModule;
|
|
1878
1892
|
readonly subscriptionModule: SubscriptionModule;
|
|
1879
|
-
constructor(network?: Network, env?: Environment);
|
|
1880
|
-
get suiClient():
|
|
1893
|
+
constructor(client: SuiGrpcClient, network?: Network, env?: Environment);
|
|
1894
|
+
get suiClient(): SuiGrpcClient;
|
|
1881
1895
|
}
|
|
1882
1896
|
|
|
1883
1897
|
export declare class NoodlesSdk {
|
|
1884
1898
|
readonly network: Network;
|
|
1885
1899
|
readonly env: Environment;
|
|
1886
1900
|
readonly options: SdkOptions;
|
|
1887
|
-
private
|
|
1901
|
+
private _suiGrpcClient;
|
|
1902
|
+
private _suiJsonRpcClient;
|
|
1888
1903
|
readonly aggregatorModule: AggregatorModule;
|
|
1889
1904
|
readonly curveModule: CurveModule;
|
|
1890
1905
|
constructor(options: SdkOptions, network?: Network, env?: Environment);
|
|
1891
|
-
get suiClient():
|
|
1906
|
+
get suiClient(): SuiGrpcClient;
|
|
1907
|
+
get suiJsonRpcClient(): SuiJsonRpcClient;
|
|
1892
1908
|
}
|
|
1893
1909
|
|
|
1894
1910
|
export declare function normalizeTokenType(type: string): string;
|
|
@@ -1947,7 +1963,7 @@ export declare namespace PythUtils {
|
|
|
1947
1963
|
const WORMHOLE_STATE_ID = "0xaeab97f96cf9877fee2883315d459552b2b921edc16d7ceac6eab944dd88919c";
|
|
1948
1964
|
const PYTH_STATE_ID = "0x1f9310238ee9298fb703c3419030b35b22bb1cc37113e3bb5007c99aec79e5b8";
|
|
1949
1965
|
export function newPythConnections(pythUrls?: string[]): SuiPriceServiceConnection[];
|
|
1950
|
-
export function newPythClient(suiClient?:
|
|
1966
|
+
export function newPythClient(suiClient?: SuiGrpcClient): SuiPythClient;
|
|
1951
1967
|
export function updatePythPriceIDs(params: {
|
|
1952
1968
|
priceFeedIds: PythPriceFeedId[];
|
|
1953
1969
|
txb: Transaction;
|
|
@@ -2014,6 +2030,7 @@ export declare namespace Scallop {
|
|
|
2014
2030
|
}
|
|
2015
2031
|
|
|
2016
2032
|
export declare type SdkOptions = {
|
|
2033
|
+
clients: SuiClients;
|
|
2017
2034
|
tradeFee: TradeFeeOptions;
|
|
2018
2035
|
/** Optional API key for Astros aggregator access */
|
|
2019
2036
|
astrosApiKey?: string;
|
|
@@ -2072,7 +2089,7 @@ export declare class SevenKAggregator {
|
|
|
2072
2089
|
* @param config - Aggregator configuration including fee settings and optional API key
|
|
2073
2090
|
* @param suiClient - Sui client for blockchain interactions
|
|
2074
2091
|
*/
|
|
2075
|
-
constructor(config: SevenKAggregatorConfig, suiClient:
|
|
2092
|
+
constructor(config: SevenKAggregatorConfig, suiClient: SuiGrpcClient);
|
|
2076
2093
|
/**
|
|
2077
2094
|
* Finds the optimal trade route for swapping tokens using 7K Protocol
|
|
2078
2095
|
* @param params - Trade route parameters
|
|
@@ -2141,7 +2158,7 @@ declare type SourceClientBaseOptions = {
|
|
|
2141
2158
|
disabled?: boolean;
|
|
2142
2159
|
};
|
|
2143
2160
|
|
|
2144
|
-
export declare function splitSuiCoinAfterFeeFromBuyTx(params: BuildSwapTxParams, suiClient:
|
|
2161
|
+
export declare function splitSuiCoinAfterFeeFromBuyTx(params: BuildSwapTxParams, suiClient: SuiGrpcClient): Promise<BuildTxResult>;
|
|
2145
2162
|
|
|
2146
2163
|
export declare function splitSuiCoinAfterFeeFromSellTx(tx: Transaction, params: BuildSwapTxParams, suiCoin: TransactionObjectArgument): Promise<BuildTxResult>;
|
|
2147
2164
|
|
|
@@ -2356,6 +2373,21 @@ export declare const SUI_METADATA_OBJECT_ID = "0x9258181f5ceac8dbffb7030890243ca
|
|
|
2356
2373
|
|
|
2357
2374
|
export declare const SUI_TYPE = "0x2::sui::SUI";
|
|
2358
2375
|
|
|
2376
|
+
export declare type SuiClient = SuiGrpcClient;
|
|
2377
|
+
|
|
2378
|
+
export declare type SuiClients = {
|
|
2379
|
+
grpc: SuiGrpcClient;
|
|
2380
|
+
jsonRpc: SuiJsonRpcClient;
|
|
2381
|
+
};
|
|
2382
|
+
|
|
2383
|
+
export { SuiGrpcClient }
|
|
2384
|
+
|
|
2385
|
+
export declare type SuiJsonRpc = SuiJsonRpcClient;
|
|
2386
|
+
|
|
2387
|
+
export { SuiJsonRpcClient }
|
|
2388
|
+
|
|
2389
|
+
export declare type SuiNetwork = SuiClientTypes.Network;
|
|
2390
|
+
|
|
2359
2391
|
export declare enum SupportedAggregator {
|
|
2360
2392
|
ASTROS = "ASTROS",
|
|
2361
2393
|
AFTERMATH = "AFTERMATH",
|