[−][src]Struct hwi::interface::HWIDevice
Fields
device_type: String
model: String
path: String
needs_pin_sent: bool
needs_passphrase_sent: bool
fingerprint: Fingerprint
Implementations
impl HWIDevice
[src]
pub fn enumerate() -> Result<Vec<HWIDevice>, Error>
[src]
Lists all HW devices currently connected.
pub fn get_master_xpub(&self, testnet: bool) -> Result<HWIExtendedPubKey, Error>
[src]
pub fn sign_tx(
&self,
psbt: &PartiallySignedTransaction,
testnet: bool
) -> Result<HWIPartiallySignedTransaction, Error>
[src]
&self,
psbt: &PartiallySignedTransaction,
testnet: bool
) -> Result<HWIPartiallySignedTransaction, Error>
Returns a psbt signed.
Arguments
psbt
- The PSBT to be signed.testnet
- Whether to use testnet or not.
pub fn get_xpub(
&self,
path: &DerivationPath,
testnet: bool
) -> Result<HWIExtendedPubKey, Error>
[src]
&self,
path: &DerivationPath,
testnet: bool
) -> Result<HWIExtendedPubKey, Error>
Returns the xpub of a device.
Arguments
path
- The derivation path to derive the key.testnet
- Whether to use testnet or not.
pub fn sign_message(
&self,
message: &str,
path: &DerivationPath,
testnet: bool
) -> Result<HWISignature, Error>
[src]
&self,
message: &str,
path: &DerivationPath,
testnet: bool
) -> Result<HWISignature, Error>
Signs a message.
Arguments
message
- The message to sign.path
- The derivation path to derive the key.testnet
- Whether to use testnet or not.
pub fn get_keypool(
&self,
keypool: bool,
internal: bool,
address_type: HWIAddressType,
account: Option<u32>,
path: Option<&DerivationPath>,
start: u32,
end: u32,
testnet: bool
) -> Result<Vec<HWIKeyPoolElement>, Error>
[src]
&self,
keypool: bool,
internal: bool,
address_type: HWIAddressType,
account: Option<u32>,
path: Option<&DerivationPath>,
start: u32,
end: u32,
testnet: bool
) -> Result<Vec<HWIKeyPoolElement>, Error>
Returns an array of keys that can be imported in Bitcoin core using importmulti
Arguments
keypool
-keypool
value in result. Check bitcoin core importmulti documentation for further informationinternal
- Whether to use internal (change) or external keysaddress type
- HWIAddressType to useaccount
- Optional BIP43 account to usepath
- The derivation path to derive the keys.start
- Keypool startend
- Keypool endtestnet
- Whether to use testnet or not.
pub fn get_descriptors(
&self,
account: Option<u32>,
testnet: bool
) -> Result<HWIDescriptor, Error>
[src]
&self,
account: Option<u32>,
testnet: bool
) -> Result<HWIDescriptor, Error>
Returns device descriptors
Arguments
account
- Optional BIP43 account to use.testnet
- Whether to use testnet or not.
pub fn display_address_with_desc(
&self,
descriptor: &str,
testnet: bool
) -> Result<HWIAddress, Error>
[src]
&self,
descriptor: &str,
testnet: bool
) -> Result<HWIAddress, Error>
Returns an address given a descriptor.
Arguments
descriptor
- The descriptor to use. HWI doesn't support descriptors checksums.testnet
- Whether to use testnet or not.
pub fn display_address_with_path(
&self,
path: &DerivationPath,
address_type: HWIAddressType,
testnet: bool
) -> Result<HWIAddress, Error>
[src]
&self,
path: &DerivationPath,
address_type: HWIAddressType,
testnet: bool
) -> Result<HWIAddress, Error>
Returns an address given pat and address type
Arguments
path
- The derivation path to use.address_type
- Address type to use.testnet
- Whether to use testnet or not.
Trait Implementations
impl Clone for HWIDevice
[src]
impl<'de> Deserialize<'de> for HWIDevice
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl RefUnwindSafe for HWIDevice
impl Send for HWIDevice
impl Sync for HWIDevice
impl Unpin for HWIDevice
impl UnwindSafe for HWIDevice
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,