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

Function invoice_encode

common/bolt12.c:386–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384}
385
386char *invoice_encode(const tal_t *ctx, const struct tlv_invoice *invoice_tlv)
387{
388 u8 *wire;
389
390 wire = tal_arr(tmpctx, u8, 0);
391 towire_tlv_invoice(&wire, invoice_tlv);
392
393 return to_bech32_charset(ctx, "lni", wire);
394}
395
396struct tlv_invoice *invoice_decode_minimal(const tal_t *ctx,
397 const char *b12, size_t b12len,

Callers 10

json_createinvoiceFunction · 0.85
mainFunction · 0.85
generate_valid_vectorFunction · 0.85
mainFunction · 0.85
create_invoicereqFunction · 0.85
handle_invreq_responseFunction · 0.85
timeout_sent_invFunction · 0.85
sign_invoiceFunction · 0.85
fail_inv_levelFunction · 0.85
listinvreqs_doneFunction · 0.85

Calls 2

to_bech32_charsetFunction · 0.70
towire_tlv_invoiceFunction · 0.50

Tested by 3

mainFunction · 0.68
generate_valid_vectorFunction · 0.68
mainFunction · 0.68