public class HardwareWallets extends Object
Factory to provide the following to HardwareWalletService:
This is a low level factory that is intended for use by higher level services.
Modifier and Type | Method and Description |
---|---|
static <T> T |
newHardwareWallet(HardwareWalletSpecification specification)
Create a new hardware wallet from the given specification
|
static HardwareWallet |
newHardwareWallet(String hardwareWalletClassName)
Create a new hardware wallet from the given class name
|
static <T extends HardwareWallet> |
newSocketInstance(Class<T> clazz,
String host,
int port)
Convenience method to wrap an arbitrary socket hardware wallet with static binding
|
static HardwareWallet |
newSocketInstance(String className,
String host,
int port)
Convenience method to wrap an arbitrary socket hardware wallet with dynamic binding
|
static <T extends HardwareWallet> |
newUsbInstance(Class<T> hardwareWalletClass,
com.google.common.base.Optional<Integer> vendorId,
com.google.common.base.Optional<Integer> productId,
com.google.common.base.Optional<String> serialNumber)
Convenience method to create an arbitrary USB hardware wallet (the normal mode of operation) with static binding
|
static HardwareWallet |
newUsbInstance(String className,
com.google.common.base.Optional<Integer> vendorId,
com.google.common.base.Optional<Integer> productId,
com.google.common.base.Optional<String> serialNumber)
Convenience method to create an arbitrary USB hardware wallet (the normal mode of operation) with dynamic binding
|
public static <T extends HardwareWallet> T newSocketInstance(Class<T> clazz, String host, int port)
Convenience method to wrap an arbitrary socket hardware wallet with static binding
Typically API consumers will use a dedicated client that provides this low level operation
clazz
- The class of the required hardware wallet implementationhost
- The host (e.g. "localhost" or "192.168.0.1")port
- The port (e.g. 3000)public static HardwareWallet newSocketInstance(String className, String host, int port)
Convenience method to wrap an arbitrary socket hardware wallet with dynamic binding
className
- The class name of the required hardware wallet implementationhost
- The host (e.g. "localhost" or "192.168.0.1")port
- The port (e.g. 3000)public static <T extends HardwareWallet> T newUsbInstance(Class<T> hardwareWalletClass, com.google.common.base.Optional<Integer> vendorId, com.google.common.base.Optional<Integer> productId, com.google.common.base.Optional<String> serialNumber)
Convenience method to create an arbitrary USB hardware wallet (the normal mode of operation) with static binding
API consumers are directed to the other builder methods that target specific device configurations
hardwareWalletClass
- The hardware walletvendorId
- The vendor ID (uses default if absent)productId
- The product ID (uses default if absent)serialNumber
- The device serial number (accepts any if absent)public static HardwareWallet newUsbInstance(String className, com.google.common.base.Optional<Integer> vendorId, com.google.common.base.Optional<Integer> productId, com.google.common.base.Optional<String> serialNumber)
Convenience method to create an arbitrary USB hardware wallet (the normal mode of operation) with dynamic binding
vendorId
- The vendor ID (uses default if absent)productId
- The product ID (uses default if absent)serialNumber
- The device serial number (accepts any if absent)public static HardwareWallet newHardwareWallet(String hardwareWalletClassName)
Create a new hardware wallet from the given class name
This approach allows for dynamic binding of the hardware wallet at runtime
API consumers are advised to use the usb or socket methods.
hardwareWalletClassName
- the fully-qualified class name of the HardwareWallet which must implementHardwareWalletSpecification
public static <T> T newHardwareWallet(HardwareWalletSpecification specification)
Create a new hardware wallet from the given specification
API consumers are advised to use the usb or socket methods.
specification
- The hardware wallet specificationCopyright © 2013–2017 Bitcoin Solutions Ltd. All rights reserved.