Protected
constructorPrivate
bytesPrivate
prefixPrivate
checkSigns the message with the private key.
The byte array to sign.
The signature byte array.
This function signs a byte-encoded message. The message is first hashed and then signed. Do not pass a digest to this function as it will be hashed twice.
Static
fromInitializes a new private key object from a byte array.
The private key in byte format.
A new private key instance.
Static
fromInitializes a new private key object from the environment variables.
The environment variable name containing the private key.
A new private key instance.
The PRIVATE_KEY
or the provided key is required in the environment variables.
Static
fromInitializes a new private key object from a serialized string.
The serialized private key string.
A new private key instance.
If the private key prefix is invalid.
Static
generateInitializes a random private key.
Optional
version: VersionThe version of the private key. If not defined, the last version will be used.
A new private key instance.
Static
Protected
initInitializes a new private key object from a version.
The version of the private key. If not defined, the last version will be used.
A new private key instance.
A class representing a private key.
Remarks
The private key is used to sign operations during interactions with the blockchain.