Skip to Content
dApps
Auf dieser Seite

getInfo

Knoteninformationen und unterstützte Methoden abrufen.

Methode

declare function getInfo(): Promise<GetInfoResponse>;

Antwort

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", ... }

Beispiel

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

Demo

Beispiel öffnen 

Zuletzt aktualisiert am