@mysten/sui 1.36.0 → 1.36.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.
- package/CHANGELOG.md +12 -6
- package/dist/cjs/bcs/bcs.d.ts +30 -6
- package/dist/cjs/bcs/bcs.js +4 -2
- package/dist/cjs/bcs/bcs.js.map +2 -2
- package/dist/cjs/bcs/index.d.ts +30 -6
- package/dist/cjs/bcs/pure.d.ts +2 -2
- package/dist/cjs/bcs/pure.js.map +2 -2
- package/dist/cjs/cryptography/signature-scheme.d.ts +1 -0
- package/dist/cjs/cryptography/signature-scheme.js +2 -1
- package/dist/cjs/cryptography/signature-scheme.js.map +2 -2
- package/dist/cjs/multisig/publickey.d.ts +4 -0
- package/dist/cjs/multisig/publickey.js.map +2 -2
- package/dist/cjs/transactions/pure.d.ts +3 -3
- package/dist/cjs/transactions/pure.js.map +1 -1
- package/dist/cjs/version.d.ts +2 -2
- package/dist/cjs/version.js +2 -2
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/bcs/bcs.d.ts +30 -6
- package/dist/esm/bcs/bcs.js +4 -2
- package/dist/esm/bcs/bcs.js.map +2 -2
- package/dist/esm/bcs/index.d.ts +30 -6
- package/dist/esm/bcs/pure.d.ts +2 -2
- package/dist/esm/bcs/pure.js.map +2 -2
- package/dist/esm/cryptography/signature-scheme.d.ts +1 -0
- package/dist/esm/cryptography/signature-scheme.js +2 -1
- package/dist/esm/cryptography/signature-scheme.js.map +2 -2
- package/dist/esm/multisig/publickey.d.ts +4 -0
- package/dist/esm/multisig/publickey.js.map +2 -2
- package/dist/esm/transactions/pure.d.ts +3 -3
- package/dist/esm/transactions/pure.js.map +1 -1
- package/dist/esm/version.d.ts +2 -2
- package/dist/esm/version.js +2 -2
- package/dist/esm/version.js.map +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -11
- package/src/bcs/bcs.ts +2 -0
- package/src/bcs/pure.ts +4 -3
- package/src/cryptography/signature-scheme.ts +1 -0
- package/src/multisig/publickey.ts +4 -2
- package/src/transactions/pure.ts +5 -5
- 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.36.
|
|
6
|
+
"version": "1.36.2",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"files": [
|
|
@@ -111,10 +111,10 @@
|
|
|
111
111
|
"access": "public"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
|
-
"@0no-co/graphqlsp": "^1.
|
|
114
|
+
"@0no-co/graphqlsp": "^1.14.0",
|
|
115
115
|
"@graphql-codegen/add": "^5.0.3",
|
|
116
|
-
"@graphql-codegen/cli": "^5.0.
|
|
117
|
-
"@graphql-codegen/typed-document-node": "^5.1.
|
|
116
|
+
"@graphql-codegen/cli": "^5.0.7",
|
|
117
|
+
"@graphql-codegen/typed-document-node": "^5.1.2",
|
|
118
118
|
"@graphql-codegen/typescript": "4.1.6",
|
|
119
119
|
"@graphql-codegen/typescript-document-nodes": "4.0.16",
|
|
120
120
|
"@graphql-codegen/typescript-operations": "^4.6.1",
|
|
@@ -125,25 +125,25 @@
|
|
|
125
125
|
"@types/ws": "^8.18.1",
|
|
126
126
|
"cross-env": "^7.0.3",
|
|
127
127
|
"graphql-config": "^5.1.5",
|
|
128
|
-
"msw": "^2.
|
|
128
|
+
"msw": "^2.10.4",
|
|
129
129
|
"tmp": "^0.2.3",
|
|
130
130
|
"ts-retry-promise": "^0.8.1",
|
|
131
131
|
"typescript": "^5.8.3",
|
|
132
|
-
"vite": "^
|
|
132
|
+
"vite": "^7.0.5",
|
|
133
133
|
"vite-tsconfig-paths": "^5.1.4",
|
|
134
|
-
"vitest": "^3.2.
|
|
135
|
-
"wait-on": "^8.0.
|
|
136
|
-
"ws": "^8.18.
|
|
134
|
+
"vitest": "^3.2.4",
|
|
135
|
+
"wait-on": "^8.0.4",
|
|
136
|
+
"ws": "^8.18.3",
|
|
137
137
|
"@mysten/build-scripts": "^0.0.0"
|
|
138
138
|
},
|
|
139
139
|
"dependencies": {
|
|
140
140
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
141
|
-
"@noble/curves": "^1.9.
|
|
141
|
+
"@noble/curves": "^1.9.4",
|
|
142
142
|
"@noble/hashes": "^1.8.0",
|
|
143
143
|
"@scure/base": "^1.2.6",
|
|
144
144
|
"@scure/bip32": "^1.7.0",
|
|
145
145
|
"@scure/bip39": "^1.6.0",
|
|
146
|
-
"gql.tada": "^1.8.
|
|
146
|
+
"gql.tada": "^1.8.12",
|
|
147
147
|
"graphql": "^16.11.0",
|
|
148
148
|
"poseidon-lite": "^0.2.0",
|
|
149
149
|
"valibot": "^0.36.0",
|
package/src/bcs/bcs.ts
CHANGED
|
@@ -273,6 +273,7 @@ export const CompressedSignature = bcs.enum('CompressedSignature', {
|
|
|
273
273
|
Secp256k1: bcs.fixedArray(64, bcs.u8()),
|
|
274
274
|
Secp256r1: bcs.fixedArray(64, bcs.u8()),
|
|
275
275
|
ZkLogin: bcs.vector(bcs.u8()),
|
|
276
|
+
Passkey: bcs.vector(bcs.u8()),
|
|
276
277
|
});
|
|
277
278
|
|
|
278
279
|
export const PublicKey = bcs.enum('PublicKey', {
|
|
@@ -280,6 +281,7 @@ export const PublicKey = bcs.enum('PublicKey', {
|
|
|
280
281
|
Secp256k1: bcs.fixedArray(33, bcs.u8()),
|
|
281
282
|
Secp256r1: bcs.fixedArray(33, bcs.u8()),
|
|
282
283
|
ZkLogin: bcs.vector(bcs.u8()),
|
|
284
|
+
Passkey: bcs.fixedArray(33, bcs.u8()),
|
|
283
285
|
});
|
|
284
286
|
|
|
285
287
|
export const MultiSigPkMap = bcs.struct('MultiSigPkMap', {
|
package/src/bcs/pure.ts
CHANGED
|
@@ -48,9 +48,10 @@ export type ShapeFromPureTypeName<T extends PureTypeName> = T extends BasePureTy
|
|
|
48
48
|
? ShapeFromPureTypeName<U> | null
|
|
49
49
|
: never;
|
|
50
50
|
|
|
51
|
-
type PureTypeValidationError<T extends string> =
|
|
51
|
+
type PureTypeValidationError<T extends string> = {
|
|
52
52
|
error: `Invalid Pure type name: ${T}`;
|
|
53
|
-
|
|
53
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
54
|
+
} & {};
|
|
54
55
|
|
|
55
56
|
export function pureBcsSchemaFromTypeName<T extends PureTypeName>(
|
|
56
57
|
name: T extends PureTypeName ? ValidPureTypeName<T> : T,
|
|
@@ -77,7 +78,7 @@ export function pureBcsSchemaFromTypeName<T extends PureTypeName>(
|
|
|
77
78
|
return Address as never;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
const generic = name.match(/^(vector|option)<(.+)>$/);
|
|
81
|
+
const generic = (name as string).match(/^(vector|option)<(.+)>$/);
|
|
81
82
|
if (generic) {
|
|
82
83
|
const [kind, inner] = generic.slice(1);
|
|
83
84
|
if (kind === 'vector') {
|
|
@@ -25,13 +25,15 @@ type CompressedSignature =
|
|
|
25
25
|
| { ED25519: number[] }
|
|
26
26
|
| { Secp256k1: number[] }
|
|
27
27
|
| { Secp256r1: number[] }
|
|
28
|
-
| { ZkLogin: number[] }
|
|
28
|
+
| { ZkLogin: number[] }
|
|
29
|
+
| { Passkey: number[] };
|
|
29
30
|
|
|
30
31
|
type PublicKeyEnum =
|
|
31
32
|
| { ED25519: number[] }
|
|
32
33
|
| { Secp256k1: number[] }
|
|
33
34
|
| { Secp256r1: number[] }
|
|
34
|
-
| { ZkLogin: number[] }
|
|
35
|
+
| { ZkLogin: number[] }
|
|
36
|
+
| { Passkey: number[] };
|
|
35
37
|
|
|
36
38
|
type PubkeyEnumWeightPair = {
|
|
37
39
|
pubKey: PublicKeyEnum;
|
package/src/transactions/pure.ts
CHANGED
|
@@ -9,9 +9,9 @@ import { pureBcsSchemaFromTypeName } from '../bcs/pure.js';
|
|
|
9
9
|
import type { PureTypeName, ShapeFromPureTypeName, ValidPureTypeName } from '../bcs/pure.js';
|
|
10
10
|
|
|
11
11
|
export function createPure<T>(makePure: (value: SerializedBcs<any, any> | Uint8Array) => T) {
|
|
12
|
-
function pure<
|
|
13
|
-
type:
|
|
14
|
-
value: ShapeFromPureTypeName<
|
|
12
|
+
function pure<Type extends PureTypeName>(
|
|
13
|
+
type: Type extends PureTypeName ? ValidPureTypeName<Type> : Type,
|
|
14
|
+
value: ShapeFromPureTypeName<Type>,
|
|
15
15
|
): T;
|
|
16
16
|
|
|
17
17
|
function pure(
|
|
@@ -48,7 +48,7 @@ export function createPure<T>(makePure: (value: SerializedBcs<any, any> | Uint8A
|
|
|
48
48
|
pure.address = (value: string) => makePure(bcs.Address.serialize(value));
|
|
49
49
|
pure.id = pure.address;
|
|
50
50
|
pure.vector = <Type extends PureTypeName>(
|
|
51
|
-
type:
|
|
51
|
+
type: Type extends PureTypeName ? ValidPureTypeName<Type> : Type,
|
|
52
52
|
value: Iterable<ShapeFromPureTypeName<Type>> & { length: number },
|
|
53
53
|
) => {
|
|
54
54
|
return makePure(
|
|
@@ -56,7 +56,7 @@ export function createPure<T>(makePure: (value: SerializedBcs<any, any> | Uint8A
|
|
|
56
56
|
);
|
|
57
57
|
};
|
|
58
58
|
pure.option = <Type extends PureTypeName>(
|
|
59
|
-
type:
|
|
59
|
+
type: Type extends PureTypeName ? ValidPureTypeName<Type> : Type,
|
|
60
60
|
value: ShapeFromPureTypeName<Type> | null | undefined,
|
|
61
61
|
) => {
|
|
62
62
|
return makePure(bcs.option(pureBcsSchemaFromTypeName(type)).serialize(value as never));
|
package/src/version.ts
CHANGED