@mysten/sui 1.21.1 → 1.22.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/CHANGELOG.md +18 -0
- package/dist/cjs/bcs/index.d.ts +1 -0
- package/dist/cjs/cryptography/keypair.js +4 -4
- package/dist/cjs/cryptography/keypair.js.map +2 -2
- 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/index.d.ts +1 -0
- package/dist/esm/cryptography/keypair.js +1 -1
- package/dist/esm/cryptography/keypair.js.map +2 -2
- 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 +3 -4
- package/src/cryptography/keypair.ts +2 -2
- 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(Work in Progress)",
|
|
5
5
|
"homepage": "https://sdk.mystenlabs.com",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.22.0",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"files": [
|
|
@@ -133,16 +133,15 @@
|
|
|
133
133
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
134
134
|
"@noble/curves": "^1.4.2",
|
|
135
135
|
"@noble/hashes": "^1.4.0",
|
|
136
|
+
"@scure/base": "^1.2.4",
|
|
136
137
|
"@scure/bip32": "^1.4.0",
|
|
137
138
|
"@scure/bip39": "^1.3.0",
|
|
138
|
-
"@suchipi/femver": "^1.0.0",
|
|
139
|
-
"bech32": "^2.0.0",
|
|
140
139
|
"gql.tada": "^1.8.2",
|
|
141
140
|
"graphql": "^16.9.0",
|
|
142
141
|
"jose": "^5.6.3",
|
|
143
142
|
"poseidon-lite": "^0.2.0",
|
|
144
143
|
"valibot": "^0.36.0",
|
|
145
|
-
"@mysten/bcs": "1.
|
|
144
|
+
"@mysten/bcs": "1.5.0"
|
|
146
145
|
},
|
|
147
146
|
"scripts": {
|
|
148
147
|
"clean": "rm -rf tsconfig.tsbuildinfo ./dist",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { bcs, toBase64 } from '@mysten/bcs';
|
|
5
5
|
import { blake2b } from '@noble/hashes/blake2b';
|
|
6
|
-
import { bech32 } from '
|
|
6
|
+
import { bech32 } from '@scure/base';
|
|
7
7
|
|
|
8
8
|
import type { IntentScope } from './intent.js';
|
|
9
9
|
import { messageWithIntent } from './intent.js';
|
|
@@ -99,7 +99,7 @@ export abstract class Keypair extends Signer {
|
|
|
99
99
|
* parse out the signature scheme and the private key in bytes.
|
|
100
100
|
*/
|
|
101
101
|
export function decodeSuiPrivateKey(value: string): ParsedKeypair {
|
|
102
|
-
const { prefix, words } = bech32.decode(value);
|
|
102
|
+
const { prefix, words } = bech32.decode(value as `${string}1${string}`);
|
|
103
103
|
if (prefix !== SUI_PRIVATE_KEY_PREFIX) {
|
|
104
104
|
throw new Error('invalid private key prefix');
|
|
105
105
|
}
|
package/src/version.ts
CHANGED