Client class interacts with the frontend and manages states. Exposes methods to interact with the wallet.

Properties

Property Description Type
autoConnect Stores a boolean indicating if the app should connect to the wallet automatically boolean
connectors Stores the array of supported connectors BaseConnector[ ]
activeConnector The connector that is currently connected to BaseConnector or null

Methods

Methods Description Params Returns
getAddress Returns a single connected address from the connector NA string or null
getChainId Returns the chainId from the connector NA string or null
getDid Returns the DID of the address from the connector NA string or null
getIsConnected Returns whether the wallet is connected NA boolean
getChain Returns the chainId of the connected wallet NA string or null
getAutoConnect Returns whether the autoConnect is enabled NA boolean
getConnectors Returns the array of connectors that was passed in the client NA BaseConnectors[]
getActiveConnector Returns the connector that is used actively NA BaseConnector or null
getLastUsedConnector Returns the connector that was used the last time user logged in NA BaseConnector or null
setAddress Sets the address for the active account string or null void
setDid Sets the DID, associated with the connected account string or null void
setIsConnected Sets the connection state of the wallet boolean void
setChainId Sets the value of the connected chainId string or null void
setAutoConnect Sets the autoConnect value, used for autoConnecting boolean void
setConnectors Sets the array of connectors that the app was enabled with
setActiveConnector Sets the connector that is being used BaseConnector or null void
setLastUsedConnector Sets the connector that was used before the page closes BaseConnector or null void