mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-18 22:54:25 +01:00
createinvoice: make a minimal blinded "path" in bolt12 invoice if none presented.
The "path" is just a message to ourselves. This meets the minimal requirement for bolt12 invoices: that there be a blinded path (at least so we can use the path_id inside in place of "payment_secret"). We expose the method to make this path_id to a common routine: offers will need this for generating more sophisticated paths. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
a5471a405b
commit
595fbd2a19
@@ -182,6 +182,15 @@ char *encode_scriptpubkey_to_addr(const tal_t *ctx UNNEEDED,
|
||||
const struct chainparams *chainparams UNNEEDED,
|
||||
const u8 *scriptPubkey UNNEEDED)
|
||||
{ fprintf(stderr, "encode_scriptpubkey_to_addr called!\n"); abort(); }
|
||||
/* Generated stub for encrypt_tlv_encrypted_data */
|
||||
u8 *encrypt_tlv_encrypted_data(const tal_t *ctx UNNEEDED,
|
||||
const struct privkey *blinding UNNEEDED,
|
||||
const struct pubkey *node UNNEEDED,
|
||||
const struct tlv_encrypted_data_tlv *tlv UNNEEDED,
|
||||
struct privkey *next_blinding UNNEEDED,
|
||||
struct pubkey *node_alias)
|
||||
|
||||
{ fprintf(stderr, "encrypt_tlv_encrypted_data called!\n"); abort(); }
|
||||
/* Generated stub for failmsg_incorrect_or_unknown_ */
|
||||
const u8 *failmsg_incorrect_or_unknown_(const tal_t *ctx UNNEEDED,
|
||||
struct lightningd *ld UNNEEDED,
|
||||
@@ -306,6 +315,11 @@ struct tlv_invoice *invoice_decode_nosig(const tal_t *ctx UNNEEDED,
|
||||
/* Generated stub for invoice_encode */
|
||||
char *invoice_encode(const tal_t *ctx UNNEEDED, const struct tlv_invoice *bolt12_tlv UNNEEDED)
|
||||
{ fprintf(stderr, "invoice_encode called!\n"); abort(); }
|
||||
/* Generated stub for invoice_path_id */
|
||||
u8 *invoice_path_id(const tal_t *ctx UNNEEDED,
|
||||
const struct secret *base_secret UNNEEDED,
|
||||
const struct sha256 *payment_hash UNNEEDED)
|
||||
{ fprintf(stderr, "invoice_path_id called!\n"); abort(); }
|
||||
/* Generated stub for json_add_address */
|
||||
void json_add_address(struct json_stream *response UNNEEDED, const char *fieldname UNNEEDED,
|
||||
const struct wireaddr *addr UNNEEDED)
|
||||
@@ -687,6 +701,9 @@ bool plugin_hook_call_(struct lightningd *ld UNNEEDED,
|
||||
void plugin_request_send(struct plugin *plugin UNNEEDED,
|
||||
struct jsonrpc_request *req TAKES UNNEEDED)
|
||||
{ fprintf(stderr, "plugin_request_send called!\n"); abort(); }
|
||||
/* Generated stub for pubkey_from_node_id */
|
||||
bool pubkey_from_node_id(struct pubkey *key UNNEEDED, const struct node_id *id UNNEEDED)
|
||||
{ fprintf(stderr, "pubkey_from_node_id called!\n"); abort(); }
|
||||
/* Generated stub for report_subd_memleak */
|
||||
void report_subd_memleak(struct leak_detect *leak_detect UNNEEDED, struct subd *leaker UNNEEDED)
|
||||
{ fprintf(stderr, "report_subd_memleak called!\n"); abort(); }
|
||||
|
||||
Reference in New Issue
Block a user