File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 3
3
4
4
//! Miniscript and Output Descriptors
5
5
//!
6
- //! # Introduction
7
6
//! ## Bitcoin Script
8
7
//!
9
8
//! In Bitcoin, spending policies are defined and enforced by means of a
35
34
//! While spending policies in Bitcoin are entirely defined by Script; there
36
35
//! are multiple ways of embedding these Scripts in transaction outputs; for
37
36
//! example, P2SH or Segwit v0. These different embeddings are expressed by
38
- //! *Output Descriptors*, [which are described here](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md)
37
+ //! *Output Descriptors*, [which are described here](https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md).
39
38
//!
40
39
//! # Examples
41
40
//!
51
50
//! )))\
52
51
//! ").unwrap();
53
52
//!
54
- //! // Derive the P2SH address
53
+ //! // Derive the P2SH address.
55
54
//! assert_eq!(
56
55
//! desc.address(bitcoin::Network::Bitcoin).unwrap().to_string(),
57
56
//! "3CJxbQBfWAe1ZkKiGQNEYrioV73ZwvBWns"
62
61
//! // elements in Wsh scripts or they contain a combination of timelock and heightlock.
63
62
//! assert!(desc.sanity_check().is_ok());
64
63
//!
65
- //! // Estimate the satisfaction cost
64
+ //! // Estimate the satisfaction cost.
66
65
//! assert_eq!(desc.max_satisfaction_weight().unwrap(), 293);
67
66
//! ```
68
67
//!
You can’t perform that action at this time.
0 commit comments