File tree Expand file tree Collapse file tree 15 files changed +49
-1
lines changed Expand file tree Collapse file tree 15 files changed +49
-1
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ crate::impl_client_v17__get_received_by_address!();
123
123
crate :: impl_client_v17__get_transaction!( ) ;
124
124
crate :: impl_client_v17__get_unconfirmed_balance!( ) ;
125
125
crate :: impl_client_v17__get_wallet_info!( ) ;
126
+ crate :: impl_client_v17__import_privkey!( ) ;
126
127
crate :: impl_client_v17__list_address_groupings!( ) ;
127
128
crate :: impl_client_v17__list_labels!( ) ;
128
129
crate :: impl_client_v17__list_lock_unspent!( ) ;
Original file line number Diff line number Diff line change @@ -243,6 +243,22 @@ macro_rules! impl_client_v17__get_wallet_info {
243
243
} ;
244
244
}
245
245
246
+ /// Implements Bitcoin Core JSON-RPC API method `importprivkey`.
247
+ #[ macro_export]
248
+ macro_rules! impl_client_v17__import_privkey {
249
+ ( ) => {
250
+ impl Client {
251
+ pub fn import_privkey( & self , privkey: & bitcoin:: PrivateKey ) -> Result <( ) > {
252
+ match self . call( "importprivkey" , & [ into_json( privkey) ?] ) {
253
+ Ok ( serde_json:: Value :: Null ) => Ok ( ( ) ) ,
254
+ Ok ( res) => Err ( Error :: Returned ( res. to_string( ) ) ) ,
255
+ Err ( err) => Err ( err. into( ) ) ,
256
+ }
257
+ }
258
+ }
259
+ } ;
260
+ }
261
+
246
262
/// Implements Bitcoin Core JSON-RPC API method `listaddressgroupings`.
247
263
#[ macro_export]
248
264
macro_rules! impl_client_v17__list_address_groupings {
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ crate::impl_client_v17__get_received_by_address!();
136
136
crate :: impl_client_v17__get_transaction!( ) ;
137
137
crate :: impl_client_v17__get_unconfirmed_balance!( ) ;
138
138
crate :: impl_client_v17__get_wallet_info!( ) ;
139
+ crate :: impl_client_v17__import_privkey!( ) ;
139
140
crate :: impl_client_v17__list_address_groupings!( ) ;
140
141
crate :: impl_client_v17__list_labels!( ) ;
141
142
crate :: impl_client_v17__list_lock_unspent!( ) ;
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ crate::impl_client_v17__get_received_by_address!();
133
133
crate :: impl_client_v17__get_transaction!( ) ;
134
134
crate :: impl_client_v17__get_unconfirmed_balance!( ) ;
135
135
crate :: impl_client_v17__get_wallet_info!( ) ;
136
+ crate :: impl_client_v17__import_privkey!( ) ;
136
137
crate :: impl_client_v17__list_address_groupings!( ) ;
137
138
crate :: impl_client_v17__list_labels!( ) ;
138
139
crate :: impl_client_v17__list_lock_unspent!( ) ;
Original file line number Diff line number Diff line change @@ -130,6 +130,7 @@ crate::impl_client_v17__get_received_by_address!();
130
130
crate :: impl_client_v17__get_transaction!( ) ;
131
131
crate :: impl_client_v17__get_unconfirmed_balance!( ) ;
132
132
crate :: impl_client_v17__get_wallet_info!( ) ;
133
+ crate :: impl_client_v17__import_privkey!( ) ;
133
134
crate :: impl_client_v17__list_address_groupings!( ) ;
134
135
crate :: impl_client_v17__list_labels!( ) ;
135
136
crate :: impl_client_v17__list_lock_unspent!( ) ;
Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ crate::impl_client_v17__get_received_by_address!();
132
132
crate :: impl_client_v17__get_transaction!( ) ;
133
133
crate :: impl_client_v17__get_unconfirmed_balance!( ) ;
134
134
crate :: impl_client_v17__get_wallet_info!( ) ;
135
+ crate :: impl_client_v17__import_privkey!( ) ;
135
136
crate :: impl_client_v17__list_address_groupings!( ) ;
136
137
crate :: impl_client_v17__list_labels!( ) ;
137
138
crate :: impl_client_v17__list_lock_unspent!( ) ;
Original file line number Diff line number Diff line change @@ -132,6 +132,7 @@ crate::impl_client_v17__get_received_by_address!();
132
132
crate :: impl_client_v17__get_transaction!( ) ;
133
133
crate :: impl_client_v17__get_unconfirmed_balance!( ) ;
134
134
crate :: impl_client_v17__get_wallet_info!( ) ;
135
+ crate :: impl_client_v17__import_privkey!( ) ;
135
136
crate :: impl_client_v17__list_address_groupings!( ) ;
136
137
crate :: impl_client_v17__list_labels!( ) ;
137
138
crate :: impl_client_v17__list_lock_unspent!( ) ;
Original file line number Diff line number Diff line change @@ -134,6 +134,7 @@ crate::impl_client_v17__get_received_by_address!();
134
134
crate :: impl_client_v17__get_transaction!( ) ;
135
135
crate :: impl_client_v17__get_unconfirmed_balance!( ) ;
136
136
crate :: impl_client_v17__get_wallet_info!( ) ;
137
+ crate :: impl_client_v17__import_privkey!( ) ;
137
138
crate :: impl_client_v17__list_address_groupings!( ) ;
138
139
crate :: impl_client_v17__list_labels!( ) ;
139
140
crate :: impl_client_v17__list_lock_unspent!( ) ;
Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ crate::impl_client_v17__get_received_by_address!();
131
131
crate :: impl_client_v17__get_transaction!( ) ;
132
132
crate :: impl_client_v17__get_unconfirmed_balance!( ) ;
133
133
crate :: impl_client_v17__get_wallet_info!( ) ;
134
+ crate :: impl_client_v17__import_privkey!( ) ;
134
135
crate :: impl_client_v17__list_address_groupings!( ) ;
135
136
crate :: impl_client_v17__list_labels!( ) ;
136
137
crate :: impl_client_v17__list_lock_unspent!( ) ;
Original file line number Diff line number Diff line change @@ -131,6 +131,7 @@ crate::impl_client_v17__get_received_by_address!();
131
131
crate :: impl_client_v17__get_transaction!( ) ;
132
132
crate :: impl_client_v17__get_unconfirmed_balance!( ) ;
133
133
crate :: impl_client_v17__get_wallet_info!( ) ;
134
+ crate :: impl_client_v17__import_privkey!( ) ;
134
135
crate :: impl_client_v17__list_address_groupings!( ) ;
135
136
crate :: impl_client_v17__list_labels!( ) ;
136
137
crate :: impl_client_v17__list_lock_unspent!( ) ;
You can’t perform that action at this time.
0 commit comments