Module algoappdev.clients

Utilities to connect to and interact with algod and kmd clients.

Functions

def build_algod_local_client(data_dir: pathlib.Path) ‑> algosdk.v2client.algod.AlgodClient

Build the algod client to interface with the local daemon whose configuration is at data_dir.

Args

data_dir
the path with the network data

Returns

the client connected to the local algod daemon

def build_kmd_local_client(data_dir: pathlib.Path, version: str = '0.5') ‑> algosdk.kmd.KMDClient

Build the kmd client to interface with the local daemon whose configuration is at data_dir.

Args

data_dir
the path with the network data

Returns

the client connected to the local kmd daemon

def get_app_global_key(app_state: Dict[~KT, ~VT], key: bytes) ‑> Union[int, bytes]

Return the value for the given key in app_id's global data.

def get_app_local_key(account_state: Dict[~KT, ~VT], app_id: int, key: bytes) ‑> Union[int, bytes]

Return the value for the given key in app_id's local data for account address.