algod client
id of the manager application
Return manager address
manager address
Return manager app id
manager app id
Returns rewards program
rewards program
Reeturns the storage addres for the client user
address to get info for
storage account address for user
Returns the market local state for storage address
storage address to get info for
market local state for storage address
Returns projected unrealized rewards for storage address
storage address to get unrealized rewards for
list of markets
two element list of primary and secondary unrealized rewards
Returns the market local state for the provided address
address to get info for
market local state for address
Returns projected unrealized rewards for a user address
address to get unrealized rewards for
list of markets
two element list of primary and secondary unrealized rewards
Method to fetch most recent manager global state
This is the function that should be called when creating a new manager. You pass everything you would to the constructor, but to this function instead and this returns the new and created manager.
//Correct way to instantiate new manager
const newManager = await Manager.init(algodClient, managerAppId)
//Incorrect way to instantiate new manager
const newManager = new Manager(algodClient, managerAppId)
algod client
id of the manager application
an instance of the manager class fully constructed
Generated using TypeDoc
This is the constructor for the Manager class.
Note, do not call this to create a new manager. Instead call the static method init as there are asynchronous set up steps in creating an manager and a constructor can only return an instance of the class and not a promise.
Example