@mysten/sui 1.45.0 → 1.45.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 (33) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/transactions/Arguments.d.ts +2 -2
  3. package/dist/cjs/transactions/Transaction.d.ts +88 -88
  4. package/dist/cjs/transactions/Transaction.js +1 -0
  5. package/dist/cjs/transactions/Transaction.js.map +2 -2
  6. package/dist/cjs/transactions/TransactionData.d.ts +6 -6
  7. package/dist/cjs/transactions/data/internal.d.ts +107 -105
  8. package/dist/cjs/transactions/data/internal.js +6 -4
  9. package/dist/cjs/transactions/data/internal.js.map +2 -2
  10. package/dist/cjs/transactions/data/v1.d.ts +95 -92
  11. package/dist/cjs/transactions/data/v2.d.ts +15 -147
  12. package/dist/cjs/version.d.ts +2 -2
  13. package/dist/cjs/version.js +2 -2
  14. package/dist/cjs/version.js.map +1 -1
  15. package/dist/esm/transactions/Arguments.d.ts +2 -2
  16. package/dist/esm/transactions/Transaction.d.ts +88 -88
  17. package/dist/esm/transactions/Transaction.js +1 -0
  18. package/dist/esm/transactions/Transaction.js.map +2 -2
  19. package/dist/esm/transactions/TransactionData.d.ts +6 -6
  20. package/dist/esm/transactions/data/internal.d.ts +107 -105
  21. package/dist/esm/transactions/data/internal.js +6 -4
  22. package/dist/esm/transactions/data/internal.js.map +2 -2
  23. package/dist/esm/transactions/data/v1.d.ts +95 -92
  24. package/dist/esm/transactions/data/v2.d.ts +15 -147
  25. package/dist/esm/version.d.ts +2 -2
  26. package/dist/esm/version.js +2 -2
  27. package/dist/esm/version.js.map +1 -1
  28. package/dist/tsconfig.esm.tsbuildinfo +1 -1
  29. package/dist/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +2 -2
  31. package/src/transactions/Transaction.ts +1 -0
  32. package/src/transactions/data/internal.ts +21 -14
  33. package/src/version.ts +2 -2
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Mysten Labs <build@mystenlabs.com>",
4
4
  "description": "Sui TypeScript API",
5
5
  "homepage": "https://sdk.mystenlabs.com",
6
- "version": "1.45.0",
6
+ "version": "1.45.2",
7
7
  "license": "Apache-2.0",
8
8
  "sideEffects": false,
9
9
  "files": [
@@ -159,7 +159,7 @@
159
159
  "gql.tada": "^1.8.13",
160
160
  "graphql": "^16.11.0",
161
161
  "poseidon-lite": "0.2.1",
162
- "valibot": "^0.36.0",
162
+ "valibot": "^1.2.0",
163
163
  "@mysten/bcs": "1.9.2",
164
164
  "@mysten/utils": "0.2.0"
165
165
  },
@@ -803,6 +803,7 @@ export class Transaction {
803
803
  } finally {
804
804
  this.#inputSection = this.#data.inputs.slice();
805
805
  this.#commandSection = this.#data.commands.slice();
806
+ this.#availableResults = new Set(this.#commandSection.map((_, i) => i));
806
807
  }
807
808
  }
808
809
 
@@ -27,17 +27,21 @@ import {
27
27
  import { isValidSuiAddress, normalizeSuiAddress } from '../../utils/sui-types.js';
28
28
  import type { Simplify } from '@mysten/utils';
29
29
 
30
+ type EnumSchemaInput<T extends Record<string, GenericSchema<any>>> = EnumInputShape<
31
+ Simplify<{
32
+ [K in keyof T]: InferInput<T[K]>;
33
+ }>
34
+ >;
35
+
36
+ type EnumSchemaOutput<T extends Record<string, GenericSchema<any>>> = EnumOutputShape<
37
+ Simplify<{
38
+ [K in keyof T]: InferOutput<T[K]>;
39
+ }>
40
+ >;
41
+
30
42
  type EnumSchema<T extends Record<string, GenericSchema<any>>> = GenericSchema<
31
- EnumInputShape<
32
- Simplify<{
33
- [K in keyof T]: InferInput<T[K]>;
34
- }>
35
- >,
36
- EnumOutputShape<
37
- Simplify<{
38
- [K in keyof T]: InferOutput<T[K]>;
39
- }>
40
- >
43
+ EnumSchemaInput<T>,
44
+ EnumSchemaOutput<T>
41
45
  >;
42
46
 
43
47
  export function safeEnum<T extends Record<string, GenericSchema<any>>>(options: T): EnumSchema<T> {
@@ -45,10 +49,13 @@ export function safeEnum<T extends Record<string, GenericSchema<any>>>(options:
45
49
 
46
50
  return pipe(
47
51
  union(unionOptions),
48
- transform((value) => ({
49
- ...value,
50
- $kind: Object.keys(value)[0] as keyof typeof value,
51
- })),
52
+ transform(
53
+ (value) =>
54
+ ({
55
+ ...value,
56
+ $kind: Object.keys(value)[0] as keyof typeof value,
57
+ }) as EnumSchemaOutput<T>,
58
+ ),
52
59
  ) as EnumSchema<T>;
53
60
  }
54
61
 
package/src/version.ts CHANGED
@@ -3,5 +3,5 @@
3
3
 
4
4
  // This file is generated by genversion.mjs. Do not edit it directly.
5
5
 
6
- export const PACKAGE_VERSION = '1.45.0';
7
- export const TARGETED_RPC_VERSION = '1.61.0';
6
+ export const PACKAGE_VERSION = '1.45.2';
7
+ export const TARGETED_RPC_VERSION = '1.62.0';