]> git.codecow.com Git - libnemo.git/commitdiff
Fix documentation.
authorChris Duncan <chris@zoso.dev>
Sat, 30 Aug 2025 09:04:17 +0000 (02:04 -0700)
committerChris Duncan <chris@zoso.dev>
Sat, 30 Aug 2025 09:04:17 +0000 (02:04 -0700)
src/lib/crypto/bip39.ts
src/lib/crypto/bip44.ts

index a41d77e44b599c956954d511b69b25511ddd3b64..130fe891d90fcca1e6c5da4a8e3e852b6a1bed0d 100644 (file)
@@ -32,7 +32,7 @@ export class Bip39 {
        * maximum entropy allowed.\r
        *\r
        * @param {(ArrayBuffer|Uint8Array<ArrayBuffer>)} entropy - Cryptographically secure random value\r
-       * @returns {string} Mnemonic phrase created using the BIP-39 wordlist\r
+       * @returns {Promise<Bip39>} Mnemonic phrase created using the BIP-39 wordlist\r
        */\r
        static fromEntropy (entropy: ArrayBuffer | Uint8Array<ArrayBuffer>): Promise<Bip39> {\r
                if (entropy instanceof ArrayBuffer) {\r
@@ -73,7 +73,7 @@ export class Bip39 {
        * wallets use the maximum of 24 words.\r
        *\r
        * @param {string} phrase - String of 12, 15, 18, 21, or 24 words\r
-       * @returns {string} Mnemonic phrase validated using the BIP-39 wordlist\r
+       * @returns {Promise<Bip39>} Mnemonic phrase validated using the BIP-39 wordlist\r
        */\r
        static fromPhrase (phrase: string): Promise<Bip39> {\r
                const self = new this()\r
@@ -92,7 +92,7 @@ export class Bip39 {
        * Validates a mnemonic phrase meets the BIP-39 specification.\r
        *\r
        * @param {string} mnemonic - Mnemonic phrase to validate\r
-       * @returns {boolean} True if the mnemonic phrase is valid\r
+       * @returns {Promise<boolean>} True if the mnemonic phrase is valid\r
        */\r
        static validate (mnemonic: string): Promise<boolean>\r
        static validate (mnemonic: unknown): Promise<boolean> {\r
index deb200c5793e373fe713bd8e4e292be1160e67f0..05958cd078529276458cc97c7e67b6d12bdb9a26 100644 (file)
@@ -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<ArrayBuffer>} Private child key for the account
        */
        static ckd (seed: ArrayBuffer, coin: number, account: number, change?: number, address?: number): Promise<ArrayBuffer> {