Skip to Content
dApps
On this page

getInfo

Obtain node information and which methods are supported.

Method

declare function getInfo(): Promise<GetInfoResponse>;

Response

interface GetInfoResponse { node: { alias: string; pubkey: string; color?: string; }; // "request.*" methods are not supported by all connectors // (see webln.request for more info) methods: string[]; // e.g. "makeInvoice", "sendPayment", "request.openchannel", ... }

Example

const provider = (window.$onekey && window.$onekey.webln) || window.webln; await provider.enable(); const info = await provider.getInfo();

Demo

Open example 

Last updated on