diff --git a/types/src/model/blockchain.rs b/types/src/model/blockchain.rs index e6b6652f..34c166b0 100644 --- a/types/src/model/blockchain.rs +++ b/types/src/model/blockchain.rs @@ -505,6 +505,63 @@ pub struct Bip9Statistics { pub possible: Option, } +/// Models the result of the JSON-RPC method `getdescriptoractivity`. +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub struct GetDescriptorActivity { + /// A list of activity events related to the descriptors. + pub activity: Vec, +} + +/// A spend or receive activity entry. Part of `getdescriptoractivity`. +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +pub enum ActivityEntry { + /// The spend activity using `model::SpendActivity`. + Spend(SpendActivity), + /// The receive activity using `model::ReceiveActivity`. + Receive(ReceiveActivity), +} + +/// Models a 'spend' activity event. Part of `getdescriptoractivity`. +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub struct SpendActivity { + /// The total amount of the spent output. + pub amount: Amount, + /// The blockhash (omitted if unconfirmed). + pub block_hash: Option, + /// Height of the spend (omitted if unconfirmed). + pub height: Option, + /// The txid of the spending transaction. + pub spend_txid: Txid, + /// The vout of the spend. + pub spend_vout: u32, + /// The txid of the prevout. + pub prevout_txid: Txid, + /// The vout of the prevout. + pub prevout_vout: u32, + /// The prev scriptPubKey. + pub prevout_spk: ScriptPubkey, +} + +/// Models a 'receive' activity event. Part of `getdescriptoractivity` +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub struct ReceiveActivity { + /// The total amount in BTC of the new output. + pub amount: Amount, + /// The block that this receive is in (omitted if unconfirmed). + pub block_hash: Option, + /// The height of the receive (omitted if unconfirmed). + pub height: Option, + /// The txid of the receiving transaction. + pub txid: Txid, + /// The vout of the receiving output. + pub vout: u32, + /// The ScriptPubKey. + pub output_spk: ScriptPubkey, +} + /// Models the result of JSON-RPC method `getdifficulty`. #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[serde(deny_unknown_fields)] @@ -520,7 +577,7 @@ pub struct GetMempoolAncestors(pub Vec); #[serde(deny_unknown_fields)] pub struct GetMempoolAncestorsVerbose(pub BTreeMap); -/// Models the result of JSON-RPC method `getmempoolancestors` with verbose set to false. +/// Models the result of JSON-RPC method `getmempooldescendants` with verbose set to false. #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[serde(deny_unknown_fields)] pub struct GetMempoolDescendants(pub Vec); @@ -696,68 +753,6 @@ pub struct GetTxSpendingPrevoutItem { pub spending_txid: Option, } -/// Models the result of JSON-RPC method `verifytxoutproof`. -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -#[serde(deny_unknown_fields)] -pub struct VerifyTxOutProof(pub Vec); - -/// Models the result of the JSON-RPC method `getdescriptoractivity`. -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -#[serde(deny_unknown_fields)] -pub struct GetDescriptorActivity { - /// A list of activity events related to the descriptors. - pub activity: Vec, -} - -/// A spend or receive activity entry. Part of `getdescriptoractivity`. -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -pub enum ActivityEntry { - /// The spend activity using `model::SpendActivity`. - Spend(SpendActivity), - /// The receive activity using `model::ReceiveActivity`. - Receive(ReceiveActivity), -} - -/// Models a 'spend' activity event. Part of `getdescriptoractivity`. -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -#[serde(deny_unknown_fields)] -pub struct SpendActivity { - /// The total amount of the spent output. - pub amount: Amount, - /// The blockhash (omitted if unconfirmed). - pub block_hash: Option, - /// Height of the spend (omitted if unconfirmed). - pub height: Option, - /// The txid of the spending transaction. - pub spend_txid: Txid, - /// The vout of the spend. - pub spend_vout: u32, - /// The txid of the prevout. - pub prevout_txid: Txid, - /// The vout of the prevout. - pub prevout_vout: u32, - /// The prev scriptPubKey. - pub prevout_spk: ScriptPubkey, -} - -/// Models a 'receive' activity event. Part of `getdescriptoractivity` -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -#[serde(deny_unknown_fields)] -pub struct ReceiveActivity { - /// The total amount in BTC of the new output. - pub amount: Amount, - /// The block that this receive is in (omitted if unconfirmed). - pub block_hash: Option, - /// The height of the receive (omitted if unconfirmed). - pub height: Option, - /// The txid of the receiving transaction. - pub txid: Txid, - /// The vout of the receiving output. - pub vout: u32, - /// The ScriptPubKey. - pub output_spk: ScriptPubkey, -} - /// Models the result of JSON-RPC method `loadtxoutset`. #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[serde(deny_unknown_fields)] @@ -782,3 +777,8 @@ pub struct ScanBlocksStart { /// Blocks that may have matched a scanobject pub relevant_blocks: Vec, } + +/// Models the result of JSON-RPC method `verifytxoutproof`. +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub struct VerifyTxOutProof(pub Vec); diff --git a/types/src/model/util.rs b/types/src/model/util.rs index 97555fb7..9a90ccfd 100644 --- a/types/src/model/util.rs +++ b/types/src/model/util.rs @@ -23,18 +23,6 @@ pub struct CreateMultisig { pub warnings: Option>, } -/// Models the result of JSON-RPC method `estimatesmartfee`. -#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -#[serde(deny_unknown_fields)] -pub struct EstimateSmartFee { - /// Estimate fee rate in BTC/kB. - pub fee_rate: Option, - /// Errors encountered during processing. - pub errors: Option>, - /// Block number where estimate was found. - pub blocks: u32, -} - /// Models the result of JSON-RPC method `deriveaddresses`. /// /// > deriveaddresses "descriptor" ( range ) @@ -56,6 +44,18 @@ pub struct DeriveAddressesMultipath { pub addresses: Vec, } +/// Models the result of JSON-RPC method `estimatesmartfee`. +#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub struct EstimateSmartFee { + /// Estimate fee rate in BTC/kB. + pub fee_rate: Option, + /// Errors encountered during processing. + pub errors: Option>, + /// Block number where estimate was found. + pub blocks: u32, +} + /// Models the result of JSON-RPC method `signmessagewithprivkey`. #[derive(Clone, Debug, PartialEq, Eq)] pub struct SignMessageWithPrivKey(pub sign_message::MessageSignature); diff --git a/types/src/model/wallet.rs b/types/src/model/wallet.rs index 22f1ef01..f30c8e8a 100644 --- a/types/src/model/wallet.rs +++ b/types/src/model/wallet.rs @@ -748,16 +748,6 @@ pub struct LoadWallet { pub warnings: Vec, } -/// Models the result of JSON-RPC method `rescanblockchain`. -#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -#[serde(deny_unknown_fields)] -pub struct RescanBlockchain { - /// The block height where the rescan has started. - pub start_height: u32, - /// The height of the last rescanned block. - pub stop_height: u32, -} - /// Models the result of JSON-RPC method `psbtbumpfee`. #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[serde(deny_unknown_fields)] @@ -772,6 +762,16 @@ pub struct PsbtBumpFee { pub errors: Vec, } +/// Models the result of JSON-RPC method `rescanblockchain`. +#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub struct RescanBlockchain { + /// The block height where the rescan has started. + pub start_height: u32, + /// The height of the last rescanned block. + pub stop_height: u32, +} + /// Models the result of JSON-RPC method `send`. #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] #[serde(deny_unknown_fields)] diff --git a/types/src/v17/blockchain/mod.rs b/types/src/v17/blockchain/mod.rs index 66f71996..b23a962c 100644 --- a/types/src/v17/blockchain/mod.rs +++ b/types/src/v17/blockchain/mod.rs @@ -602,7 +602,7 @@ pub struct GetMempoolInfo { #[serde(deny_unknown_fields)] pub struct GetRawMempool(pub Vec); -/// Result of JSON-RPC method `getmempooldescendants` with verbose set to `true`. +/// Result of JSON-RPC method `getrawmempool` with verbose set to `true`. /// /// Map of txid to [`MempoolEntry`]. #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] diff --git a/types/src/v17/wallet/mod.rs b/types/src/v17/wallet/mod.rs index 6f1fa9c2..6016df86 100644 --- a/types/src/v17/wallet/mod.rs +++ b/types/src/v17/wallet/mod.rs @@ -17,45 +17,6 @@ use serde::{Deserialize, Serialize}; // TODO: Remove wildcard, use explicit types. pub use self::error::*; -/// The purpose of an address. Part of `getaddressesbylabel`. -#[derive(Copy, Clone, PartialEq, Eq, Debug, Deserialize, Serialize)] -#[serde(rename_all = "lowercase")] -pub enum AddressPurpose { - /// A send-to address. - Send, - /// A receive-from address. - Receive, -} - -/// The category of a transaction. Part of `gettransaction`, `listsinceblock` and `listtransactions`. -#[derive(Copy, Clone, PartialEq, Eq, Debug, Deserialize, Serialize)] -#[serde(rename_all = "lowercase")] -pub enum TransactionCategory { - /// Transactions sent. - Send, - /// Non-coinbase transactions received. - Receive, - /// Coinbase transactions received with more than 100 confirmations. - Generate, - /// Coinbase transactions received with 100 or fewer confirmations. - Immature, - /// Orphaned coinbase transactions received. - Orphan, -} - -/// Whether this transaction can be RBF'ed. Part of `gettransaction`, `listsinceblock` and -/// `listtransactions`. -#[derive(Copy, Clone, PartialEq, Eq, Debug, Deserialize, Serialize)] -#[serde(rename_all = "lowercase")] -pub enum Bip125Replaceable { - /// Yes, can be replaced due to BIP-125 (RBF). - Yes, - /// No, cannot be replaced due to BIP-125 (RBF). - No, - /// RBF unknown. - Unknown, -} - /// Result of JSON-RPC method `abortrescan`. /// /// > abortrescan @@ -217,6 +178,16 @@ pub struct AddressInformation { pub purpose: AddressPurpose, } +/// The purpose of an address. Part of `getaddressesbylabel`. +#[derive(Copy, Clone, PartialEq, Eq, Debug, Deserialize, Serialize)] +#[serde(rename_all = "lowercase")] +pub enum AddressPurpose { + /// A send-to address. + Send, + /// A receive-from address. + Receive, +} + /// Result of the JSON-RPC method `getaddressinfo`. /// /// > getaddressinfo "address" @@ -502,6 +473,35 @@ pub struct GetTransactionDetail { pub abandoned: Option, } +/// The category of a transaction. Part of `gettransaction`, `listsinceblock` and `listtransactions`. +#[derive(Copy, Clone, PartialEq, Eq, Debug, Deserialize, Serialize)] +#[serde(rename_all = "lowercase")] +pub enum TransactionCategory { + /// Transactions sent. + Send, + /// Non-coinbase transactions received. + Receive, + /// Coinbase transactions received with more than 100 confirmations. + Generate, + /// Coinbase transactions received with 100 or fewer confirmations. + Immature, + /// Orphaned coinbase transactions received. + Orphan, +} + +/// Whether this transaction can be RBF'ed. Part of `gettransaction`, `listsinceblock` and +/// `listtransactions`. +#[derive(Copy, Clone, PartialEq, Eq, Debug, Deserialize, Serialize)] +#[serde(rename_all = "lowercase")] +pub enum Bip125Replaceable { + /// Yes, can be replaced due to BIP-125 (RBF). + Yes, + /// No, cannot be replaced due to BIP-125 (RBF). + No, + /// RBF unknown. + Unknown, +} + /// Result of the JSON-RPC method `getunconfirmedbalance`. /// /// > getunconfirmedbalance diff --git a/types/src/v21/wallet/mod.rs b/types/src/v21/wallet/mod.rs index 74f6ea3b..038d6a8a 100644 --- a/types/src/v21/wallet/mod.rs +++ b/types/src/v21/wallet/mod.rs @@ -12,6 +12,69 @@ use serde::{Deserialize, Serialize}; pub use self::error::{PsbtBumpFeeError, SendError}; pub use super::GetWalletInfoError; +/// Result of the JSON-RPC method `getwalletinfo`. +/// +/// > getwalletinfo +/// > Returns an object containing various wallet state info. +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub struct GetWalletInfo { + /// The wallet name. + #[serde(rename = "walletname")] + pub wallet_name: String, + /// The wallet version. + #[serde(rename = "walletversion")] + pub wallet_version: i64, + /// The database format (bdb or sqlite). + pub format: String, + /// The total confirmed balance of the wallet in BTC. (DEPRECATED) + pub balance: f64, + /// The total unconfirmed balance of the wallet in BTC. (DEPRECATED) + pub unconfirmed_balance: f64, + /// The total immature balance of the wallet in BTC. (DEPRECATED) + pub immature_balance: f64, + /// The total number of transactions in the wallet + #[serde(rename = "txcount")] + pub tx_count: i64, + /// The UNIX epoch time of the oldest pre-generated key in the key pool. Legacy wallets only. + #[serde(rename = "keypoololdest")] + pub keypool_oldest: i64, + /// How many new keys are pre-generated (only counts external keys). + #[serde(rename = "keypoolsize")] + pub keypool_size: i64, + /// How many new keys are pre-generated for internal use (used for change outputs, only appears + /// if the wallet is using this feature, otherwise external keys are used). + #[serde(rename = "keypoolsize_hd_internal")] + pub keypool_size_hd_internal: i64, + /// The UNIX epoch time until which the wallet is unlocked for transfers, or 0 if the wallet is locked. + /// Only present for passphrase-encrypted wallets. + pub unlocked_until: Option, + /// The transaction fee configuration, set in BTC/kvB. + #[serde(rename = "paytxfee")] + pub pay_tx_fee: f64, + /// The Hash160 of the HD seed (only present when HD is enabled). + #[serde(rename = "hdseedid")] + pub hd_seed_id: Option, + /// If privatekeys are disabled for this wallet (enforced watch-only wallet). + pub private_keys_enabled: bool, + /// Whether this wallet tracks clean/dirty coins in terms of reuse. + pub avoid_reuse: bool, + /// Current scanning details, or false if no scan is in progress. + pub scanning: GetWalletInfoScanning, + /// Whether this wallet uses descriptors for scriptPubKey management. + pub descriptors: bool, +} + +/// Current scanning details. Part of `getwalletinfo`. +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +#[serde(untagged)] +pub enum GetWalletInfoScanning { + /// Scanning details. + Details { duration: u64, progress: f64 }, + /// Not scanning (false). + NotScanning(bool), +} + /// Result of JSON-RPC method `importdescriptors`. /// /// > Import descriptors. This will trigger a rescan of the blockchain based on the earliest @@ -171,66 +234,3 @@ pub struct UpgradeWallet { /// Error message (if there is one) pub error: Option, } - -/// Result of the JSON-RPC method `getwalletinfo`. -/// -/// > getwalletinfo -/// > Returns an object containing various wallet state info. -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -#[serde(deny_unknown_fields)] -pub struct GetWalletInfo { - /// The wallet name. - #[serde(rename = "walletname")] - pub wallet_name: String, - /// The wallet version. - #[serde(rename = "walletversion")] - pub wallet_version: i64, - /// The database format (bdb or sqlite). - pub format: String, - /// The total confirmed balance of the wallet in BTC. (DEPRECATED) - pub balance: f64, - /// The total unconfirmed balance of the wallet in BTC. (DEPRECATED) - pub unconfirmed_balance: f64, - /// The total immature balance of the wallet in BTC. (DEPRECATED) - pub immature_balance: f64, - /// The total number of transactions in the wallet - #[serde(rename = "txcount")] - pub tx_count: i64, - /// The UNIX epoch time of the oldest pre-generated key in the key pool. Legacy wallets only. - #[serde(rename = "keypoololdest")] - pub keypool_oldest: i64, - /// How many new keys are pre-generated (only counts external keys). - #[serde(rename = "keypoolsize")] - pub keypool_size: i64, - /// How many new keys are pre-generated for internal use (used for change outputs, only appears - /// if the wallet is using this feature, otherwise external keys are used). - #[serde(rename = "keypoolsize_hd_internal")] - pub keypool_size_hd_internal: i64, - /// The UNIX epoch time until which the wallet is unlocked for transfers, or 0 if the wallet is locked. - /// Only present for passphrase-encrypted wallets. - pub unlocked_until: Option, - /// The transaction fee configuration, set in BTC/kvB. - #[serde(rename = "paytxfee")] - pub pay_tx_fee: f64, - /// The Hash160 of the HD seed (only present when HD is enabled). - #[serde(rename = "hdseedid")] - pub hd_seed_id: Option, - /// If privatekeys are disabled for this wallet (enforced watch-only wallet). - pub private_keys_enabled: bool, - /// Whether this wallet tracks clean/dirty coins in terms of reuse. - pub avoid_reuse: bool, - /// Current scanning details, or false if no scan is in progress. - pub scanning: GetWalletInfoScanning, - /// Whether this wallet uses descriptors for scriptPubKey management. - pub descriptors: bool, -} - -/// Current scanning details. Part of `getwalletinfo`. -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -#[serde(untagged)] -pub enum GetWalletInfoScanning { - /// Scanning details. - Details { duration: u64, progress: f64 }, - /// Not scanning (false). - NotScanning(bool), -} diff --git a/types/src/v22/network.rs b/types/src/v22/network.rs index 363cb460..cd60ca01 100644 --- a/types/src/v22/network.rs +++ b/types/src/v22/network.rs @@ -35,31 +35,6 @@ pub struct NodeAddress { pub network: String, } -/// Result of JSON-RPC method `listbanned`. -/// -/// > listbanned -/// -/// > List all banned IPs/Subnets. -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -#[serde(deny_unknown_fields)] -pub struct ListBanned(pub Vec); - -/// An banned item. Part of `listbanned`. -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -#[serde(deny_unknown_fields)] -pub struct Banned { - /// The IP/Subnet of the banned node. - pub address: String, - /// The UNIX epoch time the ban was created. - pub ban_created: u32, - /// The UNIX epoch time the ban was expires. - pub banned_until: u32, - /// The ban duration, in seconds. - pub ban_duration: u32, - /// The time remaining until the ban expires, in seconds. - pub time_remaining: u32, -} - /// Result of JSON-RPC method `getpeerinfo`. /// /// > getpeerinfo @@ -171,3 +146,28 @@ pub struct PeerInfo { /// Type of connection. pub connection_type: Option, } + +/// Result of JSON-RPC method `listbanned`. +/// +/// > listbanned +/// +/// > List all banned IPs/Subnets. +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub struct ListBanned(pub Vec); + +/// An banned item. Part of `listbanned`. +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub struct Banned { + /// The IP/Subnet of the banned node. + pub address: String, + /// The UNIX epoch time the ban was created. + pub ban_created: u32, + /// The UNIX epoch time the ban was expires. + pub banned_until: u32, + /// The ban duration, in seconds. + pub ban_duration: u32, + /// The time remaining until the ban expires, in seconds. + pub time_remaining: u32, +} diff --git a/types/src/v23/wallet/mod.rs b/types/src/v23/wallet/mod.rs index de30300b..42ce64ae 100644 --- a/types/src/v23/wallet/mod.rs +++ b/types/src/v23/wallet/mod.rs @@ -108,24 +108,6 @@ pub struct GetTransaction { pub decoded: Option, } -/// Result of the JSON-RPC method `restorewallet`. -/// -/// > restorewallet "wallet_name" "backup_file" ( load_on_startup ) -/// > -/// > Restore and loads a wallet from backup. -/// > -/// > Arguments: -/// > 1. wallet_name (string, required) The name that will be applied to the restored wallet -/// > 2. backup_file (string, required) The backup file that will be used to restore the wallet. -#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] -#[serde(deny_unknown_fields)] -pub struct RestoreWallet { - /// The wallet name if restored successfully. - pub name: String, - /// Warning message if wallet was not loaded cleanly. - pub warning: Option, -} - /// Result of the JSON-RPC method `getwalletinfo`. /// /// > getwalletinfo @@ -291,3 +273,21 @@ pub struct TransactionItem { #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] #[serde(deny_unknown_fields)] pub struct ListTransactions(pub Vec); + +/// Result of the JSON-RPC method `restorewallet`. +/// +/// > restorewallet "wallet_name" "backup_file" ( load_on_startup ) +/// > +/// > Restore and loads a wallet from backup. +/// > +/// > Arguments: +/// > 1. wallet_name (string, required) The name that will be applied to the restored wallet +/// > 2. backup_file (string, required) The backup file that will be used to restore the wallet. +#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub struct RestoreWallet { + /// The wallet name if restored successfully. + pub name: String, + /// Warning message if wallet was not loaded cleanly. + pub warning: Option, +} diff --git a/types/src/v28/wallet/mod.rs b/types/src/v28/wallet/mod.rs index 013eb6b1..5b2ce908 100644 --- a/types/src/v28/wallet/mod.rs +++ b/types/src/v28/wallet/mod.rs @@ -16,6 +16,23 @@ pub use super::{ GetTransactionError, LastProcessedBlock, ScriptType, }; +/// Result of the JSON-RPC method `createwalletdescriptor`. +/// +/// > createwalletdescriptor "type" ( {"internal":bool,"hdkey":"str",...} ) +/// > +/// > Creates the wallet's descriptor for the given address type. The address type must be one that the wallet does not already have a descriptor for. +/// > Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted. +/// > +/// > Arguments: +/// > 1. type (string, required) The address type the descriptor will produce. Options are "legacy", "p2sh-segwit", "bech32", and "bech32m". +#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] +#[serde(deny_unknown_fields)] +pub struct CreateWalletDescriptor { + /// The public descriptors that were added to the wallet. + #[serde(rename = "descs")] + pub descriptors: Vec, +} + /// Result of the JSON-RPC method `getaddressinfo`. /// /// > getaddressinfo "address" @@ -146,23 +163,6 @@ pub struct GetAddressInfoEmbedded { pub labels: Option>, } -/// Result of the JSON-RPC method `createwalletdescriptor`. -/// -/// > createwalletdescriptor "type" ( {"internal":bool,"hdkey":"str",...} ) -/// > -/// > Creates the wallet's descriptor for the given address type. The address type must be one that the wallet does not already have a descriptor for. -/// > Requires wallet passphrase to be set with walletpassphrase call if wallet is encrypted. -/// > -/// > Arguments: -/// > 1. type (string, required) The address type the descriptor will produce. Options are "legacy", "p2sh-segwit", "bech32", and "bech32m". -#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)] -#[serde(deny_unknown_fields)] -pub struct CreateWalletDescriptor { - /// The public descriptors that were added to the wallet. - #[serde(rename = "descs")] - pub descriptors: Vec, -} - /// Result of the JSON-RPC method `gethdkeys`. /// /// > gethdkeys ( {"active_only":bool,"private":bool,...} )