From: Chris Duncan Date: Sat, 30 Aug 2025 09:04:17 +0000 (-0700) Subject: Fix documentation. X-Git-Tag: v0.10.5~38^2~1 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=dca21de448b2ae4953a09ceffb5392e27c73ecb3;p=libnemo.git Fix documentation. --- diff --git a/src/lib/crypto/bip39.ts b/src/lib/crypto/bip39.ts index a41d77e..130fe89 100644 --- a/src/lib/crypto/bip39.ts +++ b/src/lib/crypto/bip39.ts @@ -32,7 +32,7 @@ export class Bip39 { * maximum entropy allowed. * * @param {(ArrayBuffer|Uint8Array)} entropy - Cryptographically secure random value - * @returns {string} Mnemonic phrase created using the BIP-39 wordlist + * @returns {Promise} Mnemonic phrase created using the BIP-39 wordlist */ static fromEntropy (entropy: ArrayBuffer | Uint8Array): Promise { if (entropy instanceof ArrayBuffer) { @@ -73,7 +73,7 @@ export class Bip39 { * wallets use the maximum of 24 words. * * @param {string} phrase - String of 12, 15, 18, 21, or 24 words - * @returns {string} Mnemonic phrase validated using the BIP-39 wordlist + * @returns {Promise} Mnemonic phrase validated using the BIP-39 wordlist */ static fromPhrase (phrase: string): Promise { const self = new this() @@ -92,7 +92,7 @@ export class Bip39 { * Validates a mnemonic phrase meets the BIP-39 specification. * * @param {string} mnemonic - Mnemonic phrase to validate - * @returns {boolean} True if the mnemonic phrase is valid + * @returns {Promise} True if the mnemonic phrase is valid */ static validate (mnemonic: string): Promise static validate (mnemonic: unknown): Promise { diff --git a/src/lib/crypto/bip44.ts b/src/lib/crypto/bip44.ts index deb200c..05958cd 100644 --- a/src/lib/crypto/bip44.ts +++ b/src/lib/crypto/bip44.ts @@ -17,6 +17,8 @@ export class Bip44 { * @param {ArrayBuffer} seed - Hexadecimal seed derived from mnemonic phrase * @param {number} coin - Number registered to a specific coin in SLIP-044 * @param {number} account - Account number between 0 and 2^31-1 + * @param {number} [change] - Used for change transactions, 0 for external and 1 for internal + * @param {number} [address] - Sequentially increasing index of addresses to use for each account * @returns {Promise} Private child key for the account */ static ckd (seed: ArrayBuffer, coin: number, account: number, change?: number, address?: number): Promise {