@@ -396,6 +396,22 @@ pub enum OfflineWalletSubCommand {
396396 /// Selects which policy should be used to satisfy the internal descriptor.
397397 #[ structopt( name = "INT_POLICY" , long = "internal_policy" ) ]
398398 internal_policy : Option < String > ,
399+ /// Optionally create an OP_RETURN output containing given String in utf8 encoding (max 80 bytes)
400+ #[ structopt(
401+ name = "ADD_STRING" ,
402+ long = "add_string" ,
403+ short = "s" ,
404+ conflicts_with = "ADD_DATA"
405+ ) ]
406+ add_string : Option < String > ,
407+ /// Optionally create an OP_RETURN output containing given base64 encoded String. (max 80 bytes)
408+ #[ structopt(
409+ name = "ADD_DATA" ,
410+ long = "add_data" ,
411+ short = "o" ,
412+ conflicts_with = "ADD_STRING"
413+ ) ]
414+ add_data : Option < String > , //base 64 econding
399415 } ,
400416 /// Bumps the fees of an RBF transaction.
401417 BumpFee {
@@ -945,7 +961,9 @@ mod test {
945961 "--change_descriptor" , "wpkh(tpubDEnoLuPdBep9bzw5LoGYpsxUQYheRQ9gcgrJhJEcdKFB9cWQRyYmkCyRoTqeD4tJYiVVgt6A3rN6rWn9RYhR9sBsGxji29LYWHuKKbdb1ev/1/*)" ,
946962 "create_tx" , "--to" , "n2Z3YNXtceeJhFkTknVaNjT1mnCGWesykJ:123456" , "mjDZ34icH4V2k9GmC8niCrhzVuR3z8Mgkf:78910" ,
947963 "--utxos" , "87345e46bfd702d24d54890cc094d08a005f773b27c8f965dfe0eb1e23eef88e:1" ,
948- "--utxos" , "87345e46bfd702d24d54890cc094d08a005f773b27c8f965dfe0eb1e23eef88e:2" ] ;
964+ "--utxos" , "87345e46bfd702d24d54890cc094d08a005f773b27c8f965dfe0eb1e23eef88e:2" ,
965+ "--add_string" , "Hello BDK" ,
966+ ] ;
949967
950968 let cli_opts = CliOpts :: from_iter ( & cli_args) ;
951969
@@ -1016,6 +1034,8 @@ mod test {
10161034 fee_rate : None ,
10171035 external_policy : None ,
10181036 internal_policy : None ,
1037+ add_data : None ,
1038+ add_string : Some ( "Hello BDK" . to_string ( ) ) ,
10191039 } ) ,
10201040 } ,
10211041 } ;
0 commit comments