MCPcopy Create free account
hub / github.com/ElementsProject/lightning / do_fetchinvoice

Function do_fetchinvoice

plugins/xpay/xpay.c:2379–2397  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2377}
2378
2379static struct command_result *
2380do_fetchinvoice(struct command *cmd, const char *offerstr, struct xpay_params *xparams)
2381{
2382 struct out_req *req;
2383
2384 req = jsonrpc_request_start(cmd, "fetchinvoice",
2385 invoice_fetched,
2386 forward_error,
2387 xparams);
2388 json_add_string(req->js, "offer", offerstr);
2389 if (xparams->msat)
2390 json_add_amount_msat(req->js, "amount_msat", *xparams->msat);
2391 if (xparams->bip353)
2392 json_add_string(req->js, "bip353", xparams->bip353);
2393 if (xparams->payer_note)
2394 json_add_string(req->js, "payer_note", xparams->payer_note);
2395
2396 return send_outreq(req);
2397}
2398
2399static struct command_result *
2400bip353_fetched(struct command *cmd,

Callers 3

bip353_fetchedFunction · 0.85
json_xpay_paramsFunction · 0.85
json_sendamountFunction · 0.85

Calls 3

json_add_amount_msatFunction · 0.85
json_add_stringFunction · 0.50
send_outreqFunction · 0.50

Tested by

no test coverage detected