@7kprotocol/sdk-ts 1.3.3 → 2.0.0
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/README.md +167 -1
- package/lib/cjs/buildTx.js +13 -5
- package/lib/cjs/estimateGasFee.js +3 -3
- package/lib/cjs/libs/getSplitCoinForTx.js +5 -14
- package/lib/cjs/libs/protocols/aftermath/index.js +1 -1
- package/lib/cjs/libs/protocols/base.js +1 -1
- package/lib/cjs/libs/protocols/cetus/index.js +4 -4
- package/lib/cjs/libs/protocols/deepbook/index.js +1 -1
- package/lib/cjs/libs/protocols/kriyaV3/index.js +4 -4
- package/lib/cjs/libs/protocols/suiswap/index.js +2 -2
- package/lib/cjs/libs/protocols/turbos/index.js +2 -2
- package/lib/cjs/suiClient.js +1 -1
- package/lib/cjs/types/buildTx.d.ts +2 -2
- package/lib/cjs/types/buildTx.d.ts.map +1 -1
- package/lib/cjs/types/estimateGasFee.d.ts +1 -1
- package/lib/cjs/types/estimateGasFee.d.ts.map +1 -1
- package/lib/cjs/types/index.d.ts +1 -1
- package/lib/cjs/types/libs/getCoinOjectIdsByAmount.d.ts +1 -1
- package/lib/cjs/types/libs/getCoinOjectIdsByAmount.d.ts.map +1 -1
- package/lib/cjs/types/libs/getSplitCoinForTx.d.ts +3 -3
- package/lib/cjs/types/libs/getSplitCoinForTx.d.ts.map +1 -1
- package/lib/cjs/types/libs/protocols/aftermath/index.d.ts +4 -5
- package/lib/cjs/types/libs/protocols/aftermath/index.d.ts.map +1 -1
- package/lib/cjs/types/libs/protocols/base.d.ts +3 -22
- package/lib/cjs/types/libs/protocols/base.d.ts.map +1 -1
- package/lib/cjs/types/libs/protocols/bluemove/index.d.ts +4 -5
- package/lib/cjs/types/libs/protocols/bluemove/index.d.ts.map +1 -1
- package/lib/cjs/types/libs/protocols/cetus/index.d.ts +4 -5
- package/lib/cjs/types/libs/protocols/cetus/index.d.ts.map +1 -1
- package/lib/cjs/types/libs/protocols/deepbook/index.d.ts +4 -5
- package/lib/cjs/types/libs/protocols/deepbook/index.d.ts.map +1 -1
- package/lib/cjs/types/libs/protocols/flowx/index.d.ts +4 -5
- package/lib/cjs/types/libs/protocols/flowx/index.d.ts.map +1 -1
- package/lib/cjs/types/libs/protocols/kriya/index.d.ts +4 -5
- package/lib/cjs/types/libs/protocols/kriya/index.d.ts.map +1 -1
- package/lib/cjs/types/libs/protocols/kriyaV3/index.d.ts +4 -5
- package/lib/cjs/types/libs/protocols/kriyaV3/index.d.ts.map +1 -1
- package/lib/cjs/types/libs/protocols/suiswap/index.d.ts +4 -5
- package/lib/cjs/types/libs/protocols/suiswap/index.d.ts.map +1 -1
- package/lib/cjs/types/libs/protocols/turbos/index.d.ts +4 -5
- package/lib/cjs/types/libs/protocols/turbos/index.d.ts.map +1 -1
- package/lib/cjs/types/libs/swapWithRoute.d.ts +2 -2
- package/lib/cjs/types/libs/swapWithRoute.d.ts.map +1 -1
- package/lib/cjs/types/suiClient.d.ts +1 -1
- package/lib/cjs/types/suiClient.d.ts.map +1 -1
- package/lib/cjs/types/types/sui.d.ts +1 -1
- package/lib/cjs/types/types/sui.d.ts.map +1 -1
- package/lib/cjs/types/types/tx.d.ts +5 -2
- package/lib/cjs/types/types/tx.d.ts.map +1 -1
- package/lib/cjs/types/utils/sui.d.ts +10 -11
- package/lib/cjs/types/utils/sui.d.ts.map +1 -1
- package/lib/cjs/utils/sui.js +8 -9
- package/lib/esm/buildTx.js +13 -5
- package/lib/esm/estimateGasFee.js +3 -3
- package/lib/esm/libs/getSplitCoinForTx.js +5 -14
- package/lib/esm/libs/protocols/aftermath/index.js +1 -1
- package/lib/esm/libs/protocols/base.js +1 -1
- package/lib/esm/libs/protocols/cetus/index.js +4 -4
- package/lib/esm/libs/protocols/deepbook/index.js +1 -1
- package/lib/esm/libs/protocols/kriyaV3/index.js +4 -4
- package/lib/esm/libs/protocols/suiswap/index.js +2 -2
- package/lib/esm/libs/protocols/turbos/index.js +2 -2
- package/lib/esm/suiClient.js +1 -1
- package/lib/esm/types/buildTx.d.ts +2 -2
- package/lib/esm/types/buildTx.d.ts.map +1 -1
- package/lib/esm/types/estimateGasFee.d.ts +1 -1
- package/lib/esm/types/estimateGasFee.d.ts.map +1 -1
- package/lib/esm/types/index.d.ts +1 -1
- package/lib/esm/types/libs/getCoinOjectIdsByAmount.d.ts +1 -1
- package/lib/esm/types/libs/getCoinOjectIdsByAmount.d.ts.map +1 -1
- package/lib/esm/types/libs/getSplitCoinForTx.d.ts +3 -3
- package/lib/esm/types/libs/getSplitCoinForTx.d.ts.map +1 -1
- package/lib/esm/types/libs/protocols/aftermath/index.d.ts +4 -5
- package/lib/esm/types/libs/protocols/aftermath/index.d.ts.map +1 -1
- package/lib/esm/types/libs/protocols/base.d.ts +3 -22
- package/lib/esm/types/libs/protocols/base.d.ts.map +1 -1
- package/lib/esm/types/libs/protocols/bluemove/index.d.ts +4 -5
- package/lib/esm/types/libs/protocols/bluemove/index.d.ts.map +1 -1
- package/lib/esm/types/libs/protocols/cetus/index.d.ts +4 -5
- package/lib/esm/types/libs/protocols/cetus/index.d.ts.map +1 -1
- package/lib/esm/types/libs/protocols/deepbook/index.d.ts +4 -5
- package/lib/esm/types/libs/protocols/deepbook/index.d.ts.map +1 -1
- package/lib/esm/types/libs/protocols/flowx/index.d.ts +4 -5
- package/lib/esm/types/libs/protocols/flowx/index.d.ts.map +1 -1
- package/lib/esm/types/libs/protocols/kriya/index.d.ts +4 -5
- package/lib/esm/types/libs/protocols/kriya/index.d.ts.map +1 -1
- package/lib/esm/types/libs/protocols/kriyaV3/index.d.ts +4 -5
- package/lib/esm/types/libs/protocols/kriyaV3/index.d.ts.map +1 -1
- package/lib/esm/types/libs/protocols/suiswap/index.d.ts +4 -5
- package/lib/esm/types/libs/protocols/suiswap/index.d.ts.map +1 -1
- package/lib/esm/types/libs/protocols/turbos/index.d.ts +4 -5
- package/lib/esm/types/libs/protocols/turbos/index.d.ts.map +1 -1
- package/lib/esm/types/libs/swapWithRoute.d.ts +2 -2
- package/lib/esm/types/libs/swapWithRoute.d.ts.map +1 -1
- package/lib/esm/types/suiClient.d.ts +1 -1
- package/lib/esm/types/suiClient.d.ts.map +1 -1
- package/lib/esm/types/types/sui.d.ts +1 -1
- package/lib/esm/types/types/sui.d.ts.map +1 -1
- package/lib/esm/types/types/tx.d.ts +5 -2
- package/lib/esm/types/types/tx.d.ts.map +1 -1
- package/lib/esm/types/utils/sui.d.ts +10 -11
- package/lib/esm/types/utils/sui.d.ts.map +1 -1
- package/lib/esm/utils/sui.js +8 -9
- package/package.json +2 -2
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction } from "@mysten/sui/transactions";
|
|
2
2
|
import { BaseContract } from "../base";
|
|
3
3
|
export declare class FlowXContract extends BaseContract {
|
|
4
|
-
swap(tx:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
kind: "NestedResult";
|
|
4
|
+
swap(tx: Transaction): Promise<{
|
|
5
|
+
$kind: "NestedResult";
|
|
6
|
+
NestedResult: [number, number];
|
|
8
7
|
}>;
|
|
9
8
|
}
|
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/flowx/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/flowx/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQvC,qBAAa,aAAc,SAAQ,YAAY;IACvC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CAY3B"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction } from "@mysten/sui/transactions";
|
|
2
2
|
import { BaseContract } from "../base";
|
|
3
3
|
export declare class KriyaContract extends BaseContract {
|
|
4
|
-
swap(tx:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
kind: "NestedResult";
|
|
4
|
+
swap(tx: Transaction): Promise<{
|
|
5
|
+
$kind: "NestedResult";
|
|
6
|
+
NestedResult: [number, number];
|
|
8
7
|
}>;
|
|
9
8
|
}
|
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/kriya/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/kriya/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAOvC,qBAAa,aAAc,SAAQ,YAAY;IACvC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CAyB3B"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction } from "@mysten/sui/transactions";
|
|
2
2
|
import { BaseContract } from "../base";
|
|
3
3
|
export declare class KriyaV3Contract extends BaseContract {
|
|
4
|
-
swap(tx:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
kind: "NestedResult";
|
|
4
|
+
swap(tx: Transaction): Promise<{
|
|
5
|
+
$kind: "NestedResult";
|
|
6
|
+
NestedResult: [number, number];
|
|
8
7
|
}>;
|
|
9
8
|
}
|
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/kriyaV3/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/kriyaV3/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AASvC,qBAAa,eAAgB,SAAQ,YAAY;IACzC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CA+D3B"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction } from "@mysten/sui/transactions";
|
|
2
2
|
import { BaseContract } from "../base";
|
|
3
3
|
export declare class SuiswapContract extends BaseContract {
|
|
4
|
-
swap(tx:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
kind: "NestedResult";
|
|
4
|
+
swap(tx: Transaction): Promise<{
|
|
5
|
+
$kind: "NestedResult";
|
|
6
|
+
NestedResult: [number, number];
|
|
8
7
|
}>;
|
|
9
8
|
}
|
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/suiswap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/suiswap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAMvC,qBAAa,eAAgB,SAAQ,YAAY;IACzC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CA2B3B"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction } from "@mysten/sui/transactions";
|
|
2
2
|
import { BaseContract } from "../base";
|
|
3
3
|
export declare class TurbosContract extends BaseContract {
|
|
4
|
-
swap(tx:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
kind: "NestedResult";
|
|
4
|
+
swap(tx: Transaction): Promise<{
|
|
5
|
+
$kind: "NestedResult";
|
|
6
|
+
NestedResult: [number, number];
|
|
8
7
|
}>;
|
|
9
8
|
}
|
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/turbos/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/turbos/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAUvC,qBAAa,cAAe,SAAQ,YAAY;IACxC,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CAqC3B"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction } from "@mysten/sui/transactions";
|
|
2
2
|
import { TxSorSwap } from "../types/aggregator";
|
|
3
3
|
import { TransactionResultItem } from "../types/sui";
|
|
4
4
|
export declare function swapWithRoute({ route, inputCoinObject, currentAccount, tx, }: {
|
|
5
5
|
route: TxSorSwap[];
|
|
6
6
|
inputCoinObject: TransactionResultItem;
|
|
7
7
|
currentAccount: string;
|
|
8
|
-
tx:
|
|
8
|
+
tx: Transaction;
|
|
9
9
|
}): Promise<TransactionResultItem | undefined>;
|
|
10
10
|
//# sourceMappingURL=swapWithRoute.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swapWithRoute.d.ts","sourceRoot":"","sources":["../../../../src/libs/swapWithRoute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"swapWithRoute.d.ts","sourceRoot":"","sources":["../../../../src/libs/swapWithRoute.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAErD,wBAAsB,aAAa,CAAC,EAClC,KAAK,EACL,eAAe,EACf,cAAc,EACd,EAAE,GACH,EAAE;IACD,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,eAAe,EAAE,qBAAqB,CAAC;IACvC,cAAc,EAAE,MAAM,CAAC;IACvB,EAAE,EAAE,WAAW,CAAC;CACjB,GAAG,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAiB7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"suiClient.d.ts","sourceRoot":"","sources":["../../../src/suiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,
|
|
1
|
+
{"version":3,"file":"suiClient.d.ts","sourceRoot":"","sources":["../../../src/suiClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkB,MAAM,oBAAoB,CAAC;AAM/D,wBAAgB,YAAY,cAE3B;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,SAAS,QAE7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../../../src/types/sui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../../../src/types/sui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction, TransactionObjectArgument } from "@mysten/sui/transactions";
|
|
2
2
|
import { Commission, QuoteResponse } from "./aggregator";
|
|
3
3
|
import BigNumber from "bignumber.js";
|
|
4
4
|
export interface CommonParams {
|
|
5
|
-
tx?: TransactionBlock;
|
|
6
5
|
quoteResponse: QuoteResponse;
|
|
7
6
|
accountAddress: string;
|
|
8
7
|
slippage: BigNumber.Value;
|
|
9
8
|
commission: Commission;
|
|
9
|
+
extendTx?: {
|
|
10
|
+
tx: Transaction;
|
|
11
|
+
coinIn?: TransactionObjectArgument;
|
|
12
|
+
};
|
|
10
13
|
}
|
|
11
14
|
export interface BuildTxParams extends CommonParams {
|
|
12
15
|
isGasEstimate?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../../../src/types/tx.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"tx.d.ts","sourceRoot":"","sources":["../../../../src/types/tx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,yBAAyB,EAC1B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,SAAS,MAAM,cAAc,CAAC;AAErC,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,SAAS,CAAC,KAAK,CAAC;IAC1B,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,CAAC,EAAE;QACT,EAAE,EAAE,WAAW,CAAC;QAChB,MAAM,CAAC,EAAE,yBAAyB,CAAC;KACpC,CAAC;CACH;AAED,MAAM,WAAW,aAAc,SAAQ,YAAY;IACjD,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TransactionArgument,
|
|
2
|
-
import { CoinStruct, SuiObjectResponseQuery } from "@mysten/sui
|
|
1
|
+
import { TransactionArgument, Transaction } from "@mysten/sui/transactions";
|
|
2
|
+
import { CoinStruct, SuiObjectResponseQuery } from "@mysten/sui/client";
|
|
3
3
|
type DataPage<T> = {
|
|
4
4
|
data: T[];
|
|
5
5
|
nextCursor?: any;
|
|
@@ -11,19 +11,18 @@ type PageQuery = {
|
|
|
11
11
|
};
|
|
12
12
|
type PaginationArgs = "all" | PageQuery;
|
|
13
13
|
export declare const SuiUtils: {
|
|
14
|
-
getSuiCoin(amount: bigint | TransactionArgument, txb:
|
|
15
|
-
mergeCoins(coinObjects: Array<string | TransactionArgument>, txb:
|
|
16
|
-
getCoinValue(coinType: string, coinObject: string | TransactionArgument, txb:
|
|
14
|
+
getSuiCoin(amount: bigint | TransactionArgument, txb: Transaction): TransactionArgument;
|
|
15
|
+
mergeCoins(coinObjects: Array<string | TransactionArgument>, txb: Transaction): TransactionArgument | undefined;
|
|
16
|
+
getCoinValue(coinType: string, coinObject: string | TransactionArgument, txb: Transaction): TransactionArgument;
|
|
17
17
|
getExactCoinByAmount(coinType: string, coins: {
|
|
18
18
|
objectId: string;
|
|
19
19
|
balance: bigint;
|
|
20
|
-
}[], amount: bigint, txb:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
kind: "NestedResult";
|
|
20
|
+
}[], amount: bigint, txb: Transaction): {
|
|
21
|
+
$kind: "NestedResult";
|
|
22
|
+
NestedResult: [number, number];
|
|
24
23
|
};
|
|
25
|
-
mergeAllUserCoins(coinType: string, signerAddress: string): Promise<
|
|
26
|
-
mergeAllCoinsWithoutFetch(coins: CoinStruct[], coinType: string, txb:
|
|
24
|
+
mergeAllUserCoins(coinType: string, signerAddress: string): Promise<Transaction | undefined>;
|
|
25
|
+
mergeAllCoinsWithoutFetch(coins: CoinStruct[], coinType: string, txb: Transaction): void;
|
|
27
26
|
getAllUserCoins({ address, type }: {
|
|
28
27
|
type: string;
|
|
29
28
|
address: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../../../src/utils/sui.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"sui.d.ts","sourceRoot":"","sources":["../../../../src/utils/sui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC5E,OAAO,EACL,UAAU,EAEV,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAK5B,KAAK,QAAQ,CAAC,CAAC,IAAI;IACjB,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,WAAW,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,KAAK,SAAS,GAAG;IACf,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB,CAAC;AAEF,KAAK,cAAc,GAAG,KAAK,GAAG,SAAS,CAAC;AAExC,eAAO,MAAM,QAAQ;uBAET,MAAM,GAAG,mBAAmB,OAC/B,WAAW,GACf,mBAAmB;4BAMP,KAAK,CAAC,MAAM,GAAG,mBAAmB,CAAC,OAC3C,WAAW,GACf,mBAAmB,GAAG,SAAS;2BAsBtB,MAAM,cACJ,MAAM,GAAG,mBAAmB,OACnC,WAAW,GACf,mBAAmB;mCAYV,MAAM,SACT;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,UACtC,MAAM,OACT,WAAW;;;;gCAoBgB,MAAM,iBAAiB,MAAM;qCAoCtD,UAAU,EAAE,YACT,MAAM,OACX,WAAW;uCAsBuB;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE;sCA8BhE,MAAM,SACP;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE;iCA6BvC,MAAM,SACN,sBAAsB,mBACb,cAAc,GAC7B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;4BAyBD,MAAM;CAO/B,CAAC"}
|
package/lib/cjs/utils/sui.js
CHANGED
|
@@ -10,14 +10,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SuiUtils = void 0;
|
|
13
|
-
const transactions_1 = require("@mysten/sui
|
|
14
|
-
const utils_1 = require("@mysten/sui
|
|
13
|
+
const transactions_1 = require("@mysten/sui/transactions");
|
|
14
|
+
const utils_1 = require("@mysten/sui/utils");
|
|
15
15
|
const token_1 = require("./token");
|
|
16
16
|
const suiClient_1 = require("../suiClient");
|
|
17
17
|
exports.SuiUtils = {
|
|
18
18
|
getSuiCoin(amount, txb) {
|
|
19
|
-
const
|
|
20
|
-
const [coin] = txb.splitCoins(txb.gas, [inputCoinAmount]);
|
|
19
|
+
const [coin] = txb.splitCoins(txb.gas, [amount]);
|
|
21
20
|
return coin;
|
|
22
21
|
},
|
|
23
22
|
mergeCoins(coinObjects, txb) {
|
|
@@ -48,7 +47,7 @@ exports.SuiUtils = {
|
|
|
48
47
|
},
|
|
49
48
|
getExactCoinByAmount(coinType, coins, amount, txb) {
|
|
50
49
|
if ((0, token_1.checkIsSui)(coinType)) {
|
|
51
|
-
const [coinA] = txb.splitCoins(txb.gas, [
|
|
50
|
+
const [coinA] = txb.splitCoins(txb.gas, [amount]);
|
|
52
51
|
return coinA;
|
|
53
52
|
}
|
|
54
53
|
else {
|
|
@@ -56,7 +55,7 @@ exports.SuiUtils = {
|
|
|
56
55
|
if (coinsX.length > 1) {
|
|
57
56
|
txb.mergeCoins(txb.object(coinsX[0]), coinsX.slice(1).map((coin) => txb.object(coin)));
|
|
58
57
|
}
|
|
59
|
-
const [coinA] = txb.splitCoins(txb.object(coinsX[0]), [
|
|
58
|
+
const [coinA] = txb.splitCoins(txb.object(coinsX[0]), [amount]);
|
|
60
59
|
return coinA;
|
|
61
60
|
}
|
|
62
61
|
},
|
|
@@ -71,10 +70,10 @@ exports.SuiUtils = {
|
|
|
71
70
|
coins.forEach((coin) => {
|
|
72
71
|
totalBalance += BigInt(coin.balance);
|
|
73
72
|
});
|
|
74
|
-
const txb = new transactions_1.
|
|
73
|
+
const txb = new transactions_1.Transaction();
|
|
75
74
|
if ((0, token_1.checkIsSui)(coinType)) {
|
|
76
75
|
totalBalance = totalBalance - BigInt("1000");
|
|
77
|
-
txb.splitCoins(txb.gas, [
|
|
76
|
+
txb.splitCoins(txb.gas, [totalBalance]);
|
|
78
77
|
}
|
|
79
78
|
const coinObjectsIds = coins.map((coin) => coin.coinObjectId);
|
|
80
79
|
if (coins.length > 1) {
|
|
@@ -94,7 +93,7 @@ exports.SuiUtils = {
|
|
|
94
93
|
});
|
|
95
94
|
if ((0, token_1.checkIsSui)(coinType)) {
|
|
96
95
|
totalBalance = totalBalance - BigInt("1000");
|
|
97
|
-
txb.splitCoins(txb.gas, [
|
|
96
|
+
txb.splitCoins(txb.gas, [totalBalance]);
|
|
98
97
|
}
|
|
99
98
|
const coinObjectsIds = coins.map((coin) => coin.coinObjectId);
|
|
100
99
|
if (coins.length > 1) {
|
package/lib/esm/buildTx.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction, } from "@mysten/sui/transactions";
|
|
2
2
|
import BigNumber from "bignumber.js";
|
|
3
3
|
import { getSplitCoinForTx } from "./libs/getSplitCoinForTx";
|
|
4
4
|
import { groupSwapRoutes } from "./libs/groupSwapRoutes";
|
|
@@ -6,8 +6,9 @@ import { swapWithRoute } from "./libs/swapWithRoute";
|
|
|
6
6
|
import { denormalizeTokenType } from "./utils/token";
|
|
7
7
|
import { SuiUtils } from "./utils/sui";
|
|
8
8
|
import { _7K_CONFIG, _7K_PACKAGE_ID } from "./constants/_7k";
|
|
9
|
-
import { isValidSuiAddress } from "@mysten/sui
|
|
10
|
-
export const buildTx = async ({ quoteResponse, accountAddress, slippage,
|
|
9
|
+
import { isValidSuiAddress } from "@mysten/sui/utils";
|
|
10
|
+
export const buildTx = async ({ quoteResponse, accountAddress, slippage, commission: _commission, isGasEstimate, extendTx, }) => {
|
|
11
|
+
const { tx: _tx, coinIn } = extendTx || {};
|
|
11
12
|
if (!accountAddress) {
|
|
12
13
|
throw new Error("Sender address is required");
|
|
13
14
|
}
|
|
@@ -17,10 +18,17 @@ export const buildTx = async ({ quoteResponse, accountAddress, slippage, tx: _tx
|
|
|
17
18
|
if (!isValidSuiAddress(_commission.partner)) {
|
|
18
19
|
throw new Error("Invalid commission partner address");
|
|
19
20
|
}
|
|
20
|
-
const tx = _tx || new
|
|
21
|
+
const tx = _tx || new Transaction();
|
|
21
22
|
const routes = groupSwapRoutes(quoteResponse);
|
|
22
23
|
const splits = routes.map((group) => group[0]?.amount ?? "0");
|
|
23
|
-
|
|
24
|
+
let coinData;
|
|
25
|
+
if (coinIn) {
|
|
26
|
+
coinData = tx.splitCoins(coinIn, splits);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
const { coinData: _data } = await getSplitCoinForTx(accountAddress, quoteResponse.swapAmountWithDecimal, splits, denormalizeTokenType(quoteResponse.tokenIn), tx, isGasEstimate);
|
|
30
|
+
coinData = _data;
|
|
31
|
+
}
|
|
24
32
|
const coinObjects = [];
|
|
25
33
|
await Promise.all(routes.map(async (route, index) => {
|
|
26
34
|
const inputCoinObject = coinData[index];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import BigNumber from "bignumber.js";
|
|
2
|
-
import { SUI_DECIMALS } from "@mysten/sui
|
|
2
|
+
import { SUI_DECIMALS } from "@mysten/sui/utils";
|
|
3
3
|
import { buildTx } from "./buildTx";
|
|
4
4
|
import { formatBalance } from "./utils/number";
|
|
5
5
|
import { getSuiClient } from "./suiClient";
|
|
6
6
|
import { getSuiPrice } from "./getSuiPrice";
|
|
7
|
-
export async function estimateGasFee({ quoteResponse, accountAddress, slippage, suiPrice: _suiPrice,
|
|
7
|
+
export async function estimateGasFee({ quoteResponse, accountAddress, slippage, suiPrice: _suiPrice, extendTx, commission, }) {
|
|
8
8
|
if (!accountAddress)
|
|
9
9
|
return 0;
|
|
10
10
|
const tx = await buildTx({
|
|
11
|
-
|
|
11
|
+
extendTx,
|
|
12
12
|
quoteResponse,
|
|
13
13
|
accountAddress,
|
|
14
14
|
slippage,
|
|
@@ -1,36 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction } from "@mysten/sui/transactions";
|
|
2
2
|
import { getCoinOjectIdsByAmount } from "./getCoinOjectIdsByAmount";
|
|
3
3
|
import { SUI_TYPE } from "../constants/tokens";
|
|
4
4
|
export const getSplitCoinForTx = async (account, amount, splits, coinType, inheritTx, inspecTransaction) => {
|
|
5
|
-
const tx = inheritTx ?? new
|
|
5
|
+
const tx = inheritTx ?? new Transaction();
|
|
6
6
|
const { objectIds } = await getCoinOjectIdsByAmount(account, amount, coinType);
|
|
7
7
|
const coinObjectId = objectIds[0];
|
|
8
8
|
if (coinType === SUI_TYPE) {
|
|
9
|
-
const pureAmount = [];
|
|
10
|
-
for (const split of splits) {
|
|
11
|
-
pureAmount.push(tx.pure(split));
|
|
12
|
-
}
|
|
13
9
|
let coin;
|
|
14
10
|
if (inspecTransaction) {
|
|
15
11
|
if (objectIds.length > 1) {
|
|
16
12
|
tx.mergeCoins(tx.object(coinObjectId), objectIds.slice(1).map((item) => tx.object(item)));
|
|
17
13
|
}
|
|
18
|
-
coin = tx.splitCoins(tx.object(coinObjectId),
|
|
14
|
+
coin = tx.splitCoins(tx.object(coinObjectId), splits);
|
|
19
15
|
}
|
|
20
16
|
else {
|
|
21
|
-
coin = tx.splitCoins(tx.gas,
|
|
17
|
+
coin = tx.splitCoins(tx.gas, splits);
|
|
22
18
|
}
|
|
23
19
|
return { tx, coinData: coin };
|
|
24
20
|
}
|
|
25
21
|
if (objectIds.length > 1) {
|
|
26
22
|
tx.mergeCoins(tx.object(coinObjectId), objectIds.slice(1).map((item) => tx.object(item)));
|
|
27
23
|
}
|
|
28
|
-
//handle split coin
|
|
29
|
-
const pureAmount = [];
|
|
30
|
-
for (const split of splits) {
|
|
31
|
-
pureAmount.push(tx.pure(split));
|
|
32
|
-
}
|
|
33
24
|
// split correct amount to swap
|
|
34
|
-
const coinData = tx.splitCoins(tx.object(coinObjectId),
|
|
25
|
+
const coinData = tx.splitCoins(tx.object(coinObjectId), splits);
|
|
35
26
|
return { tx, coinData };
|
|
36
27
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseContract } from "../base";
|
|
2
|
-
import { SUI_CLOCK_OBJECT_ID } from "@mysten/sui
|
|
2
|
+
import { SUI_CLOCK_OBJECT_ID } from "@mysten/sui/utils";
|
|
3
3
|
import { getDefaultSqrtPriceLimit } from "../utils";
|
|
4
4
|
import { SuiUtils } from "../../../utils/sui";
|
|
5
5
|
const GLOBAL_CONFIG_ID = "0xdaa46292632c3c4d8f31f23ea0f9b36a28ff3677e9684980e4438403a67a3d8f";
|
|
@@ -27,11 +27,11 @@ export class CetusContract extends BaseContract {
|
|
|
27
27
|
tx.object(this.swapInfo.poolId),
|
|
28
28
|
this.swapInfo.swapXtoY ? this.inputCoinObject : zeroOut, // coin A
|
|
29
29
|
this.swapInfo.swapXtoY ? zeroOut : this.inputCoinObject, // coin B
|
|
30
|
-
tx.pure(this.swapInfo.swapXtoY), // a to b or b to a
|
|
31
|
-
tx.pure(true), // exact in or out
|
|
30
|
+
tx.pure.bool(this.swapInfo.swapXtoY), // a to b or b to a
|
|
31
|
+
tx.pure.bool(true), // exact in or out
|
|
32
32
|
amountIn, // swap amount
|
|
33
33
|
tx.pure.u128(sqrtPriceLimit.toString()), // sqrt price limit
|
|
34
|
-
tx.pure(false),
|
|
34
|
+
tx.pure.bool(false),
|
|
35
35
|
tx.object(SUI_CLOCK_OBJECT_ID),
|
|
36
36
|
],
|
|
37
37
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseContract } from "../base";
|
|
2
|
-
import { SUI_CLOCK_OBJECT_ID } from "@mysten/sui
|
|
2
|
+
import { SUI_CLOCK_OBJECT_ID } from "@mysten/sui/utils";
|
|
3
3
|
import { normalizeTokenType } from "../../../utils/token";
|
|
4
4
|
const PACKAGE_ID = "0xbd8d4489782042c6fafad4de4bc6a5e0b84a43c6c00647ffd7062d1e2bb7549e";
|
|
5
5
|
const VERSION_ID = "0xf5145a7ac345ca8736cf8c76047d00d6d378f30e81be6f6eb557184d9de93c78";
|
|
@@ -16,10 +16,10 @@ export class KriyaV3Contract extends BaseContract {
|
|
|
16
16
|
typeArguments: this.getTypeParams(),
|
|
17
17
|
arguments: [
|
|
18
18
|
tx.object(poolId),
|
|
19
|
-
tx.pure(swapXtoY),
|
|
20
|
-
tx.pure(true),
|
|
19
|
+
tx.pure.bool(swapXtoY),
|
|
20
|
+
tx.pure.bool(true),
|
|
21
21
|
this.getInputCoinValue(tx),
|
|
22
|
-
tx.pure(swapXtoY ? LowLimitPrice : limitPrice),
|
|
22
|
+
tx.pure.u128(swapXtoY ? LowLimitPrice : limitPrice),
|
|
23
23
|
tx.object(SUI_CLOCK_OBJECT_ID),
|
|
24
24
|
tx.object(VERSION_ID),
|
|
25
25
|
],
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SUI_CLOCK_OBJECT_ID } from "@mysten/sui
|
|
1
|
+
import { SUI_CLOCK_OBJECT_ID } from "@mysten/sui/utils";
|
|
2
2
|
import { BaseContract } from "../base";
|
|
3
3
|
const PACKAGE_ID = "0xd075d51486df71e750872b4edf82ea3409fda397ceecc0b6aedf573d923c54a0";
|
|
4
4
|
const MODULE_NAME = "pool";
|
|
@@ -18,7 +18,7 @@ export class SuiswapContract extends BaseContract {
|
|
|
18
18
|
arguments: [
|
|
19
19
|
tx.object(poolId),
|
|
20
20
|
tx.makeMoveVec({
|
|
21
|
-
|
|
21
|
+
elements: [inputCoin],
|
|
22
22
|
}),
|
|
23
23
|
inputAmount,
|
|
24
24
|
tx.object(SUI_CLOCK_OBJECT_ID),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SUI_CLOCK_OBJECT_ID } from "@mysten/sui
|
|
1
|
+
import { SUI_CLOCK_OBJECT_ID } from "@mysten/sui/utils";
|
|
2
2
|
import { BaseContract } from "../base";
|
|
3
3
|
import { getDefaultSqrtPriceLimit } from "../utils";
|
|
4
4
|
import { ONE_MINUTE } from "./constants";
|
|
@@ -20,7 +20,7 @@ export class TurbosContract extends BaseContract {
|
|
|
20
20
|
arguments: [
|
|
21
21
|
tx.object(poolId),
|
|
22
22
|
tx.makeMoveVec({
|
|
23
|
-
|
|
23
|
+
elements: [this.inputCoinObject],
|
|
24
24
|
}),
|
|
25
25
|
inputAmount,
|
|
26
26
|
tx.pure.u64(0),
|
package/lib/esm/suiClient.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction } from "@mysten/sui/transactions";
|
|
2
2
|
import { BuildTxParams } from "./types/tx";
|
|
3
|
-
export declare const buildTx: ({ quoteResponse, accountAddress, slippage,
|
|
3
|
+
export declare const buildTx: ({ quoteResponse, accountAddress, slippage, commission: _commission, isGasEstimate, extendTx, }: BuildTxParams) => Promise<Transaction>;
|
|
4
4
|
//# sourceMappingURL=buildTx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildTx.d.ts","sourceRoot":"","sources":["../../../src/buildTx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"buildTx.d.ts","sourceRoot":"","sources":["../../../src/buildTx.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAGZ,MAAM,0BAA0B,CAAC;AAOlC,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAI3C,eAAO,MAAM,OAAO,mGAOjB,aAAa,yBA8Ef,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { EstimateGasFeeParams } from "./types/tx";
|
|
2
|
-
export declare function estimateGasFee({ quoteResponse, accountAddress, slippage, suiPrice: _suiPrice,
|
|
2
|
+
export declare function estimateGasFee({ quoteResponse, accountAddress, slippage, suiPrice: _suiPrice, extendTx, commission, }: EstimateGasFeeParams): Promise<number>;
|
|
3
3
|
//# sourceMappingURL=estimateGasFee.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"estimateGasFee.d.ts","sourceRoot":"","sources":["../../../src/estimateGasFee.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAIlD,wBAAsB,cAAc,CAAC,EACnC,aAAa,EACb,cAAc,EACd,QAAQ,EACR,QAAQ,EAAE,SAAS,EACnB,
|
|
1
|
+
{"version":3,"file":"estimateGasFee.d.ts","sourceRoot":"","sources":["../../../src/estimateGasFee.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAIlD,wBAAsB,cAAc,CAAC,EACnC,aAAa,EACb,cAAc,EACd,QAAQ,EACR,QAAQ,EAAE,SAAS,EACnB,QAAQ,EACR,UAAU,GACX,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAqCxC"}
|
package/lib/esm/types/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ declare const _default: {
|
|
|
11
11
|
getQuote: typeof getQuote;
|
|
12
12
|
getSuiPrice: typeof getSuiPrice;
|
|
13
13
|
estimateGasFee: typeof estimateGasFee;
|
|
14
|
-
buildTx: ({ quoteResponse, accountAddress, slippage,
|
|
14
|
+
buildTx: ({ quoteResponse, accountAddress, slippage, commission: _commission, isGasEstimate, extendTx, }: import("./types/tx").BuildTxParams) => Promise<import("@mysten/sui/dist/cjs/transactions").Transaction>;
|
|
15
15
|
};
|
|
16
16
|
export default _default;
|
|
17
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getCoinOjectIdsByAmount.d.ts","sourceRoot":"","sources":["../../../../src/libs/getCoinOjectIdsByAmount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,
|
|
1
|
+
{"version":3,"file":"getCoinOjectIdsByAmount.d.ts","sourceRoot":"","sources":["../../../../src/libs/getCoinOjectIdsByAmount.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAkB,MAAM,oBAAoB,CAAC;AA2BhE,eAAO,MAAM,uBAAuB,YACzB,MAAM,UACP,MAAM,YACJ,MAAM,KACf,OAAO,CAAC;IACT,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CA0CA,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const getSplitCoinForTx: (account: string, amount: string, splits: string[], coinType: string, inheritTx?:
|
|
3
|
-
tx:
|
|
1
|
+
import { Transaction, TransactionResult } from "@mysten/sui/transactions";
|
|
2
|
+
export declare const getSplitCoinForTx: (account: string, amount: string, splits: string[], coinType: string, inheritTx?: Transaction, inspecTransaction?: boolean) => Promise<{
|
|
3
|
+
tx: Transaction;
|
|
4
4
|
coinData: TransactionResult;
|
|
5
5
|
}>;
|
|
6
6
|
//# sourceMappingURL=getSplitCoinForTx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getSplitCoinForTx.d.ts","sourceRoot":"","sources":["../../../../src/libs/getSplitCoinForTx.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"getSplitCoinForTx.d.ts","sourceRoot":"","sources":["../../../../src/libs/getSplitCoinForTx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAI1E,eAAO,MAAM,iBAAiB,YACnB,MAAM,UACP,MAAM,UACN,MAAM,EAAE,YACN,MAAM,cACJ,WAAW,sBACH,OAAO,KAC1B,OAAO,CAAC;IACT,EAAE,EAAE,WAAW,CAAC;IAChB,QAAQ,EAAE,iBAAiB,CAAC;CAC7B,CAkCA,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Transaction } from "@mysten/sui/transactions";
|
|
2
2
|
import { BaseContract } from "../base";
|
|
3
3
|
export declare class AfterMathContract extends BaseContract {
|
|
4
|
-
swap(tx:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
kind: "NestedResult";
|
|
4
|
+
swap(tx: Transaction): Promise<{
|
|
5
|
+
$kind: "NestedResult";
|
|
6
|
+
NestedResult: [number, number];
|
|
8
7
|
}>;
|
|
9
8
|
}
|
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/aftermath/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/libs/protocols/aftermath/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAkBvC,qBAAa,iBAAkB,SAAQ,YAAY;IAC3C,IAAI,CAAC,EAAE,EAAE,WAAW;;;;CA2B3B"}
|