@typemove/sui 1.13.4-rc.2 → 1.13.4
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/esm/builtin/0x1.d.ts +269 -269
- package/dist/esm/builtin/0x1.d.ts.map +1 -1
- package/dist/esm/builtin/0x1.js.map +1 -1
- package/dist/esm/builtin/0x2.d.ts +684 -684
- package/dist/esm/builtin/0x2.d.ts.map +1 -1
- package/dist/esm/builtin/0x2.js.map +1 -1
- package/dist/esm/builtin/0x3.d.ts +272 -272
- package/dist/esm/builtin/0x3.d.ts.map +1 -1
- package/dist/esm/builtin/0x3.js.map +1 -1
- package/dist/esm/codegen/codegen.d.ts +1 -1
- package/dist/esm/codegen/codegen.d.ts.map +1 -1
- package/dist/esm/codegen/codegen.js +5 -5
- package/dist/esm/codegen/codegen.js.map +1 -1
- package/dist/esm/codegen/run.js +3 -2
- package/dist/esm/codegen/run.js.map +1 -1
- package/dist/esm/models.d.ts +1 -1
- package/dist/esm/models.d.ts.map +1 -1
- package/dist/esm/move-coder.d.ts +3 -3
- package/dist/esm/move-coder.d.ts.map +1 -1
- package/dist/esm/move-coder.js +3 -3
- package/dist/esm/move-coder.js.map +1 -1
- package/dist/esm/sui-chain-adapter.d.ts +4 -3
- package/dist/esm/sui-chain-adapter.d.ts.map +1 -1
- package/dist/esm/sui-chain-adapter.js +13 -2
- package/dist/esm/sui-chain-adapter.js.map +1 -1
- package/dist/esm/to-internal.d.ts +1 -1
- package/dist/esm/to-internal.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/builtin/0x1.ts +269 -269
- package/src/builtin/0x2.ts +684 -684
- package/src/builtin/0x3.ts +272 -272
- package/src/codegen/codegen.ts +5 -5
- package/src/codegen/run.ts +3 -2
- package/src/models.ts +1 -1
- package/src/move-coder.ts +7 -7
- package/src/sui-chain-adapter.ts +13 -5
- package/src/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.ts +5 -5
- package/src/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.ts +49 -49
- package/src/tests/types/testnet/0x7f7a37c826c88bcfe9aecc042453395ddfa9df6f29cb7c97590bf86cf2b0a75e.ts +32 -32
- package/src/tests/types/testnet/0xdee9.ts +91 -91
- package/src/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.ts +156 -156
- package/src/tests/types/testnet/enum.ts +119 -119
- package/src/to-internal.ts +1 -1
package/src/codegen/codegen.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SuiMoveNormalizedModule, SuiEvent, SuiMoveObject,
|
|
1
|
+
import { SuiMoveNormalizedModule, SuiEvent, SuiMoveObject, SuiJsonRpcClient } from '@mysten/sui/jsonRpc'
|
|
2
2
|
|
|
3
3
|
import * as fs from 'fs'
|
|
4
4
|
import chalk from 'chalk'
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from '@typemove/move'
|
|
14
14
|
import { AbstractCodegen } from '@typemove/move/codegen'
|
|
15
15
|
import { join } from 'path'
|
|
16
|
-
import { SuiChainAdapter } from '../sui-chain-adapter.js'
|
|
16
|
+
import { SuiChainAdapter, inferNetworkFromUrl } from '../sui-chain-adapter.js'
|
|
17
17
|
|
|
18
18
|
export async function codegen(
|
|
19
19
|
abisDir: string,
|
|
@@ -58,7 +58,7 @@ export class SuiCodegen extends AbstractCodegen<
|
|
|
58
58
|
PAYLOAD_OPTIONAL = true
|
|
59
59
|
|
|
60
60
|
constructor(endpoint: string) {
|
|
61
|
-
super(new SuiChainAdapter(new
|
|
61
|
+
super(new SuiChainAdapter(new SuiJsonRpcClient({ url: endpoint, network: inferNetworkFromUrl(endpoint) })))
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
readModulesFile(fullPath: string) {
|
|
@@ -208,7 +208,7 @@ export class SuiCodegen extends AbstractCodegen<
|
|
|
208
208
|
const returnType = `${this.generateFunctionReturnTypeParameters(func, module.address)}`
|
|
209
209
|
|
|
210
210
|
return `export async function ${camel(normalizeToJSName(func.name))}${genericString}(
|
|
211
|
-
client:
|
|
211
|
+
client: SuiJsonRpcClient,
|
|
212
212
|
args: [${args.map((a) => a.paramType).join(',')}],
|
|
213
213
|
${
|
|
214
214
|
typeParamArg.length > 0 ? `typeArguments: [${typeParamArg}]` : ``
|
|
@@ -269,7 +269,7 @@ export class SuiCodegen extends AbstractCodegen<
|
|
|
269
269
|
${super.generateImports()}
|
|
270
270
|
import { ZERO_ADDRESS, TypedDevInspectResults, getMoveCoder } from '@typemove/sui'
|
|
271
271
|
import { Transaction, TransactionArgument, TransactionObjectArgument } from '@mysten/sui/transactions'
|
|
272
|
-
import {
|
|
272
|
+
import { SuiJsonRpcClient } from '@mysten/sui/jsonRpc'
|
|
273
273
|
import { transactionArgumentOrObject,
|
|
274
274
|
transactionArgumentOrVec,
|
|
275
275
|
transactionArgumentOrPure,
|
package/src/codegen/run.ts
CHANGED
|
@@ -5,7 +5,8 @@ import { Command } from 'commander'
|
|
|
5
5
|
import { createRequire } from 'module'
|
|
6
6
|
import fs from 'fs'
|
|
7
7
|
import path from 'path'
|
|
8
|
-
import {
|
|
8
|
+
import { SuiJsonRpcClient } from '@mysten/sui/jsonRpc'
|
|
9
|
+
import { inferNetworkFromUrl } from '../sui-chain-adapter.js'
|
|
9
10
|
const require = createRequire(import.meta.url)
|
|
10
11
|
let pkg = undefined
|
|
11
12
|
try {
|
|
@@ -37,7 +38,7 @@ program
|
|
|
37
38
|
endpoint = 'https://fullnode.testnet.sui.io/'
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
const suiClient = new
|
|
41
|
+
const suiClient = new SuiJsonRpcClient({ url: endpoint, network: inferNetworkFromUrl(endpoint) })
|
|
41
42
|
|
|
42
43
|
let abisDir = location
|
|
43
44
|
if (location.startsWith('0x')) {
|
package/src/models.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SuiEvent, MoveCallSuiTransaction, SuiMoveObject, DevInspectResults } from '@mysten/sui/
|
|
1
|
+
import type { SuiEvent, MoveCallSuiTransaction, SuiMoveObject, DevInspectResults } from '@mysten/sui/jsonRpc'
|
|
2
2
|
import { DecodedStruct } from '@typemove/move'
|
|
3
3
|
|
|
4
4
|
export const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000000000000000000000000000'
|
package/src/move-coder.ts
CHANGED
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
SuiMoveNormalizedModule,
|
|
17
17
|
SuiMoveObject,
|
|
18
18
|
DevInspectResults,
|
|
19
|
-
|
|
20
|
-
} from '@mysten/sui/
|
|
19
|
+
SuiJsonRpcClient
|
|
20
|
+
} from '@mysten/sui/jsonRpc'
|
|
21
|
+
import { SuiChainAdapter, inferNetworkFromUrl } from './sui-chain-adapter.js'
|
|
21
22
|
import { toInternalModule } from './to-internal.js'
|
|
22
|
-
import { SuiChainAdapter } from './sui-chain-adapter.js'
|
|
23
23
|
import { dynamic_field } from './builtin/0x2.js'
|
|
24
24
|
import { BcsType, bcs } from '@mysten/sui/bcs'
|
|
25
25
|
|
|
@@ -33,7 +33,7 @@ export class MoveCoder extends AbstractMoveCoder<
|
|
|
33
33
|
SuiMoveNormalizedModule,
|
|
34
34
|
SuiEvent | SuiMoveObject
|
|
35
35
|
> {
|
|
36
|
-
constructor(client:
|
|
36
|
+
constructor(client: SuiJsonRpcClient) {
|
|
37
37
|
super(new SuiChainAdapter(client))
|
|
38
38
|
}
|
|
39
39
|
|
|
@@ -283,17 +283,17 @@ const CHAIN_ID_CODER_MAP = new Map<string, MoveCoder>()
|
|
|
283
283
|
export function defaultMoveCoder(endpoint: string = DEFAULT_ENDPOINT): MoveCoder {
|
|
284
284
|
let coder = CODER_MAP.get(endpoint)
|
|
285
285
|
if (!coder) {
|
|
286
|
-
coder = new MoveCoder(new
|
|
286
|
+
coder = new MoveCoder(new SuiJsonRpcClient({ url: endpoint, network: inferNetworkFromUrl(endpoint) }))
|
|
287
287
|
CODER_MAP.set(endpoint, coder)
|
|
288
288
|
}
|
|
289
289
|
return coder
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
const PROVIDER_CODER_MAP = new Map<
|
|
292
|
+
const PROVIDER_CODER_MAP = new Map<SuiJsonRpcClient, MoveCoder>()
|
|
293
293
|
|
|
294
294
|
let DEFAULT_CHAIN_ID: string | undefined
|
|
295
295
|
|
|
296
|
-
export async function getMoveCoder(client:
|
|
296
|
+
export async function getMoveCoder(client: SuiJsonRpcClient): Promise<MoveCoder> {
|
|
297
297
|
let coder = PROVIDER_CODER_MAP.get(client)
|
|
298
298
|
if (!coder) {
|
|
299
299
|
coder = new MoveCoder(client)
|
package/src/sui-chain-adapter.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
TypeDescriptor
|
|
9
9
|
} from '@typemove/move'
|
|
10
10
|
|
|
11
|
-
import { SuiMoveNormalizedModule, SuiEvent, SuiMoveObject,
|
|
11
|
+
import { SuiMoveNormalizedModule, SuiEvent, SuiMoveObject, SuiJsonRpcClient } from '@mysten/sui/jsonRpc'
|
|
12
12
|
|
|
13
13
|
export class SuiChainAdapter extends ChainAdapter<
|
|
14
14
|
// SuiNetwork,
|
|
@@ -20,8 +20,8 @@ export class SuiChainAdapter extends ChainAdapter<
|
|
|
20
20
|
}
|
|
21
21
|
// static INSTANCE = new SuiChainAdapter()
|
|
22
22
|
|
|
23
|
-
client:
|
|
24
|
-
constructor(client:
|
|
23
|
+
client: SuiJsonRpcClient
|
|
24
|
+
constructor(client: SuiJsonRpcClient) {
|
|
25
25
|
super()
|
|
26
26
|
this.client = client
|
|
27
27
|
}
|
|
@@ -108,6 +108,14 @@ export class SuiChainAdapter extends ChainAdapter<
|
|
|
108
108
|
// }
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
function
|
|
112
|
-
|
|
111
|
+
export function inferNetworkFromUrl(url: string): string {
|
|
112
|
+
if (url.includes('mainnet')) return 'mainnet'
|
|
113
|
+
if (url.includes('testnet')) return 'testnet'
|
|
114
|
+
if (url.includes('devnet')) return 'devnet'
|
|
115
|
+
if (url.includes('localnet') || url.includes('127.0.0.1') || url.includes('localhost')) return 'localnet'
|
|
116
|
+
return 'custom'
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function getRpcClient(endpoint: string): SuiJsonRpcClient {
|
|
120
|
+
return new SuiJsonRpcClient({ url: endpoint, network: inferNetworkFromUrl(endpoint) })
|
|
113
121
|
}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
TransactionArgument,
|
|
20
20
|
TransactionObjectArgument,
|
|
21
21
|
} from "@mysten/sui/transactions";
|
|
22
|
-
import {
|
|
22
|
+
import { SuiJsonRpcClient } from "@mysten/sui/jsonRpc";
|
|
23
23
|
import {
|
|
24
24
|
transactionArgumentOrObject,
|
|
25
25
|
transactionArgumentOrVec,
|
|
@@ -204,7 +204,7 @@ export namespace oracle {
|
|
|
204
204
|
}
|
|
205
205
|
export namespace view {
|
|
206
206
|
export async function copyKey<T0 = any>(
|
|
207
|
-
client:
|
|
207
|
+
client: SuiJsonRpcClient,
|
|
208
208
|
args: [string, string],
|
|
209
209
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
210
210
|
): Promise<TypedDevInspectResults<[]>> {
|
|
@@ -220,7 +220,7 @@ export namespace oracle {
|
|
|
220
220
|
);
|
|
221
221
|
}
|
|
222
222
|
export async function getOracle<T0 = any>(
|
|
223
|
-
client:
|
|
223
|
+
client: SuiJsonRpcClient,
|
|
224
224
|
args: [string],
|
|
225
225
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
226
226
|
): Promise<TypedDevInspectResults<[bigint, bigint, bigint, bigint]>> {
|
|
@@ -236,7 +236,7 @@ export namespace oracle {
|
|
|
236
236
|
>(inspectRes);
|
|
237
237
|
}
|
|
238
238
|
export async function newOracle<T0 = any>(
|
|
239
|
-
client:
|
|
239
|
+
client: SuiJsonRpcClient,
|
|
240
240
|
args: [bigint],
|
|
241
241
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
242
242
|
): Promise<TypedDevInspectResults<[]>> {
|
|
@@ -252,7 +252,7 @@ export namespace oracle {
|
|
|
252
252
|
);
|
|
253
253
|
}
|
|
254
254
|
export async function update<T0 = any>(
|
|
255
|
-
client:
|
|
255
|
+
client: SuiJsonRpcClient,
|
|
256
256
|
args: [string, string, bigint, bigint, bigint],
|
|
257
257
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
258
258
|
): Promise<TypedDevInspectResults<[]>> {
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
TransactionArgument,
|
|
20
20
|
TransactionObjectArgument,
|
|
21
21
|
} from "@mysten/sui/transactions";
|
|
22
|
-
import {
|
|
22
|
+
import { SuiJsonRpcClient } from "@mysten/sui/jsonRpc";
|
|
23
23
|
import {
|
|
24
24
|
transactionArgumentOrObject,
|
|
25
25
|
transactionArgumentOrVec,
|
|
@@ -142,7 +142,7 @@ export namespace comparator {
|
|
|
142
142
|
}
|
|
143
143
|
export namespace view {
|
|
144
144
|
export async function compare<T0 = any>(
|
|
145
|
-
client:
|
|
145
|
+
client: SuiJsonRpcClient,
|
|
146
146
|
args: [string, string],
|
|
147
147
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
148
148
|
): Promise<TypedDevInspectResults<[comparator.Result]>> {
|
|
@@ -158,7 +158,7 @@ export namespace comparator {
|
|
|
158
158
|
>(inspectRes);
|
|
159
159
|
}
|
|
160
160
|
export async function compareU8Vector(
|
|
161
|
-
client:
|
|
161
|
+
client: SuiJsonRpcClient,
|
|
162
162
|
args: [string[], string[]],
|
|
163
163
|
): Promise<TypedDevInspectResults<[comparator.Result]>> {
|
|
164
164
|
const tx = new Transaction();
|
|
@@ -173,7 +173,7 @@ export namespace comparator {
|
|
|
173
173
|
>(inspectRes);
|
|
174
174
|
}
|
|
175
175
|
export async function isEqual(
|
|
176
|
-
client:
|
|
176
|
+
client: SuiJsonRpcClient,
|
|
177
177
|
args: [string],
|
|
178
178
|
): Promise<TypedDevInspectResults<[boolean]>> {
|
|
179
179
|
const tx = new Transaction();
|
|
@@ -188,7 +188,7 @@ export namespace comparator {
|
|
|
188
188
|
);
|
|
189
189
|
}
|
|
190
190
|
export async function isGreaterThan(
|
|
191
|
-
client:
|
|
191
|
+
client: SuiJsonRpcClient,
|
|
192
192
|
args: [string],
|
|
193
193
|
): Promise<TypedDevInspectResults<[boolean]>> {
|
|
194
194
|
const tx = new Transaction();
|
|
@@ -203,7 +203,7 @@ export namespace comparator {
|
|
|
203
203
|
);
|
|
204
204
|
}
|
|
205
205
|
export async function isSmallerThan(
|
|
206
|
-
client:
|
|
206
|
+
client: SuiJsonRpcClient,
|
|
207
207
|
args: [string],
|
|
208
208
|
): Promise<TypedDevInspectResults<[boolean]>> {
|
|
209
209
|
const tx = new Transaction();
|
|
@@ -313,7 +313,7 @@ export namespace math_utils {
|
|
|
313
313
|
}
|
|
314
314
|
export namespace view {
|
|
315
315
|
export async function max(
|
|
316
|
-
client:
|
|
316
|
+
client: SuiJsonRpcClient,
|
|
317
317
|
args: [bigint, bigint],
|
|
318
318
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
319
319
|
const tx = new Transaction();
|
|
@@ -328,7 +328,7 @@ export namespace math_utils {
|
|
|
328
328
|
);
|
|
329
329
|
}
|
|
330
330
|
export async function maxU64(
|
|
331
|
-
client:
|
|
331
|
+
client: SuiJsonRpcClient,
|
|
332
332
|
args: [bigint, bigint],
|
|
333
333
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
334
334
|
const tx = new Transaction();
|
|
@@ -343,7 +343,7 @@ export namespace math_utils {
|
|
|
343
343
|
);
|
|
344
344
|
}
|
|
345
345
|
export async function min(
|
|
346
|
-
client:
|
|
346
|
+
client: SuiJsonRpcClient,
|
|
347
347
|
args: [bigint, bigint],
|
|
348
348
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
349
349
|
const tx = new Transaction();
|
|
@@ -358,7 +358,7 @@ export namespace math_utils {
|
|
|
358
358
|
);
|
|
359
359
|
}
|
|
360
360
|
export async function pow(
|
|
361
|
-
client:
|
|
361
|
+
client: SuiJsonRpcClient,
|
|
362
362
|
args: [bigint, number],
|
|
363
363
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
364
364
|
const tx = new Transaction();
|
|
@@ -373,7 +373,7 @@ export namespace math_utils {
|
|
|
373
373
|
);
|
|
374
374
|
}
|
|
375
375
|
export async function sqrt(
|
|
376
|
-
client:
|
|
376
|
+
client: SuiJsonRpcClient,
|
|
377
377
|
args: [bigint],
|
|
378
378
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
379
379
|
const tx = new Transaction();
|
|
@@ -388,7 +388,7 @@ export namespace math_utils {
|
|
|
388
388
|
);
|
|
389
389
|
}
|
|
390
390
|
export async function sqrtU256(
|
|
391
|
-
client:
|
|
391
|
+
client: SuiJsonRpcClient,
|
|
392
392
|
args: [bigint],
|
|
393
393
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
394
394
|
const tx = new Transaction();
|
|
@@ -1304,7 +1304,7 @@ export namespace pool {
|
|
|
1304
1304
|
}
|
|
1305
1305
|
export namespace view {
|
|
1306
1306
|
export async function addLiquidity<T0 = any, T1 = any>(
|
|
1307
|
-
client:
|
|
1307
|
+
client: SuiJsonRpcClient,
|
|
1308
1308
|
args: [string, string, string, bigint, bigint, bigint, bigint],
|
|
1309
1309
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1310
1310
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]>> {
|
|
@@ -1320,7 +1320,7 @@ export namespace pool {
|
|
|
1320
1320
|
>(inspectRes);
|
|
1321
1321
|
}
|
|
1322
1322
|
export async function borrowMutPool<T0 = any, T1 = any>(
|
|
1323
|
-
client:
|
|
1323
|
+
client: SuiJsonRpcClient,
|
|
1324
1324
|
args: [string],
|
|
1325
1325
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1326
1326
|
): Promise<TypedDevInspectResults<[string]>> {
|
|
@@ -1336,7 +1336,7 @@ export namespace pool {
|
|
|
1336
1336
|
);
|
|
1337
1337
|
}
|
|
1338
1338
|
export async function borrowPool<T0 = any, T1 = any>(
|
|
1339
|
-
client:
|
|
1339
|
+
client: SuiJsonRpcClient,
|
|
1340
1340
|
args: [string],
|
|
1341
1341
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1342
1342
|
): Promise<TypedDevInspectResults<[string]>> {
|
|
@@ -1352,7 +1352,7 @@ export namespace pool {
|
|
|
1352
1352
|
);
|
|
1353
1353
|
}
|
|
1354
1354
|
export async function createPool<T0 = any, T1 = any>(
|
|
1355
|
-
client:
|
|
1355
|
+
client: SuiJsonRpcClient,
|
|
1356
1356
|
args: [string, string, string, bigint, bigint],
|
|
1357
1357
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1358
1358
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]>> {
|
|
@@ -1368,7 +1368,7 @@ export namespace pool {
|
|
|
1368
1368
|
>(inspectRes);
|
|
1369
1369
|
}
|
|
1370
1370
|
export async function createPoolName(
|
|
1371
|
-
client:
|
|
1371
|
+
client: SuiJsonRpcClient,
|
|
1372
1372
|
args: [_0x1.type_name.TypeName, _0x1.type_name.TypeName],
|
|
1373
1373
|
): Promise<TypedDevInspectResults<[pool.PoolName]>> {
|
|
1374
1374
|
const tx = new Transaction();
|
|
@@ -1383,7 +1383,7 @@ export namespace pool {
|
|
|
1383
1383
|
>(inspectRes);
|
|
1384
1384
|
}
|
|
1385
1385
|
export async function getAmounts<T0 = any, T1 = any>(
|
|
1386
|
-
client:
|
|
1386
|
+
client: SuiJsonRpcClient,
|
|
1387
1387
|
args: [string],
|
|
1388
1388
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1389
1389
|
): Promise<TypedDevInspectResults<[bigint, bigint, bigint]>> {
|
|
@@ -1399,7 +1399,7 @@ export namespace pool {
|
|
|
1399
1399
|
>(inspectRes);
|
|
1400
1400
|
}
|
|
1401
1401
|
export async function getInputAmount<T0 = any, T1 = any>(
|
|
1402
|
-
client:
|
|
1402
|
+
client: SuiJsonRpcClient,
|
|
1403
1403
|
args: [string, bigint, boolean],
|
|
1404
1404
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1405
1405
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
@@ -1415,7 +1415,7 @@ export namespace pool {
|
|
|
1415
1415
|
);
|
|
1416
1416
|
}
|
|
1417
1417
|
export async function getOutputAmount<T0 = any, T1 = any>(
|
|
1418
|
-
client:
|
|
1418
|
+
client: SuiJsonRpcClient,
|
|
1419
1419
|
args: [string, bigint, boolean],
|
|
1420
1420
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1421
1421
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
@@ -1431,7 +1431,7 @@ export namespace pool {
|
|
|
1431
1431
|
);
|
|
1432
1432
|
}
|
|
1433
1433
|
export async function getPoolData<T0 = any, T1 = any>(
|
|
1434
|
-
client:
|
|
1434
|
+
client: SuiJsonRpcClient,
|
|
1435
1435
|
args: [string],
|
|
1436
1436
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1437
1437
|
): Promise<
|
|
@@ -1449,7 +1449,7 @@ export namespace pool {
|
|
|
1449
1449
|
>(inspectRes);
|
|
1450
1450
|
}
|
|
1451
1451
|
export async function isPoolCreated<T0 = any, T1 = any>(
|
|
1452
|
-
client:
|
|
1452
|
+
client: SuiJsonRpcClient,
|
|
1453
1453
|
args: [string],
|
|
1454
1454
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1455
1455
|
): Promise<TypedDevInspectResults<[boolean]>> {
|
|
@@ -1465,7 +1465,7 @@ export namespace pool {
|
|
|
1465
1465
|
);
|
|
1466
1466
|
}
|
|
1467
1467
|
export async function isPoolCreatedSorted<T0 = any, T1 = any>(
|
|
1468
|
-
client:
|
|
1468
|
+
client: SuiJsonRpcClient,
|
|
1469
1469
|
args: [string],
|
|
1470
1470
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1471
1471
|
): Promise<TypedDevInspectResults<[boolean]>> {
|
|
@@ -1481,7 +1481,7 @@ export namespace pool {
|
|
|
1481
1481
|
);
|
|
1482
1482
|
}
|
|
1483
1483
|
export async function processSwapExactInput<T0 = any, T1 = any>(
|
|
1484
|
-
client:
|
|
1484
|
+
client: SuiJsonRpcClient,
|
|
1485
1485
|
args: [string, string, string, bigint, boolean],
|
|
1486
1486
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1487
1487
|
): Promise<TypedDevInspectResults<[]>> {
|
|
@@ -1497,7 +1497,7 @@ export namespace pool {
|
|
|
1497
1497
|
);
|
|
1498
1498
|
}
|
|
1499
1499
|
export async function processSwapExactOutput<T0 = any, T1 = any>(
|
|
1500
|
-
client:
|
|
1500
|
+
client: SuiJsonRpcClient,
|
|
1501
1501
|
args: [string, string, string, bigint, boolean],
|
|
1502
1502
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1503
1503
|
): Promise<TypedDevInspectResults<[]>> {
|
|
@@ -1513,7 +1513,7 @@ export namespace pool {
|
|
|
1513
1513
|
);
|
|
1514
1514
|
}
|
|
1515
1515
|
export async function removeLiquidity<T0 = any, T1 = any>(
|
|
1516
|
-
client:
|
|
1516
|
+
client: SuiJsonRpcClient,
|
|
1517
1517
|
args: [string, string, bigint, bigint, bigint],
|
|
1518
1518
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1519
1519
|
): Promise<
|
|
@@ -1531,7 +1531,7 @@ export namespace pool {
|
|
|
1531
1531
|
>(inspectRes);
|
|
1532
1532
|
}
|
|
1533
1533
|
export async function setFeeTo_(
|
|
1534
|
-
client:
|
|
1534
|
+
client: SuiJsonRpcClient,
|
|
1535
1535
|
args: [string, string, string],
|
|
1536
1536
|
): Promise<TypedDevInspectResults<[]>> {
|
|
1537
1537
|
const tx = new Transaction();
|
|
@@ -1546,7 +1546,7 @@ export namespace pool {
|
|
|
1546
1546
|
);
|
|
1547
1547
|
}
|
|
1548
1548
|
export async function swapExactFirstToSecond<T0 = any, T1 = any>(
|
|
1549
|
-
client:
|
|
1549
|
+
client: SuiJsonRpcClient,
|
|
1550
1550
|
args: [string, string, bigint, bigint],
|
|
1551
1551
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1552
1552
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T1>]>> {
|
|
@@ -1562,7 +1562,7 @@ export namespace pool {
|
|
|
1562
1562
|
>(inspectRes);
|
|
1563
1563
|
}
|
|
1564
1564
|
export async function swapExactSecondToFirst<T0 = any, T1 = any>(
|
|
1565
|
-
client:
|
|
1565
|
+
client: SuiJsonRpcClient,
|
|
1566
1566
|
args: [string, string, bigint, bigint],
|
|
1567
1567
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1568
1568
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
|
|
@@ -1578,7 +1578,7 @@ export namespace pool {
|
|
|
1578
1578
|
>(inspectRes);
|
|
1579
1579
|
}
|
|
1580
1580
|
export async function swapFirstToExactSecond<T0 = any, T1 = any>(
|
|
1581
|
-
client:
|
|
1581
|
+
client: SuiJsonRpcClient,
|
|
1582
1582
|
args: [string, string, bigint, bigint],
|
|
1583
1583
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1584
1584
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T1>]>> {
|
|
@@ -1594,7 +1594,7 @@ export namespace pool {
|
|
|
1594
1594
|
>(inspectRes);
|
|
1595
1595
|
}
|
|
1596
1596
|
export async function swapSecondToExactFirst<T0 = any, T1 = any>(
|
|
1597
|
-
client:
|
|
1597
|
+
client: SuiJsonRpcClient,
|
|
1598
1598
|
args: [string, string, bigint, bigint],
|
|
1599
1599
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1600
1600
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
|
|
@@ -1610,7 +1610,7 @@ export namespace pool {
|
|
|
1610
1610
|
>(inspectRes);
|
|
1611
1611
|
}
|
|
1612
1612
|
export async function zapInFirst<T0 = any, T1 = any>(
|
|
1613
|
-
client:
|
|
1613
|
+
client: SuiJsonRpcClient,
|
|
1614
1614
|
args: [string, string, bigint],
|
|
1615
1615
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1616
1616
|
): Promise<
|
|
@@ -1630,7 +1630,7 @@ export namespace pool {
|
|
|
1630
1630
|
>(inspectRes);
|
|
1631
1631
|
}
|
|
1632
1632
|
export async function zapInSecond<T0 = any, T1 = any>(
|
|
1633
|
-
client:
|
|
1633
|
+
client: SuiJsonRpcClient,
|
|
1634
1634
|
args: [string, string, bigint],
|
|
1635
1635
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1636
1636
|
): Promise<
|
|
@@ -1838,7 +1838,7 @@ export namespace pool_utils {
|
|
|
1838
1838
|
}
|
|
1839
1839
|
export namespace view {
|
|
1840
1840
|
export async function executeReturnToken<T0 = any>(
|
|
1841
|
-
client:
|
|
1841
|
+
client: SuiJsonRpcClient,
|
|
1842
1842
|
args: [_0x2.coin.Coin<T0>],
|
|
1843
1843
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1844
1844
|
): Promise<TypedDevInspectResults<[]>> {
|
|
@@ -1854,7 +1854,7 @@ export namespace pool_utils {
|
|
|
1854
1854
|
);
|
|
1855
1855
|
}
|
|
1856
1856
|
export async function getInputPrice(
|
|
1857
|
-
client:
|
|
1857
|
+
client: SuiJsonRpcClient,
|
|
1858
1858
|
args: [bigint, bigint, bigint, bigint],
|
|
1859
1859
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1860
1860
|
const tx = new Transaction();
|
|
@@ -1869,7 +1869,7 @@ export namespace pool_utils {
|
|
|
1869
1869
|
);
|
|
1870
1870
|
}
|
|
1871
1871
|
export async function getOptimalZapInAmount(
|
|
1872
|
-
client:
|
|
1872
|
+
client: SuiJsonRpcClient,
|
|
1873
1873
|
args: [bigint, bigint],
|
|
1874
1874
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1875
1875
|
const tx = new Transaction();
|
|
@@ -1884,7 +1884,7 @@ export namespace pool_utils {
|
|
|
1884
1884
|
);
|
|
1885
1885
|
}
|
|
1886
1886
|
export async function getOutputPrice(
|
|
1887
|
-
client:
|
|
1887
|
+
client: SuiJsonRpcClient,
|
|
1888
1888
|
args: [bigint, bigint, bigint, bigint],
|
|
1889
1889
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1890
1890
|
const tx = new Transaction();
|
|
@@ -1899,7 +1899,7 @@ export namespace pool_utils {
|
|
|
1899
1899
|
);
|
|
1900
1900
|
}
|
|
1901
1901
|
export async function getTripleType<T0 = any, T1 = any, T2 = any>(
|
|
1902
|
-
client:
|
|
1902
|
+
client: SuiJsonRpcClient,
|
|
1903
1903
|
args: [],
|
|
1904
1904
|
typeArguments: [
|
|
1905
1905
|
TypeDescriptor<T0> | string,
|
|
@@ -1931,7 +1931,7 @@ export namespace pool_utils {
|
|
|
1931
1931
|
>(inspectRes);
|
|
1932
1932
|
}
|
|
1933
1933
|
export async function getType<T0 = any, T1 = any>(
|
|
1934
|
-
client:
|
|
1934
|
+
client: SuiJsonRpcClient,
|
|
1935
1935
|
args: [],
|
|
1936
1936
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1937
1937
|
): Promise<
|
|
@@ -1949,7 +1949,7 @@ export namespace pool_utils {
|
|
|
1949
1949
|
>(inspectRes);
|
|
1950
1950
|
}
|
|
1951
1951
|
export async function quote(
|
|
1952
|
-
client:
|
|
1952
|
+
client: SuiJsonRpcClient,
|
|
1953
1953
|
args: [bigint, bigint, bigint],
|
|
1954
1954
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1955
1955
|
const tx = new Transaction();
|
|
@@ -1964,7 +1964,7 @@ export namespace pool_utils {
|
|
|
1964
1964
|
);
|
|
1965
1965
|
}
|
|
1966
1966
|
export async function sortTokenType(
|
|
1967
|
-
client:
|
|
1967
|
+
client: SuiJsonRpcClient,
|
|
1968
1968
|
args: [string, string],
|
|
1969
1969
|
): Promise<TypedDevInspectResults<[comparator.Result]>> {
|
|
1970
1970
|
const tx = new Transaction();
|
|
@@ -2304,7 +2304,7 @@ export namespace router {
|
|
|
2304
2304
|
}
|
|
2305
2305
|
export namespace view {
|
|
2306
2306
|
export async function addLiquidity_<T0 = any, T1 = any>(
|
|
2307
|
-
client:
|
|
2307
|
+
client: SuiJsonRpcClient,
|
|
2308
2308
|
args: [string, string[], string[], bigint, bigint, bigint, bigint],
|
|
2309
2309
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2310
2310
|
): Promise<TypedDevInspectResults<[]>> {
|
|
@@ -2320,7 +2320,7 @@ export namespace router {
|
|
|
2320
2320
|
);
|
|
2321
2321
|
}
|
|
2322
2322
|
export async function createPool_<T0 = any, T1 = any>(
|
|
2323
|
-
client:
|
|
2323
|
+
client: SuiJsonRpcClient,
|
|
2324
2324
|
args: [string, string[], string[], bigint, bigint],
|
|
2325
2325
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2326
2326
|
): Promise<TypedDevInspectResults<[]>> {
|
|
@@ -2336,7 +2336,7 @@ export namespace router {
|
|
|
2336
2336
|
);
|
|
2337
2337
|
}
|
|
2338
2338
|
export async function removeLiquidity_<T0 = any, T1 = any>(
|
|
2339
|
-
client:
|
|
2339
|
+
client: SuiJsonRpcClient,
|
|
2340
2340
|
args: [string, string[], bigint, bigint, bigint],
|
|
2341
2341
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2342
2342
|
): Promise<TypedDevInspectResults<[]>> {
|
|
@@ -2352,7 +2352,7 @@ export namespace router {
|
|
|
2352
2352
|
);
|
|
2353
2353
|
}
|
|
2354
2354
|
export async function swapExactInput_<T0 = any, T1 = any>(
|
|
2355
|
-
client:
|
|
2355
|
+
client: SuiJsonRpcClient,
|
|
2356
2356
|
args: [string, string[], bigint, bigint],
|
|
2357
2357
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2358
2358
|
): Promise<TypedDevInspectResults<[]>> {
|
|
@@ -2372,7 +2372,7 @@ export namespace router {
|
|
|
2372
2372
|
T1 = any,
|
|
2373
2373
|
T2 = any,
|
|
2374
2374
|
>(
|
|
2375
|
-
client:
|
|
2375
|
+
client: SuiJsonRpcClient,
|
|
2376
2376
|
args: [string, string[], bigint, bigint],
|
|
2377
2377
|
typeArguments: [
|
|
2378
2378
|
TypeDescriptor<T0> | string,
|
|
@@ -2392,7 +2392,7 @@ export namespace router {
|
|
|
2392
2392
|
);
|
|
2393
2393
|
}
|
|
2394
2394
|
export async function swapExactOutput_<T0 = any, T1 = any>(
|
|
2395
|
-
client:
|
|
2395
|
+
client: SuiJsonRpcClient,
|
|
2396
2396
|
args: [string, string[], bigint, bigint],
|
|
2397
2397
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2398
2398
|
): Promise<TypedDevInspectResults<[]>> {
|
|
@@ -2412,7 +2412,7 @@ export namespace router {
|
|
|
2412
2412
|
T1 = any,
|
|
2413
2413
|
T2 = any,
|
|
2414
2414
|
>(
|
|
2415
|
-
client:
|
|
2415
|
+
client: SuiJsonRpcClient,
|
|
2416
2416
|
args: [string, string[], bigint, bigint],
|
|
2417
2417
|
typeArguments: [
|
|
2418
2418
|
TypeDescriptor<T0> | string,
|
|
@@ -2432,7 +2432,7 @@ export namespace router {
|
|
|
2432
2432
|
);
|
|
2433
2433
|
}
|
|
2434
2434
|
export async function zapIn_<T0 = any, T1 = any>(
|
|
2435
|
-
client:
|
|
2435
|
+
client: SuiJsonRpcClient,
|
|
2436
2436
|
args: [string, string[], bigint],
|
|
2437
2437
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2438
2438
|
): Promise<TypedDevInspectResults<[]>> {
|