@typemove/sui 1.7.1 → 1.8.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typemove/sui",
3
- "version": "1.7.1",
3
+ "version": "1.8.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -47,7 +47,7 @@
47
47
  "commander": "^12.0.0",
48
48
  "prettier": "^3.2.4",
49
49
  "radash": "^12.0.0",
50
- "@typemove/move": "1.7.1"
50
+ "@typemove/move": "1.8.0"
51
51
  },
52
52
  "url": "https://github.com/sentioxyz/typemove",
53
53
  "scripts": {
@@ -1906,7 +1906,7 @@ export namespace option {
1906
1906
  client: SuiClient,
1907
1907
  args: [option.Option<T0>],
1908
1908
  typeArguments: [TypeDescriptor<T0> | string],
1909
- ): Promise<TypedDevInspectResults<[T0[] | string]>> {
1909
+ ): Promise<TypedDevInspectResults<[T0[]]>> {
1910
1910
  const tx = new Transaction();
1911
1911
  builder.toVec(tx, args, typeArguments);
1912
1912
  const inspectRes = await client.devInspectTransactionBlock({
@@ -1914,9 +1914,9 @@ export namespace option {
1914
1914
  sender: ZERO_ADDRESS,
1915
1915
  });
1916
1916
 
1917
- return (await getMoveCoder(client)).decodeDevInspectResult<
1918
- [T0[] | string]
1919
- >(inspectRes);
1917
+ return (await getMoveCoder(client)).decodeDevInspectResult<[T0[]]>(
1918
+ inspectRes,
1919
+ );
1920
1920
  }
1921
1921
  }
1922
1922
  }
@@ -5404,7 +5404,7 @@ export namespace vector {
5404
5404
  client: SuiClient,
5405
5405
  args: [],
5406
5406
  typeArguments: [TypeDescriptor<T0> | string],
5407
- ): Promise<TypedDevInspectResults<[T0[] | string]>> {
5407
+ ): Promise<TypedDevInspectResults<[T0[]]>> {
5408
5408
  const tx = new Transaction();
5409
5409
  builder.empty(tx, args, typeArguments);
5410
5410
  const inspectRes = await client.devInspectTransactionBlock({
@@ -5412,15 +5412,15 @@ export namespace vector {
5412
5412
  sender: ZERO_ADDRESS,
5413
5413
  });
5414
5414
 
5415
- return (await getMoveCoder(client)).decodeDevInspectResult<
5416
- [T0[] | string]
5417
- >(inspectRes);
5415
+ return (await getMoveCoder(client)).decodeDevInspectResult<[T0[]]>(
5416
+ inspectRes,
5417
+ );
5418
5418
  }
5419
5419
  export async function flatten<T0 = any>(
5420
5420
  client: SuiClient,
5421
5421
  args: [string[]],
5422
5422
  typeArguments: [TypeDescriptor<T0> | string],
5423
- ): Promise<TypedDevInspectResults<[T0[] | string]>> {
5423
+ ): Promise<TypedDevInspectResults<[T0[]]>> {
5424
5424
  const tx = new Transaction();
5425
5425
  builder.flatten(tx, args, typeArguments);
5426
5426
  const inspectRes = await client.devInspectTransactionBlock({
@@ -5428,9 +5428,9 @@ export namespace vector {
5428
5428
  sender: ZERO_ADDRESS,
5429
5429
  });
5430
5430
 
5431
- return (await getMoveCoder(client)).decodeDevInspectResult<
5432
- [T0[] | string]
5433
- >(inspectRes);
5431
+ return (await getMoveCoder(client)).decodeDevInspectResult<[T0[]]>(
5432
+ inspectRes,
5433
+ );
5434
5434
  }
5435
5435
  export async function indexOf<T0 = any>(
5436
5436
  client: SuiClient,
@@ -5564,7 +5564,7 @@ export namespace vector {
5564
5564
  client: SuiClient,
5565
5565
  args: [T0],
5566
5566
  typeArguments: [TypeDescriptor<T0> | string],
5567
- ): Promise<TypedDevInspectResults<[T0[] | string]>> {
5567
+ ): Promise<TypedDevInspectResults<[T0[]]>> {
5568
5568
  const tx = new Transaction();
5569
5569
  builder.singleton(tx, args, typeArguments);
5570
5570
  const inspectRes = await client.devInspectTransactionBlock({
@@ -5572,9 +5572,9 @@ export namespace vector {
5572
5572
  sender: ZERO_ADDRESS,
5573
5573
  });
5574
5574
 
5575
- return (await getMoveCoder(client)).decodeDevInspectResult<
5576
- [T0[] | string]
5577
- >(inspectRes);
5575
+ return (await getMoveCoder(client)).decodeDevInspectResult<[T0[]]>(
5576
+ inspectRes,
5577
+ );
5578
5578
  }
5579
5579
  export async function swap<T0 = any>(
5580
5580
  client: SuiClient,
@@ -21563,7 +21563,7 @@ export namespace vec_map {
21563
21563
  client: SuiClient,
21564
21564
  args: [vec_map.VecMap<T0, T1>],
21565
21565
  typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
21566
- ): Promise<TypedDevInspectResults<[T0[] | string, T1[] | string]>> {
21566
+ ): Promise<TypedDevInspectResults<[T0[], T1[]]>> {
21567
21567
  const tx = new Transaction();
21568
21568
  builder.intoKeysValues(tx, args, typeArguments);
21569
21569
  const inspectRes = await client.devInspectTransactionBlock({
@@ -21571,9 +21571,9 @@ export namespace vec_map {
21571
21571
  sender: ZERO_ADDRESS,
21572
21572
  });
21573
21573
 
21574
- return (await getMoveCoder(client)).decodeDevInspectResult<
21575
- [T0[] | string, T1[] | string]
21576
- >(inspectRes);
21574
+ return (await getMoveCoder(client)).decodeDevInspectResult<[T0[], T1[]]>(
21575
+ inspectRes,
21576
+ );
21577
21577
  }
21578
21578
  export async function isEmpty<T0 = any, T1 = any>(
21579
21579
  client: SuiClient,
@@ -21595,7 +21595,7 @@ export namespace vec_map {
21595
21595
  client: SuiClient,
21596
21596
  args: [string],
21597
21597
  typeArguments: [TypeDescriptor<T0> | string, TypeDescriptor<T1> | string],
21598
- ): Promise<TypedDevInspectResults<[T0[] | string]>> {
21598
+ ): Promise<TypedDevInspectResults<[T0[]]>> {
21599
21599
  const tx = new Transaction();
21600
21600
  builder.keys(tx, args, typeArguments);
21601
21601
  const inspectRes = await client.devInspectTransactionBlock({
@@ -21603,9 +21603,9 @@ export namespace vec_map {
21603
21603
  sender: ZERO_ADDRESS,
21604
21604
  });
21605
21605
 
21606
- return (await getMoveCoder(client)).decodeDevInspectResult<
21607
- [T0[] | string]
21608
- >(inspectRes);
21606
+ return (await getMoveCoder(client)).decodeDevInspectResult<[T0[]]>(
21607
+ inspectRes,
21608
+ );
21609
21609
  }
21610
21610
  export async function pop<T0 = any, T1 = any>(
21611
21611
  client: SuiClient,
@@ -21692,7 +21692,7 @@ export namespace vec_map {
21692
21692
 
21693
21693
  export namespace vec_set {
21694
21694
  export interface VecSet<T0> {
21695
- contents: T0[] | string;
21695
+ contents: T0[];
21696
21696
  }
21697
21697
 
21698
21698
  export namespace VecSet {
@@ -21984,7 +21984,7 @@ export namespace vec_set {
21984
21984
  client: SuiClient,
21985
21985
  args: [vec_set.VecSet<T0>],
21986
21986
  typeArguments: [TypeDescriptor<T0> | string],
21987
- ): Promise<TypedDevInspectResults<[T0[] | string]>> {
21987
+ ): Promise<TypedDevInspectResults<[T0[]]>> {
21988
21988
  const tx = new Transaction();
21989
21989
  builder.intoKeys(tx, args, typeArguments);
21990
21990
  const inspectRes = await client.devInspectTransactionBlock({
@@ -21992,9 +21992,9 @@ export namespace vec_set {
21992
21992
  sender: ZERO_ADDRESS,
21993
21993
  });
21994
21994
 
21995
- return (await getMoveCoder(client)).decodeDevInspectResult<
21996
- [T0[] | string]
21997
- >(inspectRes);
21995
+ return (await getMoveCoder(client)).decodeDevInspectResult<[T0[]]>(
21996
+ inspectRes,
21997
+ );
21998
21998
  }
21999
21999
  export async function isEmpty<T0 = any>(
22000
22000
  client: SuiClient,
package/src/move-coder.ts CHANGED
@@ -261,7 +261,7 @@ export class MoveCoder extends AbstractMoveCoder<
261
261
  for (const returnValue of r.returnValues) {
262
262
  const type = parseMoveType(returnValue[1])
263
263
  const bcsDecoded = await this.decodeBCS(type, new Uint8Array(returnValue[0]))
264
- const decoded = await this.decodedType(bcsDecoded, type)
264
+ const decoded = await this.decodeType(bcsDecoded, type)
265
265
  returnValues.push(decoded)
266
266
  }
267
267
  } else {