Constructor
new SPVNode(optionsnullable)
Create SPV node.
Extends:
- Node
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<nullable> |
Properties
|
- Source:
Extends
- Node
Methods
(async) broadcast(item) → {Promise}
Broadcast a transaction (note that this will not be verified by the mempool - use with care, lest you get banned from bitcoind nodes).
Parameters:
Name | Type | Description |
---|---|---|
item |
TX | Block |
- Source:
Returns:
- Type
- Promise
(async) close() → {Promise}
Close the node, wait for the database to close.
- Source:
Returns:
- Type
- Promise
connect() → {Promise}
Connect to the network.
- Source:
Returns:
- Type
- Promise
disconnect() → {Promise}
Disconnect from the network.
- Source:
Returns:
- Type
- Promise
(private) init()
Initialize the node.
- Source:
(async) open() → {Promise}
Open the node and all its child objects, wait for the database to load.
- Source:
Returns:
- Type
- Promise
relay(tx) → {Promise}
Broadcast a transaction. Silence errors.
Parameters:
Name | Type | Description |
---|---|---|
tx |
TX |
- Source:
Returns:
- Type
- Promise
(async) scan(start) → {Promise}
Scan for any missed transactions. Note that this will replay the blockchain sync.
Parameters:
Name | Type | Description |
---|---|---|
start |
Number | Hash | Start block. |
- Source:
Returns:
- Type
- Promise
sendTX(tx) → {Promise}
Broadcast a transaction (note that this will not be verified by the mempool - use with care, lest you get banned from bitcoind nodes).
Parameters:
Name | Type | Description |
---|---|---|
tx |
TX |
- Source:
Returns:
- Type
- Promise
startSync()
Start the blockchain sync.
- Source:
stopSync()
Stop syncing the blockchain.
- Source: