public class TrezorRelayServer extends Object
Server to provide the following to RelayClient:
Modifier and Type | Field and Description |
---|---|
protected ExecutorService |
clientMonitorService |
static int |
DEFAULT_PORT_NUMBER |
protected ExecutorService |
hardwareWalletMonitorService |
protected ExecutorService |
serverExecutorService |
Constructor and Description |
---|
TrezorRelayServer()
Create a RelayServer, wrapping a Trezor V1 HID device, exposing port 3000
|
TrezorRelayServer(TrezorV1HidHardwareWallet hardwareWallet,
int portNumber)
Create a RelayServer using a HardwareWallet instance and the specified port
|
Modifier and Type | Method and Description |
---|---|
HardwareWallet |
getHardwareWallet() |
int |
getPortNumber() |
static void |
main(String[] args)
Start a RelayServer wrapping a Trezor V1 USB device on the DEFAULT_PORT_NUMBER (3000)
|
void |
onHardwareWalletProtocolEvent(MessageEvent event) |
void |
writeMessage(com.google.protobuf.Message message,
OutputStream out)
Send a message to an output stream
|
public static int DEFAULT_PORT_NUMBER
protected final ExecutorService serverExecutorService
protected final ExecutorService hardwareWalletMonitorService
protected final ExecutorService clientMonitorService
public TrezorRelayServer()
public TrezorRelayServer(TrezorV1HidHardwareWallet hardwareWallet, int portNumber) throws IOException
IOException
public int getPortNumber()
public HardwareWallet getHardwareWallet()
public void writeMessage(com.google.protobuf.Message message, OutputStream out)
message
- the message to serialise and send to the OutputStreampublic void onHardwareWalletProtocolEvent(MessageEvent event)
public static void main(String[] args)
Copyright © 2013–2016 Bitcoin Solutions Ltd. All rights reserved.