pub enum HwiCommand {
Show 18 variants
Enumerate,
GetMasterXpub {
addr_type: HwiAddressType,
account: u32,
},
SignTx {
psbt: String,
},
SignMessage {
message: String,
path: String,
},
DisplayAddress(HwiDisplayAddressRequest),
GetXpub {
path: String,
expert: bool,
},
GetDescriptors {
account: u32,
},
GetKeypool {
start: u32,
end: u32,
internal: bool,
keypool: bool,
account: u32,
addr_type: HwiAddressType,
all: bool,
path: Option<String>,
},
Backup {
label: String,
backup_passphrase: String,
},
Setup {
interactive: bool,
label: String,
backup_passphrase: String,
},
Wipe,
Restore {
interactive: bool,
word_count: i32,
label: String,
},
TogglePassphrase,
PromptPin,
SendPin {
pin: String,
},
UnsupportedDeviceAction(HwiUnsupportedDeviceAction),
InstallUdevRules {
location: PathBuf,
},
Unsupported(String),
}Expand description
An executable Python HWI-compatible operation.
Device support varies; unsupported operations return an HwiError in
HwiResponse::Error rather than succeeding without performing the operation.
Variants§
Enumerate
Enumerates devices, including per-device errors and readiness information.
GetMasterXpub
Retrieves the extended public key for an account and address type.
Fields
addr_type: HwiAddressTypeThe address type used to select the account’s derivation purpose.
SignTx
Signs a PSBT, preparing Ledger policy contexts when required.
SignMessage
Signs a UTF-8 message at a BIP32 derivation path.
DisplayAddress(HwiDisplayAddressRequest)
Retrieves an address and requests display on the device.
Tuple Fields
0: HwiDisplayAddressRequestThe path or descriptor identifying the address.
GetXpub
Retrieves an extended public key at a BIP32 path.
Fields
GetDescriptors
Retrieves receive and change descriptors for supported address types.
GetKeypool
Retrieves ranged Bitcoin Core descriptor-import records.
Fields
addr_type: HwiAddressTypeThe address type to use unless all is true.
Backup
Requests a BitBox02 mnemonic display or writes a Coldcard backup to a local file.
Fields
Setup
Initializes a BitBox02, Trezor, or KeepKey.
Fields
Wipe
Erases a supported device’s wallet.
Restore
Restores a BitBox02, Trezor, or KeepKey from a mnemonic.
Fields
TogglePassphrase
Toggles passphrase protection on a supported device.
PromptPin
Requests PIN entry and prints keypad instructions to stderr.
SendPin
Sends scrambled keypad positions to a supported device waiting for a PIN.
UnsupportedDeviceAction(HwiUnsupportedDeviceAction)
Produces a device-specific unsupported-action error after selecting a device.
Tuple Fields
0: HwiUnsupportedDeviceActionThe management action used to choose the error message.
InstallUdevRules
Installs all udev rules, updates the USB group, and reloads rules on Linux.
Unsupported(String)
Reports an unsupported HWI command without selecting a device.
Trait Implementations§
Source§impl Clone for HwiCommand
impl Clone for HwiCommand
Source§impl Debug for HwiCommand
impl Debug for HwiCommand
impl Eq for HwiCommand
Source§impl PartialEq for HwiCommand
impl PartialEq for HwiCommand
impl StructuralPartialEq for HwiCommand
Auto Trait Implementations§
impl Freeze for HwiCommand
impl RefUnwindSafe for HwiCommand
impl Send for HwiCommand
impl Sync for HwiCommand
impl Unpin for HwiCommand
impl UnsafeUnpin for HwiCommand
impl UnwindSafe for HwiCommand
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.