@typemove/sui 1.13.4-rc.1 → 1.13.4

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