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

Function create_offer

plugins/offers_offer.c:285–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285static struct command_result *create_offer(struct command *cmd,
286 struct offer_info *offinfo)
287{
288 struct out_req *req;
289
290 /* We simply pass this through. */
291 req = jsonrpc_request_start(cmd->plugin, cmd, "createoffer",
292 check_result, forward_error,
293 offinfo);
294 json_add_string(req->js, "bolt12",
295 offer_encode(tmpctx, offinfo->offer));
296 if (offinfo->label)
297 json_add_string(req->js, "label", offinfo->label);
298 json_add_bool(req->js, "single_use", *offinfo->single_use);
299
300 return send_outreq(cmd->plugin, req);
301}
302
303static struct command_result *currency_done(struct command *cmd,
304 const char *buf,

Callers 2

currency_doneFunction · 0.85
json_offerFunction · 0.85

Calls 4

offer_encodeFunction · 0.85
send_outreqFunction · 0.70
json_add_stringFunction · 0.50
json_add_boolFunction · 0.50

Tested by

no test coverage detected