]> git.codecow.com Git - libnemo.git/commitdiff
Formatting.
authorChris Duncan <chris@zoso.dev>
Thu, 17 Jul 2025 12:55:55 +0000 (05:55 -0700)
committerChris Duncan <chris@zoso.dev>
Thu, 17 Jul 2025 12:55:55 +0000 (05:55 -0700)
src/lib/account.ts

index dfa63ba90f28421dadb8d67826961c080a5b7ca2..39c946f70f08efa3c01ed76b4b8a948f84e55bdc 100644 (file)
@@ -342,12 +342,20 @@ export class Account {
        }\r
 \r
        /**\r
-       * Unlocks the account using the same password as used prior to lock it.\r
+       * Retrieves and decryptes the private key of the Account. The same password\r
+       * used to lock it must be used to unlock it.\r
        *\r
-       * @param {(string|Uint8Array)} password Used previously to lock the account\r
-       * @returns True if successfully unlocked\r
+       * @param {(string|Uint8Array)} password Used previously to lock the Account\r
+       * @returns Private key bytes as a Uint8Array\r
        */\r
        async exportPrivateKey (password: string | Uint8Array<ArrayBuffer>): Promise<Uint8Array<ArrayBuffer>>\r
+       /**\r
+       * Retrieves and decryptes the private key of the Account. The same password\r
+       * used to lock it must be used to unlock it.\r
+       *\r
+       * @param {(string|Uint8Array)} password Used previously to lock the Account\r
+       * @returns Private key bytes as a hexadecimal string\r
+       */\r
        async exportPrivateKey (password: string | Uint8Array<ArrayBuffer>, format: 'hex'): Promise<string>\r
        async exportPrivateKey (password: string | Uint8Array<ArrayBuffer>, format?: 'hex'): Promise<string | Uint8Array<ArrayBuffer>> {\r
                if (typeof password === 'string') password = utf8.toBytes(password)\r
@@ -356,8 +364,8 @@ export class Account {
                }\r
                try {\r
                        const headers = {\r
-                               store: 'Account',\r
                                method: 'get',\r
+                               store: 'Account',\r
                                name: this.publicKey,\r
                                password: password.buffer\r
                        }\r