From: Chris Duncan Date: Thu, 17 Jul 2025 12:55:55 +0000 (-0700) Subject: Formatting. X-Git-Tag: v0.10.5~56^2~23 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=80e964091ea23a7ba48af512d0f38a2ee49ada61;p=libnemo.git Formatting. --- diff --git a/src/lib/account.ts b/src/lib/account.ts index dfa63ba..39c946f 100644 --- a/src/lib/account.ts +++ b/src/lib/account.ts @@ -342,12 +342,20 @@ export class Account { } /** - * Unlocks the account using the same password as used prior to lock it. + * Retrieves and decryptes the private key of the Account. The same password + * used to lock it must be used to unlock it. * - * @param {(string|Uint8Array)} password Used previously to lock the account - * @returns True if successfully unlocked + * @param {(string|Uint8Array)} password Used previously to lock the Account + * @returns Private key bytes as a Uint8Array */ async exportPrivateKey (password: string | Uint8Array): Promise> + /** + * Retrieves and decryptes the private key of the Account. The same password + * used to lock it must be used to unlock it. + * + * @param {(string|Uint8Array)} password Used previously to lock the Account + * @returns Private key bytes as a hexadecimal string + */ async exportPrivateKey (password: string | Uint8Array, format: 'hex'): Promise async exportPrivateKey (password: string | Uint8Array, format?: 'hex'): Promise> { if (typeof password === 'string') password = utf8.toBytes(password) @@ -356,8 +364,8 @@ export class Account { } try { const headers = { - store: 'Account', method: 'get', + store: 'Account', name: this.publicKey, password: password.buffer }