@typemove/sui 1.5.1 → 1.5.2-rc.2

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 (37) hide show
  1. package/Readme.md +8 -4
  2. package/dist/cjs/builtin/0x1.d.ts +2 -0
  3. package/dist/cjs/builtin/0x1.d.ts.map +1 -1
  4. package/dist/cjs/builtin/0x1.js +187 -167
  5. package/dist/cjs/builtin/0x1.js.map +1 -1
  6. package/dist/cjs/builtin/0x2.d.ts +121 -0
  7. package/dist/cjs/builtin/0x2.d.ts.map +1 -1
  8. package/dist/cjs/builtin/0x2.js +1077 -856
  9. package/dist/cjs/builtin/0x2.js.map +1 -1
  10. package/dist/cjs/builtin/0x3.js +212 -212
  11. package/dist/cjs/codegen/codegen.js +2 -2
  12. package/dist/cjs/move-coder.d.ts +1 -1
  13. package/dist/cjs/move-coder.js +4 -4
  14. package/dist/esm/builtin/0x1.d.ts +2 -0
  15. package/dist/esm/builtin/0x1.d.ts.map +1 -1
  16. package/dist/esm/builtin/0x1.js +187 -167
  17. package/dist/esm/builtin/0x1.js.map +1 -1
  18. package/dist/esm/builtin/0x2.d.ts +121 -0
  19. package/dist/esm/builtin/0x2.d.ts.map +1 -1
  20. package/dist/esm/builtin/0x2.js +1076 -855
  21. package/dist/esm/builtin/0x2.js.map +1 -1
  22. package/dist/esm/builtin/0x3.js +212 -212
  23. package/dist/esm/codegen/codegen.js +2 -2
  24. package/dist/esm/move-coder.d.ts +1 -1
  25. package/dist/esm/move-coder.js +4 -4
  26. package/package.json +2 -2
  27. package/src/abis/0x1.json +20 -0
  28. package/src/abis/0x2.json +551 -0
  29. package/src/builtin/0x1.ts +195 -167
  30. package/src/builtin/0x2.ts +1238 -855
  31. package/src/builtin/0x3.ts +212 -212
  32. package/src/codegen/codegen.ts +2 -2
  33. package/src/move-coder.ts +4 -4
  34. package/src/tests/types/testnet/0x1e2b124f746a339b3cf99b9f969393a96594519aafb1d06517aacfeeae20e7a5.ts +8 -8
  35. package/src/tests/types/testnet/0x6c4a21e3e7e6b6d51c4604021633e1d97e24e37a696f8c082cd48f37503e602a.ts +96 -96
  36. package/src/tests/types/testnet/0xdee9.ts +94 -94
  37. package/src/tests/types/testnet/0xebaa2ad3eacc230f309cd933958cc52684df0a41ae7ac214d186b80f830867d2.ts +310 -310
@@ -165,12 +165,12 @@ export class SuiCodegen extends AbstractCodegen<
165
165
  } ): Promise<TypedDevInspectResults<${returnType}>> {
166
166
  const tx = new TransactionBlock()
167
167
  builder.${camel(normalizeToJSName(func.name))}(tx, args ${typeParamArg.length > 0 ? `, typeArguments` : ''})
168
- const insepctRes = await client.devInspectTransactionBlock({
168
+ const inspectRes = await client.devInspectTransactionBlock({
169
169
  transactionBlock: tx,
170
170
  sender: ZERO_ADDRESS
171
171
  })
172
172
 
173
- return (await getMoveCoder(client)).decodeDevInspectResult<${returnType}>(insepctRes)
173
+ return (await getMoveCoder(client)).decodeDevInspectResult<${returnType}>(inspectRes)
174
174
  }`
175
175
  }
176
176
 
package/src/move-coder.ts CHANGED
@@ -221,10 +221,10 @@ export class MoveCoder extends AbstractMoveCoder<
221
221
  return this.bcs.de(type.getNormalizedSignature(), data, encoding)
222
222
  }
223
223
 
224
- async decodeDevInspectResult<T extends any[]>(insepctRes: DevInspectResults): Promise<TypedDevInspectResults<T>> {
224
+ async decodeDevInspectResult<T extends any[]>(inspectRes: DevInspectResults): Promise<TypedDevInspectResults<T>> {
225
225
  const returnValues = []
226
- if (insepctRes.results != null) {
227
- for (const r of insepctRes.results) {
226
+ if (inspectRes.results != null) {
227
+ for (const r of inspectRes.results) {
228
228
  if (r.returnValues) {
229
229
  const type = parseMoveType(r.returnValues[0][1])
230
230
  const value = r.returnValues[0][0]
@@ -236,7 +236,7 @@ export class MoveCoder extends AbstractMoveCoder<
236
236
  }
237
237
  }
238
238
  }
239
- return { ...insepctRes, results_decoded: returnValues as any }
239
+ return { ...inspectRes, results_decoded: returnValues as any }
240
240
  }
241
241
  }
242
242
 
@@ -218,13 +218,13 @@ export namespace oracle {
218
218
  ): Promise<TypedDevInspectResults<[]>> {
219
219
  const tx = new TransactionBlock();
220
220
  builder.copyKey(tx, args, typeArguments);
221
- const insepctRes = await client.devInspectTransactionBlock({
221
+ const inspectRes = await client.devInspectTransactionBlock({
222
222
  transactionBlock: tx,
223
223
  sender: ZERO_ADDRESS,
224
224
  });
225
225
 
226
226
  return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
227
- insepctRes,
227
+ inspectRes,
228
228
  );
229
229
  }
230
230
  export async function getOracle<T0 = any>(
@@ -234,14 +234,14 @@ export namespace oracle {
234
234
  ): Promise<TypedDevInspectResults<[bigint, bigint, bigint, bigint]>> {
235
235
  const tx = new TransactionBlock();
236
236
  builder.getOracle(tx, args, typeArguments);
237
- const insepctRes = await client.devInspectTransactionBlock({
237
+ const inspectRes = await client.devInspectTransactionBlock({
238
238
  transactionBlock: tx,
239
239
  sender: ZERO_ADDRESS,
240
240
  });
241
241
 
242
242
  return (await getMoveCoder(client)).decodeDevInspectResult<
243
243
  [bigint, bigint, bigint, bigint]
244
- >(insepctRes);
244
+ >(inspectRes);
245
245
  }
246
246
  export async function newOracle<T0 = any>(
247
247
  client: SuiClient,
@@ -253,13 +253,13 @@ export namespace oracle {
253
253
  ): Promise<TypedDevInspectResults<[]>> {
254
254
  const tx = new TransactionBlock();
255
255
  builder.newOracle(tx, args, typeArguments);
256
- const insepctRes = await client.devInspectTransactionBlock({
256
+ const inspectRes = await client.devInspectTransactionBlock({
257
257
  transactionBlock: tx,
258
258
  sender: ZERO_ADDRESS,
259
259
  });
260
260
 
261
261
  return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
262
- insepctRes,
262
+ inspectRes,
263
263
  );
264
264
  }
265
265
  export async function update<T0 = any>(
@@ -276,13 +276,13 @@ export namespace oracle {
276
276
  ): Promise<TypedDevInspectResults<[]>> {
277
277
  const tx = new TransactionBlock();
278
278
  builder.update(tx, args, typeArguments);
279
- const insepctRes = await client.devInspectTransactionBlock({
279
+ const inspectRes = await client.devInspectTransactionBlock({
280
280
  transactionBlock: tx,
281
281
  sender: ZERO_ADDRESS,
282
282
  });
283
283
 
284
284
  return (await getMoveCoder(client)).decodeDevInspectResult<[]>(
285
- insepctRes,
285
+ inspectRes,
286
286
  );
287
287
  }
288
288
  }