aea.crypto.helpers

Module wrapping the helpers of public and private key cryptography.

verify_or_create_private_keys

verify_or_create_private_keys(aea_project_path: Path, exit_on_error: bool = True) -> AgentConfig

Verify or create private keys.

Arguments:

  • aea_project_path: path to an AEA project.
  • exit_on_error: whether we should exit the program on error.

Returns:

the agent configuration.

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, _sync: bool = True) -> None

Try generate wealth on a testnet.

Arguments:

  • identifier: the identifier of the ledger
  • address: the address to check for
  • _sync: whether to wait to sync or not; currently unused

Returns:

None