Skip to main content

@midnight-ntwrk/dapp-connector-api v1.2.2Readme | API


@midnight-ntwrk/dapp-connector-api v1.2.2 / 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 (pub-sub, node, and proof server) URIs.

Returns

Promise<ServiceUriConfig>