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

Function do_fetchinvoice

plugins/xpay/xpay.c:2245–2263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2243}
2244
2245static struct command_result *
2246do_fetchinvoice(struct command *cmd, const char *offerstr, struct xpay_params *xparams)
2247{
2248 struct out_req *req;
2249
2250 req = jsonrpc_request_start(cmd, "fetchinvoice",
2251 invoice_fetched,
2252 forward_error,
2253 xparams);
2254 json_add_string(req->js, "offer", offerstr);
2255 if (xparams->msat)
2256 json_add_amount_msat(req->js, "amount_msat", *xparams->msat);
2257 if (xparams->bip353)
2258 json_add_string(req->js, "bip353", xparams->bip353);
2259 if (xparams->payer_note)
2260 json_add_string(req->js, "payer_note", xparams->payer_note);
2261
2262 return send_outreq(req);
2263}
2264
2265static struct command_result *
2266bip353_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