From 39465d545d521e66bb3accfa788aa94bffaf47eb Mon Sep 17 00:00:00 2001 From: Sjors Provoost Date: Mon, 23 Sep 2019 20:25:10 +0200 Subject: [PATCH] [wallet] add fillPSBT to interface --- src/interfaces/wallet.cpp | 11 ++++++++++- src/interfaces/wallet.h | 8 ++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/interfaces/wallet.cpp b/src/interfaces/wallet.cpp index 701a748e5..008902e8a 100644 --- a/src/interfaces/wallet.cpp +++ b/src/interfaces/wallet.cpp @@ -18,8 +18,9 @@ #include #include #include -#include #include +#include +#include #include #include @@ -343,6 +344,14 @@ public: } return {}; } + TransactionError fillPSBT(PartiallySignedTransaction& psbtx, + bool& complete, + int sighash_type = 1 /* SIGHASH_ALL */, + bool sign = true, + bool bip32derivs = false) override + { + return FillPSBT(m_wallet.get(), psbtx, complete, sighash_type, sign, bip32derivs); + } WalletBalances getBalances() override { const auto bal = m_wallet->GetBalance(); diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h index a96b93b4c..93d397058 100644 --- a/src/interfaces/wallet.h +++ b/src/interfaces/wallet.h @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -194,6 +195,13 @@ public: bool& in_mempool, int& num_blocks) = 0; + //! Fill PSBT. + virtual TransactionError fillPSBT(PartiallySignedTransaction& psbtx, + bool& complete, + int sighash_type = 1 /* SIGHASH_ALL */, + bool sign = true, + bool bip32derivs = false) = 0; + //! Get balances. virtual WalletBalances getBalances() = 0;