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
(async) scanInteractive(socket, start, filter, fullLockopt) → {Promise}
Scan using a socket's filter (interactive).
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
socket |
WebSocket | |||
start |
Hash | |||
filter |
BloomFilter | |||
fullLock |
Boolean |
<optional> |
false |
- Source:
Returns:
- Type
- Promise