helium_py.crypto.keypair.Keypair¶
- class helium_py.crypto.keypair.Keypair(keypair: SodiumKeyPair, net_type: Optional[int] = None)[source]¶
Bases:
objectKeypair 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
Return Address instance for Keypair.
keypairpublic_keyprivate_keykey_typenet_type- 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).