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

Function create_offer

plugins/offers_offer.c:237–254  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

235}
236
237static struct command_result *create_offer(struct command *cmd,
238 struct offer_info *offinfo)
239{
240 struct out_req *req;
241
242 /* We simply pass this through. */
243 req = jsonrpc_request_start(cmd, "createoffer",
244 check_result, forward_error,
245 offinfo);
246 json_add_string(req->js, "bolt12",
247 offer_encode(tmpctx, offinfo->offer));
248 if (offinfo->label)
249 json_add_string(req->js, "label", offinfo->label);
250 json_add_bool(req->js, "single_use", *offinfo->single_use);
251 json_add_bool(req->js, "force_paths", offinfo->fronting_nodes != NULL);
252
253 return send_outreq(req);
254}
255
256/* Create num_node_ids paths from these node_ids to us (one hop each) */
257static struct blinded_path **offer_onehop_paths(const tal_t *ctx,

Callers 2

found_best_peerFunction · 0.85
maybe_add_pathFunction · 0.85

Calls 4

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

Tested by

no test coverage detected