@typemove/sui 1.0.0-rc.19 → 1.0.0-rc.21
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/builtin/0x1.d.ts +211 -10870
- package/dist/builtin/0x1.d.ts.map +1 -1
- package/dist/builtin/0x1.js +166 -165
- package/dist/builtin/0x1.js.map +1 -1
- package/dist/builtin/0x2.d.ts +1163 -46532
- package/dist/builtin/0x2.d.ts.map +1 -1
- package/dist/builtin/0x2.js +700 -699
- package/dist/builtin/0x2.js.map +1 -1
- package/dist/builtin/0x3.d.ts +476 -13475
- package/dist/builtin/0x3.d.ts.map +1 -1
- package/dist/builtin/0x3.js +202 -201
- package/dist/builtin/0x3.js.map +1 -1
- package/dist/codegen/codegen.js +9 -8
- package/dist/codegen/codegen.js.map +1 -1
- package/dist/models.d.ts +1 -1
- package/dist/models.d.ts.map +1 -1
- package/dist/models.js.map +1 -1
- package/dist/move-coder.d.ts +1 -1
- package/dist/move-coder.d.ts.map +1 -1
- package/dist/move-coder.js +1 -5
- package/dist/move-coder.js.map +1 -1
- package/dist/sui-chain-adapter.d.ts +1 -1
- package/dist/sui-chain-adapter.d.ts.map +1 -1
- package/dist/sui-chain-adapter.js +10 -4
- package/dist/sui-chain-adapter.js.map +1 -1
- package/dist/tests/move-call.test.d.ts.map +1 -1
- package/dist/tests/move-call.test.js.map +1 -1
- package/dist/tests/move-coder.test.js.map +1 -1
- package/dist/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.d.ts +25 -544
- package/dist/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.d.ts.map +1 -1
- package/dist/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.js +10 -9
- package/dist/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.js.map +1 -1
- package/dist/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.d.ts +250 -6489
- package/dist/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.d.ts.map +1 -1
- package/dist/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.js +98 -97
- package/dist/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.js.map +1 -1
- package/dist/tests/types/testnet/0xdee9.d.ts +289 -6398
- package/dist/tests/types/testnet/0xdee9.d.ts.map +1 -1
- package/dist/tests/types/testnet/0xdee9.js +96 -95
- package/dist/tests/types/testnet/0xdee9.js.map +1 -1
- package/dist/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.d.ts +977 -21126
- package/dist/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.d.ts.map +1 -1
- package/dist/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.js +312 -311
- package/dist/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.js.map +1 -1
- package/dist/to-internal.d.ts +1 -1
- package/dist/to-internal.d.ts.map +1 -1
- package/dist/to-internal.js +2 -8
- package/dist/to-internal.js.map +1 -1
- package/package.json +5 -12
- package/src/builtin/0x1.ts +293 -297
- package/src/builtin/0x2.ts +1483 -1490
- package/src/builtin/0x3.ts +582 -589
- package/src/codegen/codegen.ts +10 -9
- package/src/models.ts +8 -14
- package/src/move-coder.ts +6 -20
- package/src/sui-chain-adapter.ts +13 -15
- package/src/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.ts +27 -31
- package/src/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.ts +276 -280
- package/src/tests/types/testnet/0xdee9.ts +303 -307
- package/src/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.ts +1064 -1068
- package/src/to-internal.ts +12 -32
|
@@ -6,15 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
import { TypeDescriptor, ANY_TYPE } from "@typemove/move";
|
|
8
8
|
import { MoveCoder, defaultMoveCoder, TypedEventInstance } from "@typemove/sui";
|
|
9
|
-
import { SuiAddress, ObjectId } from "@mysten/sui.js";
|
|
10
9
|
|
|
11
10
|
import { ZERO_ADDRESS } from "@typemove/sui";
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
ObjectCallArg,
|
|
16
|
-
JsonRpcProvider,
|
|
17
|
-
} from "@mysten/sui.js";
|
|
11
|
+
import { TransactionBlock } from "@mysten/sui.js/transactions";
|
|
12
|
+
import { ObjectCallArg, TransactionArgument } from "@mysten/sui.js";
|
|
13
|
+
import { SuiClient } from "@mysten/sui.js/client";
|
|
18
14
|
|
|
19
15
|
import { _0x2 } from "@typemove/sui/builtin";
|
|
20
16
|
import { _0x1 } from "@typemove/sui/builtin";
|
|
@@ -39,8 +35,8 @@ export namespace comparator {
|
|
|
39
35
|
export function compare<T0 = any>(
|
|
40
36
|
tx: TransactionBlock,
|
|
41
37
|
args: [
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
string | ObjectCallArg | TransactionArgument,
|
|
39
|
+
string | ObjectCallArg | TransactionArgument
|
|
44
40
|
],
|
|
45
41
|
typeArguments: [TypeDescriptor<T0> | string]
|
|
46
42
|
): TransactionArgument & [TransactionArgument, TransactionArgument] {
|
|
@@ -67,8 +63,8 @@ export namespace comparator {
|
|
|
67
63
|
export function compareU8Vector(
|
|
68
64
|
tx: TransactionBlock,
|
|
69
65
|
args: [
|
|
70
|
-
(
|
|
71
|
-
(
|
|
66
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
67
|
+
(string | ObjectCallArg)[] | TransactionArgument
|
|
72
68
|
]
|
|
73
69
|
): TransactionArgument & [TransactionArgument, TransactionArgument] {
|
|
74
70
|
const _args: any[] = [];
|
|
@@ -98,7 +94,7 @@ export namespace comparator {
|
|
|
98
94
|
}
|
|
99
95
|
export function isEqual(
|
|
100
96
|
tx: TransactionBlock,
|
|
101
|
-
args: [
|
|
97
|
+
args: [string | ObjectCallArg | TransactionArgument]
|
|
102
98
|
): TransactionArgument & [TransactionArgument] {
|
|
103
99
|
const _args: any[] = [];
|
|
104
100
|
_args.push(
|
|
@@ -114,7 +110,7 @@ export namespace comparator {
|
|
|
114
110
|
}
|
|
115
111
|
export function isGreaterThan(
|
|
116
112
|
tx: TransactionBlock,
|
|
117
|
-
args: [
|
|
113
|
+
args: [string | ObjectCallArg | TransactionArgument]
|
|
118
114
|
): TransactionArgument & [TransactionArgument] {
|
|
119
115
|
const _args: any[] = [];
|
|
120
116
|
_args.push(
|
|
@@ -130,7 +126,7 @@ export namespace comparator {
|
|
|
130
126
|
}
|
|
131
127
|
export function isSmallerThan(
|
|
132
128
|
tx: TransactionBlock,
|
|
133
|
-
args: [
|
|
129
|
+
args: [string | ObjectCallArg | TransactionArgument]
|
|
134
130
|
): TransactionArgument & [TransactionArgument] {
|
|
135
131
|
const _args: any[] = [];
|
|
136
132
|
_args.push(
|
|
@@ -147,67 +143,67 @@ export namespace comparator {
|
|
|
147
143
|
}
|
|
148
144
|
export namespace view {
|
|
149
145
|
export async function compare<T0 = any>(
|
|
150
|
-
|
|
146
|
+
client: SuiClient,
|
|
151
147
|
args: [
|
|
152
|
-
|
|
153
|
-
|
|
148
|
+
string | ObjectCallArg | TransactionArgument,
|
|
149
|
+
string | ObjectCallArg | TransactionArgument
|
|
154
150
|
],
|
|
155
151
|
typeArguments: [TypeDescriptor<T0> | string]
|
|
156
152
|
) {
|
|
157
153
|
const tx = new TransactionBlock();
|
|
158
154
|
builder.compare(tx, args, typeArguments);
|
|
159
|
-
const res = await
|
|
155
|
+
const res = await client.devInspectTransactionBlock({
|
|
160
156
|
transactionBlock: tx,
|
|
161
157
|
sender: ZERO_ADDRESS,
|
|
162
158
|
});
|
|
163
159
|
return res;
|
|
164
160
|
}
|
|
165
161
|
export async function compareU8Vector(
|
|
166
|
-
|
|
162
|
+
client: SuiClient,
|
|
167
163
|
args: [
|
|
168
|
-
(
|
|
169
|
-
(
|
|
164
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
165
|
+
(string | ObjectCallArg)[] | TransactionArgument
|
|
170
166
|
]
|
|
171
167
|
) {
|
|
172
168
|
const tx = new TransactionBlock();
|
|
173
169
|
builder.compareU8Vector(tx, args);
|
|
174
|
-
const res = await
|
|
170
|
+
const res = await client.devInspectTransactionBlock({
|
|
175
171
|
transactionBlock: tx,
|
|
176
172
|
sender: ZERO_ADDRESS,
|
|
177
173
|
});
|
|
178
174
|
return res;
|
|
179
175
|
}
|
|
180
176
|
export async function isEqual(
|
|
181
|
-
|
|
182
|
-
args: [
|
|
177
|
+
client: SuiClient,
|
|
178
|
+
args: [string | ObjectCallArg | TransactionArgument]
|
|
183
179
|
) {
|
|
184
180
|
const tx = new TransactionBlock();
|
|
185
181
|
builder.isEqual(tx, args);
|
|
186
|
-
const res = await
|
|
182
|
+
const res = await client.devInspectTransactionBlock({
|
|
187
183
|
transactionBlock: tx,
|
|
188
184
|
sender: ZERO_ADDRESS,
|
|
189
185
|
});
|
|
190
186
|
return res;
|
|
191
187
|
}
|
|
192
188
|
export async function isGreaterThan(
|
|
193
|
-
|
|
194
|
-
args: [
|
|
189
|
+
client: SuiClient,
|
|
190
|
+
args: [string | ObjectCallArg | TransactionArgument]
|
|
195
191
|
) {
|
|
196
192
|
const tx = new TransactionBlock();
|
|
197
193
|
builder.isGreaterThan(tx, args);
|
|
198
|
-
const res = await
|
|
194
|
+
const res = await client.devInspectTransactionBlock({
|
|
199
195
|
transactionBlock: tx,
|
|
200
196
|
sender: ZERO_ADDRESS,
|
|
201
197
|
});
|
|
202
198
|
return res;
|
|
203
199
|
}
|
|
204
200
|
export async function isSmallerThan(
|
|
205
|
-
|
|
206
|
-
args: [
|
|
201
|
+
client: SuiClient,
|
|
202
|
+
args: [string | ObjectCallArg | TransactionArgument]
|
|
207
203
|
) {
|
|
208
204
|
const tx = new TransactionBlock();
|
|
209
205
|
builder.isSmallerThan(tx, args);
|
|
210
|
-
const res = await
|
|
206
|
+
const res = await client.devInspectTransactionBlock({
|
|
211
207
|
transactionBlock: tx,
|
|
212
208
|
sender: ZERO_ADDRESS,
|
|
213
209
|
});
|
|
@@ -309,72 +305,72 @@ export namespace math_utils {
|
|
|
309
305
|
}
|
|
310
306
|
export namespace view {
|
|
311
307
|
export async function max(
|
|
312
|
-
|
|
308
|
+
client: SuiClient,
|
|
313
309
|
args: [bigint | TransactionArgument, bigint | TransactionArgument]
|
|
314
310
|
) {
|
|
315
311
|
const tx = new TransactionBlock();
|
|
316
312
|
builder.max(tx, args);
|
|
317
|
-
const res = await
|
|
313
|
+
const res = await client.devInspectTransactionBlock({
|
|
318
314
|
transactionBlock: tx,
|
|
319
315
|
sender: ZERO_ADDRESS,
|
|
320
316
|
});
|
|
321
317
|
return res;
|
|
322
318
|
}
|
|
323
319
|
export async function maxU64(
|
|
324
|
-
|
|
320
|
+
client: SuiClient,
|
|
325
321
|
args: [bigint | TransactionArgument, bigint | TransactionArgument]
|
|
326
322
|
) {
|
|
327
323
|
const tx = new TransactionBlock();
|
|
328
324
|
builder.maxU64(tx, args);
|
|
329
|
-
const res = await
|
|
325
|
+
const res = await client.devInspectTransactionBlock({
|
|
330
326
|
transactionBlock: tx,
|
|
331
327
|
sender: ZERO_ADDRESS,
|
|
332
328
|
});
|
|
333
329
|
return res;
|
|
334
330
|
}
|
|
335
331
|
export async function min(
|
|
336
|
-
|
|
332
|
+
client: SuiClient,
|
|
337
333
|
args: [bigint | TransactionArgument, bigint | TransactionArgument]
|
|
338
334
|
) {
|
|
339
335
|
const tx = new TransactionBlock();
|
|
340
336
|
builder.min(tx, args);
|
|
341
|
-
const res = await
|
|
337
|
+
const res = await client.devInspectTransactionBlock({
|
|
342
338
|
transactionBlock: tx,
|
|
343
339
|
sender: ZERO_ADDRESS,
|
|
344
340
|
});
|
|
345
341
|
return res;
|
|
346
342
|
}
|
|
347
343
|
export async function pow(
|
|
348
|
-
|
|
344
|
+
client: SuiClient,
|
|
349
345
|
args: [bigint | TransactionArgument, number | TransactionArgument]
|
|
350
346
|
) {
|
|
351
347
|
const tx = new TransactionBlock();
|
|
352
348
|
builder.pow(tx, args);
|
|
353
|
-
const res = await
|
|
349
|
+
const res = await client.devInspectTransactionBlock({
|
|
354
350
|
transactionBlock: tx,
|
|
355
351
|
sender: ZERO_ADDRESS,
|
|
356
352
|
});
|
|
357
353
|
return res;
|
|
358
354
|
}
|
|
359
355
|
export async function sqrt(
|
|
360
|
-
|
|
356
|
+
client: SuiClient,
|
|
361
357
|
args: [bigint | TransactionArgument]
|
|
362
358
|
) {
|
|
363
359
|
const tx = new TransactionBlock();
|
|
364
360
|
builder.sqrt(tx, args);
|
|
365
|
-
const res = await
|
|
361
|
+
const res = await client.devInspectTransactionBlock({
|
|
366
362
|
transactionBlock: tx,
|
|
367
363
|
sender: ZERO_ADDRESS,
|
|
368
364
|
});
|
|
369
365
|
return res;
|
|
370
366
|
}
|
|
371
367
|
export async function sqrtU256(
|
|
372
|
-
|
|
368
|
+
client: SuiClient,
|
|
373
369
|
args: [bigint | TransactionArgument]
|
|
374
370
|
) {
|
|
375
371
|
const tx = new TransactionBlock();
|
|
376
372
|
builder.sqrtU256(tx, args);
|
|
377
|
-
const res = await
|
|
373
|
+
const res = await client.devInspectTransactionBlock({
|
|
378
374
|
transactionBlock: tx,
|
|
379
375
|
sender: ZERO_ADDRESS,
|
|
380
376
|
});
|
|
@@ -400,8 +396,8 @@ export namespace pool {
|
|
|
400
396
|
}
|
|
401
397
|
|
|
402
398
|
export interface FeeToSet {
|
|
403
|
-
fee_to:
|
|
404
|
-
caller:
|
|
399
|
+
fee_to: string;
|
|
400
|
+
caller: string;
|
|
405
401
|
}
|
|
406
402
|
|
|
407
403
|
export namespace FeeToSet {
|
|
@@ -421,7 +417,7 @@ export namespace pool {
|
|
|
421
417
|
}
|
|
422
418
|
|
|
423
419
|
export interface LiquidityAdded<T0, T1> {
|
|
424
|
-
user:
|
|
420
|
+
user: string;
|
|
425
421
|
first_amount: bigint;
|
|
426
422
|
second_amount: bigint;
|
|
427
423
|
first_reserve: bigint;
|
|
@@ -453,7 +449,7 @@ export namespace pool {
|
|
|
453
449
|
}
|
|
454
450
|
|
|
455
451
|
export interface LiquidityRemoved<T0, T1> {
|
|
456
|
-
user:
|
|
452
|
+
user: string;
|
|
457
453
|
first_amount: bigint;
|
|
458
454
|
second_amount: bigint;
|
|
459
455
|
first_reserve: bigint;
|
|
@@ -507,7 +503,7 @@ export namespace pool {
|
|
|
507
503
|
}
|
|
508
504
|
|
|
509
505
|
export interface PoolCreated<T0, T1> {
|
|
510
|
-
pool:
|
|
506
|
+
pool: string;
|
|
511
507
|
first_amount: bigint;
|
|
512
508
|
second_amount: bigint;
|
|
513
509
|
wisp_lp_amount: bigint;
|
|
@@ -558,7 +554,7 @@ export namespace pool {
|
|
|
558
554
|
|
|
559
555
|
export interface PoolRegistry {
|
|
560
556
|
id: _0x2.object_.UID;
|
|
561
|
-
fee_to:
|
|
557
|
+
fee_to: string;
|
|
562
558
|
pools: _0x2.object_bag.ObjectBag;
|
|
563
559
|
}
|
|
564
560
|
|
|
@@ -574,7 +570,7 @@ export namespace pool {
|
|
|
574
570
|
}
|
|
575
571
|
|
|
576
572
|
export interface TokenSwapped<T0, T1> {
|
|
577
|
-
user:
|
|
573
|
+
user: string;
|
|
578
574
|
first_amount_in: bigint;
|
|
579
575
|
second_amount_in: bigint;
|
|
580
576
|
first_amount_out: bigint;
|
|
@@ -627,14 +623,14 @@ export namespace pool {
|
|
|
627
623
|
export function addLiquidity<T0 = any, T1 = any>(
|
|
628
624
|
tx: TransactionBlock,
|
|
629
625
|
args: [
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
626
|
+
string | ObjectCallArg | TransactionArgument,
|
|
627
|
+
string | ObjectCallArg | TransactionArgument,
|
|
628
|
+
string | ObjectCallArg | TransactionArgument,
|
|
633
629
|
bigint | TransactionArgument,
|
|
634
630
|
bigint | TransactionArgument,
|
|
635
631
|
bigint | TransactionArgument,
|
|
636
632
|
bigint | TransactionArgument,
|
|
637
|
-
|
|
633
|
+
string | ObjectCallArg | TransactionArgument
|
|
638
634
|
],
|
|
639
635
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
640
636
|
): TransactionArgument &
|
|
@@ -683,7 +679,7 @@ export namespace pool {
|
|
|
683
679
|
}
|
|
684
680
|
export function borrowMutPool<T0 = any, T1 = any>(
|
|
685
681
|
tx: TransactionBlock,
|
|
686
|
-
args: [
|
|
682
|
+
args: [string | ObjectCallArg | TransactionArgument],
|
|
687
683
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
688
684
|
): TransactionArgument & [TransactionArgument] {
|
|
689
685
|
const _args: any[] = [];
|
|
@@ -708,7 +704,7 @@ export namespace pool {
|
|
|
708
704
|
}
|
|
709
705
|
export function borrowPool<T0 = any, T1 = any>(
|
|
710
706
|
tx: TransactionBlock,
|
|
711
|
-
args: [
|
|
707
|
+
args: [string | ObjectCallArg | TransactionArgument],
|
|
712
708
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
713
709
|
): TransactionArgument & [TransactionArgument] {
|
|
714
710
|
const _args: any[] = [];
|
|
@@ -734,12 +730,12 @@ export namespace pool {
|
|
|
734
730
|
export function createPool<T0 = any, T1 = any>(
|
|
735
731
|
tx: TransactionBlock,
|
|
736
732
|
args: [
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
733
|
+
string | ObjectCallArg | TransactionArgument,
|
|
734
|
+
string | ObjectCallArg | TransactionArgument,
|
|
735
|
+
string | ObjectCallArg | TransactionArgument,
|
|
740
736
|
bigint | TransactionArgument,
|
|
741
737
|
bigint | TransactionArgument,
|
|
742
|
-
|
|
738
|
+
string | ObjectCallArg | TransactionArgument
|
|
743
739
|
],
|
|
744
740
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
745
741
|
): TransactionArgument &
|
|
@@ -802,7 +798,7 @@ export namespace pool {
|
|
|
802
798
|
}
|
|
803
799
|
export function getAmounts<T0 = any, T1 = any>(
|
|
804
800
|
tx: TransactionBlock,
|
|
805
|
-
args: [
|
|
801
|
+
args: [string | ObjectCallArg | TransactionArgument],
|
|
806
802
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
807
803
|
): TransactionArgument & [TransactionArgument] {
|
|
808
804
|
const _args: any[] = [];
|
|
@@ -828,7 +824,7 @@ export namespace pool {
|
|
|
828
824
|
export function getInputAmount<T0 = any, T1 = any>(
|
|
829
825
|
tx: TransactionBlock,
|
|
830
826
|
args: [
|
|
831
|
-
|
|
827
|
+
string | ObjectCallArg | TransactionArgument,
|
|
832
828
|
bigint | TransactionArgument,
|
|
833
829
|
Boolean | TransactionArgument
|
|
834
830
|
],
|
|
@@ -860,7 +856,7 @@ export namespace pool {
|
|
|
860
856
|
export function getOutputAmount<T0 = any, T1 = any>(
|
|
861
857
|
tx: TransactionBlock,
|
|
862
858
|
args: [
|
|
863
|
-
|
|
859
|
+
string | ObjectCallArg | TransactionArgument,
|
|
864
860
|
bigint | TransactionArgument,
|
|
865
861
|
Boolean | TransactionArgument
|
|
866
862
|
],
|
|
@@ -891,7 +887,7 @@ export namespace pool {
|
|
|
891
887
|
}
|
|
892
888
|
export function getPoolData<T0 = any, T1 = any>(
|
|
893
889
|
tx: TransactionBlock,
|
|
894
|
-
args: [
|
|
890
|
+
args: [string | ObjectCallArg | TransactionArgument],
|
|
895
891
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
896
892
|
): TransactionArgument & [TransactionArgument] {
|
|
897
893
|
const _args: any[] = [];
|
|
@@ -916,7 +912,7 @@ export namespace pool {
|
|
|
916
912
|
}
|
|
917
913
|
export function isPoolCreated<T0 = any, T1 = any>(
|
|
918
914
|
tx: TransactionBlock,
|
|
919
|
-
args: [
|
|
915
|
+
args: [string | ObjectCallArg | TransactionArgument],
|
|
920
916
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
921
917
|
): TransactionArgument & [TransactionArgument] {
|
|
922
918
|
const _args: any[] = [];
|
|
@@ -941,7 +937,7 @@ export namespace pool {
|
|
|
941
937
|
}
|
|
942
938
|
export function isPoolCreatedSorted<T0 = any, T1 = any>(
|
|
943
939
|
tx: TransactionBlock,
|
|
944
|
-
args: [
|
|
940
|
+
args: [string | ObjectCallArg | TransactionArgument],
|
|
945
941
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
946
942
|
): TransactionArgument & [TransactionArgument] {
|
|
947
943
|
const _args: any[] = [];
|
|
@@ -967,12 +963,12 @@ export namespace pool {
|
|
|
967
963
|
export function processSwapExactInput<T0 = any, T1 = any>(
|
|
968
964
|
tx: TransactionBlock,
|
|
969
965
|
args: [
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
966
|
+
string | ObjectCallArg | TransactionArgument,
|
|
967
|
+
string | ObjectCallArg | TransactionArgument,
|
|
968
|
+
string | ObjectCallArg | TransactionArgument,
|
|
973
969
|
bigint | TransactionArgument,
|
|
974
970
|
Boolean | TransactionArgument,
|
|
975
|
-
|
|
971
|
+
string | ObjectCallArg | TransactionArgument
|
|
976
972
|
],
|
|
977
973
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
978
974
|
): TransactionArgument &
|
|
@@ -1018,12 +1014,12 @@ export namespace pool {
|
|
|
1018
1014
|
export function processSwapExactOutput<T0 = any, T1 = any>(
|
|
1019
1015
|
tx: TransactionBlock,
|
|
1020
1016
|
args: [
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1017
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1018
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1019
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1024
1020
|
bigint | TransactionArgument,
|
|
1025
1021
|
Boolean | TransactionArgument,
|
|
1026
|
-
|
|
1022
|
+
string | ObjectCallArg | TransactionArgument
|
|
1027
1023
|
],
|
|
1028
1024
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1029
1025
|
): TransactionArgument &
|
|
@@ -1069,12 +1065,12 @@ export namespace pool {
|
|
|
1069
1065
|
export function removeLiquidity<T0 = any, T1 = any>(
|
|
1070
1066
|
tx: TransactionBlock,
|
|
1071
1067
|
args: [
|
|
1072
|
-
|
|
1073
|
-
|
|
1068
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1069
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1074
1070
|
bigint | TransactionArgument,
|
|
1075
1071
|
bigint | TransactionArgument,
|
|
1076
1072
|
bigint | TransactionArgument,
|
|
1077
|
-
|
|
1073
|
+
string | ObjectCallArg | TransactionArgument
|
|
1078
1074
|
],
|
|
1079
1075
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1080
1076
|
): TransactionArgument &
|
|
@@ -1118,10 +1114,10 @@ export namespace pool {
|
|
|
1118
1114
|
export function setFeeTo_(
|
|
1119
1115
|
tx: TransactionBlock,
|
|
1120
1116
|
args: [
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1117
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1118
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1119
|
+
string | TransactionArgument,
|
|
1120
|
+
string | ObjectCallArg | TransactionArgument
|
|
1125
1121
|
]
|
|
1126
1122
|
): TransactionArgument &
|
|
1127
1123
|
[
|
|
@@ -1152,11 +1148,11 @@ export namespace pool {
|
|
|
1152
1148
|
export function swapExactFirstToSecond<T0 = any, T1 = any>(
|
|
1153
1149
|
tx: TransactionBlock,
|
|
1154
1150
|
args: [
|
|
1155
|
-
|
|
1156
|
-
|
|
1151
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1152
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1157
1153
|
bigint | TransactionArgument,
|
|
1158
1154
|
bigint | TransactionArgument,
|
|
1159
|
-
|
|
1155
|
+
string | ObjectCallArg | TransactionArgument
|
|
1160
1156
|
],
|
|
1161
1157
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1162
1158
|
): TransactionArgument &
|
|
@@ -1198,11 +1194,11 @@ export namespace pool {
|
|
|
1198
1194
|
export function swapExactSecondToFirst<T0 = any, T1 = any>(
|
|
1199
1195
|
tx: TransactionBlock,
|
|
1200
1196
|
args: [
|
|
1201
|
-
|
|
1202
|
-
|
|
1197
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1198
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1203
1199
|
bigint | TransactionArgument,
|
|
1204
1200
|
bigint | TransactionArgument,
|
|
1205
|
-
|
|
1201
|
+
string | ObjectCallArg | TransactionArgument
|
|
1206
1202
|
],
|
|
1207
1203
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1208
1204
|
): TransactionArgument &
|
|
@@ -1244,11 +1240,11 @@ export namespace pool {
|
|
|
1244
1240
|
export function swapFirstToExactSecond<T0 = any, T1 = any>(
|
|
1245
1241
|
tx: TransactionBlock,
|
|
1246
1242
|
args: [
|
|
1247
|
-
|
|
1248
|
-
|
|
1243
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1244
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1249
1245
|
bigint | TransactionArgument,
|
|
1250
1246
|
bigint | TransactionArgument,
|
|
1251
|
-
|
|
1247
|
+
string | ObjectCallArg | TransactionArgument
|
|
1252
1248
|
],
|
|
1253
1249
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1254
1250
|
): TransactionArgument &
|
|
@@ -1290,11 +1286,11 @@ export namespace pool {
|
|
|
1290
1286
|
export function swapSecondToExactFirst<T0 = any, T1 = any>(
|
|
1291
1287
|
tx: TransactionBlock,
|
|
1292
1288
|
args: [
|
|
1293
|
-
|
|
1294
|
-
|
|
1289
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1290
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1295
1291
|
bigint | TransactionArgument,
|
|
1296
1292
|
bigint | TransactionArgument,
|
|
1297
|
-
|
|
1293
|
+
string | ObjectCallArg | TransactionArgument
|
|
1298
1294
|
],
|
|
1299
1295
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1300
1296
|
): TransactionArgument &
|
|
@@ -1336,10 +1332,10 @@ export namespace pool {
|
|
|
1336
1332
|
export function zapInFirst<T0 = any, T1 = any>(
|
|
1337
1333
|
tx: TransactionBlock,
|
|
1338
1334
|
args: [
|
|
1339
|
-
|
|
1340
|
-
|
|
1335
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1336
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1341
1337
|
bigint | TransactionArgument,
|
|
1342
|
-
|
|
1338
|
+
string | ObjectCallArg | TransactionArgument
|
|
1343
1339
|
],
|
|
1344
1340
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1345
1341
|
): TransactionArgument &
|
|
@@ -1379,10 +1375,10 @@ export namespace pool {
|
|
|
1379
1375
|
export function zapInSecond<T0 = any, T1 = any>(
|
|
1380
1376
|
tx: TransactionBlock,
|
|
1381
1377
|
args: [
|
|
1382
|
-
|
|
1383
|
-
|
|
1378
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1379
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1384
1380
|
bigint | TransactionArgument,
|
|
1385
|
-
|
|
1381
|
+
string | ObjectCallArg | TransactionArgument
|
|
1386
1382
|
],
|
|
1387
1383
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1388
1384
|
): TransactionArgument &
|
|
@@ -1422,75 +1418,75 @@ export namespace pool {
|
|
|
1422
1418
|
}
|
|
1423
1419
|
export namespace view {
|
|
1424
1420
|
export async function addLiquidity<T0 = any, T1 = any>(
|
|
1425
|
-
|
|
1421
|
+
client: SuiClient,
|
|
1426
1422
|
args: [
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1423
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1424
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1425
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1430
1426
|
bigint | TransactionArgument,
|
|
1431
1427
|
bigint | TransactionArgument,
|
|
1432
1428
|
bigint | TransactionArgument,
|
|
1433
1429
|
bigint | TransactionArgument,
|
|
1434
|
-
|
|
1430
|
+
string | ObjectCallArg | TransactionArgument
|
|
1435
1431
|
],
|
|
1436
1432
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1437
1433
|
) {
|
|
1438
1434
|
const tx = new TransactionBlock();
|
|
1439
1435
|
builder.addLiquidity(tx, args, typeArguments);
|
|
1440
|
-
const res = await
|
|
1436
|
+
const res = await client.devInspectTransactionBlock({
|
|
1441
1437
|
transactionBlock: tx,
|
|
1442
1438
|
sender: ZERO_ADDRESS,
|
|
1443
1439
|
});
|
|
1444
1440
|
return res;
|
|
1445
1441
|
}
|
|
1446
1442
|
export async function borrowMutPool<T0 = any, T1 = any>(
|
|
1447
|
-
|
|
1448
|
-
args: [
|
|
1443
|
+
client: SuiClient,
|
|
1444
|
+
args: [string | ObjectCallArg | TransactionArgument],
|
|
1449
1445
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1450
1446
|
) {
|
|
1451
1447
|
const tx = new TransactionBlock();
|
|
1452
1448
|
builder.borrowMutPool(tx, args, typeArguments);
|
|
1453
|
-
const res = await
|
|
1449
|
+
const res = await client.devInspectTransactionBlock({
|
|
1454
1450
|
transactionBlock: tx,
|
|
1455
1451
|
sender: ZERO_ADDRESS,
|
|
1456
1452
|
});
|
|
1457
1453
|
return res;
|
|
1458
1454
|
}
|
|
1459
1455
|
export async function borrowPool<T0 = any, T1 = any>(
|
|
1460
|
-
|
|
1461
|
-
args: [
|
|
1456
|
+
client: SuiClient,
|
|
1457
|
+
args: [string | ObjectCallArg | TransactionArgument],
|
|
1462
1458
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1463
1459
|
) {
|
|
1464
1460
|
const tx = new TransactionBlock();
|
|
1465
1461
|
builder.borrowPool(tx, args, typeArguments);
|
|
1466
|
-
const res = await
|
|
1462
|
+
const res = await client.devInspectTransactionBlock({
|
|
1467
1463
|
transactionBlock: tx,
|
|
1468
1464
|
sender: ZERO_ADDRESS,
|
|
1469
1465
|
});
|
|
1470
1466
|
return res;
|
|
1471
1467
|
}
|
|
1472
1468
|
export async function createPool<T0 = any, T1 = any>(
|
|
1473
|
-
|
|
1469
|
+
client: SuiClient,
|
|
1474
1470
|
args: [
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1471
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1472
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1473
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1478
1474
|
bigint | TransactionArgument,
|
|
1479
1475
|
bigint | TransactionArgument,
|
|
1480
|
-
|
|
1476
|
+
string | ObjectCallArg | TransactionArgument
|
|
1481
1477
|
],
|
|
1482
1478
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1483
1479
|
) {
|
|
1484
1480
|
const tx = new TransactionBlock();
|
|
1485
1481
|
builder.createPool(tx, args, typeArguments);
|
|
1486
|
-
const res = await
|
|
1482
|
+
const res = await client.devInspectTransactionBlock({
|
|
1487
1483
|
transactionBlock: tx,
|
|
1488
1484
|
sender: ZERO_ADDRESS,
|
|
1489
1485
|
});
|
|
1490
1486
|
return res;
|
|
1491
1487
|
}
|
|
1492
1488
|
export async function createPoolName(
|
|
1493
|
-
|
|
1489
|
+
client: SuiClient,
|
|
1494
1490
|
args: [
|
|
1495
1491
|
_0x1.type_name.TypeName | TransactionArgument,
|
|
1496
1492
|
_0x1.type_name.TypeName | TransactionArgument
|
|
@@ -1498,29 +1494,29 @@ export namespace pool {
|
|
|
1498
1494
|
) {
|
|
1499
1495
|
const tx = new TransactionBlock();
|
|
1500
1496
|
builder.createPoolName(tx, args);
|
|
1501
|
-
const res = await
|
|
1497
|
+
const res = await client.devInspectTransactionBlock({
|
|
1502
1498
|
transactionBlock: tx,
|
|
1503
1499
|
sender: ZERO_ADDRESS,
|
|
1504
1500
|
});
|
|
1505
1501
|
return res;
|
|
1506
1502
|
}
|
|
1507
1503
|
export async function getAmounts<T0 = any, T1 = any>(
|
|
1508
|
-
|
|
1509
|
-
args: [
|
|
1504
|
+
client: SuiClient,
|
|
1505
|
+
args: [string | ObjectCallArg | TransactionArgument],
|
|
1510
1506
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1511
1507
|
) {
|
|
1512
1508
|
const tx = new TransactionBlock();
|
|
1513
1509
|
builder.getAmounts(tx, args, typeArguments);
|
|
1514
|
-
const res = await
|
|
1510
|
+
const res = await client.devInspectTransactionBlock({
|
|
1515
1511
|
transactionBlock: tx,
|
|
1516
1512
|
sender: ZERO_ADDRESS,
|
|
1517
1513
|
});
|
|
1518
1514
|
return res;
|
|
1519
1515
|
}
|
|
1520
1516
|
export async function getInputAmount<T0 = any, T1 = any>(
|
|
1521
|
-
|
|
1517
|
+
client: SuiClient,
|
|
1522
1518
|
args: [
|
|
1523
|
-
|
|
1519
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1524
1520
|
bigint | TransactionArgument,
|
|
1525
1521
|
Boolean | TransactionArgument
|
|
1526
1522
|
],
|
|
@@ -1528,16 +1524,16 @@ export namespace pool {
|
|
|
1528
1524
|
) {
|
|
1529
1525
|
const tx = new TransactionBlock();
|
|
1530
1526
|
builder.getInputAmount(tx, args, typeArguments);
|
|
1531
|
-
const res = await
|
|
1527
|
+
const res = await client.devInspectTransactionBlock({
|
|
1532
1528
|
transactionBlock: tx,
|
|
1533
1529
|
sender: ZERO_ADDRESS,
|
|
1534
1530
|
});
|
|
1535
1531
|
return res;
|
|
1536
1532
|
}
|
|
1537
1533
|
export async function getOutputAmount<T0 = any, T1 = any>(
|
|
1538
|
-
|
|
1534
|
+
client: SuiClient,
|
|
1539
1535
|
args: [
|
|
1540
|
-
|
|
1536
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1541
1537
|
bigint | TransactionArgument,
|
|
1542
1538
|
Boolean | TransactionArgument
|
|
1543
1539
|
],
|
|
@@ -1545,235 +1541,235 @@ export namespace pool {
|
|
|
1545
1541
|
) {
|
|
1546
1542
|
const tx = new TransactionBlock();
|
|
1547
1543
|
builder.getOutputAmount(tx, args, typeArguments);
|
|
1548
|
-
const res = await
|
|
1544
|
+
const res = await client.devInspectTransactionBlock({
|
|
1549
1545
|
transactionBlock: tx,
|
|
1550
1546
|
sender: ZERO_ADDRESS,
|
|
1551
1547
|
});
|
|
1552
1548
|
return res;
|
|
1553
1549
|
}
|
|
1554
1550
|
export async function getPoolData<T0 = any, T1 = any>(
|
|
1555
|
-
|
|
1556
|
-
args: [
|
|
1551
|
+
client: SuiClient,
|
|
1552
|
+
args: [string | ObjectCallArg | TransactionArgument],
|
|
1557
1553
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1558
1554
|
) {
|
|
1559
1555
|
const tx = new TransactionBlock();
|
|
1560
1556
|
builder.getPoolData(tx, args, typeArguments);
|
|
1561
|
-
const res = await
|
|
1557
|
+
const res = await client.devInspectTransactionBlock({
|
|
1562
1558
|
transactionBlock: tx,
|
|
1563
1559
|
sender: ZERO_ADDRESS,
|
|
1564
1560
|
});
|
|
1565
1561
|
return res;
|
|
1566
1562
|
}
|
|
1567
1563
|
export async function isPoolCreated<T0 = any, T1 = any>(
|
|
1568
|
-
|
|
1569
|
-
args: [
|
|
1564
|
+
client: SuiClient,
|
|
1565
|
+
args: [string | ObjectCallArg | TransactionArgument],
|
|
1570
1566
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1571
1567
|
) {
|
|
1572
1568
|
const tx = new TransactionBlock();
|
|
1573
1569
|
builder.isPoolCreated(tx, args, typeArguments);
|
|
1574
|
-
const res = await
|
|
1570
|
+
const res = await client.devInspectTransactionBlock({
|
|
1575
1571
|
transactionBlock: tx,
|
|
1576
1572
|
sender: ZERO_ADDRESS,
|
|
1577
1573
|
});
|
|
1578
1574
|
return res;
|
|
1579
1575
|
}
|
|
1580
1576
|
export async function isPoolCreatedSorted<T0 = any, T1 = any>(
|
|
1581
|
-
|
|
1582
|
-
args: [
|
|
1577
|
+
client: SuiClient,
|
|
1578
|
+
args: [string | ObjectCallArg | TransactionArgument],
|
|
1583
1579
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1584
1580
|
) {
|
|
1585
1581
|
const tx = new TransactionBlock();
|
|
1586
1582
|
builder.isPoolCreatedSorted(tx, args, typeArguments);
|
|
1587
|
-
const res = await
|
|
1583
|
+
const res = await client.devInspectTransactionBlock({
|
|
1588
1584
|
transactionBlock: tx,
|
|
1589
1585
|
sender: ZERO_ADDRESS,
|
|
1590
1586
|
});
|
|
1591
1587
|
return res;
|
|
1592
1588
|
}
|
|
1593
1589
|
export async function processSwapExactInput<T0 = any, T1 = any>(
|
|
1594
|
-
|
|
1590
|
+
client: SuiClient,
|
|
1595
1591
|
args: [
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1592
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1593
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1594
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1599
1595
|
bigint | TransactionArgument,
|
|
1600
1596
|
Boolean | TransactionArgument,
|
|
1601
|
-
|
|
1597
|
+
string | ObjectCallArg | TransactionArgument
|
|
1602
1598
|
],
|
|
1603
1599
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1604
1600
|
) {
|
|
1605
1601
|
const tx = new TransactionBlock();
|
|
1606
1602
|
builder.processSwapExactInput(tx, args, typeArguments);
|
|
1607
|
-
const res = await
|
|
1603
|
+
const res = await client.devInspectTransactionBlock({
|
|
1608
1604
|
transactionBlock: tx,
|
|
1609
1605
|
sender: ZERO_ADDRESS,
|
|
1610
1606
|
});
|
|
1611
1607
|
return res;
|
|
1612
1608
|
}
|
|
1613
1609
|
export async function processSwapExactOutput<T0 = any, T1 = any>(
|
|
1614
|
-
|
|
1610
|
+
client: SuiClient,
|
|
1615
1611
|
args: [
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1612
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1613
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1614
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1619
1615
|
bigint | TransactionArgument,
|
|
1620
1616
|
Boolean | TransactionArgument,
|
|
1621
|
-
|
|
1617
|
+
string | ObjectCallArg | TransactionArgument
|
|
1622
1618
|
],
|
|
1623
1619
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1624
1620
|
) {
|
|
1625
1621
|
const tx = new TransactionBlock();
|
|
1626
1622
|
builder.processSwapExactOutput(tx, args, typeArguments);
|
|
1627
|
-
const res = await
|
|
1623
|
+
const res = await client.devInspectTransactionBlock({
|
|
1628
1624
|
transactionBlock: tx,
|
|
1629
1625
|
sender: ZERO_ADDRESS,
|
|
1630
1626
|
});
|
|
1631
1627
|
return res;
|
|
1632
1628
|
}
|
|
1633
1629
|
export async function removeLiquidity<T0 = any, T1 = any>(
|
|
1634
|
-
|
|
1630
|
+
client: SuiClient,
|
|
1635
1631
|
args: [
|
|
1636
|
-
|
|
1637
|
-
|
|
1632
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1633
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1638
1634
|
bigint | TransactionArgument,
|
|
1639
1635
|
bigint | TransactionArgument,
|
|
1640
1636
|
bigint | TransactionArgument,
|
|
1641
|
-
|
|
1637
|
+
string | ObjectCallArg | TransactionArgument
|
|
1642
1638
|
],
|
|
1643
1639
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1644
1640
|
) {
|
|
1645
1641
|
const tx = new TransactionBlock();
|
|
1646
1642
|
builder.removeLiquidity(tx, args, typeArguments);
|
|
1647
|
-
const res = await
|
|
1643
|
+
const res = await client.devInspectTransactionBlock({
|
|
1648
1644
|
transactionBlock: tx,
|
|
1649
1645
|
sender: ZERO_ADDRESS,
|
|
1650
1646
|
});
|
|
1651
1647
|
return res;
|
|
1652
1648
|
}
|
|
1653
1649
|
export async function setFeeTo_(
|
|
1654
|
-
|
|
1650
|
+
client: SuiClient,
|
|
1655
1651
|
args: [
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1652
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1653
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1654
|
+
string | TransactionArgument,
|
|
1655
|
+
string | ObjectCallArg | TransactionArgument
|
|
1660
1656
|
]
|
|
1661
1657
|
) {
|
|
1662
1658
|
const tx = new TransactionBlock();
|
|
1663
1659
|
builder.setFeeTo_(tx, args);
|
|
1664
|
-
const res = await
|
|
1660
|
+
const res = await client.devInspectTransactionBlock({
|
|
1665
1661
|
transactionBlock: tx,
|
|
1666
1662
|
sender: ZERO_ADDRESS,
|
|
1667
1663
|
});
|
|
1668
1664
|
return res;
|
|
1669
1665
|
}
|
|
1670
1666
|
export async function swapExactFirstToSecond<T0 = any, T1 = any>(
|
|
1671
|
-
|
|
1667
|
+
client: SuiClient,
|
|
1672
1668
|
args: [
|
|
1673
|
-
|
|
1674
|
-
|
|
1669
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1670
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1675
1671
|
bigint | TransactionArgument,
|
|
1676
1672
|
bigint | TransactionArgument,
|
|
1677
|
-
|
|
1673
|
+
string | ObjectCallArg | TransactionArgument
|
|
1678
1674
|
],
|
|
1679
1675
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1680
1676
|
) {
|
|
1681
1677
|
const tx = new TransactionBlock();
|
|
1682
1678
|
builder.swapExactFirstToSecond(tx, args, typeArguments);
|
|
1683
|
-
const res = await
|
|
1679
|
+
const res = await client.devInspectTransactionBlock({
|
|
1684
1680
|
transactionBlock: tx,
|
|
1685
1681
|
sender: ZERO_ADDRESS,
|
|
1686
1682
|
});
|
|
1687
1683
|
return res;
|
|
1688
1684
|
}
|
|
1689
1685
|
export async function swapExactSecondToFirst<T0 = any, T1 = any>(
|
|
1690
|
-
|
|
1686
|
+
client: SuiClient,
|
|
1691
1687
|
args: [
|
|
1692
|
-
|
|
1693
|
-
|
|
1688
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1689
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1694
1690
|
bigint | TransactionArgument,
|
|
1695
1691
|
bigint | TransactionArgument,
|
|
1696
|
-
|
|
1692
|
+
string | ObjectCallArg | TransactionArgument
|
|
1697
1693
|
],
|
|
1698
1694
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1699
1695
|
) {
|
|
1700
1696
|
const tx = new TransactionBlock();
|
|
1701
1697
|
builder.swapExactSecondToFirst(tx, args, typeArguments);
|
|
1702
|
-
const res = await
|
|
1698
|
+
const res = await client.devInspectTransactionBlock({
|
|
1703
1699
|
transactionBlock: tx,
|
|
1704
1700
|
sender: ZERO_ADDRESS,
|
|
1705
1701
|
});
|
|
1706
1702
|
return res;
|
|
1707
1703
|
}
|
|
1708
1704
|
export async function swapFirstToExactSecond<T0 = any, T1 = any>(
|
|
1709
|
-
|
|
1705
|
+
client: SuiClient,
|
|
1710
1706
|
args: [
|
|
1711
|
-
|
|
1712
|
-
|
|
1707
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1708
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1713
1709
|
bigint | TransactionArgument,
|
|
1714
1710
|
bigint | TransactionArgument,
|
|
1715
|
-
|
|
1711
|
+
string | ObjectCallArg | TransactionArgument
|
|
1716
1712
|
],
|
|
1717
1713
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1718
1714
|
) {
|
|
1719
1715
|
const tx = new TransactionBlock();
|
|
1720
1716
|
builder.swapFirstToExactSecond(tx, args, typeArguments);
|
|
1721
|
-
const res = await
|
|
1717
|
+
const res = await client.devInspectTransactionBlock({
|
|
1722
1718
|
transactionBlock: tx,
|
|
1723
1719
|
sender: ZERO_ADDRESS,
|
|
1724
1720
|
});
|
|
1725
1721
|
return res;
|
|
1726
1722
|
}
|
|
1727
1723
|
export async function swapSecondToExactFirst<T0 = any, T1 = any>(
|
|
1728
|
-
|
|
1724
|
+
client: SuiClient,
|
|
1729
1725
|
args: [
|
|
1730
|
-
|
|
1731
|
-
|
|
1726
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1727
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1732
1728
|
bigint | TransactionArgument,
|
|
1733
1729
|
bigint | TransactionArgument,
|
|
1734
|
-
|
|
1730
|
+
string | ObjectCallArg | TransactionArgument
|
|
1735
1731
|
],
|
|
1736
1732
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1737
1733
|
) {
|
|
1738
1734
|
const tx = new TransactionBlock();
|
|
1739
1735
|
builder.swapSecondToExactFirst(tx, args, typeArguments);
|
|
1740
|
-
const res = await
|
|
1736
|
+
const res = await client.devInspectTransactionBlock({
|
|
1741
1737
|
transactionBlock: tx,
|
|
1742
1738
|
sender: ZERO_ADDRESS,
|
|
1743
1739
|
});
|
|
1744
1740
|
return res;
|
|
1745
1741
|
}
|
|
1746
1742
|
export async function zapInFirst<T0 = any, T1 = any>(
|
|
1747
|
-
|
|
1743
|
+
client: SuiClient,
|
|
1748
1744
|
args: [
|
|
1749
|
-
|
|
1750
|
-
|
|
1745
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1746
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1751
1747
|
bigint | TransactionArgument,
|
|
1752
|
-
|
|
1748
|
+
string | ObjectCallArg | TransactionArgument
|
|
1753
1749
|
],
|
|
1754
1750
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1755
1751
|
) {
|
|
1756
1752
|
const tx = new TransactionBlock();
|
|
1757
1753
|
builder.zapInFirst(tx, args, typeArguments);
|
|
1758
|
-
const res = await
|
|
1754
|
+
const res = await client.devInspectTransactionBlock({
|
|
1759
1755
|
transactionBlock: tx,
|
|
1760
1756
|
sender: ZERO_ADDRESS,
|
|
1761
1757
|
});
|
|
1762
1758
|
return res;
|
|
1763
1759
|
}
|
|
1764
1760
|
export async function zapInSecond<T0 = any, T1 = any>(
|
|
1765
|
-
|
|
1761
|
+
client: SuiClient,
|
|
1766
1762
|
args: [
|
|
1767
|
-
|
|
1768
|
-
|
|
1763
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1764
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1769
1765
|
bigint | TransactionArgument,
|
|
1770
|
-
|
|
1766
|
+
string | ObjectCallArg | TransactionArgument
|
|
1771
1767
|
],
|
|
1772
1768
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
1773
1769
|
) {
|
|
1774
1770
|
const tx = new TransactionBlock();
|
|
1775
1771
|
builder.zapInSecond(tx, args, typeArguments);
|
|
1776
|
-
const res = await
|
|
1772
|
+
const res = await client.devInspectTransactionBlock({
|
|
1777
1773
|
transactionBlock: tx,
|
|
1778
1774
|
sender: ZERO_ADDRESS,
|
|
1779
1775
|
});
|
|
@@ -1788,7 +1784,7 @@ export namespace pool_utils {
|
|
|
1788
1784
|
tx: TransactionBlock,
|
|
1789
1785
|
args: [
|
|
1790
1786
|
_0x2.coin.Coin<T0> | TransactionArgument,
|
|
1791
|
-
|
|
1787
|
+
string | ObjectCallArg | TransactionArgument
|
|
1792
1788
|
],
|
|
1793
1789
|
typeArguments: [TypeDescriptor<T0> | string]
|
|
1794
1790
|
): TransactionArgument & [TransactionArgument, TransactionArgument] {
|
|
@@ -1956,8 +1952,8 @@ export namespace pool_utils {
|
|
|
1956
1952
|
export function sortTokenType(
|
|
1957
1953
|
tx: TransactionBlock,
|
|
1958
1954
|
args: [
|
|
1959
|
-
|
|
1960
|
-
|
|
1955
|
+
string | ObjectCallArg | TransactionArgument,
|
|
1956
|
+
string | ObjectCallArg | TransactionArgument
|
|
1961
1957
|
]
|
|
1962
1958
|
): TransactionArgument & [TransactionArgument, TransactionArgument] {
|
|
1963
1959
|
const _args: any[] = [];
|
|
@@ -1978,23 +1974,23 @@ export namespace pool_utils {
|
|
|
1978
1974
|
}
|
|
1979
1975
|
export namespace view {
|
|
1980
1976
|
export async function executeReturnToken<T0 = any>(
|
|
1981
|
-
|
|
1977
|
+
client: SuiClient,
|
|
1982
1978
|
args: [
|
|
1983
1979
|
_0x2.coin.Coin<T0> | TransactionArgument,
|
|
1984
|
-
|
|
1980
|
+
string | ObjectCallArg | TransactionArgument
|
|
1985
1981
|
],
|
|
1986
1982
|
typeArguments: [TypeDescriptor<T0> | string]
|
|
1987
1983
|
) {
|
|
1988
1984
|
const tx = new TransactionBlock();
|
|
1989
1985
|
builder.executeReturnToken(tx, args, typeArguments);
|
|
1990
|
-
const res = await
|
|
1986
|
+
const res = await client.devInspectTransactionBlock({
|
|
1991
1987
|
transactionBlock: tx,
|
|
1992
1988
|
sender: ZERO_ADDRESS,
|
|
1993
1989
|
});
|
|
1994
1990
|
return res;
|
|
1995
1991
|
}
|
|
1996
1992
|
export async function getInputPrice(
|
|
1997
|
-
|
|
1993
|
+
client: SuiClient,
|
|
1998
1994
|
args: [
|
|
1999
1995
|
bigint | TransactionArgument,
|
|
2000
1996
|
bigint | TransactionArgument,
|
|
@@ -2004,26 +2000,26 @@ export namespace pool_utils {
|
|
|
2004
2000
|
) {
|
|
2005
2001
|
const tx = new TransactionBlock();
|
|
2006
2002
|
builder.getInputPrice(tx, args);
|
|
2007
|
-
const res = await
|
|
2003
|
+
const res = await client.devInspectTransactionBlock({
|
|
2008
2004
|
transactionBlock: tx,
|
|
2009
2005
|
sender: ZERO_ADDRESS,
|
|
2010
2006
|
});
|
|
2011
2007
|
return res;
|
|
2012
2008
|
}
|
|
2013
2009
|
export async function getOptimalZapInAmount(
|
|
2014
|
-
|
|
2010
|
+
client: SuiClient,
|
|
2015
2011
|
args: [bigint | TransactionArgument, bigint | TransactionArgument]
|
|
2016
2012
|
) {
|
|
2017
2013
|
const tx = new TransactionBlock();
|
|
2018
2014
|
builder.getOptimalZapInAmount(tx, args);
|
|
2019
|
-
const res = await
|
|
2015
|
+
const res = await client.devInspectTransactionBlock({
|
|
2020
2016
|
transactionBlock: tx,
|
|
2021
2017
|
sender: ZERO_ADDRESS,
|
|
2022
2018
|
});
|
|
2023
2019
|
return res;
|
|
2024
2020
|
}
|
|
2025
2021
|
export async function getOutputPrice(
|
|
2026
|
-
|
|
2022
|
+
client: SuiClient,
|
|
2027
2023
|
args: [
|
|
2028
2024
|
bigint | TransactionArgument,
|
|
2029
2025
|
bigint | TransactionArgument,
|
|
@@ -2033,14 +2029,14 @@ export namespace pool_utils {
|
|
|
2033
2029
|
) {
|
|
2034
2030
|
const tx = new TransactionBlock();
|
|
2035
2031
|
builder.getOutputPrice(tx, args);
|
|
2036
|
-
const res = await
|
|
2032
|
+
const res = await client.devInspectTransactionBlock({
|
|
2037
2033
|
transactionBlock: tx,
|
|
2038
2034
|
sender: ZERO_ADDRESS,
|
|
2039
2035
|
});
|
|
2040
2036
|
return res;
|
|
2041
2037
|
}
|
|
2042
2038
|
export async function getTripleType<T0 = any, T1 = any, T2 = any>(
|
|
2043
|
-
|
|
2039
|
+
client: SuiClient,
|
|
2044
2040
|
args: [],
|
|
2045
2041
|
typeArguments: [
|
|
2046
2042
|
TypeDescriptor<T0> | string,
|
|
@@ -2050,27 +2046,27 @@ export namespace pool_utils {
|
|
|
2050
2046
|
) {
|
|
2051
2047
|
const tx = new TransactionBlock();
|
|
2052
2048
|
builder.getTripleType(tx, args, typeArguments);
|
|
2053
|
-
const res = await
|
|
2049
|
+
const res = await client.devInspectTransactionBlock({
|
|
2054
2050
|
transactionBlock: tx,
|
|
2055
2051
|
sender: ZERO_ADDRESS,
|
|
2056
2052
|
});
|
|
2057
2053
|
return res;
|
|
2058
2054
|
}
|
|
2059
2055
|
export async function getType<T0 = any, T1 = any>(
|
|
2060
|
-
|
|
2056
|
+
client: SuiClient,
|
|
2061
2057
|
args: [],
|
|
2062
2058
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
2063
2059
|
) {
|
|
2064
2060
|
const tx = new TransactionBlock();
|
|
2065
2061
|
builder.getType(tx, args, typeArguments);
|
|
2066
|
-
const res = await
|
|
2062
|
+
const res = await client.devInspectTransactionBlock({
|
|
2067
2063
|
transactionBlock: tx,
|
|
2068
2064
|
sender: ZERO_ADDRESS,
|
|
2069
2065
|
});
|
|
2070
2066
|
return res;
|
|
2071
2067
|
}
|
|
2072
2068
|
export async function quote(
|
|
2073
|
-
|
|
2069
|
+
client: SuiClient,
|
|
2074
2070
|
args: [
|
|
2075
2071
|
bigint | TransactionArgument,
|
|
2076
2072
|
bigint | TransactionArgument,
|
|
@@ -2079,22 +2075,22 @@ export namespace pool_utils {
|
|
|
2079
2075
|
) {
|
|
2080
2076
|
const tx = new TransactionBlock();
|
|
2081
2077
|
builder.quote(tx, args);
|
|
2082
|
-
const res = await
|
|
2078
|
+
const res = await client.devInspectTransactionBlock({
|
|
2083
2079
|
transactionBlock: tx,
|
|
2084
2080
|
sender: ZERO_ADDRESS,
|
|
2085
2081
|
});
|
|
2086
2082
|
return res;
|
|
2087
2083
|
}
|
|
2088
2084
|
export async function sortTokenType(
|
|
2089
|
-
|
|
2085
|
+
client: SuiClient,
|
|
2090
2086
|
args: [
|
|
2091
|
-
|
|
2092
|
-
|
|
2087
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2088
|
+
string | ObjectCallArg | TransactionArgument
|
|
2093
2089
|
]
|
|
2094
2090
|
) {
|
|
2095
2091
|
const tx = new TransactionBlock();
|
|
2096
2092
|
builder.sortTokenType(tx, args);
|
|
2097
|
-
const res = await
|
|
2093
|
+
const res = await client.devInspectTransactionBlock({
|
|
2098
2094
|
transactionBlock: tx,
|
|
2099
2095
|
sender: ZERO_ADDRESS,
|
|
2100
2096
|
});
|
|
@@ -2108,14 +2104,14 @@ export namespace router {
|
|
|
2108
2104
|
export function addLiquidity_<T0 = any, T1 = any>(
|
|
2109
2105
|
tx: TransactionBlock,
|
|
2110
2106
|
args: [
|
|
2111
|
-
|
|
2112
|
-
(
|
|
2113
|
-
(
|
|
2107
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2108
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2109
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2114
2110
|
bigint | TransactionArgument,
|
|
2115
2111
|
bigint | TransactionArgument,
|
|
2116
2112
|
bigint | TransactionArgument,
|
|
2117
2113
|
bigint | TransactionArgument,
|
|
2118
|
-
|
|
2114
|
+
string | ObjectCallArg | TransactionArgument
|
|
2119
2115
|
],
|
|
2120
2116
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
2121
2117
|
): TransactionArgument &
|
|
@@ -2175,12 +2171,12 @@ export namespace router {
|
|
|
2175
2171
|
export function createPool_<T0 = any, T1 = any>(
|
|
2176
2172
|
tx: TransactionBlock,
|
|
2177
2173
|
args: [
|
|
2178
|
-
|
|
2179
|
-
(
|
|
2180
|
-
(
|
|
2174
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2175
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2176
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2181
2177
|
bigint | TransactionArgument,
|
|
2182
2178
|
bigint | TransactionArgument,
|
|
2183
|
-
|
|
2179
|
+
string | ObjectCallArg | TransactionArgument
|
|
2184
2180
|
],
|
|
2185
2181
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
2186
2182
|
): TransactionArgument &
|
|
@@ -2236,12 +2232,12 @@ export namespace router {
|
|
|
2236
2232
|
export function removeLiquidity_<T0 = any, T1 = any>(
|
|
2237
2233
|
tx: TransactionBlock,
|
|
2238
2234
|
args: [
|
|
2239
|
-
|
|
2240
|
-
(
|
|
2235
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2236
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2241
2237
|
bigint | TransactionArgument,
|
|
2242
2238
|
bigint | TransactionArgument,
|
|
2243
2239
|
bigint | TransactionArgument,
|
|
2244
|
-
|
|
2240
|
+
string | ObjectCallArg | TransactionArgument
|
|
2245
2241
|
],
|
|
2246
2242
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
2247
2243
|
): TransactionArgument &
|
|
@@ -2290,11 +2286,11 @@ export namespace router {
|
|
|
2290
2286
|
export function swapExactInput_<T0 = any, T1 = any>(
|
|
2291
2287
|
tx: TransactionBlock,
|
|
2292
2288
|
args: [
|
|
2293
|
-
|
|
2294
|
-
(
|
|
2289
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2290
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2295
2291
|
bigint | TransactionArgument,
|
|
2296
2292
|
bigint | TransactionArgument,
|
|
2297
|
-
|
|
2293
|
+
string | ObjectCallArg | TransactionArgument
|
|
2298
2294
|
],
|
|
2299
2295
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
2300
2296
|
): TransactionArgument &
|
|
@@ -2341,11 +2337,11 @@ export namespace router {
|
|
|
2341
2337
|
export function swapExactInputDoublehop_<T0 = any, T1 = any, T2 = any>(
|
|
2342
2338
|
tx: TransactionBlock,
|
|
2343
2339
|
args: [
|
|
2344
|
-
|
|
2345
|
-
(
|
|
2340
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2341
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2346
2342
|
bigint | TransactionArgument,
|
|
2347
2343
|
bigint | TransactionArgument,
|
|
2348
|
-
|
|
2344
|
+
string | ObjectCallArg | TransactionArgument
|
|
2349
2345
|
],
|
|
2350
2346
|
typeArguments: [
|
|
2351
2347
|
TypeDescriptor<T0> | string,
|
|
@@ -2399,11 +2395,11 @@ export namespace router {
|
|
|
2399
2395
|
export function swapExactOutput_<T0 = any, T1 = any>(
|
|
2400
2396
|
tx: TransactionBlock,
|
|
2401
2397
|
args: [
|
|
2402
|
-
|
|
2403
|
-
(
|
|
2398
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2399
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2404
2400
|
bigint | TransactionArgument,
|
|
2405
2401
|
bigint | TransactionArgument,
|
|
2406
|
-
|
|
2402
|
+
string | ObjectCallArg | TransactionArgument
|
|
2407
2403
|
],
|
|
2408
2404
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
2409
2405
|
): TransactionArgument &
|
|
@@ -2450,11 +2446,11 @@ export namespace router {
|
|
|
2450
2446
|
export function swapExactOutputDoublehop_<T0 = any, T1 = any, T2 = any>(
|
|
2451
2447
|
tx: TransactionBlock,
|
|
2452
2448
|
args: [
|
|
2453
|
-
|
|
2454
|
-
(
|
|
2449
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2450
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2455
2451
|
bigint | TransactionArgument,
|
|
2456
2452
|
bigint | TransactionArgument,
|
|
2457
|
-
|
|
2453
|
+
string | ObjectCallArg | TransactionArgument
|
|
2458
2454
|
],
|
|
2459
2455
|
typeArguments: [
|
|
2460
2456
|
TypeDescriptor<T0> | string,
|
|
@@ -2508,10 +2504,10 @@ export namespace router {
|
|
|
2508
2504
|
export function zapIn_<T0 = any, T1 = any>(
|
|
2509
2505
|
tx: TransactionBlock,
|
|
2510
2506
|
args: [
|
|
2511
|
-
|
|
2512
|
-
(
|
|
2507
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2508
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2513
2509
|
bigint | TransactionArgument,
|
|
2514
|
-
|
|
2510
|
+
string | ObjectCallArg | TransactionArgument
|
|
2515
2511
|
],
|
|
2516
2512
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
2517
2513
|
): TransactionArgument &
|
|
@@ -2556,81 +2552,81 @@ export namespace router {
|
|
|
2556
2552
|
}
|
|
2557
2553
|
export namespace view {
|
|
2558
2554
|
export async function addLiquidity_<T0 = any, T1 = any>(
|
|
2559
|
-
|
|
2555
|
+
client: SuiClient,
|
|
2560
2556
|
args: [
|
|
2561
|
-
|
|
2562
|
-
(
|
|
2563
|
-
(
|
|
2557
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2558
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2559
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2564
2560
|
bigint | TransactionArgument,
|
|
2565
2561
|
bigint | TransactionArgument,
|
|
2566
2562
|
bigint | TransactionArgument,
|
|
2567
2563
|
bigint | TransactionArgument,
|
|
2568
|
-
|
|
2564
|
+
string | ObjectCallArg | TransactionArgument
|
|
2569
2565
|
],
|
|
2570
2566
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
2571
2567
|
) {
|
|
2572
2568
|
const tx = new TransactionBlock();
|
|
2573
2569
|
builder.addLiquidity_(tx, args, typeArguments);
|
|
2574
|
-
const res = await
|
|
2570
|
+
const res = await client.devInspectTransactionBlock({
|
|
2575
2571
|
transactionBlock: tx,
|
|
2576
2572
|
sender: ZERO_ADDRESS,
|
|
2577
2573
|
});
|
|
2578
2574
|
return res;
|
|
2579
2575
|
}
|
|
2580
2576
|
export async function createPool_<T0 = any, T1 = any>(
|
|
2581
|
-
|
|
2577
|
+
client: SuiClient,
|
|
2582
2578
|
args: [
|
|
2583
|
-
|
|
2584
|
-
(
|
|
2585
|
-
(
|
|
2579
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2580
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2581
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2586
2582
|
bigint | TransactionArgument,
|
|
2587
2583
|
bigint | TransactionArgument,
|
|
2588
|
-
|
|
2584
|
+
string | ObjectCallArg | TransactionArgument
|
|
2589
2585
|
],
|
|
2590
2586
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
2591
2587
|
) {
|
|
2592
2588
|
const tx = new TransactionBlock();
|
|
2593
2589
|
builder.createPool_(tx, args, typeArguments);
|
|
2594
|
-
const res = await
|
|
2590
|
+
const res = await client.devInspectTransactionBlock({
|
|
2595
2591
|
transactionBlock: tx,
|
|
2596
2592
|
sender: ZERO_ADDRESS,
|
|
2597
2593
|
});
|
|
2598
2594
|
return res;
|
|
2599
2595
|
}
|
|
2600
2596
|
export async function removeLiquidity_<T0 = any, T1 = any>(
|
|
2601
|
-
|
|
2597
|
+
client: SuiClient,
|
|
2602
2598
|
args: [
|
|
2603
|
-
|
|
2604
|
-
(
|
|
2599
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2600
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2605
2601
|
bigint | TransactionArgument,
|
|
2606
2602
|
bigint | TransactionArgument,
|
|
2607
2603
|
bigint | TransactionArgument,
|
|
2608
|
-
|
|
2604
|
+
string | ObjectCallArg | TransactionArgument
|
|
2609
2605
|
],
|
|
2610
2606
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
2611
2607
|
) {
|
|
2612
2608
|
const tx = new TransactionBlock();
|
|
2613
2609
|
builder.removeLiquidity_(tx, args, typeArguments);
|
|
2614
|
-
const res = await
|
|
2610
|
+
const res = await client.devInspectTransactionBlock({
|
|
2615
2611
|
transactionBlock: tx,
|
|
2616
2612
|
sender: ZERO_ADDRESS,
|
|
2617
2613
|
});
|
|
2618
2614
|
return res;
|
|
2619
2615
|
}
|
|
2620
2616
|
export async function swapExactInput_<T0 = any, T1 = any>(
|
|
2621
|
-
|
|
2617
|
+
client: SuiClient,
|
|
2622
2618
|
args: [
|
|
2623
|
-
|
|
2624
|
-
(
|
|
2619
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2620
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2625
2621
|
bigint | TransactionArgument,
|
|
2626
2622
|
bigint | TransactionArgument,
|
|
2627
|
-
|
|
2623
|
+
string | ObjectCallArg | TransactionArgument
|
|
2628
2624
|
],
|
|
2629
2625
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
2630
2626
|
) {
|
|
2631
2627
|
const tx = new TransactionBlock();
|
|
2632
2628
|
builder.swapExactInput_(tx, args, typeArguments);
|
|
2633
|
-
const res = await
|
|
2629
|
+
const res = await client.devInspectTransactionBlock({
|
|
2634
2630
|
transactionBlock: tx,
|
|
2635
2631
|
sender: ZERO_ADDRESS,
|
|
2636
2632
|
});
|
|
@@ -2641,13 +2637,13 @@ export namespace router {
|
|
|
2641
2637
|
T1 = any,
|
|
2642
2638
|
T2 = any
|
|
2643
2639
|
>(
|
|
2644
|
-
|
|
2640
|
+
client: SuiClient,
|
|
2645
2641
|
args: [
|
|
2646
|
-
|
|
2647
|
-
(
|
|
2642
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2643
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2648
2644
|
bigint | TransactionArgument,
|
|
2649
2645
|
bigint | TransactionArgument,
|
|
2650
|
-
|
|
2646
|
+
string | ObjectCallArg | TransactionArgument
|
|
2651
2647
|
],
|
|
2652
2648
|
typeArguments: [
|
|
2653
2649
|
TypeDescriptor<T0> | string,
|
|
@@ -2657,26 +2653,26 @@ export namespace router {
|
|
|
2657
2653
|
) {
|
|
2658
2654
|
const tx = new TransactionBlock();
|
|
2659
2655
|
builder.swapExactInputDoublehop_(tx, args, typeArguments);
|
|
2660
|
-
const res = await
|
|
2656
|
+
const res = await client.devInspectTransactionBlock({
|
|
2661
2657
|
transactionBlock: tx,
|
|
2662
2658
|
sender: ZERO_ADDRESS,
|
|
2663
2659
|
});
|
|
2664
2660
|
return res;
|
|
2665
2661
|
}
|
|
2666
2662
|
export async function swapExactOutput_<T0 = any, T1 = any>(
|
|
2667
|
-
|
|
2663
|
+
client: SuiClient,
|
|
2668
2664
|
args: [
|
|
2669
|
-
|
|
2670
|
-
(
|
|
2665
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2666
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2671
2667
|
bigint | TransactionArgument,
|
|
2672
2668
|
bigint | TransactionArgument,
|
|
2673
|
-
|
|
2669
|
+
string | ObjectCallArg | TransactionArgument
|
|
2674
2670
|
],
|
|
2675
2671
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
2676
2672
|
) {
|
|
2677
2673
|
const tx = new TransactionBlock();
|
|
2678
2674
|
builder.swapExactOutput_(tx, args, typeArguments);
|
|
2679
|
-
const res = await
|
|
2675
|
+
const res = await client.devInspectTransactionBlock({
|
|
2680
2676
|
transactionBlock: tx,
|
|
2681
2677
|
sender: ZERO_ADDRESS,
|
|
2682
2678
|
});
|
|
@@ -2687,13 +2683,13 @@ export namespace router {
|
|
|
2687
2683
|
T1 = any,
|
|
2688
2684
|
T2 = any
|
|
2689
2685
|
>(
|
|
2690
|
-
|
|
2686
|
+
client: SuiClient,
|
|
2691
2687
|
args: [
|
|
2692
|
-
|
|
2693
|
-
(
|
|
2688
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2689
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2694
2690
|
bigint | TransactionArgument,
|
|
2695
2691
|
bigint | TransactionArgument,
|
|
2696
|
-
|
|
2692
|
+
string | ObjectCallArg | TransactionArgument
|
|
2697
2693
|
],
|
|
2698
2694
|
typeArguments: [
|
|
2699
2695
|
TypeDescriptor<T0> | string,
|
|
@@ -2703,25 +2699,25 @@ export namespace router {
|
|
|
2703
2699
|
) {
|
|
2704
2700
|
const tx = new TransactionBlock();
|
|
2705
2701
|
builder.swapExactOutputDoublehop_(tx, args, typeArguments);
|
|
2706
|
-
const res = await
|
|
2702
|
+
const res = await client.devInspectTransactionBlock({
|
|
2707
2703
|
transactionBlock: tx,
|
|
2708
2704
|
sender: ZERO_ADDRESS,
|
|
2709
2705
|
});
|
|
2710
2706
|
return res;
|
|
2711
2707
|
}
|
|
2712
2708
|
export async function zapIn_<T0 = any, T1 = any>(
|
|
2713
|
-
|
|
2709
|
+
client: SuiClient,
|
|
2714
2710
|
args: [
|
|
2715
|
-
|
|
2716
|
-
(
|
|
2711
|
+
string | ObjectCallArg | TransactionArgument,
|
|
2712
|
+
(string | ObjectCallArg)[] | TransactionArgument,
|
|
2717
2713
|
bigint | TransactionArgument,
|
|
2718
|
-
|
|
2714
|
+
string | ObjectCallArg | TransactionArgument
|
|
2719
2715
|
],
|
|
2720
2716
|
typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string]
|
|
2721
2717
|
) {
|
|
2722
2718
|
const tx = new TransactionBlock();
|
|
2723
2719
|
builder.zapIn_(tx, args, typeArguments);
|
|
2724
|
-
const res = await
|
|
2720
|
+
const res = await client.devInspectTransactionBlock({
|
|
2725
2721
|
transactionBlock: tx,
|
|
2726
2722
|
sender: ZERO_ADDRESS,
|
|
2727
2723
|
});
|