enable

To begin interaction, you first need to obtain the appropriate permissions. Calling webn.enable() will prompt the user to allow the use of the browser's web access feature. After this, you are free to call any other API methods.

Method

async function enable(): void

Example

const provider = (window.$onekey && window.$onekey.webln) || window.webln;

async provider.enable()

Demo

Last updated