From: Chris Duncan Date: Sat, 9 Aug 2025 06:29:02 +0000 (-0700) Subject: Fix old BIP-39 nomenclature. X-Git-Tag: v0.10.5~41^2~158 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=14c56cadd202186fb99f9bcca7b52b8fade1833c;p=libnemo.git Fix old BIP-39 nomenclature. --- diff --git a/src/lib/crypto/bip39.ts b/src/lib/crypto/bip39.ts index 3ae1261..f30120b 100644 --- a/src/lib/crypto/bip39.ts +++ b/src/lib/crypto/bip39.ts @@ -153,7 +153,7 @@ export class Bip39 { private constructor () { if (!Bip39.#isInternal) { - throw new Error(`Bip39Mnemonic must be created with async methods 'fromPhrase()' or 'fromEntropy().`) + throw new Error(`Bip39 must be created with async methods 'fromPhrase()' or 'fromEntropy().`) } Bip39.#isInternal = false } diff --git a/src/types.d.ts b/src/types.d.ts index 1d74a67..c71f9c2 100644 --- a/src/types.d.ts +++ b/src/types.d.ts @@ -123,7 +123,7 @@ export declare class AccountList extends Object { /** * Represents a mnemonic phrase that identifies a wallet as defined by BIP-39. */ -export declare class Bip39Mnemonic { +export declare class Bip39 { #private /** * Derives a mnemonic phrase from source of entropy or seed. @@ -135,7 +135,7 @@ export declare class Bip39Mnemonic { * @param {(string|ArrayBuffer|Uint8Array)} entropy - Cryptographically secure random value * @returns {string} Mnemonic phrase created using the BIP-39 wordlist */ - static fromEntropy (entropy: string | ArrayBuffer | Uint8Array): Promise + static fromEntropy (entropy: string | ArrayBuffer | Uint8Array): Promise /** * Imports and validates an existing mnemonic phrase. * @@ -145,7 +145,7 @@ export declare class Bip39Mnemonic { * @param {string} phrase - String of 12, 15, 18, 21, or 24 words * @returns {string} Mnemonic phrase validated using the BIP-39 wordlist */ - static fromPhrase (phrase: string): Promise + static fromPhrase (phrase: string): Promise /** * Validates a mnemonic phrase meets the BIP-39 specification. *