[][src]Macro bdk::fragment

macro_rules! fragment {
    ( $modif:tt : $( $tail:tt )* ) => { ... };
    ( true ) => { ... };
    ( false ) => { ... };
    ( pk_k ( $key:expr ) ) => { ... };
    ( pk ( $key:expr ) ) => { ... };
    ( pk_h ( $key_hash:expr ) ) => { ... };
    ( after ( $value:expr ) ) => { ... };
    ( older ( $value:expr ) ) => { ... };
    ( sha256 ( $hash:expr ) ) => { ... };
    ( hash256 ( $hash:expr ) ) => { ... };
    ( ripemd160 ( $hash:expr ) ) => { ... };
    ( hash160 ( $hash:expr ) ) => { ... };
    ( and_v ( $( $inner:tt )* ) ) => { ... };
    ( and_b ( $( $inner:tt )* ) ) => { ... };
    ( and_or ( $( $inner:tt )* ) ) => { ... };
    ( or_b ( $( $inner:tt )* ) ) => { ... };
    ( or_d ( $( $inner:tt )* ) ) => { ... };
    ( or_c ( $( $inner:tt )* ) ) => { ... };
    ( or_i ( $( $inner:tt )* ) ) => { ... };
    ( thresh_vec ( $thresh:expr, $items:expr ) ) => { ... };
    ( thresh ( $thresh:expr, $( $inner:tt )* ) ) => { ... };
    ( multi_vec ( $thresh:expr, $keys:expr ) ) => { ... };
    ( multi ( $thresh:expr $(, $key:expr )+ ) ) => { ... };
    ( sortedmulti ( $( $inner:tt )* ) ) => { ... };
    ( sortedmulti_vec ( $( $inner:tt )* ) ) => { ... };
}

Macro to write descriptor fragments with code

This macro will be expanded to an object of type Result<(Miniscript<DescriptorPublicKey, _>, KeyMap, ValidNetworks), Error>. It allows writing fragments of larger descriptors that can be pieced together using fragment!(thresh_vec(m, ...)).

The syntax to write macro fragment is the same as documented for the descriptor macro.