Skip to main content

terra_sdk.key.raw

RawKey Objects


_1
class 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_key bytes - private key in bytes

private_key

Private key, in bytes.

from_hex


_2
@classmethod
_2
def from_hex(cls, private_key_hex: str) -> RawKey

Create a new RawKey from a hex-encoded private key string.

Arguments:

  • private_key_hex str - hex-encoded private key

sign


_1
def sign(payload: bytes) -> bytes

Signs the data payload using ECDSA and curve Secp256k1 with the private key as the signing key.

Arguments:

  • payload bytes - data to sign