WIP (BlockchainLocal working)
Signed-off-by: James Zuccon <zuccon@gmail.com>
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user