Browse Source
Added bitcoinRegtest server to peers.json.
Added bitcoinRegtest as needed throughout client.js.
get-transaction-merkle
Corey Phillips
3 years ago
No known key found for this signature in database
GPG Key ID: 80C0975F55D3A07B
3 changed files with
14 additions and
6 deletions
-
helpers/clients.js
-
helpers/index.js
-
helpers/peers.json
|
|
@ -3,23 +3,28 @@ class Clients { |
|
|
|
this.network = "bitcoin"; |
|
|
|
this.mainClient = { |
|
|
|
bitcoin: false, |
|
|
|
bitcoinTestnet: false |
|
|
|
bitcoinTestnet: false, |
|
|
|
bitcoinRegtest: false |
|
|
|
}; |
|
|
|
this.peer = { |
|
|
|
bitcoin: { port: 0, host: "", protocol: "" }, |
|
|
|
bitcoinTestnet: { port: 0, host: "", protocol: "" } |
|
|
|
bitcoinTestnet: { port: 0, host: "", protocol: "" }, |
|
|
|
bitcoinRegtest: { port: 0, host: "", protocol: "" } |
|
|
|
}; |
|
|
|
this.peers = { |
|
|
|
bitcoin: [], |
|
|
|
bitcoinTestnet: [] |
|
|
|
bitcoinTestnet: [], |
|
|
|
bitcoinRegtest: [] |
|
|
|
}; |
|
|
|
this.subscribedAddresses = { |
|
|
|
bitcoin: [], |
|
|
|
bitcoinTestnet: [] |
|
|
|
bitcoinTestnet: [], |
|
|
|
bitcoinRegtest: [] |
|
|
|
}; |
|
|
|
this.subscribedHeaders = { |
|
|
|
bitcoin: false, |
|
|
|
bitcoinTestnet: false, |
|
|
|
bitcoinRegtest: false |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -444,9 +444,9 @@ const broadcastTransaction = ({ rawTx = [], id = Math.random(), network = "", ti |
|
|
|
* Returns header hex of the provided height and network. |
|
|
|
* @param {Number} [height] |
|
|
|
* @param {Number} [id] |
|
|
|
* @param {"bitcoin" | "bitcoinTestnet"} network |
|
|
|
* @param {"bitcoin" | "bitcoinTestnet" | "bitcoinRegtest"} network |
|
|
|
* @param {Number | undefined} [timeout] |
|
|
|
* @return {Promise<{id: Number, error: boolean, method: "getHeader", data: string, network: "bitcoin" | "bitcoinTestnet"}>} |
|
|
|
* @return {Promise<{id: Number, error: boolean, method: "getHeader", data: string, network: "bitcoin" | "bitcoinTestnet" | "bitcoinRegtest"}>} |
|
|
|
*/ |
|
|
|
const getHeader = ({ height = 0, id = Math.random(), network = "", timeout = undefined } = {}) => { |
|
|
|
const method = "getHeader"; |
|
|
|
|
|
@ -11,5 +11,8 @@ |
|
|
|
{"host": "testnet.hsmiths.com", "ssl": 53012, "tcp": 53011}, |
|
|
|
{"host": "tn.not.fyi", "ssl": 55002, "tcp": 55001}, |
|
|
|
{"host": "testnet.aranguren.org", "ssl": 51002, "tcp": 51001} |
|
|
|
], |
|
|
|
"bitcoinRegtest": [ |
|
|
|
{"host": "35.233.47.252", "ssl": 18482, "tcp": 18483} |
|
|
|
] |
|
|
|
} |
|
|
|