このページの内容
sendPayment
インボイスへの支払いをユーザーに要求します。アプリケーションは BOLT-11 インボイスを提供する必要があります
メソッド
declare function sendPayment(paymentRequest: string): Promise<SendPaymentResponse>;paymentRequest: ユーザーに支払ってもらうインボイス (lnbc…)
レスポンス
interface SendPaymentResponse {
preimage: string;
}例
const provider = (window.$onekey && window.$onekey.webln) || window.webln;
const invoice = "<BOLT11_INVOICE>"; // Replace with a complete invoice.
await provider.enable();
const info = await provider.sendPayment(invoice);デモ
最終更新日