aea.crypto.helpers
Module wrapping the helpers of public and private key cryptography.
try_
validate_
private_
key_
path
try_validate_private_key_path(ledger_id: str, private_key_path: str, exit_on_error: bool = True) -> None
Try validate a private key path.
Arguments:
ledger_id
: one of 'fetchai', 'ethereum'private_key_path
: the path to the private key.
Returns:
None :raises: ValueError if the identifier is invalid.
create_
private_
key
create_private_key(ledger_id: str, private_key_file: str) -> None
Create a private key for the specified ledger identifier.
Arguments:
ledger_id
: the ledger identifier.private_key_file
: the private key file.
Returns:
None :raises: ValueError if the identifier is invalid.
try_
generate_
testnet_
wealth
try_generate_testnet_wealth(identifier: str, address: str, url: Optional[str] = None, _sync: bool = True) -> None
Try generate wealth on a testnet.
Arguments:
identifier
: the identifier of the ledgeraddress
: the address to check forurl
: the url_sync
: whether to wait to sync or not; currently unused
Returns:
None
private_
key_
verify_
or_
create
private_key_verify_or_create(aea_conf: AgentConfig, aea_project_path: Path, create_keys: bool = True) -> None
Check key or create if none present.
Arguments:
aea_conf
: AgentConfigaea_project_path
: Path, where project placed.
Returns:
None
make_
certificate
make_certificate(ledger_id: str, crypto_private_key_path: str, message: bytes, output_path: str) -> str
Create certificate.