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

Function payer_key

plugins/fetchinvoice.c:837–850  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

835}
836
837static bool payer_key(const struct offers_data *od,
838 const u8 *public_tweak, size_t public_tweak_len,
839 struct pubkey *key)
840{
841 struct sha256 tweakhash;
842
843 bolt12_alias_tweak(&od->nodealias_base, public_tweak, public_tweak_len,
844 &tweakhash);
845
846 *key = od->id;
847 return secp256k1_ec_pubkey_tweak_add(secp256k1_ctx,
848 &key->pubkey,
849 tweakhash.u.u8) == 1;
850}
851
852/* BOLT #12:
853 * - MUST set `invreq_metadata` to an unpredictable series of bytes.

Callers 2

json_fetchinvoiceFunction · 0.70

Calls 1

bolt12_alias_tweakFunction · 0.85

Tested by

no test coverage detected