On this page
enable
To begin interaction, you first need to obtain the appropriate permissions. Calling provider.enable() requests access to the user’s Lightning account. Await approval before invoking another method. Later payments and signing requests may require separate approval.
Method
declare function enable(): Promise<void>;Example
const provider = (window.$onekey && window.$onekey.webln) || window.webln;
await provider.enable()Demo
Last updated on