File tree 5 files changed +10
-10
lines changed
5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ export class Bip32PrivateKey {
71
71
* - 32 bytes: Ed25519 curve scalar from which few bits have been tweaked according to ED25519-BIP32
72
72
* - 32 bytes: Ed25519 binary blob used as IV for signing
73
73
*
74
- * NOTE: You must call `Crypto.ready()` at least once before calling this function.
74
+ * NOTE: You must await `Crypto.ready()` at least once before calling this function.
75
75
*
76
76
* @param entropy Random stream of bytes generated from a BIP39 seed phrase.
77
77
* @param password The second factor authentication password for the mnemonic phrase.
@@ -125,7 +125,7 @@ export class Bip32PrivateKey {
125
125
* This is why deriving the private key should not fail while deriving
126
126
* the public key may fail (if the derivation index is invalid).
127
127
*
128
- * NOTE: You must call `Crypto.ready()` at least once before calling this function.
128
+ * NOTE: You must await `Crypto.ready()` at least once before calling this function.
129
129
*
130
130
* @param derivationIndices The derivation indices.
131
131
* @returns The child BIP-32 key.
@@ -148,7 +148,7 @@ export class Bip32PrivateKey {
148
148
/**
149
149
* Computes the BIP-32 public key from this BIP-32 private key.
150
150
*
151
- * NOTE: You must call `Crypto.ready()` at least once before calling this function.
151
+ * NOTE: You must await `Crypto.ready()` at least once before calling this function.
152
152
*
153
153
* @returns the public key.
154
154
*/
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ export class Bip32PublicKey {
53
53
/**
54
54
* Given a set of indices, this function computes the corresponding child extended key.
55
55
*
56
- * NOTE: You must call `Crypto.ready()` at least once before calling this function.
56
+ * NOTE: You must await `Crypto.ready()` at least once before calling this function.
57
57
*
58
58
* @param derivationIndices The list of derivation indices.
59
59
* @returns The child extended private key.
@@ -78,7 +78,7 @@ export class Bip32PublicKey {
78
78
return Bip32PublicKeyHex ( Buffer . from ( this . #key) . toString ( 'hex' ) ) ;
79
79
}
80
80
81
- /** Gets the blake2 hash of the key. NOTE: You must call `Crypto.ready()` at least once before calling this function. */
81
+ /** Gets the blake2 hash of the key. NOTE: You must await `Crypto.ready()` at least once before calling this function. */
82
82
hash ( ) : Bip32PublicKeyHashHex {
83
83
const hash = sodium . crypto_generichash ( BIP32_PUBLIC_KEY_HASH_LENGTH , this . #key) ;
84
84
return Bip32PublicKeyHashHex ( Buffer . from ( hash ) . toString ( 'hex' ) ) ;
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ export class Ed25519PrivateKey {
78
78
/**
79
79
* Computes the raw public key from this raw private key.
80
80
*
81
- * NOTE: You must call `Crypto.ready()` at least once before calling this function.
81
+ * NOTE: You must await `Crypto.ready()` at least once before calling this function.
82
82
*
83
83
* @returns the public key.
84
84
*/
@@ -93,7 +93,7 @@ export class Ed25519PrivateKey {
93
93
/**
94
94
* Generates an Ed25519 signature.
95
95
*
96
- * NOTE: You must call `Crypto.ready()` at least once before calling this function.
96
+ * NOTE: You must await `Crypto.ready()` at least once before calling this function.
97
97
*
98
98
* @param message The message to be signed.
99
99
* @returns The Ed25519 digital signature.
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export class Ed25519PublicKey {
26
26
* Verifies that the passed-in signature was generated with a private key that matches
27
27
* the given public key.
28
28
*
29
- * NOTE: You must call `Crypto.ready()` at least once before calling this function.
29
+ * NOTE: You must await `Crypto.ready()` at least once before calling this function.
30
30
*
31
31
* @param signature The signature bytes to be verified.
32
32
* @param message The original message the signature was computed from.
@@ -59,7 +59,7 @@ export class Ed25519PublicKey {
59
59
return Ed25519PublicKey . fromBytes ( Buffer . from ( keyMaterial , 'hex' ) ) ;
60
60
}
61
61
62
- /** Gets the blake2 hash of the key material. NOTE: You must call `Crypto.ready()` at least once before calling this function. */
62
+ /** Gets the blake2 hash of the key material. NOTE: You must await `Crypto.ready()` at least once before calling this function. */
63
63
hash ( ) : Ed25519KeyHash {
64
64
const hash = sodium . crypto_generichash ( ED25519_PUBLIC_KEY_HASH_LENGTH , this . #keyMaterial) ;
65
65
return Ed25519KeyHash . fromBytes ( hash ) ;
Original file line number Diff line number Diff line change @@ -9,5 +9,5 @@ export * from './strategies';
9
9
export * from './hexTypes' ;
10
10
export * from './types' ;
11
11
12
- /** This function must be called before any other function in this module. it is safe to call this function multiple times. */
12
+ /** This function must be awaited before calling any other function in this module. It is safe to await this function multiple times. */
13
13
export const ready = async ( ) : Promise < void > => await sodium . ready ;
You can’t perform that action at this time.
0 commit comments