webln.getInfo()
Get information about the connected node: node alias, public key and color

Method

async function getInfo(): GetInfoResponse;

Response

interface GetInfoResponse = {
node: {
alias: string;
pubkey: string;
color?: string;
};
}

Code Example

await webln.enable();
const info = await webln.getInfo();

Demo

Copy link
Edit on GitHub
On this page