| 835 | } |
| 836 | |
| 837 | static 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. |
no test coverage detected