A signature creator for transactions. */
| 51 | |
| 52 | /** A signature creator for transactions. */ |
| 53 | class MutableTransactionSignatureCreator : public BaseSignatureCreator |
| 54 | { |
| 55 | const CMutableTransaction& m_txto; |
| 56 | unsigned int nIn; |
| 57 | SignOptions m_options; |
| 58 | CAmount amount; |
| 59 | const MutableTransactionSignatureChecker checker; |
| 60 | const PrecomputedTransactionData* m_txdata; |
| 61 | |
| 62 | std::optional<uint256> ComputeSchnorrSignatureHash(const uint256* leaf_hash, SigVersion sigversion) const; |
| 63 | |
| 64 | public: |
| 65 | MutableTransactionSignatureCreator(const CMutableTransaction& tx LIFETIMEBOUND, unsigned int input_idx, const CAmount& amount, const SignOptions& options); |
| 66 | MutableTransactionSignatureCreator(const CMutableTransaction& tx LIFETIMEBOUND, unsigned int input_idx, const CAmount& amount, const PrecomputedTransactionData* txdata, const SignOptions& options); |
| 67 | const BaseSignatureChecker& Checker() const override { return checker; } |
| 68 | bool CreateSig(const SigningProvider& provider, std::vector<unsigned char>& vchSig, const CKeyID& keyid, const CScript& scriptCode, SigVersion sigversion) const override; |
| 69 | bool CreateSchnorrSig(const SigningProvider& provider, std::vector<unsigned char>& sig, const XOnlyPubKey& pubkey, const uint256* leaf_hash, const uint256* merkle_root, SigVersion sigversion) const override; |
| 70 | std::vector<uint8_t> CreateMuSig2Nonce(const SigningProvider& provider, const CPubKey& aggregate_pubkey, const CPubKey& script_pubkey, const CPubKey& part_pubkey, const uint256* leaf_hash, const uint256* merkle_root, SigVersion sigversion, const SignatureData& sigdata) const override; |
| 71 | bool CreateMuSig2PartialSig(const SigningProvider& provider, uint256& partial_sig, const CPubKey& aggregate_pubkey, const CPubKey& script_pubkey, const CPubKey& part_pubkey, const uint256* leaf_hash, const std::vector<std::pair<uint256, bool>>& tweaks, SigVersion sigversion, const SignatureData& sigdata) const override; |
| 72 | bool CreateMuSig2AggregateSig(const std::vector<CPubKey>& participants, std::vector<uint8_t>& sig, const CPubKey& aggregate_pubkey, const CPubKey& script_pubkey, const uint256* leaf_hash, const std::vector<std::pair<uint256, bool>>& tweaks, SigVersion sigversion, const SignatureData& sigdata) const override; |
| 73 | }; |
| 74 | |
| 75 | /** A signature checker that accepts all signatures */ |
| 76 | extern const BaseSignatureChecker& DUMMY_CHECKER; |
no outgoing calls