helium_py.crypto.keypair.Keypair

class helium_py.crypto.keypair.Keypair(keypair: SodiumKeyPair, net_type: Optional[int] = None)[source]

Bases: object

Keypair class with mnemonic, entropy, and signing capabilities.

__init__(keypair: SodiumKeyPair, net_type: Optional[int] = None)[source]

Initialize Keypair instance.

Methods

__init__(keypair[, net_type])

Initialize Keypair instance.

from_entropy(entropy[, net_type])

Return Keypair generated from entropy.

from_mnemonic(mnemonic[, net_type])

Return Keypair generated from a Mnemonic object.

from_words(words[, net_type])

Return Keypair generated from list of words (mnemonic).

make_random([net_type])

Return randomly generated Keypair.

sign(message)

Return signature for provided message utilizing private_key.

Attributes

address

Return Address instance for Keypair.

keypair

public_key

private_key

key_type

net_type

property address: Address

Return Address instance for Keypair.

classmethod from_entropy(entropy: bytes, net_type: Optional[int] = None) Keypair[source]

Return Keypair generated from entropy.

classmethod from_mnemonic(mnemonic: Mnemonic, net_type: Optional[int] = None) Keypair[source]

Return Keypair generated from a Mnemonic object.

classmethod from_words(words: List[str], net_type: Optional[int] = None) Keypair[source]

Return Keypair generated from list of words (mnemonic).

static make_random(net_type: Optional[int] = None) Keypair[source]

Return randomly generated Keypair.

sign(message: bytes) bytes[source]

Return signature for provided message utilizing private_key.