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

Function create_offer

plugins/offers_offer.c:242–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242static struct command_result *create_offer(struct command *cmd,
243 struct offer_info *offinfo)
244{
245 struct out_req *req;
246
247 /* We simply pass this through. */
248 req = jsonrpc_request_start(cmd, "createoffer",
249 check_result, forward_error,
250 offinfo);
251 json_add_string(req->js, "bolt12",
252 offer_encode(tmpctx, offinfo->offer));
253 if (offinfo->label)
254 json_add_string(req->js, "label", offinfo->label);
255 json_add_bool(req->js, "single_use", *offinfo->single_use);
256 json_add_bool(req->js, "force_paths", offinfo->fronting_nodes != NULL);
257
258 return send_outreq(req);
259}
260
261/* Create num_node_ids paths from these node_ids to us (one hop each) */
262static 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