aea.crypto.wallet
Module wrapping all the public and private keys cryptography.
CryptoStore Objects
Utility class to store and retrieve crypto objects.
__
init__
| __init__(crypto_id_to_path: Optional[Dict[str, Optional[str]]] = None, password: Optional[str] = None) -> None
Initialize the crypto store.
Arguments:
crypto_id_to_path
: dictionary from crypto id to an (optional) path to the private key.password
: the password to encrypt/decrypt the private key.
public_
keys
Get the public_key dictionary.
crypto_
objects
Get the crypto objects (key pair).
addresses
Get the crypto addresses.
private_
keys
Get the crypto addresses.
Wallet Objects
Container for crypto objects.
The cryptos are separated into two categories:
- main cryptos: used by the AEA for the economic side (i.e. signing transaction)
- connection cryptos: exposed to the connection objects for encrypted communication.
__
init__
| __init__(private_key_paths: Dict[str, Optional[str]], connection_private_key_paths: Optional[Dict[str, Optional[str]]] = None, password: Optional[str] = None)
Instantiate a wallet object.
Arguments:
private_key_paths
: the private key pathsconnection_private_key_paths
: the private key paths for the connections.password
: the password to encrypt/decrypt the private key.
public_
keys
Get the public_key dictionary.
crypto_
objects
Get the crypto objects (key pair).
addresses
Get the crypto addresses.
private_
keys
Get the crypto addresses.
main_
cryptos
Get the main crypto store.
connection_
cryptos
Get the connection crypto store.
sign_
message
Sign a message.
Arguments:
crypto_id
: the id of the cryptomessage
: the message to be signedis_deprecated_mode
: what signing mode to use
Returns:
the signature of the message
sign_
transaction
Sign a tx.
Arguments:
crypto_id
: the id of the cryptotransaction
: the transaction to be signed
Returns:
the signed tx