]> git.codecow.com Git - libnemo.git/commitdiff
Combine redundant overloads.
authorChris Duncan <chris@zoso.dev>
Fri, 1 May 2026 06:02:01 +0000 (23:02 -0700)
committerChris Duncan <chris@zoso.dev>
Fri, 1 May 2026 06:02:01 +0000 (23:02 -0700)
src/lib/block.ts

index 83194a495ee34b7c530e6fa61ba8677b05a2fe35..653d6a9ba097f405e3c5fc849418473826773d81 100644 (file)
@@ -369,21 +369,12 @@ export class Block {
        }
 
        /**
-        * Sign the block with a 32-byte private key by deriving the matching public
-        * key, concatenating to create the full 64-byte secret key, and signing.
+        * Sign the block with either a full 64-byte secret key or 32-byte private key
+        * which is used to rebuild the secret key.
         *
         * Saves the result to the `signature` property of the block.
         *
-        * @param {string} [key] - 32-byte hexadecimal private key to use for signing
-        * @returns {Block} this with `signature` value set
-        */
-       sign (key: string): Block
-       /**
-        * Sign the block using a 64-byte secret key.
-        *
-        * Saves the result to the `signature` property of the block.
-        *
-        * @param {string} [key] - 64-byte hexadecimal secret key to use for signing
+        * @param {string} [key] - 64- or 32-byte hexadecimal key to use for signing
         * @returns {Block} this with `signature` value set
         */
        sign (key: string): Block