lending_client

class algofipy.lending.v2.lending_client.LendingClient(algofi_client)

Bases: object

get_storage_account(user_account)
get_storage_accounts(verbose=False)

Fetches the list of user storage accounts on the lending protocol from the blockchain

Parameters:

verbose (bool, optional) – return account address with full account data (e.g. created apps / assets, local state, balances)

Returns:

list of storage account address strings

Return type:

list

get_user(user_address, storage_address=None)

Gets an algofi lending v2 user given an address.

Parameters:
  • user_address (str) – the address of the user we are interested in.

  • storage_address (str, optional) – a storage address of the user wallet

Returns:

an algofi lending v2 user.

Return type:

LendingUser

get_user_account(storage_account)
load_state(block=None)

Function to update the state of the lending client markets