Add change descriptor to Wallet
This commit is contained in:
parent
cda099a2f2
commit
091f5df97d
@ -126,7 +126,7 @@ callback interface BdkProgress {
|
||||
|
||||
interface OnlineWallet {
|
||||
[Throws=BdkError]
|
||||
constructor(string descriptor, Network network, DatabaseConfig database_config, BlockchainConfig blockchain_config);
|
||||
constructor(string descriptor, string? change_descriptor, Network network, DatabaseConfig database_config, BlockchainConfig blockchain_config);
|
||||
|
||||
// OfflineWalletOperations
|
||||
string get_new_address();
|
||||
|
@ -193,6 +193,7 @@ impl PartiallySignedBitcoinTransaction {
|
||||
impl OnlineWallet {
|
||||
fn new(
|
||||
descriptor: String,
|
||||
change_descriptor: Option<String>,
|
||||
network: Network,
|
||||
database_config: DatabaseConfig,
|
||||
blockchain_config: BlockchainConfig,
|
||||
@ -225,7 +226,7 @@ impl OnlineWallet {
|
||||
let blockchain = AnyBlockchain::from_config(&any_blockchain_config)?;
|
||||
let wallet = Mutex::new(Wallet::new(
|
||||
&descriptor,
|
||||
None,
|
||||
change_descriptor.to_owned().as_ref(),
|
||||
network,
|
||||
database,
|
||||
blockchain,
|
||||
|
Loading…
x
Reference in New Issue
Block a user