Keypair
Keypair is the combination of a public key and private key, any authorized action requires this.
class Keypair(value: NaclPrivateKey | None = None)
The value is required to initialise the object with an existing nacl.Public.PrivateKey object. To initialize with a private key as a string or bytes, use from_private_key class method. Without the value a new keypair is generated.
Methods
Attributes
Methods
.sign
Signs a message which can be either a string or bytes.
def sign(message: str | bytes)
.from_private_key
Initializes the keypair object using a private key, which can be either a string or bytes.
def from_private_key(private_key: str | bytes)
Attributes
.public_key
Returns the keypair object's public key.
.private_key
Returns the keypair object's private key.
.key_pair
Returns the keypair value itself in bytes.