diff --git a/client/src/client_sync/v17/mod.rs b/client/src/client_sync/v17/mod.rs index d17bae2c..d77a3089 100644 --- a/client/src/client_sync/v17/mod.rs +++ b/client/src/client_sync/v17/mod.rs @@ -18,7 +18,7 @@ use std::path::Path; use bitcoin::address::{Address, NetworkChecked}; use bitcoin::{sign_message, Amount, Block, BlockHash, PublicKey, Txid}; -use serde::{Deserialize, Serialize}; +use serde::{Deserialize, Serialize, Serializer}; use crate::client_sync::into_json; use crate::types::v17::*; @@ -128,6 +128,7 @@ crate::impl_client_v17__get_transaction!(); crate::impl_client_v17__get_unconfirmed_balance!(); crate::impl_client_v17__get_wallet_info!(); crate::impl_client_v17__import_address!(); +crate::impl_client_v17__import_multi!(); crate::impl_client_v17__import_privkey!(); crate::impl_client_v17__import_pruned_funds!(); crate::impl_client_v17__import_pubkey!(); @@ -247,3 +248,48 @@ pub enum SetBanCommand { Add, Remove, } + +/// Args for the `importmulti` method +#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] +pub struct ImportMultiRequest { + /// Descriptor to import. If using descriptor, donot also provide address/scriptPubKey, scripts, or pubkeys. + #[serde(skip_serializing_if = "Option::is_none")] + pub desc: Option, // from core v18 onwards. + /// Type of scriptPubKey (string for script, json for address). Should not be provided if using descriptor. + #[serde(rename = "scriptPubKey", skip_serializing_if = "Option::is_none")] + pub script_pub_key: Option, + /// Creation time of the key expressed in UNIX epoch time, or the string "now" to substitute the current synced blockchain time. + pub timestamp: ImportMultiTimestamp, +} + +/// `scriptPubKey` can be a string for script or json for address. +#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] +#[serde(untagged)] +pub enum ImportMultiScriptPubKey { + /// The script. + Script(String), + /// The address. + Address { address: String }, +} + +/// `timestamp` can be a number (UNIX epoch time) or the string `"now"` +#[derive(Clone, Debug, Deserialize, PartialEq)] +#[serde(untagged)] +pub enum ImportMultiTimestamp { + /// The string "now". + Now, + /// The UNIX timestamp. + Time(u64), +} + +impl Serialize for ImportMultiTimestamp { + fn serialize(&self, serializer: S) -> std::result::Result + where + S: Serializer, + { + match self { + ImportMultiTimestamp::Now => serializer.serialize_str("now"), + ImportMultiTimestamp::Time(t) => serializer.serialize_u64(*t), + } + } +} diff --git a/client/src/client_sync/v17/wallet.rs b/client/src/client_sync/v17/wallet.rs index cb715fec..7b314769 100644 --- a/client/src/client_sync/v17/wallet.rs +++ b/client/src/client_sync/v17/wallet.rs @@ -298,6 +298,18 @@ macro_rules! impl_client_v17__import_address { }; } +/// Implements Bitcoin Core JSON-RPC API method `importmulti` +#[macro_export] +macro_rules! impl_client_v17__import_multi { + () => { + impl Client { + pub fn import_multi(&self, requests: &[ImportMultiRequest]) -> Result { + self.call("importmulti", &[into_json(requests)?]) + } + } + }; +} + /// Implements Bitcoin Core JSON-RPC API method `importprivkey`. #[macro_export] macro_rules! impl_client_v17__import_privkey { diff --git a/client/src/client_sync/v18/mod.rs b/client/src/client_sync/v18/mod.rs index 39a5be97..e33f4573 100644 --- a/client/src/client_sync/v18/mod.rs +++ b/client/src/client_sync/v18/mod.rs @@ -23,8 +23,8 @@ use crate::types::v18::*; #[rustfmt::skip] // Keep public re-exports separate. pub use crate::client_sync::{ v17::{ - AddNodeCommand, AddressType, Input, Output, SetBanCommand, TemplateRequest, - TemplateRules, WalletCreateFundedPsbtInput + AddNodeCommand, AddressType, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, TemplateRequest, + TemplateRules, WalletCreateFundedPsbtInput, }, }; @@ -143,6 +143,7 @@ crate::impl_client_v17__get_transaction!(); crate::impl_client_v17__get_unconfirmed_balance!(); crate::impl_client_v17__get_wallet_info!(); crate::impl_client_v17__import_address!(); +crate::impl_client_v17__import_multi!(); crate::impl_client_v17__import_privkey!(); crate::impl_client_v17__import_pruned_funds!(); crate::impl_client_v17__import_pubkey!(); diff --git a/client/src/client_sync/v19/mod.rs b/client/src/client_sync/v19/mod.rs index 80859a7c..65371fed 100644 --- a/client/src/client_sync/v19/mod.rs +++ b/client/src/client_sync/v19/mod.rs @@ -19,8 +19,8 @@ use crate::types::v19::*; #[rustfmt::skip] // Keep public re-exports separate. pub use crate::client_sync::{ v17::{ - AddNodeCommand, AddressType, Input, Output, SetBanCommand, TemplateRequest, - TemplateRules, WalletCreateFundedPsbtInput + AddNodeCommand, AddressType, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, TemplateRequest, + TemplateRules, WalletCreateFundedPsbtInput, }, }; @@ -139,6 +139,7 @@ crate::impl_client_v17__get_transaction!(); crate::impl_client_v17__get_unconfirmed_balance!(); crate::impl_client_v17__get_wallet_info!(); crate::impl_client_v17__import_address!(); +crate::impl_client_v17__import_multi!(); crate::impl_client_v17__import_privkey!(); crate::impl_client_v17__import_pruned_funds!(); crate::impl_client_v17__import_pubkey!(); diff --git a/client/src/client_sync/v20/mod.rs b/client/src/client_sync/v20/mod.rs index 3cf59879..9ba29706 100644 --- a/client/src/client_sync/v20/mod.rs +++ b/client/src/client_sync/v20/mod.rs @@ -16,8 +16,8 @@ use crate::types::v20::*; #[rustfmt::skip] // Keep public re-exports separate. pub use crate::client_sync::{ v17::{ - AddressType, AddNodeCommand, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, - WalletCreateFundedPsbtInput + AddressType, AddNodeCommand, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, + WalletCreateFundedPsbtInput, }, }; @@ -136,6 +136,7 @@ crate::impl_client_v17__get_transaction!(); crate::impl_client_v17__get_unconfirmed_balance!(); crate::impl_client_v17__get_wallet_info!(); crate::impl_client_v17__import_address!(); +crate::impl_client_v17__import_multi!(); crate::impl_client_v17__import_privkey!(); crate::impl_client_v17__import_pruned_funds!(); crate::impl_client_v17__import_pubkey!(); diff --git a/client/src/client_sync/v21/mod.rs b/client/src/client_sync/v21/mod.rs index 23af0098..c86360f4 100644 --- a/client/src/client_sync/v21/mod.rs +++ b/client/src/client_sync/v21/mod.rs @@ -18,8 +18,8 @@ use crate::types::v21::*; #[rustfmt::skip] // Keep public re-exports separate. pub use crate::client_sync::{ v17::{ - AddNodeCommand, AddressType, Input, Output, SetBanCommand, TemplateRequest, - TemplateRules, WalletCreateFundedPsbtInput + AddNodeCommand, AddressType, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, TemplateRequest, + TemplateRules, WalletCreateFundedPsbtInput, }, }; @@ -138,6 +138,7 @@ crate::impl_client_v17__get_transaction!(); crate::impl_client_v17__get_unconfirmed_balance!(); crate::impl_client_v17__get_wallet_info!(); crate::impl_client_v17__import_address!(); +crate::impl_client_v17__import_multi!(); crate::impl_client_v17__import_privkey!(); crate::impl_client_v17__import_pruned_funds!(); crate::impl_client_v17__import_pubkey!(); diff --git a/client/src/client_sync/v22/mod.rs b/client/src/client_sync/v22/mod.rs index 960b3f7a..90cc4ee0 100644 --- a/client/src/client_sync/v22/mod.rs +++ b/client/src/client_sync/v22/mod.rs @@ -18,8 +18,8 @@ use crate::types::v22::*; #[rustfmt::skip] // Keep public re-exports separate. pub use crate::client_sync::{ v17::{ - AddNodeCommand, AddressType, Input, Output, SetBanCommand, TemplateRequest, - TemplateRules, WalletCreateFundedPsbtInput + AddNodeCommand, AddressType, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, TemplateRequest, + TemplateRules, WalletCreateFundedPsbtInput, }, }; @@ -138,6 +138,7 @@ crate::impl_client_v17__get_transaction!(); crate::impl_client_v17__get_unconfirmed_balance!(); crate::impl_client_v17__get_wallet_info!(); crate::impl_client_v17__import_address!(); +crate::impl_client_v17__import_multi!(); crate::impl_client_v17__import_privkey!(); crate::impl_client_v17__import_pruned_funds!(); crate::impl_client_v17__import_pubkey!(); diff --git a/client/src/client_sync/v23/mod.rs b/client/src/client_sync/v23/mod.rs index 800bf419..06bdb5f9 100644 --- a/client/src/client_sync/v23/mod.rs +++ b/client/src/client_sync/v23/mod.rs @@ -20,8 +20,8 @@ use crate::types::v23::*; #[rustfmt::skip] // Keep public re-exports separate. pub use crate::client_sync::{ v17::{ - AddNodeCommand, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, - WalletCreateFundedPsbtInput + AddNodeCommand, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, + WalletCreateFundedPsbtInput, }, }; @@ -140,6 +140,7 @@ crate::impl_client_v17__get_transaction!(); crate::impl_client_v17__get_unconfirmed_balance!(); crate::impl_client_v17__get_wallet_info!(); crate::impl_client_v17__import_address!(); +crate::impl_client_v17__import_multi!(); crate::impl_client_v17__import_privkey!(); crate::impl_client_v17__import_pruned_funds!(); crate::impl_client_v17__import_pubkey!(); diff --git a/client/src/client_sync/v24/mod.rs b/client/src/client_sync/v24/mod.rs index 6459ea89..b29da857 100644 --- a/client/src/client_sync/v24/mod.rs +++ b/client/src/client_sync/v24/mod.rs @@ -16,8 +16,8 @@ use crate::types::v24::*; #[rustfmt::skip] // Keep public re-exports separate. pub use crate::client_sync::{ v17::{ - AddNodeCommand, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, - WalletCreateFundedPsbtInput + AddNodeCommand, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, + WalletCreateFundedPsbtInput, }, v23::AddressType, }; @@ -137,6 +137,7 @@ crate::impl_client_v17__get_transaction!(); crate::impl_client_v17__get_unconfirmed_balance!(); crate::impl_client_v17__get_wallet_info!(); crate::impl_client_v17__import_address!(); +crate::impl_client_v17__import_multi!(); crate::impl_client_v17__import_privkey!(); crate::impl_client_v17__import_pruned_funds!(); crate::impl_client_v17__import_pubkey!(); diff --git a/client/src/client_sync/v25/mod.rs b/client/src/client_sync/v25/mod.rs index 15625fb7..c977fca0 100644 --- a/client/src/client_sync/v25/mod.rs +++ b/client/src/client_sync/v25/mod.rs @@ -16,8 +16,8 @@ use crate::types::v25::*; #[rustfmt::skip] // Keep public re-exports separate. pub use crate::client_sync::{ v17::{ - AddNodeCommand, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, - WalletCreateFundedPsbtInput + AddNodeCommand, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, + WalletCreateFundedPsbtInput, }, v23::AddressType, }; @@ -137,6 +137,7 @@ crate::impl_client_v17__get_transaction!(); crate::impl_client_v17__get_unconfirmed_balance!(); crate::impl_client_v17__get_wallet_info!(); crate::impl_client_v17__import_address!(); +crate::impl_client_v17__import_multi!(); crate::impl_client_v17__import_privkey!(); crate::impl_client_v17__import_pruned_funds!(); crate::impl_client_v17__import_pubkey!(); diff --git a/client/src/client_sync/v26/mod.rs b/client/src/client_sync/v26/mod.rs index c9b29930..8a9a6141 100644 --- a/client/src/client_sync/v26/mod.rs +++ b/client/src/client_sync/v26/mod.rs @@ -20,8 +20,8 @@ use crate::types::v26::*; #[rustfmt::skip] // Keep public re-exports separate. pub use crate::client_sync::{ v17::{ - AddNodeCommand, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, - WalletCreateFundedPsbtInput + AddNodeCommand, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, + WalletCreateFundedPsbtInput, }, v23::AddressType, }; @@ -143,6 +143,7 @@ crate::impl_client_v17__get_transaction!(); crate::impl_client_v17__get_unconfirmed_balance!(); crate::impl_client_v17__get_wallet_info!(); crate::impl_client_v17__import_address!(); +crate::impl_client_v17__import_multi!(); crate::impl_client_v17__import_privkey!(); crate::impl_client_v17__import_pruned_funds!(); crate::impl_client_v17__import_pubkey!(); diff --git a/client/src/client_sync/v27/mod.rs b/client/src/client_sync/v27/mod.rs index e84f7d7c..4b1caab6 100644 --- a/client/src/client_sync/v27/mod.rs +++ b/client/src/client_sync/v27/mod.rs @@ -16,8 +16,8 @@ use crate::types::v27::*; #[rustfmt::skip] // Keep public re-exports separate. pub use crate::client_sync::{ v17::{ - AddNodeCommand, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, - WalletCreateFundedPsbtInput + AddNodeCommand, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, + WalletCreateFundedPsbtInput, }, v23::AddressType, }; @@ -139,6 +139,7 @@ crate::impl_client_v17__get_transaction!(); crate::impl_client_v17__get_unconfirmed_balance!(); crate::impl_client_v17__get_wallet_info!(); crate::impl_client_v17__import_address!(); +crate::impl_client_v17__import_multi!(); crate::impl_client_v17__import_privkey!(); crate::impl_client_v17__import_pruned_funds!(); crate::impl_client_v17__import_pubkey!(); diff --git a/client/src/client_sync/v28/mod.rs b/client/src/client_sync/v28/mod.rs index b0466149..cca5a698 100644 --- a/client/src/client_sync/v28/mod.rs +++ b/client/src/client_sync/v28/mod.rs @@ -18,8 +18,8 @@ use crate::types::v28::*; #[rustfmt::skip] // Keep public re-exports separate. pub use crate::client_sync::{ v17::{ - AddNodeCommand, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, - WalletCreateFundedPsbtInput + AddNodeCommand, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, TemplateRequest, TemplateRules, + WalletCreateFundedPsbtInput, }, v23::AddressType, }; @@ -141,6 +141,7 @@ crate::impl_client_v17__get_transaction!(); crate::impl_client_v17__get_unconfirmed_balance!(); crate::impl_client_v17__get_wallet_info!(); crate::impl_client_v17__import_address!(); +crate::impl_client_v17__import_multi!(); crate::impl_client_v17__import_privkey!(); crate::impl_client_v17__import_pruned_funds!(); crate::impl_client_v17__import_pubkey!(); diff --git a/client/src/client_sync/v29/mod.rs b/client/src/client_sync/v29/mod.rs index ded13cf7..b0ffad20 100644 --- a/client/src/client_sync/v29/mod.rs +++ b/client/src/client_sync/v29/mod.rs @@ -19,7 +19,7 @@ use crate::types::v29::*; #[rustfmt::skip] // Keep public re-exports separate. pub use crate::client_sync::{ - v17::{AddNodeCommand, Input, Output, SetBanCommand, WalletCreateFundedPsbtInput}, + v17::{AddNodeCommand, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp, Input, Output, SetBanCommand, WalletCreateFundedPsbtInput,}, v23::AddressType, }; @@ -141,6 +141,7 @@ crate::impl_client_v17__get_transaction!(); crate::impl_client_v17__get_unconfirmed_balance!(); crate::impl_client_v17__get_wallet_info!(); crate::impl_client_v17__import_address!(); +crate::impl_client_v17__import_multi!(); crate::impl_client_v17__import_privkey!(); crate::impl_client_v17__import_pruned_funds!(); crate::impl_client_v17__import_pubkey!(); diff --git a/integration_test/tests/wallet.rs b/integration_test/tests/wallet.rs index bc6b6066..df1aa05b 100644 --- a/integration_test/tests/wallet.rs +++ b/integration_test/tests/wallet.rs @@ -8,7 +8,7 @@ use bitcoin::address::{Address, NetworkChecked}; use bitcoin::{Amount, PrivateKey, PublicKey}; use integration_test::{Node, NodeExt as _, Wallet}; -use node::{mtype,AddressType}; +use node::{mtype, AddressType, ImportMultiRequest, ImportMultiScriptPubKey, ImportMultiTimestamp}; use node::vtype::*; // All the version specific types. use std::fs; @@ -343,6 +343,70 @@ fn wallet__list_received_by_label__modelled() { assert!(model.0.iter().any(|item| item.label == label)); } +#[test] +fn wallet__import_multi() { + let node = match () { + #[cfg(feature = "v22_and_below")] + () => Node::with_wallet(Wallet::Default, &[]), + #[cfg(not(feature = "v22_and_below"))] + () => { + let node = Node::with_wallet(Wallet::None, &["-deprecatedrpc=create_bdb"]); + node.client.create_legacy_wallet("wallet_name").expect("createlegacywallet"); + node + } + }; + + let dummy_script_hex = "76a914aabbccddeeff00112233445566778899aabbccdd88ac"; + let addr = node.client.new_address().expect("newaddress"); + let dummy_desc = "pkh(02c6047f9441ed7d6d3045406e95c07cd85a2a0e5c1e507a7a7e3d2f0d6c3d8ef8)#tp9h0863"; + + // Uses scriptPubKey (valid): success - true, without warnings nor error. + // NOTE: On v17, use a wallet-generated address (not raw script) + // to ensure import succeeds, since the wallet already knows the key. + let req1 = ImportMultiRequest { + desc: None, + script_pub_key: Some(ImportMultiScriptPubKey::Script(dummy_script_hex.to_string())), + timestamp: ImportMultiTimestamp::Now, + }; + + // Uses an address (valid): success - false, with JSON-RPC error. + let req2 = ImportMultiRequest { + desc: None, + script_pub_key: Some(ImportMultiScriptPubKey::Address { + address: addr.to_string(), + }), + timestamp: ImportMultiTimestamp::Now, + }; + + // Uses descriptor (valid): success - true + // on v18 onwards, it will return a watch-only warning. + // NOTE: Works only for v18 onwards, as v17 doesn't support descriptors. + let req3 = ImportMultiRequest { + desc: Some(dummy_desc.to_string()), + script_pub_key: None, + timestamp: ImportMultiTimestamp::Time(1_700_000_000), + }; + + let json: ImportMulti = node.client.import_multi(&[req1, req2, req3]).expect("importmulti"); + + #[cfg(not(feature = "v17"))] + { + // result of req1: should succeed, no error, no warning. + // just any random script doesn't work with v17. + assert!(json.0[0].success); + assert!(json.0[0].error.is_none()); + + // result of req3: should succeed, with warning for v18 onwards + assert!(json.0[2].success); + assert!(json.0[2].error.is_none()); + assert!(json.0[2].warnings.is_some()); + } + + // result of req2: should fail with error (wallet already contains privkey for address/script) + assert!(!json.0[1].success); + assert!(json.0[1].error.is_some()); +} + #[test] fn wallet__import_privkey() { let node = match () { diff --git a/types/src/v17/mod.rs b/types/src/v17/mod.rs index d67b3d8e..cb783703 100644 --- a/types/src/v17/mod.rs +++ b/types/src/v17/mod.rs @@ -173,7 +173,7 @@ //! | getunconfirmedbalance | version + model | UNTESTED | //! | getwalletinfo | version + model | UNTESTED | //! | importaddress | returns nothing | | -//! | importmulti | returns nothing | | +//! | importmulti | version | | //! | importprivkey | returns nothing | | //! | importprunedfunds | returns nothing | | //! | importpubkey | returns nothing | | @@ -277,14 +277,15 @@ pub use self::{ GetAddressInfoError, GetAddressInfoLabel, GetAddressesByLabel, GetBalance, GetNewAddress, GetRawChangeAddress, GetReceivedByAddress, GetTransaction, GetTransactionDetail, GetTransactionDetailError, GetTransactionError, GetUnconfirmedBalance, GetWalletInfo, - GetWalletInfoError, ListAddressGroupings, ListAddressGroupingsError, - ListAddressGroupingsItem, ListLabels, ListLockUnspent, ListLockUnspentItem, - ListLockUnspentItemError, ListReceivedByAddress, ListReceivedByAddressError, - ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, ListSinceBlockTransaction, - ListSinceBlockTransactionError, ListTransactions, ListTransactionsItem, - ListTransactionsItemError, ListUnspent, ListUnspentItem, ListUnspentItemError, ListWallets, - LoadWallet, RescanBlockchain, SendMany, SendToAddress, SignMessage, TransactionCategory, - WalletCreateFundedPsbt, WalletCreateFundedPsbtError, WalletProcessPsbt, + GetWalletInfoError, ImportMulti, ImportMultiEntry, JsonRpcError, ListAddressGroupings, + ListAddressGroupingsError, ListAddressGroupingsItem, ListLabels, ListLockUnspent, + ListLockUnspentItem, ListLockUnspentItemError, ListReceivedByAddress, + ListReceivedByAddressError, ListReceivedByAddressItem, ListSinceBlock, ListSinceBlockError, + ListSinceBlockTransaction, ListSinceBlockTransactionError, ListTransactions, + ListTransactionsItem, ListTransactionsItemError, ListUnspent, ListUnspentItem, + ListUnspentItemError, ListWallets, LoadWallet, RescanBlockchain, SendMany, SendToAddress, + SignMessage, TransactionCategory, WalletCreateFundedPsbt, WalletCreateFundedPsbtError, + WalletProcessPsbt, }, zmq::GetZmqNotifications, }; diff --git a/types/src/v17/wallet/mod.rs b/types/src/v17/wallet/mod.rs index bda0c483..927f1ec4 100644 --- a/types/src/v17/wallet/mod.rs +++ b/types/src/v17/wallet/mod.rs @@ -547,6 +547,43 @@ pub struct GetWalletInfo { pub private_keys_enabled: bool, } +/// Result of JSON-RPC method `importmulti`. +/// +/// > importmulti requests ( options ) +/// > +/// > Arguments: +/// > 1. requests (json array, required) Data to be imported +/// > [ +/// > { (json object) +/// > "desc": "str", (string, optional) Descriptor to import. If using descriptor, do not also provide address/scriptPubKey, scripts, or pubkeys +/// > "scriptPubKey": "script" | { "address":"address" }, (string / json, required) Type of scriptPubKey (string for script, json for address). Should not be provided if using a descriptor +/// > "timestamp": timestamp | "now", (integer / string, required) Creation time of the key expressed in UNIX epoch time,or the string "now" to substitute the current synced blockchain time. The timestamp of the oldest key will determine how far back blockchain rescans need to begin for missing wallet transactions. "now" can be specified to bypass scanning, for keys which are known to never have been used, and 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest key creation time of all keys being imported by the importmulti call will be scanned. +/// > }, +/// > ... +/// > ] +#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] +pub struct ImportMulti(pub Vec); + +/// Represents a single entry in the importmulti result array. +#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] +pub struct ImportMultiEntry { + /// The success. + pub success: bool, + /// The error. + pub error: Option, +} + +/// Represents the error object in a JSON-RPC error response. +#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] +pub struct JsonRpcError { + /// The error code. + pub code: i32, + /// The error message. + pub message: String, + /// The error data. + pub data: Option, // Can hold arbitrary extra information +} + /// Result of the JSON-RPC method `listaddressgroupings`. /// /// > listaddressgroupings diff --git a/types/src/v18/mod.rs b/types/src/v18/mod.rs index c484e625..5fc9ab18 100644 --- a/types/src/v18/mod.rs +++ b/types/src/v18/mod.rs @@ -177,7 +177,7 @@ //! | getunconfirmedbalance | version + model | UNTESTED | //! | getwalletinfo | version + model | UNTESTED | //! | importaddress | returns nothing | | -//! | importmulti | returns nothing | | +//! | importmulti | version | | //! | importprivkey | returns nothing | | //! | importprunedfunds | returns nothing | | //! | importpubkey | returns nothing | | @@ -241,8 +241,8 @@ pub use self::{ }, util::{DeriveAddresses, GetDescriptorInfo}, wallet::{ - GetReceivedByLabel, ListReceivedByLabel, ListReceivedByLabelError, ListUnspent, - ListUnspentItem, ListWalletDir, ListWalletDirWallet, + GetReceivedByLabel, ImportMulti, ImportMultiEntry, JsonRpcError, ListReceivedByLabel, + ListReceivedByLabelError, ListUnspent, ListUnspentItem, ListWalletDir, ListWalletDirWallet, }, }; #[doc(inline)] diff --git a/types/src/v18/wallet/mod.rs b/types/src/v18/wallet/mod.rs index 474d3c21..fd06304f 100644 --- a/types/src/v18/wallet/mod.rs +++ b/types/src/v18/wallet/mod.rs @@ -19,6 +19,45 @@ pub use self::error::ListReceivedByLabelError; #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] pub struct GetReceivedByLabel(pub f64); +/// Result of JSON-RPC method `importmulti`. +/// +/// > importmulti requests ( options ) +/// > +/// > Arguments: +/// > 1. requests (json array, required) Data to be imported +/// > [ +/// > { (json object) +/// > "desc": "str", (string, optional) Descriptor to import. If using descriptor, do not also provide address/scriptPubKey, scripts, or pubkeys +/// > "scriptPubKey": "script" | { "address":"address" }, (string / json, required) Type of scriptPubKey (string for script, json for address). Should not be provided if using a descriptor +/// > "timestamp": timestamp | "now", (integer / string, required) Creation time of the key expressed in UNIX epoch time,or the string "now" to substitute the current synced blockchain time. The timestamp of the oldest key will determine how far back blockchain rescans need to begin for missing wallet transactions. "now" can be specified to bypass scanning, for keys which are known to never have been used, and 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest key creation time of all keys being imported by the importmulti call will be scanned. +/// > }, +/// > ... +/// > ] +#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] +pub struct ImportMulti(pub Vec); + +/// Represents a single entry in the importmulti result array. +#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] +pub struct ImportMultiEntry { + /// The success. + pub success: bool, + /// The warnings. + pub warnings: Option>, + /// The error. + pub error: Option, +} + +/// Represents the error object in a JSON-RPC error response. +#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] +pub struct JsonRpcError { + /// The error code. + pub code: i32, + /// The error message. + pub message: String, + /// The error data. + pub data: Option, // Can hold arbitrary extra information +} + /// Result of the JSON-RPC method `listreceivedbylabel`. /// /// > listreceivedbylabel ( minconf include_empty include_watchonly ) diff --git a/types/src/v19/mod.rs b/types/src/v19/mod.rs index d4844e04..9456e240 100644 --- a/types/src/v19/mod.rs +++ b/types/src/v19/mod.rs @@ -178,7 +178,7 @@ //! | getunconfirmedbalance | version + model | UNTESTED | //! | getwalletinfo | version + model | UNTESTED | //! | importaddress | returns nothing | | -//! | importmulti | returns nothing | | +//! | importmulti | version | | //! | importprivkey | returns nothing | | //! | importprunedfunds | returns nothing | | //! | importpubkey | returns nothing | | @@ -284,7 +284,8 @@ pub use crate::v17::{ #[doc(inline)] pub use crate::v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, - AnalyzePsbtInputMissingError, DeriveAddresses, GetNodeAddresses, GetReceivedByLabel, JoinPsbts, - ListReceivedByLabel, ListReceivedByLabelError, ListUnspent, ListUnspentItem, ListWalletDir, - ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, + AnalyzePsbtInputMissingError, DeriveAddresses, GetNodeAddresses, GetReceivedByLabel, + ImportMulti, ImportMultiEntry, JoinPsbts, JsonRpcError, ListReceivedByLabel, + ListReceivedByLabelError, ListUnspent, ListUnspentItem, ListWalletDir, ListWalletDirWallet, + NodeAddress, UtxoUpdatePsbt, }; diff --git a/types/src/v20/mod.rs b/types/src/v20/mod.rs index b105b31a..054c1369 100644 --- a/types/src/v20/mod.rs +++ b/types/src/v20/mod.rs @@ -179,7 +179,7 @@ //! | getunconfirmedbalance | version + model | UNTESTED | //! | getwalletinfo | version + model | UNTESTED | //! | importaddress | returns nothing | | -//! | importmulti | returns nothing | | +//! | importmulti | version | | //! | importprivkey | returns nothing | | //! | importprunedfunds | returns nothing | | //! | importpubkey | returns nothing | | @@ -276,8 +276,9 @@ pub use crate::{ v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, AnalyzePsbtInputMissingError, DeriveAddresses, GetNodeAddresses, GetReceivedByLabel, - JoinPsbts, ListReceivedByLabel, ListReceivedByLabelError, ListUnspent, ListUnspentItem, - ListWalletDir, ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, + ImportMulti, ImportMultiEntry, JoinPsbts, JsonRpcError, ListReceivedByLabel, + ListReceivedByLabelError, ListUnspent, ListUnspentItem, ListWalletDir, ListWalletDirWallet, + NodeAddress, UtxoUpdatePsbt, }, v19::{ Bip9SoftforkInfo, Bip9SoftforkStatistics, Bip9SoftforkStatus, GetBalances, diff --git a/types/src/v21/mod.rs b/types/src/v21/mod.rs index 34820009..2f6bee5a 100644 --- a/types/src/v21/mod.rs +++ b/types/src/v21/mod.rs @@ -182,7 +182,7 @@ //! | getwalletinfo | version + model | UNTESTED | //! | importaddress | returns nothing | | //! | importdescriptors | version | TODO | -//! | importmulti | returns nothing | | +//! | importmulti | version | | //! | importprivkey | returns nothing | | //! | importprunedfunds | returns nothing | | //! | importpubkey | returns nothing | | @@ -282,8 +282,9 @@ pub use crate::{ v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, AnalyzePsbtInputMissingError, DeriveAddresses, GetNodeAddresses, GetReceivedByLabel, - JoinPsbts, ListReceivedByLabel, ListReceivedByLabelError, ListUnspent, ListUnspentItem, - ListWalletDir, ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, + ImportMulti, ImportMultiEntry, JoinPsbts, JsonRpcError, ListReceivedByLabel, + ListReceivedByLabelError, ListUnspent, ListUnspentItem, ListWalletDir, ListWalletDirWallet, + NodeAddress, UtxoUpdatePsbt, }, v19::{ Bip9SoftforkStatistics, Bip9SoftforkStatus, GetBalances, GetBalancesError, GetBalancesMine, diff --git a/types/src/v22/mod.rs b/types/src/v22/mod.rs index c1ec64ad..7eb7f5ba 100644 --- a/types/src/v22/mod.rs +++ b/types/src/v22/mod.rs @@ -191,7 +191,7 @@ //! | getwalletinfo | version + model | UNTESTED | //! | importaddress | returns nothing | | //! | importdescriptors | version | TODO | -//! | importmulti | returns nothing | | +//! | importmulti | version | | //! | importprivkey | returns nothing | | //! | importprunedfunds | returns nothing | | //! | importpubkey | returns nothing | | @@ -292,8 +292,9 @@ pub use crate::{ v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, AnalyzePsbtInputMissingError, DeriveAddresses, GetNodeAddresses, GetReceivedByLabel, - JoinPsbts, ListReceivedByLabel, ListReceivedByLabelError, ListUnspent, ListUnspentItem, - ListWalletDir, ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, + ImportMulti, ImportMultiEntry, JoinPsbts, JsonRpcError, ListReceivedByLabel, + ListReceivedByLabelError, ListUnspent, ListUnspentItem, ListWalletDir, ListWalletDirWallet, + NodeAddress, UtxoUpdatePsbt, }, v19::{ Bip9SoftforkStatistics, Bip9SoftforkStatus, GetBalances, GetBalancesError, GetBalancesMine, diff --git a/types/src/v23/mod.rs b/types/src/v23/mod.rs index f59bee8c..1acdee03 100644 --- a/types/src/v23/mod.rs +++ b/types/src/v23/mod.rs @@ -182,7 +182,7 @@ //! | getwalletinfo | version + model | UNTESTED | //! | importaddress | returns nothing | | //! | importdescriptors | version | TODO | -//! | importmulti | returns nothing | | +//! | importmulti | version | | //! | importprivkey | returns nothing | | //! | importprunedfunds | returns nothing | | //! | importpubkey | returns nothing | | @@ -291,8 +291,9 @@ pub use crate::{ v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, AnalyzePsbtInputMissingError, DeriveAddresses, GetNodeAddresses, GetReceivedByLabel, - JoinPsbts, ListReceivedByLabel, ListReceivedByLabelError, ListUnspent, ListUnspentItem, - ListWalletDir, ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, + ImportMulti, ImportMultiEntry, JoinPsbts, JsonRpcError, ListReceivedByLabel, + ListReceivedByLabelError, ListUnspent, ListUnspentItem, ListWalletDir, ListWalletDirWallet, + NodeAddress, UtxoUpdatePsbt, }, v19::{ Bip9SoftforkInfo, Bip9SoftforkStatistics, Bip9SoftforkStatus, GetBalances, diff --git a/types/src/v24/mod.rs b/types/src/v24/mod.rs index c9f3d0e6..248b48c0 100644 --- a/types/src/v24/mod.rs +++ b/types/src/v24/mod.rs @@ -183,7 +183,7 @@ //! | getwalletinfo | version + model | UNTESTED | //! | importaddress | returns nothing | | //! | importdescriptors | version | TODO | -//! | importmulti | returns nothing | | +//! | importmulti | version | | //! | importprivkey | returns nothing | | //! | importprunedfunds | returns nothing | | //! | importpubkey | returns nothing | | @@ -293,8 +293,8 @@ pub use crate::{ v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, AnalyzePsbtInputMissingError, DeriveAddresses, GetNodeAddresses, GetReceivedByLabel, - JoinPsbts, ListReceivedByLabel, ListReceivedByLabelError, ListWalletDir, - ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, + ImportMulti, ImportMultiEntry, JoinPsbts, JsonRpcError, ListReceivedByLabel, + ListReceivedByLabelError, ListWalletDir, ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, }, v19::{ Bip9SoftforkInfo, Bip9SoftforkStatistics, Bip9SoftforkStatus, GetBalances, diff --git a/types/src/v25/mod.rs b/types/src/v25/mod.rs index af35157b..59beb831 100644 --- a/types/src/v25/mod.rs +++ b/types/src/v25/mod.rs @@ -184,7 +184,7 @@ //! | getwalletinfo | version + model | UNTESTED | //! | importaddress | returns nothing | | //! | importdescriptors | version | TODO | -//! | importmulti | returns nothing | | +//! | importmulti | version | | //! | importprivkey | returns nothing | | //! | importprunedfunds | returns nothing | | //! | importpubkey | returns nothing | | @@ -286,8 +286,8 @@ pub use crate::{ v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, AnalyzePsbtInputMissingError, DeriveAddresses, GetNodeAddresses, GetReceivedByLabel, - JoinPsbts, ListReceivedByLabel, ListReceivedByLabelError, ListWalletDir, - ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, + ImportMulti, ImportMultiEntry, JoinPsbts, JsonRpcError, ListReceivedByLabel, + ListReceivedByLabelError, ListWalletDir, ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, }, v19::{ Bip9SoftforkInfo, Bip9SoftforkStatistics, Bip9SoftforkStatus, GetBalances, diff --git a/types/src/v26/mod.rs b/types/src/v26/mod.rs index 87797764..096d9676 100644 --- a/types/src/v26/mod.rs +++ b/types/src/v26/mod.rs @@ -192,7 +192,7 @@ //! | getwalletinfo | version + model | UNTESTED | //! | importaddress | returns nothing | | //! | importdescriptors | version | TODO | -//! | importmulti | returns nothing | | +//! | importmulti | version | | //! | importprivkey | returns nothing | | //! | importprunedfunds | returns nothing | | //! | importpubkey | returns nothing | | @@ -307,8 +307,8 @@ pub use crate::{ v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, AnalyzePsbtInputMissingError, DeriveAddresses, GetNodeAddresses, GetReceivedByLabel, - JoinPsbts, ListReceivedByLabel, ListReceivedByLabelError, ListWalletDir, - ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, + ImportMulti, ImportMultiEntry, JoinPsbts, JsonRpcError, ListReceivedByLabel, + ListReceivedByLabelError, ListWalletDir, ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, }, v19::{ Bip9SoftforkInfo, Bip9SoftforkStatistics, Bip9SoftforkStatus, GetBalancesMine, diff --git a/types/src/v27/mod.rs b/types/src/v27/mod.rs index 6cceca81..e1b33499 100644 --- a/types/src/v27/mod.rs +++ b/types/src/v27/mod.rs @@ -192,7 +192,7 @@ //! | getwalletinfo | version + model | UNTESTED | //! | importaddress | returns nothing | | //! | importdescriptors | version | TODO | -//! | importmulti | returns nothing | | +//! | importmulti | version | | //! | importprivkey | returns nothing | | //! | importprunedfunds | returns nothing | | //! | importpubkey | returns nothing | | @@ -284,8 +284,8 @@ pub use crate::{ v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, AnalyzePsbtInputMissingError, DeriveAddresses, GetNodeAddresses, GetReceivedByLabel, - JoinPsbts, ListReceivedByLabel, ListReceivedByLabelError, ListWalletDir, - ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, + ImportMulti, ImportMultiEntry, JoinPsbts, JsonRpcError, ListReceivedByLabel, + ListReceivedByLabelError, ListWalletDir, ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, }, v19::{ Bip9SoftforkInfo, Bip9SoftforkStatistics, Bip9SoftforkStatus, GetBalancesMine, diff --git a/types/src/v28/mod.rs b/types/src/v28/mod.rs index 8c232899..9fa32960 100644 --- a/types/src/v28/mod.rs +++ b/types/src/v28/mod.rs @@ -194,7 +194,7 @@ //! | getwalletinfo | version + model | UNTESTED | //! | importaddress | returns nothing | | //! | importdescriptors | version | TODO | -//! | importmulti | returns nothing | | +//! | importmulti | version | | //! | importprivkey | returns nothing | | //! | importprunedfunds | returns nothing | | //! | importpubkey | returns nothing | | @@ -305,8 +305,8 @@ pub use crate::{ v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, AnalyzePsbtInputMissingError, DeriveAddresses, GetNodeAddresses, GetReceivedByLabel, - JoinPsbts, ListReceivedByLabel, ListReceivedByLabelError, ListWalletDir, - ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, + ImportMulti, ImportMultiEntry, JoinPsbts, JsonRpcError, ListReceivedByLabel, + ListReceivedByLabelError, ListWalletDir, ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, }, v19::{ Bip9SoftforkInfo, Bip9SoftforkStatistics, Bip9SoftforkStatus, GetBalancesMine, diff --git a/types/src/v29/mod.rs b/types/src/v29/mod.rs index 1e338443..7638cf52 100644 --- a/types/src/v29/mod.rs +++ b/types/src/v29/mod.rs @@ -195,7 +195,7 @@ //! | getwalletinfo | version + model | UNTESTED | //! | importaddress | returns nothing | | //! | importdescriptors | version | TODO | -//! | importmulti | returns nothing | | +//! | importmulti | version | | //! | importprivkey | returns nothing | | //! | importprunedfunds | returns nothing | | //! | importpubkey | returns nothing | | @@ -303,8 +303,8 @@ pub use crate::{ v18::{ ActiveCommand, AnalyzePsbt, AnalyzePsbtError, AnalyzePsbtInput, AnalyzePsbtInputMissing, AnalyzePsbtInputMissingError, DeriveAddresses, GetNodeAddresses, GetReceivedByLabel, - JoinPsbts, ListReceivedByLabel, ListReceivedByLabelError, ListWalletDir, - ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, + ImportMulti, ImportMultiEntry, JoinPsbts, JsonRpcError, ListReceivedByLabel, + ListReceivedByLabelError, ListWalletDir, ListWalletDirWallet, NodeAddress, UtxoUpdatePsbt, }, v19::{ Bip9SoftforkInfo, Bip9SoftforkStatistics, Bip9SoftforkStatus, GetBalancesMine, diff --git a/verify/src/method/v17.rs b/verify/src/method/v17.rs index 810fdeb8..b915dc4e 100644 --- a/verify/src/method/v17.rs +++ b/verify/src/method/v17.rs @@ -113,7 +113,7 @@ pub const METHODS: &[Method] = &[ ), Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), Method::new_nothing("importaddress", "import_addressss"), - Method::new_nothing("importmulti", "import_multi"), + Method::new_no_model("importmulti", "ImportMulti", "import_multi"), Method::new_nothing("importprivkey", "import_priv_key"), Method::new_nothing("importprunedfunds", "import_pruned_funds"), Method::new_nothing("importpubkey", "import_pubkey"), diff --git a/verify/src/method/v18.rs b/verify/src/method/v18.rs index d763d884..04fb2d65 100644 --- a/verify/src/method/v18.rs +++ b/verify/src/method/v18.rs @@ -117,7 +117,7 @@ pub const METHODS: &[Method] = &[ ), Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), Method::new_nothing("importaddress", "import_addressss"), - Method::new_nothing("importmulti", "import_multi"), + Method::new_no_model("importmulti", "ImportMulti", "import_multi"), Method::new_nothing("importprivkey", "import_priv_key"), Method::new_nothing("importprunedfunds", "import_pruned_funds"), Method::new_nothing("importpubkey", "import_pubkey"), diff --git a/verify/src/method/v19.rs b/verify/src/method/v19.rs index dc5e5f4a..f6b2d266 100644 --- a/verify/src/method/v19.rs +++ b/verify/src/method/v19.rs @@ -118,7 +118,7 @@ pub const METHODS: &[Method] = &[ ), Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), Method::new_nothing("importaddress", "import_addressss"), - Method::new_nothing("importmulti", "import_multi"), + Method::new_no_model("importmulti", "ImportMulti", "import_multi"), Method::new_nothing("importprivkey", "import_priv_key"), Method::new_nothing("importprunedfunds", "import_pruned_funds"), Method::new_nothing("importpubkey", "import_pubkey"), diff --git a/verify/src/method/v20.rs b/verify/src/method/v20.rs index ecfa408f..a37aa350 100644 --- a/verify/src/method/v20.rs +++ b/verify/src/method/v20.rs @@ -119,7 +119,7 @@ pub const METHODS: &[Method] = &[ ), Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), Method::new_nothing("importaddress", "import_addressss"), - Method::new_nothing("importmulti", "import_multi"), + Method::new_no_model("importmulti", "ImportMulti", "import_multi"), Method::new_nothing("importprivkey", "import_priv_key"), Method::new_nothing("importprunedfunds", "import_pruned_funds"), Method::new_nothing("importpubkey", "import_pubkey"), diff --git a/verify/src/method/v21.rs b/verify/src/method/v21.rs index b8a848ac..8f530539 100644 --- a/verify/src/method/v21.rs +++ b/verify/src/method/v21.rs @@ -122,7 +122,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), Method::new_nothing("importaddress", "import_address"), Method::new_no_model("importdescriptors", "ImportDescriptors", "import_descriptors"), - Method::new_nothing("importmulti", "import_multi"), + Method::new_no_model("importmulti", "ImportMulti", "import_multi"), Method::new_nothing("importprivkey", "import_priv_key"), Method::new_nothing("importprunedfunds", "import_pruned_funds"), Method::new_nothing("importpubkey", "import_pubkey"), diff --git a/verify/src/method/v22.rs b/verify/src/method/v22.rs index 7b196786..da9217b6 100644 --- a/verify/src/method/v22.rs +++ b/verify/src/method/v22.rs @@ -124,7 +124,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), Method::new_nothing("importaddress", "import_address"), Method::new_no_model("importdescriptors", "ImportDescriptors", "import_descriptors"), - Method::new_nothing("importmulti", "import_multi"), + Method::new_no_model("importmulti", "ImportMulti", "import_multi"), Method::new_nothing("importprivkey", "import_priv_key"), Method::new_nothing("importprunedfunds", "import_pruned_funds"), Method::new_nothing("importpubkey", "import_pubkey"), diff --git a/verify/src/method/v23.rs b/verify/src/method/v23.rs index 5da40e87..752ffa98 100644 --- a/verify/src/method/v23.rs +++ b/verify/src/method/v23.rs @@ -120,7 +120,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), Method::new_nothing("importaddress", "import_address"), Method::new_no_model("importdescriptors", "ImportDescriptors", "import_descriptors"), - Method::new_nothing("importmulti", "import_multi"), + Method::new_no_model("importmulti", "ImportMulti", "import_multi"), Method::new_nothing("importprivkey", "import_priv_key"), Method::new_nothing("importprunedfunds", "import_pruned_funds"), Method::new_nothing("importpubkey", "import_pubkey"), diff --git a/verify/src/method/v24.rs b/verify/src/method/v24.rs index 97a75c9e..9c1fdcb7 100644 --- a/verify/src/method/v24.rs +++ b/verify/src/method/v24.rs @@ -121,7 +121,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), Method::new_nothing("importaddress", "import_address"), Method::new_no_model("importdescriptors", "ImportDescriptors", "import_descriptors"), - Method::new_nothing("importmulti", "import_multi"), + Method::new_no_model("importmulti", "ImportMulti", "import_multi"), Method::new_nothing("importprivkey", "import_priv_key"), Method::new_nothing("importprunedfunds", "import_pruned_funds"), Method::new_nothing("importpubkey", "import_pubkey"), diff --git a/verify/src/method/v25.rs b/verify/src/method/v25.rs index a7b6c73f..a7fdd1aa 100644 --- a/verify/src/method/v25.rs +++ b/verify/src/method/v25.rs @@ -122,7 +122,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), Method::new_nothing("importaddress", "import_address"), Method::new_no_model("importdescriptors", "ImportDescriptors", "import_descriptors"), - Method::new_nothing("importmulti", "import_multi"), + Method::new_no_model("importmulti", "ImportMulti", "import_multi"), Method::new_nothing("importprivkey", "import_priv_key"), Method::new_nothing("importprunedfunds", "import_pruned_funds"), Method::new_nothing("importpubkey", "import_pubkey"), diff --git a/verify/src/method/v26.rs b/verify/src/method/v26.rs index 8a3f86fd..3ed7d971 100644 --- a/verify/src/method/v26.rs +++ b/verify/src/method/v26.rs @@ -129,7 +129,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), Method::new_nothing("importaddress", "import_address"), Method::new_no_model("importdescriptors", "ImportDescriptors", "import_descriptors"), - Method::new_nothing("importmulti", "import_multi"), + Method::new_no_model("importmulti", "ImportMulti", "import_multi"), Method::new_nothing("importprivkey", "import_priv_key"), Method::new_nothing("importprunedfunds", "import_pruned_funds"), Method::new_nothing("importpubkey", "import_pubkey"), diff --git a/verify/src/method/v27.rs b/verify/src/method/v27.rs index befb3012..7143a1ad 100644 --- a/verify/src/method/v27.rs +++ b/verify/src/method/v27.rs @@ -132,7 +132,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), Method::new_nothing("importaddress", "import_address"), Method::new_no_model("importdescriptors", "ImportDescriptors", "import_descriptors"), - Method::new_nothing("importmulti", "import_multi"), + Method::new_no_model("importmulti", "ImportMulti", "import_multi"), Method::new_nothing("importprivkey", "import_priv_key"), Method::new_nothing("importprunedfunds", "import_pruned_funds"), Method::new_nothing("importpubkey", "import_pubkey"), diff --git a/verify/src/method/v28.rs b/verify/src/method/v28.rs index f9c1a9af..ab2efb98 100644 --- a/verify/src/method/v28.rs +++ b/verify/src/method/v28.rs @@ -134,7 +134,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), Method::new_nothing("importaddress", "import_address"), Method::new_no_model("importdescriptors", "ImportDescriptors", "import_descriptors"), - Method::new_nothing("importmulti", "import_multi"), + Method::new_no_model("importmulti", "ImportMulti", "import_multi"), Method::new_nothing("importprivkey", "import_priv_key"), Method::new_nothing("importprunedfunds", "import_pruned_funds"), Method::new_nothing("importpubkey", "import_pubkey"), diff --git a/verify/src/method/v29.rs b/verify/src/method/v29.rs index 75972b0b..921f10e6 100644 --- a/verify/src/method/v29.rs +++ b/verify/src/method/v29.rs @@ -135,7 +135,7 @@ pub const METHODS: &[Method] = &[ Method::new_modelled("getwalletinfo", "GetWalletInfo", "get_wallet_info"), Method::new_nothing("importaddress", "import_address"), Method::new_no_model("importdescriptors", "ImportDescriptors", "import_descriptors"), - Method::new_nothing("importmulti", "import_multi"), + Method::new_no_model("importmulti", "ImportMulti", "import_multi"), Method::new_nothing("importprivkey", "import_priv_key"), Method::new_nothing("importprunedfunds", "import_pruned_funds"), Method::new_nothing("importpubkey", "import_pubkey"),