This repository has been archived by the owner on Nov 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from tcharding/06-06-miniscript
Add support for rust-miniscript
- Loading branch information
Showing
45 changed files
with
644 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,73 +1,73 @@ | ||
// All features uses 26_0 | ||
#[cfg(feature = "26_0")] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v26::Client, json::v26 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v26::{Client, AddressType}, json::v26 as json}; | ||
|
||
#[cfg(all(feature = "25_2", not(feature = "26_0")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v25::Client, json::v25 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v25::{Client, AddressType}, json::v25 as json}; | ||
|
||
#[cfg(all(feature = "25_1", not(feature = "25_2")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v25::Client, json::v25 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v25::{Client, AddressType}, json::v25 as json}; | ||
|
||
#[cfg(all(feature = "25_0", not(feature = "25_1")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v25::Client, json::v25 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v25::{Client, AddressType}, json::v25 as json}; | ||
|
||
#[cfg(all(feature = "24_2", not(feature = "25_0")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v24::Client, json::v24 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v24::{Client, AddressType}, json::v24 as json}; | ||
|
||
#[cfg(all(feature = "24_1", not(feature = "24_2")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v24::Client, json::v24 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v24::{Client, AddressType}, json::v24 as json}; | ||
|
||
#[cfg(all(feature = "24_0_1", not(feature = "24_1")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v24::Client, json::v24 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v24::{Client, AddressType}, json::v24 as json}; | ||
|
||
#[cfg(all(feature = "23_2", not(feature = "24_0_1")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v23::Client, json::v23 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v23::{Client, AddressType}, json::v23 as json}; | ||
|
||
#[cfg(all(feature = "23_1", not(feature = "23_2")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v23::Client, json::v23 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v23::{Client, AddressType}, json::v23 as json}; | ||
|
||
#[cfg(all(feature = "23_0", not(feature = "23_1")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v23::Client, json::v23 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v23::{Client, AddressType}, json::v23 as json}; | ||
|
||
#[cfg(all(feature = "22_1", not(feature = "23_0")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v22::Client, json::v22 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v22::{Client, AddressType}, json::v22 as json}; | ||
|
||
#[cfg(all(feature = "22_0", not(feature = "22_1")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v22::Client, json::v22 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v22::{Client, AddressType}, json::v22 as json}; | ||
|
||
#[cfg(all(feature = "0_21_2", not(feature = "22_0")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v21::Client, json::v21 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v21::{Client, AddressType}, json::v21 as json}; | ||
|
||
#[cfg(all(feature = "0_20_2", not(feature = "0_21_2")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v20::Client, json::v20 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v20::{Client, AddressType}, json::v20 as json}; | ||
|
||
#[cfg(all(feature = "0_19_1", not(feature = "0_20_2")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v19::Client, json::v19 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v19::{Client, AddressType}, json::v19 as json}; | ||
|
||
#[cfg(all(feature = "0_18_1", not(feature = "0_19_1")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v18::Client, json::v18 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v18::{Client, AddressType}, json::v18 as json}; | ||
|
||
#[cfg(all(feature = "0_17_2", not(feature = "0_18_1")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v17::Client, json::v17 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v17::{Client, AddressType}, json::v17 as json}; | ||
|
||
// To make --no-default-features work we have to enable some feature, use most recent version same as for default. | ||
#[cfg(all(not(feature = "26_0"), not(feature = "25_2"), not(feature = "25_1"), not(feature = "25_0"), not(feature = "24_2"),not(feadure = "24_1"), not(feature = "24_0_1"), not(feature = "23_2"), not(feature = "23_1"), not(feature = "23_0"), not(feature = "22_1"), not(feature = "22_0"), not(feature = "0_21_2"), not(feature = "0_20_2"), not(feature = "0_19_1"), not(feature = "0_18_1"), not(feature = "0_17_2")))] | ||
#[allow(unused_imports)] // Not all users need the json types. | ||
pub use bitcoind_json_rpc_client::{client_sync::v26::Client, json::v26 as json}; | ||
pub use bitcoind_json_rpc_client::{client_sync::v26::{Client, AddressType}, json::v26 as json}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: CC0-1.0 | ||
|
||
//! Macros for implementing JSON-RPC methods on a client. | ||
//! | ||
//! Specifically this is methods found under the `== Rawtransactions ==` section of the | ||
//! API docs of `bitcoind v0.17.1`. | ||
//! | ||
//! All macros require `Client` to be in scope. | ||
//! | ||
//! See or use the `define_jsonrpc_minreq_client!` macro to define a `Client`. | ||
/// Implements bitcoind JSON-RPC API method `sendrawtransaction` | ||
#[macro_export] | ||
macro_rules! impl_client_v17__sendrawtransaction { | ||
() => { | ||
impl Client { | ||
pub fn send_raw_transaction( | ||
&self, | ||
tx: &bitcoin::Transaction, | ||
) -> Result<SendRawTransaction> { | ||
self.call("sendrawtransaction", &[into_json(tx)?]) | ||
} | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.