WIP (BlockchainLocal working)

Signed-off-by: James Zuccon <zuccon@gmail.com>
This commit is contained in:
James Zuccon
2024-09-12 21:33:11 +10:00
parent 52da32ad4d
commit e308206d9f
33 changed files with 1274 additions and 397 deletions
+14 -1
View File
@@ -44,6 +44,19 @@ export class PrivateKey {
this.bytes = bytes;
}
/**
* Create a Private Key Entity from the given bytes.
*
* @param privateKeyBytes {string} Raw Private Key bytes.
*
* @throws {Error} If Private Key could not be created.
*
* @returns {PrivateKey} The created Private Key Entity.
*/
public static fromBytes(privateKeyBytes: Uint8Array): PrivateKey {
return new PrivateKey(privateKeyBytes);
}
/**
* Create a Private Key Entity from the given bytes (as hexadecimal string).
*
@@ -232,7 +245,7 @@ export class PrivateKey {
*
* NOTE: Electron can verify this message successfully, but generates them differently internally.
*
* @param messageHash {Uint8Array} The hash of the message.
* @param message The message.
*
* @throws {Error} If message hash cannot be signed.
*