terra_sdk.key.raw
RawKey Objects
_1class RawKey(Key)
RawKey directly uses a raw (plaintext) private key in memory, and provides the implementation for signing with ECDSA on curve Secp256k1.
Arguments:
private_keybytes - private key in bytes
private_key
Private key, in bytes.
from_hex
_2@classmethod_2def from_hex(cls, private_key_hex: str) -> RawKey
Create a new RawKey from a hex-encoded private key string.
Arguments:
private_key_hexstr - hex-encoded private key
sign
_1def sign(payload: bytes) -> bytes
Signs the data payload using ECDSA and curve Secp256k1 with the private key as the signing key.
Arguments:
payloadbytes - data to sign