Constructor
new Server(options)
Create an http server.
Parameters:
Name | Type | Description |
---|---|---|
options |
Object |
- Source:
Methods
(private) filterBlock(socket, block) → {Array.<TX>}
Filter block by socket.
Parameters:
Name | Type | Description |
---|---|---|
socket |
WebSocket | |
block |
Block |
- Source:
Returns:
- Type
- Array.<TX>
(private) filterTX(socket, tx) → {Boolean}
Filter transaction by socket.
Parameters:
Name | Type | Description |
---|---|---|
socket |
WebSocket | |
tx |
TX |
- Source:
Returns:
- Type
- Boolean
(private) handleAuth(socket)
Handle new auth'd websocket.
Parameters:
Name | Type | Description |
---|---|---|
socket |
WebSocket |
- Source:
(private) handleSocket(socket)
Handle new websocket.
Parameters:
Name | Type | Description |
---|---|---|
socket |
WebSocket |
- Source:
(private) init()
Initialize routes.
- Source:
(private) initRouter()
Initialize routes.
- Source:
(private) initSockets()
Bind to chain events.
- Source:
(async, private) scan(socket, start) → {Promise}
Scan using a socket's filter.
Parameters:
Name | Type | Description |
---|---|---|
socket |
WebSocket | |
start |
Hash |
- Source:
Returns:
- Type
- Promise