@typemove/sui 1.6.10 → 1.6.11
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/cjs/builtin/0x1.d.ts +166 -305
- package/dist/cjs/builtin/0x1.d.ts.map +1 -1
- package/dist/cjs/builtin/0x1.js.map +1 -1
- package/dist/cjs/builtin/0x2.d.ts +559 -1475
- package/dist/cjs/builtin/0x2.d.ts.map +1 -1
- package/dist/cjs/builtin/0x2.js.map +1 -1
- package/dist/cjs/builtin/0x3.d.ts +334 -806
- package/dist/cjs/builtin/0x3.d.ts.map +1 -1
- package/dist/cjs/builtin/0x3.js.map +1 -1
- package/dist/cjs/codegen/codegen.d.ts.map +1 -1
- package/dist/cjs/codegen/codegen.js +12 -6
- package/dist/cjs/codegen/codegen.js.map +1 -1
- package/dist/esm/builtin/0x1.d.ts +166 -305
- 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 +559 -1475
- 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 +334 -806
- 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.map +1 -1
- package/dist/esm/codegen/codegen.js +12 -6
- package/dist/esm/codegen/codegen.js.map +1 -1
- package/package.json +2 -2
- package/src/builtin/0x1.ts +166 -305
- package/src/builtin/0x2.ts +552 -1468
- package/src/builtin/0x3.ts +331 -803
- package/src/codegen/codegen.ts +12 -6
- package/src/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.ts +4 -13
- package/src/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.ts +46 -188
- package/src/tests/types/testnet/0x7f7a37c826c88bcfe9aecc042453395ddfa9df6f29cb7c97590bf86cf2b0a75e.ts +29 -78
- package/src/tests/types/testnet/0xdee9.ts +110 -346
- package/src/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.ts +245 -642
package/src/codegen/codegen.ts
CHANGED
|
@@ -121,7 +121,7 @@ export class SuiCodegen extends AbstractCodegen<
|
|
|
121
121
|
`
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
private generateArgs(module: InternalMoveModule, func: InternalMoveFunction) {
|
|
124
|
+
private generateArgs(module: InternalMoveModule, func: InternalMoveFunction, isView: boolean) {
|
|
125
125
|
const args = []
|
|
126
126
|
const argsLen = func.params.length
|
|
127
127
|
for (const [idx, arg] of func.params.entries()) {
|
|
@@ -129,19 +129,25 @@ export class SuiCodegen extends AbstractCodegen<
|
|
|
129
129
|
// no op
|
|
130
130
|
} else if (arg.reference) {
|
|
131
131
|
args.push({
|
|
132
|
-
paramType:
|
|
132
|
+
paramType: isView
|
|
133
|
+
? this.ADDRESS_TYPE
|
|
134
|
+
: `${this.ADDRESS_TYPE} | TransactionObjectArgument | TransactionArgument`,
|
|
133
135
|
callValue: `_args.push(transactionArgumentOrObject(args[${idx}], tx))`
|
|
134
136
|
})
|
|
135
137
|
} else if (arg.isVector()) {
|
|
136
138
|
// TODO fix pure vector
|
|
137
139
|
args.push({
|
|
138
|
-
paramType:
|
|
140
|
+
paramType: isView
|
|
141
|
+
? `${this.ADDRESS_TYPE}[]`
|
|
142
|
+
: `(${this.ADDRESS_TYPE} | TransactionObjectArgument)[] | TransactionArgument`,
|
|
139
143
|
callValue: `_args.push(transactionArgumentOrVec(args[${idx}], tx))`
|
|
140
144
|
})
|
|
141
145
|
} else {
|
|
142
146
|
// Handle pure type
|
|
143
147
|
let pureFunction = ''
|
|
144
|
-
const paramType =
|
|
148
|
+
const paramType = isView
|
|
149
|
+
? this.generateTypeForDescriptor(arg, module.address)
|
|
150
|
+
: `${this.generateTypeForDescriptor(arg, module.address)} | TransactionArgument`
|
|
145
151
|
|
|
146
152
|
switch (arg.qname.toLowerCase()) {
|
|
147
153
|
case 'u8':
|
|
@@ -200,7 +206,7 @@ export class SuiCodegen extends AbstractCodegen<
|
|
|
200
206
|
})
|
|
201
207
|
.join(',')
|
|
202
208
|
|
|
203
|
-
const args = this.generateArgs(module, func)
|
|
209
|
+
const args = this.generateArgs(module, func, true)
|
|
204
210
|
const returnType = `${this.generateFunctionReturnTypeParameters(func, module.address)}`
|
|
205
211
|
|
|
206
212
|
return `export async function ${camel(normalizeToJSName(func.name))}${genericString}(
|
|
@@ -229,7 +235,7 @@ export class SuiCodegen extends AbstractCodegen<
|
|
|
229
235
|
return ''
|
|
230
236
|
}
|
|
231
237
|
|
|
232
|
-
const args = this.generateArgs(module, func)
|
|
238
|
+
const args = this.generateArgs(module, func, false)
|
|
233
239
|
|
|
234
240
|
const genericString = this.generateFunctionTypeParameters(func)
|
|
235
241
|
|
|
@@ -208,10 +208,7 @@ export namespace oracle {
|
|
|
208
208
|
export namespace view {
|
|
209
209
|
export async function copyKey<T0 = any>(
|
|
210
210
|
client: SuiClient,
|
|
211
|
-
args: [
|
|
212
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
213
|
-
string | TransactionArgument,
|
|
214
|
-
],
|
|
211
|
+
args: [string, string],
|
|
215
212
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
216
213
|
): Promise<TypedDevInspectResults<[]>> {
|
|
217
214
|
const tx = new Transaction();
|
|
@@ -227,7 +224,7 @@ export namespace oracle {
|
|
|
227
224
|
}
|
|
228
225
|
export async function getOracle<T0 = any>(
|
|
229
226
|
client: SuiClient,
|
|
230
|
-
args: [string
|
|
227
|
+
args: [string],
|
|
231
228
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
232
229
|
): Promise<TypedDevInspectResults<[bigint, bigint, bigint, bigint]>> {
|
|
233
230
|
const tx = new Transaction();
|
|
@@ -243,7 +240,7 @@ export namespace oracle {
|
|
|
243
240
|
}
|
|
244
241
|
export async function newOracle<T0 = any>(
|
|
245
242
|
client: SuiClient,
|
|
246
|
-
args: [bigint
|
|
243
|
+
args: [bigint],
|
|
247
244
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
248
245
|
): Promise<TypedDevInspectResults<[]>> {
|
|
249
246
|
const tx = new Transaction();
|
|
@@ -259,13 +256,7 @@ export namespace oracle {
|
|
|
259
256
|
}
|
|
260
257
|
export async function update<T0 = any>(
|
|
261
258
|
client: SuiClient,
|
|
262
|
-
args: [
|
|
263
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
264
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
265
|
-
bigint | TransactionArgument,
|
|
266
|
-
bigint | TransactionArgument,
|
|
267
|
-
bigint | TransactionArgument,
|
|
268
|
-
],
|
|
259
|
+
args: [string, string, bigint, bigint, bigint],
|
|
269
260
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
270
261
|
): Promise<TypedDevInspectResults<[]>> {
|
|
271
262
|
const tx = new Transaction();
|
|
@@ -143,10 +143,7 @@ export namespace comparator {
|
|
|
143
143
|
export namespace view {
|
|
144
144
|
export async function compare<T0 = any>(
|
|
145
145
|
client: SuiClient,
|
|
146
|
-
args: [
|
|
147
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
148
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
149
|
-
],
|
|
146
|
+
args: [string, string],
|
|
150
147
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
151
148
|
): Promise<TypedDevInspectResults<[comparator.Result]>> {
|
|
152
149
|
const tx = new Transaction();
|
|
@@ -162,10 +159,7 @@ export namespace comparator {
|
|
|
162
159
|
}
|
|
163
160
|
export async function compareU8Vector(
|
|
164
161
|
client: SuiClient,
|
|
165
|
-
args: [
|
|
166
|
-
(string | TransactionObjectArgument)[] | TransactionArgument,
|
|
167
|
-
(string | TransactionObjectArgument)[] | TransactionArgument,
|
|
168
|
-
],
|
|
162
|
+
args: [string[], string[]],
|
|
169
163
|
): Promise<TypedDevInspectResults<[comparator.Result]>> {
|
|
170
164
|
const tx = new Transaction();
|
|
171
165
|
builder.compareU8Vector(tx, args);
|
|
@@ -180,7 +174,7 @@ export namespace comparator {
|
|
|
180
174
|
}
|
|
181
175
|
export async function isEqual(
|
|
182
176
|
client: SuiClient,
|
|
183
|
-
args: [string
|
|
177
|
+
args: [string],
|
|
184
178
|
): Promise<TypedDevInspectResults<[boolean]>> {
|
|
185
179
|
const tx = new Transaction();
|
|
186
180
|
builder.isEqual(tx, args);
|
|
@@ -195,7 +189,7 @@ export namespace comparator {
|
|
|
195
189
|
}
|
|
196
190
|
export async function isGreaterThan(
|
|
197
191
|
client: SuiClient,
|
|
198
|
-
args: [string
|
|
192
|
+
args: [string],
|
|
199
193
|
): Promise<TypedDevInspectResults<[boolean]>> {
|
|
200
194
|
const tx = new Transaction();
|
|
201
195
|
builder.isGreaterThan(tx, args);
|
|
@@ -210,7 +204,7 @@ export namespace comparator {
|
|
|
210
204
|
}
|
|
211
205
|
export async function isSmallerThan(
|
|
212
206
|
client: SuiClient,
|
|
213
|
-
args: [string
|
|
207
|
+
args: [string],
|
|
214
208
|
): Promise<TypedDevInspectResults<[boolean]>> {
|
|
215
209
|
const tx = new Transaction();
|
|
216
210
|
builder.isSmallerThan(tx, args);
|
|
@@ -320,7 +314,7 @@ export namespace math_utils {
|
|
|
320
314
|
export namespace view {
|
|
321
315
|
export async function max(
|
|
322
316
|
client: SuiClient,
|
|
323
|
-
args: [bigint
|
|
317
|
+
args: [bigint, bigint],
|
|
324
318
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
325
319
|
const tx = new Transaction();
|
|
326
320
|
builder.max(tx, args);
|
|
@@ -335,7 +329,7 @@ export namespace math_utils {
|
|
|
335
329
|
}
|
|
336
330
|
export async function maxU64(
|
|
337
331
|
client: SuiClient,
|
|
338
|
-
args: [bigint
|
|
332
|
+
args: [bigint, bigint],
|
|
339
333
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
340
334
|
const tx = new Transaction();
|
|
341
335
|
builder.maxU64(tx, args);
|
|
@@ -350,7 +344,7 @@ export namespace math_utils {
|
|
|
350
344
|
}
|
|
351
345
|
export async function min(
|
|
352
346
|
client: SuiClient,
|
|
353
|
-
args: [bigint
|
|
347
|
+
args: [bigint, bigint],
|
|
354
348
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
355
349
|
const tx = new Transaction();
|
|
356
350
|
builder.min(tx, args);
|
|
@@ -365,7 +359,7 @@ export namespace math_utils {
|
|
|
365
359
|
}
|
|
366
360
|
export async function pow(
|
|
367
361
|
client: SuiClient,
|
|
368
|
-
args: [bigint
|
|
362
|
+
args: [bigint, number],
|
|
369
363
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
370
364
|
const tx = new Transaction();
|
|
371
365
|
builder.pow(tx, args);
|
|
@@ -380,7 +374,7 @@ export namespace math_utils {
|
|
|
380
374
|
}
|
|
381
375
|
export async function sqrt(
|
|
382
376
|
client: SuiClient,
|
|
383
|
-
args: [bigint
|
|
377
|
+
args: [bigint],
|
|
384
378
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
385
379
|
const tx = new Transaction();
|
|
386
380
|
builder.sqrt(tx, args);
|
|
@@ -395,7 +389,7 @@ export namespace math_utils {
|
|
|
395
389
|
}
|
|
396
390
|
export async function sqrtU256(
|
|
397
391
|
client: SuiClient,
|
|
398
|
-
args: [bigint
|
|
392
|
+
args: [bigint],
|
|
399
393
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
400
394
|
const tx = new Transaction();
|
|
401
395
|
builder.sqrtU256(tx, args);
|
|
@@ -1307,15 +1301,7 @@ export namespace pool {
|
|
|
1307
1301
|
export namespace view {
|
|
1308
1302
|
export async function addLiquidity<T0 = any, T1 = any>(
|
|
1309
1303
|
client: SuiClient,
|
|
1310
|
-
args: [
|
|
1311
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1312
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1313
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1314
|
-
bigint | TransactionArgument,
|
|
1315
|
-
bigint | TransactionArgument,
|
|
1316
|
-
bigint | TransactionArgument,
|
|
1317
|
-
bigint | TransactionArgument,
|
|
1318
|
-
],
|
|
1304
|
+
args: [string, string, string, bigint, bigint, bigint, bigint],
|
|
1319
1305
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1320
1306
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]>> {
|
|
1321
1307
|
const tx = new Transaction();
|
|
@@ -1331,7 +1317,7 @@ export namespace pool {
|
|
|
1331
1317
|
}
|
|
1332
1318
|
export async function borrowMutPool<T0 = any, T1 = any>(
|
|
1333
1319
|
client: SuiClient,
|
|
1334
|
-
args: [string
|
|
1320
|
+
args: [string],
|
|
1335
1321
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1336
1322
|
): Promise<TypedDevInspectResults<[string]>> {
|
|
1337
1323
|
const tx = new Transaction();
|
|
@@ -1347,7 +1333,7 @@ export namespace pool {
|
|
|
1347
1333
|
}
|
|
1348
1334
|
export async function borrowPool<T0 = any, T1 = any>(
|
|
1349
1335
|
client: SuiClient,
|
|
1350
|
-
args: [string
|
|
1336
|
+
args: [string],
|
|
1351
1337
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1352
1338
|
): Promise<TypedDevInspectResults<[string]>> {
|
|
1353
1339
|
const tx = new Transaction();
|
|
@@ -1363,13 +1349,7 @@ export namespace pool {
|
|
|
1363
1349
|
}
|
|
1364
1350
|
export async function createPool<T0 = any, T1 = any>(
|
|
1365
1351
|
client: SuiClient,
|
|
1366
|
-
args: [
|
|
1367
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1368
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1369
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1370
|
-
bigint | TransactionArgument,
|
|
1371
|
-
bigint | TransactionArgument,
|
|
1372
|
-
],
|
|
1352
|
+
args: [string, string, string, bigint, bigint],
|
|
1373
1353
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1374
1354
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<pool.WISPLP<T0, T1>>]>> {
|
|
1375
1355
|
const tx = new Transaction();
|
|
@@ -1385,10 +1365,7 @@ export namespace pool {
|
|
|
1385
1365
|
}
|
|
1386
1366
|
export async function createPoolName(
|
|
1387
1367
|
client: SuiClient,
|
|
1388
|
-
args: [
|
|
1389
|
-
_0x1.type_name.TypeName | TransactionArgument,
|
|
1390
|
-
_0x1.type_name.TypeName | TransactionArgument,
|
|
1391
|
-
],
|
|
1368
|
+
args: [_0x1.type_name.TypeName, _0x1.type_name.TypeName],
|
|
1392
1369
|
): Promise<TypedDevInspectResults<[pool.PoolName]>> {
|
|
1393
1370
|
const tx = new Transaction();
|
|
1394
1371
|
builder.createPoolName(tx, args);
|
|
@@ -1403,7 +1380,7 @@ export namespace pool {
|
|
|
1403
1380
|
}
|
|
1404
1381
|
export async function getAmounts<T0 = any, T1 = any>(
|
|
1405
1382
|
client: SuiClient,
|
|
1406
|
-
args: [string
|
|
1383
|
+
args: [string],
|
|
1407
1384
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1408
1385
|
): Promise<TypedDevInspectResults<[bigint, bigint, bigint]>> {
|
|
1409
1386
|
const tx = new Transaction();
|
|
@@ -1419,11 +1396,7 @@ export namespace pool {
|
|
|
1419
1396
|
}
|
|
1420
1397
|
export async function getInputAmount<T0 = any, T1 = any>(
|
|
1421
1398
|
client: SuiClient,
|
|
1422
|
-
args: [
|
|
1423
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1424
|
-
bigint | TransactionArgument,
|
|
1425
|
-
boolean | TransactionArgument,
|
|
1426
|
-
],
|
|
1399
|
+
args: [string, bigint, boolean],
|
|
1427
1400
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1428
1401
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1429
1402
|
const tx = new Transaction();
|
|
@@ -1439,11 +1412,7 @@ export namespace pool {
|
|
|
1439
1412
|
}
|
|
1440
1413
|
export async function getOutputAmount<T0 = any, T1 = any>(
|
|
1441
1414
|
client: SuiClient,
|
|
1442
|
-
args: [
|
|
1443
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1444
|
-
bigint | TransactionArgument,
|
|
1445
|
-
boolean | TransactionArgument,
|
|
1446
|
-
],
|
|
1415
|
+
args: [string, bigint, boolean],
|
|
1447
1416
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1448
1417
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1449
1418
|
const tx = new Transaction();
|
|
@@ -1459,7 +1428,7 @@ export namespace pool {
|
|
|
1459
1428
|
}
|
|
1460
1429
|
export async function getPoolData<T0 = any, T1 = any>(
|
|
1461
1430
|
client: SuiClient,
|
|
1462
|
-
args: [string
|
|
1431
|
+
args: [string],
|
|
1463
1432
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1464
1433
|
): Promise<
|
|
1465
1434
|
TypedDevInspectResults<[bigint, bigint, bigint, bigint, bigint]>
|
|
@@ -1477,7 +1446,7 @@ export namespace pool {
|
|
|
1477
1446
|
}
|
|
1478
1447
|
export async function isPoolCreated<T0 = any, T1 = any>(
|
|
1479
1448
|
client: SuiClient,
|
|
1480
|
-
args: [string
|
|
1449
|
+
args: [string],
|
|
1481
1450
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1482
1451
|
): Promise<TypedDevInspectResults<[boolean]>> {
|
|
1483
1452
|
const tx = new Transaction();
|
|
@@ -1493,7 +1462,7 @@ export namespace pool {
|
|
|
1493
1462
|
}
|
|
1494
1463
|
export async function isPoolCreatedSorted<T0 = any, T1 = any>(
|
|
1495
1464
|
client: SuiClient,
|
|
1496
|
-
args: [string
|
|
1465
|
+
args: [string],
|
|
1497
1466
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1498
1467
|
): Promise<TypedDevInspectResults<[boolean]>> {
|
|
1499
1468
|
const tx = new Transaction();
|
|
@@ -1509,13 +1478,7 @@ export namespace pool {
|
|
|
1509
1478
|
}
|
|
1510
1479
|
export async function processSwapExactInput<T0 = any, T1 = any>(
|
|
1511
1480
|
client: SuiClient,
|
|
1512
|
-
args: [
|
|
1513
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1514
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1515
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1516
|
-
bigint | TransactionArgument,
|
|
1517
|
-
boolean | TransactionArgument,
|
|
1518
|
-
],
|
|
1481
|
+
args: [string, string, string, bigint, boolean],
|
|
1519
1482
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1520
1483
|
): Promise<TypedDevInspectResults<[]>> {
|
|
1521
1484
|
const tx = new Transaction();
|
|
@@ -1531,13 +1494,7 @@ export namespace pool {
|
|
|
1531
1494
|
}
|
|
1532
1495
|
export async function processSwapExactOutput<T0 = any, T1 = any>(
|
|
1533
1496
|
client: SuiClient,
|
|
1534
|
-
args: [
|
|
1535
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1536
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1537
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1538
|
-
bigint | TransactionArgument,
|
|
1539
|
-
boolean | TransactionArgument,
|
|
1540
|
-
],
|
|
1497
|
+
args: [string, string, string, bigint, boolean],
|
|
1541
1498
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1542
1499
|
): Promise<TypedDevInspectResults<[]>> {
|
|
1543
1500
|
const tx = new Transaction();
|
|
@@ -1553,13 +1510,7 @@ export namespace pool {
|
|
|
1553
1510
|
}
|
|
1554
1511
|
export async function removeLiquidity<T0 = any, T1 = any>(
|
|
1555
1512
|
client: SuiClient,
|
|
1556
|
-
args: [
|
|
1557
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1558
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1559
|
-
bigint | TransactionArgument,
|
|
1560
|
-
bigint | TransactionArgument,
|
|
1561
|
-
bigint | TransactionArgument,
|
|
1562
|
-
],
|
|
1513
|
+
args: [string, string, bigint, bigint, bigint],
|
|
1563
1514
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1564
1515
|
): Promise<
|
|
1565
1516
|
TypedDevInspectResults<[_0x2.coin.Coin<T0>, _0x2.coin.Coin<T1>]>
|
|
@@ -1577,11 +1528,7 @@ export namespace pool {
|
|
|
1577
1528
|
}
|
|
1578
1529
|
export async function setFeeTo_(
|
|
1579
1530
|
client: SuiClient,
|
|
1580
|
-
args: [
|
|
1581
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1582
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1583
|
-
string | TransactionArgument,
|
|
1584
|
-
],
|
|
1531
|
+
args: [string, string, string],
|
|
1585
1532
|
): Promise<TypedDevInspectResults<[]>> {
|
|
1586
1533
|
const tx = new Transaction();
|
|
1587
1534
|
builder.setFeeTo_(tx, args);
|
|
@@ -1596,12 +1543,7 @@ export namespace pool {
|
|
|
1596
1543
|
}
|
|
1597
1544
|
export async function swapExactFirstToSecond<T0 = any, T1 = any>(
|
|
1598
1545
|
client: SuiClient,
|
|
1599
|
-
args: [
|
|
1600
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1601
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1602
|
-
bigint | TransactionArgument,
|
|
1603
|
-
bigint | TransactionArgument,
|
|
1604
|
-
],
|
|
1546
|
+
args: [string, string, bigint, bigint],
|
|
1605
1547
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1606
1548
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T1>]>> {
|
|
1607
1549
|
const tx = new Transaction();
|
|
@@ -1617,12 +1559,7 @@ export namespace pool {
|
|
|
1617
1559
|
}
|
|
1618
1560
|
export async function swapExactSecondToFirst<T0 = any, T1 = any>(
|
|
1619
1561
|
client: SuiClient,
|
|
1620
|
-
args: [
|
|
1621
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1622
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1623
|
-
bigint | TransactionArgument,
|
|
1624
|
-
bigint | TransactionArgument,
|
|
1625
|
-
],
|
|
1562
|
+
args: [string, string, bigint, bigint],
|
|
1626
1563
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1627
1564
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
|
|
1628
1565
|
const tx = new Transaction();
|
|
@@ -1638,12 +1575,7 @@ export namespace pool {
|
|
|
1638
1575
|
}
|
|
1639
1576
|
export async function swapFirstToExactSecond<T0 = any, T1 = any>(
|
|
1640
1577
|
client: SuiClient,
|
|
1641
|
-
args: [
|
|
1642
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1643
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1644
|
-
bigint | TransactionArgument,
|
|
1645
|
-
bigint | TransactionArgument,
|
|
1646
|
-
],
|
|
1578
|
+
args: [string, string, bigint, bigint],
|
|
1647
1579
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1648
1580
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T1>]>> {
|
|
1649
1581
|
const tx = new Transaction();
|
|
@@ -1659,12 +1591,7 @@ export namespace pool {
|
|
|
1659
1591
|
}
|
|
1660
1592
|
export async function swapSecondToExactFirst<T0 = any, T1 = any>(
|
|
1661
1593
|
client: SuiClient,
|
|
1662
|
-
args: [
|
|
1663
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1664
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1665
|
-
bigint | TransactionArgument,
|
|
1666
|
-
bigint | TransactionArgument,
|
|
1667
|
-
],
|
|
1594
|
+
args: [string, string, bigint, bigint],
|
|
1668
1595
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1669
1596
|
): Promise<TypedDevInspectResults<[_0x2.coin.Coin<T0>]>> {
|
|
1670
1597
|
const tx = new Transaction();
|
|
@@ -1680,11 +1607,7 @@ export namespace pool {
|
|
|
1680
1607
|
}
|
|
1681
1608
|
export async function zapInFirst<T0 = any, T1 = any>(
|
|
1682
1609
|
client: SuiClient,
|
|
1683
|
-
args: [
|
|
1684
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1685
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1686
|
-
bigint | TransactionArgument,
|
|
1687
|
-
],
|
|
1610
|
+
args: [string, string, bigint],
|
|
1688
1611
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1689
1612
|
): Promise<
|
|
1690
1613
|
TypedDevInspectResults<
|
|
@@ -1704,11 +1627,7 @@ export namespace pool {
|
|
|
1704
1627
|
}
|
|
1705
1628
|
export async function zapInSecond<T0 = any, T1 = any>(
|
|
1706
1629
|
client: SuiClient,
|
|
1707
|
-
args: [
|
|
1708
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1709
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
1710
|
-
bigint | TransactionArgument,
|
|
1711
|
-
],
|
|
1630
|
+
args: [string, string, bigint],
|
|
1712
1631
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
1713
1632
|
): Promise<
|
|
1714
1633
|
TypedDevInspectResults<
|
|
@@ -1916,7 +1835,7 @@ export namespace pool_utils {
|
|
|
1916
1835
|
export namespace view {
|
|
1917
1836
|
export async function executeReturnToken<T0 = any>(
|
|
1918
1837
|
client: SuiClient,
|
|
1919
|
-
args: [_0x2.coin.Coin<T0>
|
|
1838
|
+
args: [_0x2.coin.Coin<T0>],
|
|
1920
1839
|
typeArguments: [TypeDescriptor<T0> | string],
|
|
1921
1840
|
): Promise<TypedDevInspectResults<[]>> {
|
|
1922
1841
|
const tx = new Transaction();
|
|
@@ -1932,12 +1851,7 @@ export namespace pool_utils {
|
|
|
1932
1851
|
}
|
|
1933
1852
|
export async function getInputPrice(
|
|
1934
1853
|
client: SuiClient,
|
|
1935
|
-
args: [
|
|
1936
|
-
bigint | TransactionArgument,
|
|
1937
|
-
bigint | TransactionArgument,
|
|
1938
|
-
bigint | TransactionArgument,
|
|
1939
|
-
bigint | TransactionArgument,
|
|
1940
|
-
],
|
|
1854
|
+
args: [bigint, bigint, bigint, bigint],
|
|
1941
1855
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1942
1856
|
const tx = new Transaction();
|
|
1943
1857
|
builder.getInputPrice(tx, args);
|
|
@@ -1952,7 +1866,7 @@ export namespace pool_utils {
|
|
|
1952
1866
|
}
|
|
1953
1867
|
export async function getOptimalZapInAmount(
|
|
1954
1868
|
client: SuiClient,
|
|
1955
|
-
args: [bigint
|
|
1869
|
+
args: [bigint, bigint],
|
|
1956
1870
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1957
1871
|
const tx = new Transaction();
|
|
1958
1872
|
builder.getOptimalZapInAmount(tx, args);
|
|
@@ -1967,12 +1881,7 @@ export namespace pool_utils {
|
|
|
1967
1881
|
}
|
|
1968
1882
|
export async function getOutputPrice(
|
|
1969
1883
|
client: SuiClient,
|
|
1970
|
-
args: [
|
|
1971
|
-
bigint | TransactionArgument,
|
|
1972
|
-
bigint | TransactionArgument,
|
|
1973
|
-
bigint | TransactionArgument,
|
|
1974
|
-
bigint | TransactionArgument,
|
|
1975
|
-
],
|
|
1884
|
+
args: [bigint, bigint, bigint, bigint],
|
|
1976
1885
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
1977
1886
|
const tx = new Transaction();
|
|
1978
1887
|
builder.getOutputPrice(tx, args);
|
|
@@ -2037,11 +1946,7 @@ export namespace pool_utils {
|
|
|
2037
1946
|
}
|
|
2038
1947
|
export async function quote(
|
|
2039
1948
|
client: SuiClient,
|
|
2040
|
-
args: [
|
|
2041
|
-
bigint | TransactionArgument,
|
|
2042
|
-
bigint | TransactionArgument,
|
|
2043
|
-
bigint | TransactionArgument,
|
|
2044
|
-
],
|
|
1949
|
+
args: [bigint, bigint, bigint],
|
|
2045
1950
|
): Promise<TypedDevInspectResults<[bigint]>> {
|
|
2046
1951
|
const tx = new Transaction();
|
|
2047
1952
|
builder.quote(tx, args);
|
|
@@ -2056,10 +1961,7 @@ export namespace pool_utils {
|
|
|
2056
1961
|
}
|
|
2057
1962
|
export async function sortTokenType(
|
|
2058
1963
|
client: SuiClient,
|
|
2059
|
-
args: [
|
|
2060
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
2061
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
2062
|
-
],
|
|
1964
|
+
args: [string, string],
|
|
2063
1965
|
): Promise<TypedDevInspectResults<[comparator.Result]>> {
|
|
2064
1966
|
const tx = new Transaction();
|
|
2065
1967
|
builder.sortTokenType(tx, args);
|
|
@@ -2399,15 +2301,7 @@ export namespace router {
|
|
|
2399
2301
|
export namespace view {
|
|
2400
2302
|
export async function addLiquidity_<T0 = any, T1 = any>(
|
|
2401
2303
|
client: SuiClient,
|
|
2402
|
-
args: [
|
|
2403
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
2404
|
-
(string | TransactionObjectArgument)[] | TransactionArgument,
|
|
2405
|
-
(string | TransactionObjectArgument)[] | TransactionArgument,
|
|
2406
|
-
bigint | TransactionArgument,
|
|
2407
|
-
bigint | TransactionArgument,
|
|
2408
|
-
bigint | TransactionArgument,
|
|
2409
|
-
bigint | TransactionArgument,
|
|
2410
|
-
],
|
|
2304
|
+
args: [string, string[], string[], bigint, bigint, bigint, bigint],
|
|
2411
2305
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2412
2306
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2413
2307
|
const tx = new Transaction();
|
|
@@ -2423,13 +2317,7 @@ export namespace router {
|
|
|
2423
2317
|
}
|
|
2424
2318
|
export async function createPool_<T0 = any, T1 = any>(
|
|
2425
2319
|
client: SuiClient,
|
|
2426
|
-
args: [
|
|
2427
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
2428
|
-
(string | TransactionObjectArgument)[] | TransactionArgument,
|
|
2429
|
-
(string | TransactionObjectArgument)[] | TransactionArgument,
|
|
2430
|
-
bigint | TransactionArgument,
|
|
2431
|
-
bigint | TransactionArgument,
|
|
2432
|
-
],
|
|
2320
|
+
args: [string, string[], string[], bigint, bigint],
|
|
2433
2321
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2434
2322
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2435
2323
|
const tx = new Transaction();
|
|
@@ -2445,13 +2333,7 @@ export namespace router {
|
|
|
2445
2333
|
}
|
|
2446
2334
|
export async function removeLiquidity_<T0 = any, T1 = any>(
|
|
2447
2335
|
client: SuiClient,
|
|
2448
|
-
args: [
|
|
2449
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
2450
|
-
(string | TransactionObjectArgument)[] | TransactionArgument,
|
|
2451
|
-
bigint | TransactionArgument,
|
|
2452
|
-
bigint | TransactionArgument,
|
|
2453
|
-
bigint | TransactionArgument,
|
|
2454
|
-
],
|
|
2336
|
+
args: [string, string[], bigint, bigint, bigint],
|
|
2455
2337
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2456
2338
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2457
2339
|
const tx = new Transaction();
|
|
@@ -2467,12 +2349,7 @@ export namespace router {
|
|
|
2467
2349
|
}
|
|
2468
2350
|
export async function swapExactInput_<T0 = any, T1 = any>(
|
|
2469
2351
|
client: SuiClient,
|
|
2470
|
-
args: [
|
|
2471
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
2472
|
-
(string | TransactionObjectArgument)[] | TransactionArgument,
|
|
2473
|
-
bigint | TransactionArgument,
|
|
2474
|
-
bigint | TransactionArgument,
|
|
2475
|
-
],
|
|
2352
|
+
args: [string, string[], bigint, bigint],
|
|
2476
2353
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2477
2354
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2478
2355
|
const tx = new Transaction();
|
|
@@ -2492,12 +2369,7 @@ export namespace router {
|
|
|
2492
2369
|
T2 = any,
|
|
2493
2370
|
>(
|
|
2494
2371
|
client: SuiClient,
|
|
2495
|
-
args: [
|
|
2496
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
2497
|
-
(string | TransactionObjectArgument)[] | TransactionArgument,
|
|
2498
|
-
bigint | TransactionArgument,
|
|
2499
|
-
bigint | TransactionArgument,
|
|
2500
|
-
],
|
|
2372
|
+
args: [string, string[], bigint, bigint],
|
|
2501
2373
|
typeArguments: [
|
|
2502
2374
|
TypeDescriptor<T0> | string,
|
|
2503
2375
|
TypeDescriptor<T1> | string,
|
|
@@ -2517,12 +2389,7 @@ export namespace router {
|
|
|
2517
2389
|
}
|
|
2518
2390
|
export async function swapExactOutput_<T0 = any, T1 = any>(
|
|
2519
2391
|
client: SuiClient,
|
|
2520
|
-
args: [
|
|
2521
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
2522
|
-
(string | TransactionObjectArgument)[] | TransactionArgument,
|
|
2523
|
-
bigint | TransactionArgument,
|
|
2524
|
-
bigint | TransactionArgument,
|
|
2525
|
-
],
|
|
2392
|
+
args: [string, string[], bigint, bigint],
|
|
2526
2393
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2527
2394
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2528
2395
|
const tx = new Transaction();
|
|
@@ -2542,12 +2409,7 @@ export namespace router {
|
|
|
2542
2409
|
T2 = any,
|
|
2543
2410
|
>(
|
|
2544
2411
|
client: SuiClient,
|
|
2545
|
-
args: [
|
|
2546
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
2547
|
-
(string | TransactionObjectArgument)[] | TransactionArgument,
|
|
2548
|
-
bigint | TransactionArgument,
|
|
2549
|
-
bigint | TransactionArgument,
|
|
2550
|
-
],
|
|
2412
|
+
args: [string, string[], bigint, bigint],
|
|
2551
2413
|
typeArguments: [
|
|
2552
2414
|
TypeDescriptor<T0> | string,
|
|
2553
2415
|
TypeDescriptor<T1> | string,
|
|
@@ -2567,11 +2429,7 @@ export namespace router {
|
|
|
2567
2429
|
}
|
|
2568
2430
|
export async function zapIn_<T0 = any, T1 = any>(
|
|
2569
2431
|
client: SuiClient,
|
|
2570
|
-
args: [
|
|
2571
|
-
string | TransactionObjectArgument | TransactionArgument,
|
|
2572
|
-
(string | TransactionObjectArgument)[] | TransactionArgument,
|
|
2573
|
-
bigint | TransactionArgument,
|
|
2574
|
-
],
|
|
2432
|
+
args: [string, string[], bigint],
|
|
2575
2433
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
|
|
2576
2434
|
): Promise<TypedDevInspectResults<[]>> {
|
|
2577
2435
|
const tx = new Transaction();
|