Show slatepack QR codes (#655)

* Show slatepack QR codes

* Make slatepack QR codes optional

Co-authored-by: cliik <cliik@example.com>
This commit is contained in:
cliik
2022-07-12 10:32:26 +01:00
committed by GitHub
co-authored by cliik
parent 407f7df111
commit 95bb4c477e
5 changed files with 65 additions and 0 deletions
+20
View File
@@ -177,6 +177,10 @@ subcommands:
short: g
long: bridge
takes_value: true
- slatepack_qr:
help: Show slatepack data as QR code
short: q
long: slatepack_qr
- unpack:
about: Unpack and display an armored Slatepack Message, decrypting if possible
args:
@@ -207,6 +211,10 @@ subcommands:
short: g
long: bridge
takes_value: true
- slatepack_qr:
help: Show slatepack data as QR code
short: q
long: slatepack_qr
- finalize:
about: Processes a Slatepack Message to finalize a transfer.
args:
@@ -228,6 +236,10 @@ subcommands:
short: u
long: outfile
takes_value: true
- slatepack_qr:
help: Show slatepack data as QR code
short: q
long: slatepack_qr
- invoice:
about: Initialize an invoice transaction, outputting a Slatepack Message with the result
args:
@@ -244,6 +256,10 @@ subcommands:
short: u
long: outfile
takes_value: true
- slatepack_qr:
help: Show slatepack data as QR code
short: q
long: slatepack_qr
- pay:
about: Spend coins to pay the provided invoice transaction
args:
@@ -295,6 +311,10 @@ subcommands:
short: g
long: bridge
takes_value: true
- slatepack_qr:
help: Show slatepack data as QR code
short: q
long: slatepack_qr
- outputs:
about: Raw wallet output info (list of outputs)
- txs:
+18
View File
@@ -520,6 +520,8 @@ pub fn parse_send_args(args: &ArgMatches) -> Result<command::SendArgs, ParseErro
None => None,
};
let slatepack_qr = args.is_present("slatepack_qr");
Ok(command::SendArgs {
amount: amount,
minimum_confirmations: min_c,
@@ -536,6 +538,7 @@ pub fn parse_send_args(args: &ArgMatches) -> Result<command::SendArgs, ParseErro
outfile,
skip_tor: args.is_present("manual"),
bridge: bridge,
slatepack_qr: slatepack_qr,
})
}
@@ -563,12 +566,15 @@ pub fn parse_receive_args(args: &ArgMatches) -> Result<command::ReceiveArgs, Par
let bridge = parse_optional(args, "bridge")?;
let slatepack_qr = args.is_present("slatepack_qr");
Ok(command::ReceiveArgs {
input_file,
input_slatepack_message,
skip_tor: args.is_present("manual"),
outfile,
bridge,
slatepack_qr: slatepack_qr,
})
}
@@ -596,12 +602,15 @@ pub fn parse_unpack_args(args: &ArgMatches) -> Result<command::ReceiveArgs, Pars
let bridge = parse_optional(args, "bridge")?;
let slatepack_qr = args.is_present("slatepack_qr");
Ok(command::ReceiveArgs {
input_file,
input_slatepack_message,
skip_tor: args.is_present("manual"),
outfile,
bridge,
slatepack_qr: slatepack_qr,
})
}
@@ -629,12 +638,15 @@ pub fn parse_finalize_args(args: &ArgMatches) -> Result<command::FinalizeArgs, P
let outfile = parse_optional(args, "outfile")?;
let slatepack_qr = args.is_present("slatepack_qr");
Ok(command::FinalizeArgs {
input_file,
input_slatepack_message,
fluff: fluff,
nopost: nopost,
outfile,
slatepack_qr: slatepack_qr,
})
}
@@ -673,6 +685,8 @@ pub fn parse_issue_invoice_args(
let outfile = parse_optional(args, "outfile")?;
let slatepack_qr = args.is_present("slatepack_qr");
Ok(command::IssueInvoiceArgs {
dest: dest.into(),
issue_args: IssueInvoiceTxArgs {
@@ -681,6 +695,7 @@ pub fn parse_issue_invoice_args(
target_slate_version,
},
outfile,
slatepack_qr: slatepack_qr,
})
}
@@ -758,6 +773,8 @@ pub fn parse_process_invoice_args(
let bridge = parse_optional(args, "bridge")?;
let slatepack_qr = args.is_present("slatepack_qr");
Ok(command::ProcessInvoiceArgs {
minimum_confirmations: min_c,
selection_strategy: selection_strategy.to_owned(),
@@ -769,6 +786,7 @@ pub fn parse_process_invoice_args(
skip_tor: args.is_present("manual"),
outfile,
bridge,
slatepack_qr: slatepack_qr,
})
}