| 876 | } |
| 877 | |
| 878 | static bool payer_key(const struct offers_data *od, |
| 879 | const u8 *public_tweak, size_t public_tweak_len, |
| 880 | struct pubkey *key) |
| 881 | { |
| 882 | struct sha256 tweakhash; |
| 883 | |
| 884 | bolt12_alias_tweak(&od->nodealias_base, public_tweak, public_tweak_len, |
| 885 | &tweakhash); |
| 886 | |
| 887 | *key = od->id; |
| 888 | return secp256k1_ec_pubkey_tweak_add(secp256k1_ctx, |
| 889 | &key->pubkey, |
| 890 | tweakhash.u.u8) == 1; |
| 891 | } |
| 892 | |
| 893 | /* BOLT #12: |
| 894 | * - MUST set `invreq_metadata` to an unpredictable series of bytes. |
no test coverage detected