| 330 | bool m_xonly; |
| 331 | |
| 332 | std::optional<CKey> GetPrivKey(const SigningProvider& arg) const |
| 333 | { |
| 334 | CKey key; |
| 335 | if (!(m_xonly ? arg.GetKeyByXOnly(XOnlyPubKey(m_pubkey), key) : |
| 336 | arg.GetKey(m_pubkey.GetID(), key))) return std::nullopt; |
| 337 | return key; |
| 338 | } |
| 339 | |
| 340 | public: |
| 341 | ConstPubkeyProvider(uint32_t exp_index, const CPubKey& pubkey, bool xonly) : PubkeyProvider(exp_index), m_pubkey(pubkey), m_xonly(xonly) {} |
no test coverage detected