Accounts API

pab.accounts.create_keyfile(path: Path, private_key: str, password: str) None

Creates a keyfile using Web3.eth.account.encrypt.

pab.accounts._load_keyfile(keyfile: Path) Optional[LocalAccount]
pab.accounts._get_ix_from_name(name) Optional[int]

Returns the index from PAB_PK<INDEX>.

pab.accounts._load_from_env() Dict[int, LocalAccount]

Private keys are loaded from the environment variables that follow the naming convention PAB_PK<ix>. ix will be the index in the accounts list.

pab.accounts.load_accounts(keyfiles: list[pathlib.Path]) Dict[int, LocalAccount]

Load accounts from environment variables and keyfiles

exception pab.accounts.AccountsError
exception pab.accounts.KeyfileOverrideException