diff --git a/src/lib.rs b/src/lib.rs index 108fe12..2913f45 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -721,6 +721,9 @@ pub enum OfflineWalletSubCommand { /// Selects which policy should be used to satisfy the internal descriptor #[structopt(name = "INT_POLICY", long = "internal_policy")] internal_policy: Option, + /// Allows 80-bytes of arbitrary data to a transaction output via OP_RETURN + #[structopt(name = "ADD_DATA", long = "add_data")] + add_data: String, }, /// Bumps the fees of an RBF transaction BumpFee { @@ -920,6 +923,7 @@ where fee_rate, external_policy, internal_policy, + add_data, } => { let mut tx_builder = wallet.build_tx(); @@ -928,6 +932,9 @@ where } else { tx_builder.set_recipients(recipients); } + if !&add_data.is_empty() { + tx_builder.add_data(add_data.as_bytes()); + } if enable_rbf { tx_builder.enable_rbf();