Skip to content

Commit 7090932

Browse files
committed
Upgrade @scure/bip39 to v2
1 parent 0e53192 commit 7090932

File tree

7 files changed

+36
-36
lines changed

7 files changed

+36
-36
lines changed

.pnp.cjs

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.yarn/cache/@scure-bip39-npm-1.6.0-63a27ac0b7-73a54b5566.zip

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:4a411036cb2d0f07e6b72a92a3138d67813c96fa31f190cfb3a16d6190ecff74
3+
size 202966

packages/crypto/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@noble/ciphers": "^2.1.1",
4747
"@noble/curves": "^2.0.1",
4848
"@noble/hashes": "^2.0.1",
49-
"@scure/bip39": "^1.6.0",
49+
"@scure/bip39": "^2.0.1",
5050
"hash-wasm": "^4.12.0"
5151
},
5252
"devDependencies": {

packages/crypto/src/bip39.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,26 @@ describe("Bip39", () => {
2020

2121
it("throws for invalid input", () => {
2222
// invalid input length
23-
expect(() => Bip39.encode(fromHex(""))).toThrowError(/got length/);
24-
expect(() => Bip39.encode(fromHex("00"))).toThrowError(/got length/);
23+
expect(() => Bip39.encode(fromHex(""))).toThrowError(/invalid entropy length/);
24+
expect(() => Bip39.encode(fromHex("00"))).toThrowError(/invalid entropy length/);
2525
expect(() => Bip39.encode(fromHex("000000000000000000000000000000"))).toThrowError(
26-
/expected of length .*, got length=15/,
26+
/invalid entropy length/,
2727
);
2828
expect(() => Bip39.encode(fromHex("0000000000000000000000000000000000"))).toThrowError(
29-
/expected of length .*, got length=17/,
29+
/invalid entropy length/,
3030
);
3131
expect(() => Bip39.encode(fromHex("0000000000000000000000000000000000000000000000"))).toThrowError(
32-
/got length/,
32+
/invalid entropy length/,
3333
);
3434
expect(() => Bip39.encode(fromHex("00000000000000000000000000000000000000000000000000"))).toThrowError(
35-
/got length/,
35+
/invalid entropy length/,
3636
);
3737
expect(() =>
3838
Bip39.encode(fromHex("00000000000000000000000000000000000000000000000000000000000000")),
39-
).toThrowError(/got length/);
39+
).toThrowError(/invalid entropy length/);
4040
expect(() =>
4141
Bip39.encode(fromHex("000000000000000000000000000000000000000000000000000000000000000000")),
42-
).toThrowError(/got length/);
42+
).toThrowError(/invalid entropy length/);
4343
});
4444
});
4545

packages/crypto/src/bip39.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { fixUint8Array } from "@cosmjs/encoding";
22
import { entropyToMnemonic, mnemonicToEntropy, mnemonicToSeed } from "@scure/bip39";
3-
import { wordlist } from "@scure/bip39/wordlists/english";
3+
import { wordlist } from "@scure/bip39/wordlists/english.js";
44

55
export class EnglishMnemonic {
66
public static readonly wordlist: readonly string[] = wordlist;

yarn.lock

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ __metadata:
282282
"@noble/ciphers": "npm:^2.1.1"
283283
"@noble/curves": "npm:^2.0.1"
284284
"@noble/hashes": "npm:^2.0.1"
285-
"@scure/bip39": "npm:^1.6.0"
285+
"@scure/bip39": "npm:^2.0.1"
286286
"@types/jasmine": "npm:^4"
287287
"@types/karma-firefox-launcher": "npm:^2"
288288
"@types/karma-jasmine": "npm:^4"
@@ -1166,7 +1166,7 @@ __metadata:
11661166
languageName: node
11671167
linkType: hard
11681168

1169-
"@noble/hashes@npm:^1.7.1, @noble/hashes@npm:~1.8.0":
1169+
"@noble/hashes@npm:^1.7.1":
11701170
version: 1.8.0
11711171
resolution: "@noble/hashes@npm:1.8.0"
11721172
checksum: 10c0/06a0b52c81a6fa7f04d67762e08b2c476a00285858150caeaaff4037356dd5e119f45b2a530f638b77a5eeca013168ec1b655db41bae3236cb2e9d511484fc77
@@ -1316,27 +1316,27 @@ __metadata:
13161316
languageName: node
13171317
linkType: hard
13181318

1319-
"@scure/base@npm:^1.2.4, @scure/base@npm:~1.2.5":
1320-
version: 1.2.6
1321-
resolution: "@scure/base@npm:1.2.6"
1322-
checksum: 10c0/49bd5293371c4e062cb6ba689c8fe3ea3981b7bb9c000400dc4eafa29f56814cdcdd27c04311c2fec34de26bc373c593a1d6ca6d754398a488d587943b7c128a
1323-
languageName: node
1324-
linkType: hard
1325-
1326-
"@scure/base@npm:^2.0.0":
1319+
"@scure/base@npm:2.0.0, @scure/base@npm:^2.0.0":
13271320
version: 2.0.0
13281321
resolution: "@scure/base@npm:2.0.0"
13291322
checksum: 10c0/7d999c7bebf053bb49cb706fdc6c5366737cff0f7f7518f52d32d7f7ad7b898904f03673648a2af5c4f22396f5c05f1d8bddbf010d6595052d07ba8163d506ad
13301323
languageName: node
13311324
linkType: hard
13321325

1333-
"@scure/bip39@npm:^1.6.0":
1334-
version: 1.6.0
1335-
resolution: "@scure/bip39@npm:1.6.0"
1326+
"@scure/base@npm:^1.2.4":
1327+
version: 1.2.6
1328+
resolution: "@scure/base@npm:1.2.6"
1329+
checksum: 10c0/49bd5293371c4e062cb6ba689c8fe3ea3981b7bb9c000400dc4eafa29f56814cdcdd27c04311c2fec34de26bc373c593a1d6ca6d754398a488d587943b7c128a
1330+
languageName: node
1331+
linkType: hard
1332+
1333+
"@scure/bip39@npm:^2.0.1":
1334+
version: 2.0.1
1335+
resolution: "@scure/bip39@npm:2.0.1"
13361336
dependencies:
1337-
"@noble/hashes": "npm:~1.8.0"
1338-
"@scure/base": "npm:~1.2.5"
1339-
checksum: 10c0/73a54b5566a50a3f8348a5cfd74d2092efeefc485efbed83d7a7374ffd9a75defddf446e8e5ea0385e4adb49a94b8ae83c5bad3e16333af400e932f7da3aaff8
1337+
"@noble/hashes": "npm:2.0.1"
1338+
"@scure/base": "npm:2.0.0"
1339+
checksum: 10c0/ed8a0788bca006a6e4a647ed67c4c973b1deeaee5d62ddc168c9521c33e3a66cf5707c8aadcd0b6f9e3e41c3f763a985d913f4abc3813963497238e73ce166b6
13401340
languageName: node
13411341
linkType: hard
13421342

0 commit comments

Comments
 (0)