File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ and this project adheres to
1717 wallet serialization/deserialization which is not needed anymore after
1818 [ #1938 ] .
1919- Bring back main/types fields for bundlephobia support
20+ - @cosmjs/crypto : Deprecate ` Argon2id ` /` Argon2idOptions ` /` isArgon2idOptions `
21+ because it will likely be removed when wallet serialization/deserialization is
22+ removed.
2023
2124[ #1935 ] : https://github.com/cosmos/cosmjs/pull/1935
2225[ #1938 ] : https://github.com/cosmos/cosmjs/issues/1938
Original file line number Diff line number Diff line change 11import { isNonNullObject } from "@cosmjs/utils" ;
22import { argon2id , ArgonOpts } from "@noble/hashes/argon2.js" ;
33
4+ /**
5+ * @deprecated This is just a thin wrapper around argon2id from @noble/hashes and will likely be removed.
6+ * @see https://github.com/cosmos/cosmjs/issues/1796
7+ */
48export interface Argon2idOptions {
59 /** Output length in bytes */
610 readonly outputLength : number ;
@@ -20,6 +24,10 @@ export interface Argon2idOptions {
2024 readonly memLimitKib : number ;
2125}
2226
27+ /**
28+ * @deprecated This is just a thin wrapper around argon2id from @noble/hashes and will likely be removed.
29+ * @see https://github.com/cosmos/cosmjs/issues/1796
30+ */
2331export function isArgon2idOptions ( thing : unknown ) : thing is Argon2idOptions {
2432 if ( ! isNonNullObject ( thing ) ) return false ;
2533 if ( typeof ( thing as Argon2idOptions ) . outputLength !== "number" ) return false ;
@@ -28,6 +36,10 @@ export function isArgon2idOptions(thing: unknown): thing is Argon2idOptions {
2836 return true ;
2937}
3038
39+ /**
40+ * @deprecated This is just a thin wrapper around argon2id from @noble/hashes and will likely be removed.
41+ * @see https://github.com/cosmos/cosmjs/issues/1796
42+ */
3143export class Argon2id {
3244 // This is async for historic reasons. If we switch to a Wasm implementation or get argon2 in WebCrypto,
3345 // this is needed again.
You can’t perform that action at this time.
0 commit comments