Skip to main content

HwiCliCommand

Enum HwiCliCommand 

Source
pub enum HwiCliCommand {
Show 17 variants Enumerate, Getmasterxpub { addr_type: HwiAddressType, account: u32, }, Signtx { psbt: String, }, Signmessage { message: String, path: String, }, Displayaddress { path: Option<String>, desc: Option<String>, addr_type: HwiAddressType, }, Getxpub { path: String, }, Getdescriptors { account: u32, }, Getkeypool { start: u32, end: u32, keypool: bool, nokeypool: bool, internal: bool, addr_type: Option<HwiAddressType>, all: bool, account: u32, path: Option<String>, }, Setup { label: String, backup_passphrase: String, }, Wipe, Restore { word_count: i32, label: String, }, Backup { label: String, backup_passphrase: String, }, Promptpin, Sendpin { pin: String, }, Togglepassphrase, Installudevrules { location: PathBuf, }, External(Vec<OsString>),
}
Expand description

Subcommands accepted by the Python HWI-compatible argument parser.

Variants§

§

Enumerate

Enumerates devices and their readiness or connection errors.

§

Getmasterxpub

Retrieves the account extended public key for an address type.

Fields

§addr_type: HwiAddressType

The address type used to select the BIP44-style purpose.

§account: u32

The account number, defaulting to zero.

§

Signtx

Signs a base64-encoded PSBT.

Fields

§psbt: String

The base64-encoded PSBT to sign.

§

Signmessage

Signs a UTF-8 message with a key at a derivation path.

Fields

§message: String

The message text to sign.

§path: String

The BIP32 derivation path of the signing key.

§

Displayaddress

Displays an address selected by exactly one path or descriptor.

Fields

§path: Option<String>

The BIP32 derivation path, mutually exclusive with desc.

§desc: Option<String>

The output descriptor, mutually exclusive with path.

§addr_type: HwiAddressType

The address type for a path request; ignored for a descriptor request.

§

Getxpub

Retrieves an extended public key at a BIP32 path.

Fields

§path: String

The derivation path of the extended public key.

§

Getdescriptors

Retrieves receive and change descriptors for an account.

Fields

§account: u32

The account number, defaulting to zero.

§

Getkeypool

Retrieves ranged descriptors for Bitcoin Core keypool import.

Fields

§start: u32

The inclusive first child index.

§end: u32

The inclusive last child index.

§keypool: bool

A compatibility flag; keypool import is enabled unless nokeypool is set.

§nokeypool: bool

Whether to disable keypool and active flags in the returned records.

§internal: bool

Whether to return only change descriptors; otherwise both branches are used without path.

§addr_type: Option<HwiAddressType>

The address type, defaulting to native SegWit and mutually exclusive with all.

§all: bool

Whether to return every address type supported by the selected device.

§account: u32

The account number, ignored when path is supplied.

§path: Option<String>

An explicit derivation path starting with m/ and ending in /*.

§

Setup

Initializes a supported device in interactive mode.

Fields

§label: String

The requested device label.

§backup_passphrase: String

A compatibility option rejected when nonempty for BitBox02 and unused by Trezor and KeepKey.

§

Wipe

Erases a supported device’s wallet.

§

Restore

Restores a supported device from a mnemonic in interactive mode.

Fields

§word_count: i32

The requested mnemonic word count.

§label: String

The requested device label.

§

Backup

Requests a BitBox02 mnemonic display or a Coldcard backup file.

Fields

§label: String

A compatibility label, required to be empty for BitBox02 and unused by Coldcard.

§backup_passphrase: String

A compatibility backup password, required to be empty for BitBox02 and unused by Coldcard.

§

Promptpin

Prompts a supported device to request host-entered PIN positions.

§

Sendpin

Sends scrambled keypad positions to a device waiting for a PIN.

Fields

§pin: String

A nonempty ASCII-digit position string, not literal PIN digits.

§

Togglepassphrase

Toggles passphrase protection on a supported device.

§

Installudevrules

Installs all device udev rules and updates permissions on Linux.

Fields

§location: PathBuf

The directory in which to write the udev rules.

§

External(Vec<OsString>)

Captures an unrecognized subcommand for compatibility error handling.

Tuple Fields

§0: Vec<OsString>

The unrecognized command name followed by its arguments.

Trait Implementations§

Source§

impl Clone for HwiCliCommand

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HwiCliCommand

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl FromArgMatches for HwiCliCommand

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for HwiCliCommand

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more