DAppConnectorAPI
@midnight-ntwrk/dapp-connector-api v3.0.0
@midnight-ntwrk/dapp-connector-api / DAppConnectorAPI
Interface: DAppConnectorAPI
DApp Connector API Definition
When errors occur in functions returning a promise, they should be thrown in the form of an APIError.
Properties​
apiVersion​
apiVersion:
string
Semver string. DApps are encouraged to check the compatibility whenever this changes.
enable()​
enable: () =>
Promise<DAppConnectorWalletAPI>
Request access to the wallet, returns the wallet api on approval
Returns​
Promise<DAppConnectorWalletAPI>
isEnabled()​
isEnabled: () =>
Promise<boolean>
Check if the wallet has authorized the dapp
Returns​
Promise<boolean>
name​
name:
string
The name of the wallet
serviceUriConfig()​
serviceUriConfig: () =>
Promise<ServiceUriConfig>
Request the services (indexer, node, and proof server) URIs.
Returns​
Promise<ServiceUriConfig>