Created
February 6, 2019 08:54
-
-
Save HOllarves/800fa72d1d3e119dd7c9236ebbd431de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Network } = require("bcoin") | |
const { WalletClient, NodeClient } = require("bclient") | |
const network = Network.get("testnet") | |
const walletOptions = { | |
network: network.type, | |
port: network.walletPort, | |
apiKey: process.env.BTC_API_KEY, | |
host: process.env.BTC_HOST | |
} | |
const nodeOptions = { | |
network: network.type, | |
port: network.rpcPort, | |
host: process.env.BTC_HOST, | |
apiKey: process.env.BTC_API_KEY, | |
} | |
const walletClient = new WalletClient(walletOptions) | |
const nodeClient = new NodeClient(nodeOptions) | |
const { eventListeners } = require("./bcoin-listeners") | |
eventListeners(walletClient, nodeClient) | |
module.exports = { walletClient } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment