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;
},
// Not supported by all connectors (see webln.request for more info)
methods: string[];
}

Code Example

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

Demo