mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Merge pull request #1430 from cosmos/migrate-to-libsodium-wrappers-sumo
Migrate to libsodium-wrappers-sumo
This commit is contained in:
commit
cb1e68906c
52
.pnp.cjs
generated
52
.pnp.cjs
generated
@ -564,7 +564,11 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
],\
|
||||
[\
|
||||
"@types/libsodium-wrappers",\
|
||||
"npm:0.7.9"\
|
||||
"npm:0.7.10"\
|
||||
],\
|
||||
[\
|
||||
"@types/libsodium-wrappers-sumo",\
|
||||
"npm:0.7.5"\
|
||||
],\
|
||||
[\
|
||||
"@types/long",\
|
||||
@ -1851,12 +1855,12 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
"npm:0.4.1"\
|
||||
],\
|
||||
[\
|
||||
"libsodium",\
|
||||
"npm:0.7.9"\
|
||||
"libsodium-sumo",\
|
||||
"npm:0.7.11"\
|
||||
],\
|
||||
[\
|
||||
"libsodium-wrappers",\
|
||||
"npm:0.7.9"\
|
||||
"libsodium-wrappers-sumo",\
|
||||
"npm:0.7.11"\
|
||||
],\
|
||||
[\
|
||||
"load-json-file",\
|
||||
@ -3336,7 +3340,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/karma-firefox-launcher", "npm:2.1.0"],\
|
||||
["@types/karma-jasmine", "npm:4.0.2"],\
|
||||
["@types/karma-jasmine-html-reporter", "npm:1.5.1"],\
|
||||
["@types/libsodium-wrappers", "npm:0.7.9"],\
|
||||
["@types/libsodium-wrappers-sumo", "npm:0.7.5"],\
|
||||
["@types/node", "npm:18.15.11"],\
|
||||
["@typescript-eslint/eslint-plugin", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:5.54.0"],\
|
||||
["@typescript-eslint/parser", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:5.54.0"],\
|
||||
@ -3358,7 +3362,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["karma-firefox-launcher", "npm:2.1.0"],\
|
||||
["karma-jasmine", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:5.1.0"],\
|
||||
["karma-jasmine-html-reporter", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:1.6.0"],\
|
||||
["libsodium-wrappers", "npm:0.7.9"],\
|
||||
["libsodium-wrappers-sumo", "npm:0.7.11"],\
|
||||
["nyc", "npm:15.1.0"],\
|
||||
["prettier", "npm:2.8.1"],\
|
||||
["ses", "npm:0.11.1"],\
|
||||
@ -4725,10 +4729,20 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
}]\
|
||||
]],\
|
||||
["@types/libsodium-wrappers", [\
|
||||
["npm:0.7.9", {\
|
||||
"packageLocation": "./.yarn/cache/@types-libsodium-wrappers-npm-0.7.9-4b14af299f-5ddf61b804.zip/node_modules/@types/libsodium-wrappers/",\
|
||||
["npm:0.7.10", {\
|
||||
"packageLocation": "./.yarn/cache/@types-libsodium-wrappers-npm-0.7.10-1977488a6a-717054ebcb.zip/node_modules/@types/libsodium-wrappers/",\
|
||||
"packageDependencies": [\
|
||||
["@types/libsodium-wrappers", "npm:0.7.9"]\
|
||||
["@types/libsodium-wrappers", "npm:0.7.10"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["@types/libsodium-wrappers-sumo", [\
|
||||
["npm:0.7.5", {\
|
||||
"packageLocation": "./.yarn/cache/@types-libsodium-wrappers-sumo-npm-0.7.5-b503484acd-27846e49cd.zip/node_modules/@types/libsodium-wrappers-sumo/",\
|
||||
"packageDependencies": [\
|
||||
["@types/libsodium-wrappers-sumo", "npm:0.7.5"],\
|
||||
["@types/libsodium-wrappers", "npm:0.7.10"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
@ -9536,21 +9550,21 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["libsodium", [\
|
||||
["npm:0.7.9", {\
|
||||
"packageLocation": "./.yarn/cache/libsodium-npm-0.7.9-98a3b621b1-1c922c9972.zip/node_modules/libsodium/",\
|
||||
["libsodium-sumo", [\
|
||||
["npm:0.7.11", {\
|
||||
"packageLocation": "./.yarn/cache/libsodium-sumo-npm-0.7.11-aaac6bcc6c-9efac902a0.zip/node_modules/libsodium-sumo/",\
|
||||
"packageDependencies": [\
|
||||
["libsodium", "npm:0.7.9"]\
|
||||
["libsodium-sumo", "npm:0.7.11"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
]],\
|
||||
["libsodium-wrappers", [\
|
||||
["npm:0.7.9", {\
|
||||
"packageLocation": "./.yarn/cache/libsodium-wrappers-npm-0.7.9-be74b30f7d-b5b1b9e1b4.zip/node_modules/libsodium-wrappers/",\
|
||||
["libsodium-wrappers-sumo", [\
|
||||
["npm:0.7.11", {\
|
||||
"packageLocation": "./.yarn/cache/libsodium-wrappers-sumo-npm-0.7.11-08fe1b2cf4-26c7aaf8c4.zip/node_modules/libsodium-wrappers-sumo/",\
|
||||
"packageDependencies": [\
|
||||
["libsodium-wrappers", "npm:0.7.9"],\
|
||||
["libsodium", "npm:0.7.9"]\
|
||||
["libsodium-wrappers-sumo", "npm:0.7.11"],\
|
||||
["libsodium-sumo", "npm:0.7.11"]\
|
||||
],\
|
||||
"linkType": "HARD"\
|
||||
}]\
|
||||
|
BIN
.yarn/cache/@types-libsodium-wrappers-npm-0.7.10-1977488a6a-717054ebcb.zip
(Stored with Git LFS)
vendored
Normal file
BIN
.yarn/cache/@types-libsodium-wrappers-npm-0.7.10-1977488a6a-717054ebcb.zip
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/@types-libsodium-wrappers-npm-0.7.9-4b14af299f-5ddf61b804.zip
(Stored with Git LFS)
vendored
BIN
.yarn/cache/@types-libsodium-wrappers-npm-0.7.9-4b14af299f-5ddf61b804.zip
(Stored with Git LFS)
vendored
Binary file not shown.
BIN
.yarn/cache/@types-libsodium-wrappers-sumo-npm-0.7.5-b503484acd-27846e49cd.zip
(Stored with Git LFS)
vendored
Normal file
BIN
.yarn/cache/@types-libsodium-wrappers-sumo-npm-0.7.5-b503484acd-27846e49cd.zip
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/libsodium-npm-0.7.9-98a3b621b1-1c922c9972.zip
(Stored with Git LFS)
vendored
BIN
.yarn/cache/libsodium-npm-0.7.9-98a3b621b1-1c922c9972.zip
(Stored with Git LFS)
vendored
Binary file not shown.
BIN
.yarn/cache/libsodium-sumo-npm-0.7.11-aaac6bcc6c-9efac902a0.zip
(Stored with Git LFS)
vendored
Normal file
BIN
.yarn/cache/libsodium-sumo-npm-0.7.11-aaac6bcc6c-9efac902a0.zip
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
BIN
.yarn/cache/libsodium-wrappers-npm-0.7.9-be74b30f7d-b5b1b9e1b4.zip
(Stored with Git LFS)
vendored
BIN
.yarn/cache/libsodium-wrappers-npm-0.7.9-be74b30f7d-b5b1b9e1b4.zip
(Stored with Git LFS)
vendored
Binary file not shown.
BIN
.yarn/cache/libsodium-wrappers-sumo-npm-0.7.11-08fe1b2cf4-26c7aaf8c4.zip
(Stored with Git LFS)
vendored
Normal file
BIN
.yarn/cache/libsodium-wrappers-sumo-npm-0.7.11-08fe1b2cf4-26c7aaf8c4.zip
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
@ -6,6 +6,13 @@ and this project adheres to
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
|
||||
- @cosmjs/crypto: Migrate to `libsodium-wrappers-sumo` to be able to use the
|
||||
`crypto_pwhash` functions ([#1429]).
|
||||
|
||||
[#1429]: https://github.com/cosmos/cosmjs/issues/1429
|
||||
|
||||
### Added
|
||||
|
||||
- @cosmjs/cosmwasm-stargate: Add `SigningCosmWasmClient.instantiate2` ([#1407]).
|
||||
|
@ -47,7 +47,7 @@
|
||||
"@noble/hashes": "^1",
|
||||
"bn.js": "^5.2.0",
|
||||
"elliptic": "^6.5.4",
|
||||
"libsodium-wrappers": "^0.7.6"
|
||||
"libsodium-wrappers-sumo": "^0.7.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@istanbuljs/nyc-config-typescript": "^1.0.1",
|
||||
@ -58,7 +58,7 @@
|
||||
"@types/karma-firefox-launcher": "^2",
|
||||
"@types/karma-jasmine": "^4",
|
||||
"@types/karma-jasmine-html-reporter": "^1",
|
||||
"@types/libsodium-wrappers": "^0.7.7",
|
||||
"@types/libsodium-wrappers-sumo": "^0.7.5",
|
||||
"@types/node": "^18",
|
||||
"@typescript-eslint/eslint-plugin": "^5.54.0",
|
||||
"@typescript-eslint/parser": "^5.54.0",
|
||||
|
@ -4,7 +4,10 @@
|
||||
// libsodium.js API: https://gist.github.com/webmaster128/b2dbe6d54d36dd168c9fabf441b9b09c
|
||||
|
||||
import { isNonNullObject } from "@cosmjs/utils";
|
||||
import sodium from "libsodium-wrappers";
|
||||
// Using crypto_pwhash requires sumo. Once we migrate to a standalone
|
||||
// Argon2 implementation, we can use the normal libsodium-wrappers
|
||||
// again: https://github.com/cosmos/cosmjs/issues/1031
|
||||
import sodium from "libsodium-wrappers-sumo";
|
||||
|
||||
export interface Argon2idOptions {
|
||||
/** Output length in bytes */
|
||||
|
41
yarn.lock
41
yarn.lock
@ -456,7 +456,7 @@ __metadata:
|
||||
"@types/karma-firefox-launcher": ^2
|
||||
"@types/karma-jasmine": ^4
|
||||
"@types/karma-jasmine-html-reporter": ^1
|
||||
"@types/libsodium-wrappers": ^0.7.7
|
||||
"@types/libsodium-wrappers-sumo": ^0.7.5
|
||||
"@types/node": ^18
|
||||
"@typescript-eslint/eslint-plugin": ^5.54.0
|
||||
"@typescript-eslint/parser": ^5.54.0
|
||||
@ -478,7 +478,7 @@ __metadata:
|
||||
karma-firefox-launcher: ^2.1.0
|
||||
karma-jasmine: ^5
|
||||
karma-jasmine-html-reporter: ^1.5.4
|
||||
libsodium-wrappers: ^0.7.6
|
||||
libsodium-wrappers-sumo: ^0.7.11
|
||||
nyc: ^15.1.0
|
||||
prettier: ^2.8.1
|
||||
ses: ^0.11.0
|
||||
@ -1700,10 +1700,19 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/libsodium-wrappers@npm:^0.7.7":
|
||||
version: 0.7.9
|
||||
resolution: "@types/libsodium-wrappers@npm:0.7.9"
|
||||
checksum: 5ddf61b8047e38f00c1509369ad868a724235a67940971cc671b070ab9d6b2e6872407253be1163b174f742ecbb0986fda7b91aa0b7069437359b4671bfc529b
|
||||
"@types/libsodium-wrappers-sumo@npm:^0.7.5":
|
||||
version: 0.7.5
|
||||
resolution: "@types/libsodium-wrappers-sumo@npm:0.7.5"
|
||||
dependencies:
|
||||
"@types/libsodium-wrappers": "*"
|
||||
checksum: 27846e49cd54556c05011ff475cc6564ce8dde8f9a02a542740e3ebaab7de21ed2dfb4afdc182510d7058d3475f748bab0aa4a41178cd105b9f8618a00f8ef3f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/libsodium-wrappers@npm:*":
|
||||
version: 0.7.10
|
||||
resolution: "@types/libsodium-wrappers@npm:0.7.10"
|
||||
checksum: 717054ebcb5fa553e378144b8d564bed8b691905c0d4e90b95c64d77ba24ec9fe798cb2c58cd61dad545ceacb1f05ab69b5597217f9829f2da7a23f0688d11d0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@ -5083,19 +5092,19 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"libsodium-wrappers@npm:^0.7.6":
|
||||
version: 0.7.9
|
||||
resolution: "libsodium-wrappers@npm:0.7.9"
|
||||
dependencies:
|
||||
libsodium: ^0.7.0
|
||||
checksum: b5b1b9e1b4aa5662e07df244934125f9e3cd2ba7fe0ec45191a5ffc822d22f4d2f6e09e42d91c30c4f48ca0c7f810a176fdf5e32eed6722d7d82a2a719459f56
|
||||
"libsodium-sumo@npm:^0.7.11":
|
||||
version: 0.7.11
|
||||
resolution: "libsodium-sumo@npm:0.7.11"
|
||||
checksum: 9efac902a05002e1caca1c1df3a7cd838ac370588cfa31107d6e787cb5a181f4ca46c7961e3136943c8b07b1d543c0283b91e08a141f9b55a74f10808c3017ef
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"libsodium@npm:^0.7.0":
|
||||
version: 0.7.9
|
||||
resolution: "libsodium@npm:0.7.9"
|
||||
checksum: 1c922c9972cf97ddb7207ee4f810dd291e0610dd57ea0e47f2343968392546aaa629945a2fb39ae5f19d067f6ed0bb7330f32cc9a680a847a662e9a210ce7bfb
|
||||
"libsodium-wrappers-sumo@npm:^0.7.11":
|
||||
version: 0.7.11
|
||||
resolution: "libsodium-wrappers-sumo@npm:0.7.11"
|
||||
dependencies:
|
||||
libsodium-sumo: ^0.7.11
|
||||
checksum: 26c7aaf8c4b6da6b06ef17637e5541e16c796be9611b194d795501f021ac04abfeda09cadae66b3b515308993cd57361a571eefabdf9d9b3377b070a17535440
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user