From 80e964091ea23a7ba48af512d0f38a2ee49ada61 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Thu, 17 Jul 2025 05:55:55 -0700 Subject: [PATCH] Formatting. --- src/lib/account.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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 } -- 2.47.3