You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wrap all_assets for desc and add count_assets method
This commit wraps the all_assets function for all possible descriptor
types. It also adds `count_assets` function which can count the total
possible ways to obtain an asset for a given descriptor.
Signed-off-by: Harshil Jani <[email protected]>
Copy file name to clipboardExpand all lines: src/lib.rs
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -501,6 +501,8 @@ pub enum Error {
501
501
/// At least two BIP389 key expressions in the descriptor contain tuples of
502
502
/// derivation indexes of different lengths.
503
503
MultipathDescLenMismatch,
504
+
/// Cannot get assets for this large descriptor. Exceeds 1000 assets.
505
+
MaxAssetThresholdExceeded,
504
506
}
505
507
506
508
// https://github.com/sipa/miniscript/pull/5 for discussion on this number
@@ -577,6 +579,7 @@ impl fmt::Display for Error {
577
579
Error::TrNoScriptCode => write!(f,"No script code for Tr descriptors"),
578
580
Error::TrNoExplicitScript => write!(f,"No script code for Tr descriptors"),
579
581
Error::MultipathDescLenMismatch => write!(f,"At least two BIP389 key expressions in the descriptor contain tuples of derivation indexes of different lengths"),
582
+
Error::MaxAssetThresholdExceeded => write!(f,"Cannot plan descriptors having more than 1000 possible spend paths."),
0 commit comments