Skip to content

Commit d67f983

Browse files
Merge pull request #1683 from Chris79OG/luminaflow/fix-libsodium-esm-import
2 parents 5fd89b1 + aaf400a commit d67f983

5 files changed

Lines changed: 15 additions & 15 deletions

File tree

packages/crypto/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"@cardano-sdk/util": "workspace:~",
7171
"blake2b": "^2.1.4",
7272
"i": "^0.3.7",
73-
"libsodium-wrappers-sumo": "0.7.10",
73+
"libsodium-wrappers-sumo": "0.8.4",
7474
"lodash": "^4.17.21",
7575
"pbkdf2": "^3.1.3",
7676
"ts-custom-error": "^3.2.0",

packages/crypto/src/Bip32/Bip32PublicKey.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export class Bip32PublicKey {
8585

8686
/** Gets the blake2 hash of the key. NOTE: You must await `Crypto.ready()` at least once before calling this function. */
8787
hash(): Bip32PublicKeyHashHex {
88-
const hash = sodium.crypto_generichash(BIP32_PUBLIC_KEY_HASH_LENGTH, this.#key);
88+
const hash = sodium.crypto_generichash(BIP32_PUBLIC_KEY_HASH_LENGTH, this.#key, null);
8989
return Bip32PublicKeyHashHex(Buffer.from(hash).toString('hex'));
9090
}
9191
}

packages/crypto/src/Ed25519e/Ed25519PublicKey.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export class Ed25519PublicKey {
5959

6060
/** Gets the blake2 hash of the key material. NOTE: You must await `Crypto.ready()` at least once before calling this function. */
6161
hash(): Ed25519KeyHash {
62-
const hash = sodium.crypto_generichash(ED25519_PUBLIC_KEY_HASH_LENGTH, this.#keyMaterial);
62+
const hash = sodium.crypto_generichash(ED25519_PUBLIC_KEY_HASH_LENGTH, this.#keyMaterial, null);
6363
return Ed25519KeyHash.fromBytes(hash);
6464
}
6565

yarn-project.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1670,8 +1670,8 @@ cacheEntries = {
16701670
"libnpmaccess@npm:7.0.2" = { filename = "libnpmaccess-npm-7.0.2-57b91bfda5-73d49f3939.zip"; sha512 = "73d49f39391173276c46c12e32f503709338efd867d255d062ae9bc9e9f464d61240747f42bdd6dc6003a5dc275a27352ebfc11ed4cb424091463f302d823f23"; };
16711671
"libnpmpublish@npm:7.1.3" = { filename = "libnpmpublish-npm-7.1.3-5c85223e00-585902f510.zip"; sha512 = "585902f5105b0e6647992d10dcea72373e8475f3bf279f3ba7264521568d90863c910355966d71e1407d3203945c995c2601a243df86578431cce1566e686070"; };
16721672
"libphonenumber-js@npm:1.10.18" = { filename = "libphonenumber-js-npm-1.10.18-154a7b087a-df0a4b8adf.zip"; sha512 = "df0a4b8adfb79666636913f6da730ffc3bc037094e35be492d2f7a23ef26754d65a7afa5f64e04f5c5c2883193fa10bd4bea966fd28edcf0c72ddd13bd4b3625"; };
1673-
"libsodium-sumo@npm:0.7.10" = { filename = "libsodium-sumo-npm-0.7.10-a21fe7b00e-67ed75fa15.zip"; sha512 = "67ed75fa15559bad7cca5cdc2d5eb20725281be38a08814f7e39af8ea0c0d83ed2211e534f7b47460b6a48a1f7bb5c31759e4bc5cc79fb74292ffea8f90ee741"; };
1674-
"libsodium-wrappers-sumo@npm:0.7.10" = { filename = "libsodium-wrappers-sumo-npm-0.7.10-51c142ca41-f1ff2599e9.zip"; sha512 = "f1ff2599e9ec6271a0ba9ee6a8ad940b9a7dbd1d14c6cb87f2e34e7c6d43f7f4622a1f432e5254875e0cae7d56b1de8697a3989b118f49959639f48f0268db88"; };
1673+
"libsodium-sumo@npm:0.8.4" = { filename = "libsodium-sumo-npm-0.8.4-3c5914becc-ba95071a06.zip"; sha512 = "ba95071a063c72330721b4ff7bc6b41321441f376f44203825dc4464cb88198cab941d54e03cdcba440af8754589eeb925fc82269fdced60f5c12c1a86227eb3"; };
1674+
"libsodium-wrappers-sumo@npm:0.8.4" = { filename = "libsodium-wrappers-sumo-npm-0.8.4-7827a76857-c6123e68f1.zip"; sha512 = "c6123e68f18902bbbd982ddc1b1c5b118626313104933e9de97ae8bf9cf300fee02d924758496fefe07567f3314bdd51aaddef61d40d9cdd3efac881e1db25f1"; };
16751675
"lie@npm:3.1.1" = { filename = "lie-npm-3.1.1-91350720d9-6da9f2121d.zip"; sha512 = "6da9f2121d2dbd15f1eca44c0c7e211e66a99c7b326ec8312645f3648935bc3a658cf0e9fa7b5f10144d9e2641500b4f55bd32754607c3de945b5f443e50ddd1"; };
16761676
"lighthouse-logger@npm:1.3.0" = { filename = "lighthouse-logger-npm-1.3.0-3f60201e4a-82655f1862.zip"; sha512 = "82655f1862779dc5a917de62567a23dbf47bbde9a53abbdd4d72b2cf80d6c2595bc84de7ef836c94c76a2e4e3f3ec613a2e1ec021367959d397aeb5aae97a7cb"; };
16771677
"lightstep-tracer@npm:0.31.2" = { filename = "lightstep-tracer-npm-0.31.2-3829fcb8e9-bbfc20aa46.zip"; sha512 = "bbfc20aa46e9884cb70b5a56a8eb59325e957ea4862954902dbf6203b955394b16ce989251cea6481c589b0a0d23ad43c2f5598a4ce7188d8adf91bb3df13cdc"; };

yarn.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2339,7 +2339,7 @@ __metadata:
23392339
eslint: ^7.32.0
23402340
i: ^0.3.7
23412341
jest: ^28.1.3
2342-
libsodium-wrappers-sumo: 0.7.10
2342+
libsodium-wrappers-sumo: 0.8.4
23432343
lodash: ^4.17.21
23442344
madge: ^5.0.1
23452345
npm-run-all: ^4.1.5
@@ -16955,19 +16955,19 @@ __metadata:
1695516955
languageName: node
1695616956
linkType: hard
1695716957

16958-
"libsodium-sumo@npm:^0.7.0":
16959-
version: 0.7.10
16960-
resolution: "libsodium-sumo@npm:0.7.10"
16961-
checksum: 67ed75fa15559bad7cca5cdc2d5eb20725281be38a08814f7e39af8ea0c0d83ed2211e534f7b47460b6a48a1f7bb5c31759e4bc5cc79fb74292ffea8f90ee741
16958+
"libsodium-sumo@npm:^0.8.0":
16959+
version: 0.8.4
16960+
resolution: "libsodium-sumo@npm:0.8.4"
16961+
checksum: ba95071a063c72330721b4ff7bc6b41321441f376f44203825dc4464cb88198cab941d54e03cdcba440af8754589eeb925fc82269fdced60f5c12c1a86227eb3
1696216962
languageName: node
1696316963
linkType: hard
1696416964

16965-
"libsodium-wrappers-sumo@npm:0.7.10":
16966-
version: 0.7.10
16967-
resolution: "libsodium-wrappers-sumo@npm:0.7.10"
16965+
"libsodium-wrappers-sumo@npm:0.8.4":
16966+
version: 0.8.4
16967+
resolution: "libsodium-wrappers-sumo@npm:0.8.4"
1696816968
dependencies:
16969-
libsodium-sumo: ^0.7.0
16970-
checksum: f1ff2599e9ec6271a0ba9ee6a8ad940b9a7dbd1d14c6cb87f2e34e7c6d43f7f4622a1f432e5254875e0cae7d56b1de8697a3989b118f49959639f48f0268db88
16969+
libsodium-sumo: ^0.8.0
16970+
checksum: c6123e68f18902bbbd982ddc1b1c5b118626313104933e9de97ae8bf9cf300fee02d924758496fefe07567f3314bdd51aaddef61d40d9cdd3efac881e1db25f1
1697116971
languageName: node
1697216972
linkType: hard
1697316973

0 commit comments

Comments
 (0)