2
Does anyone know if Bitcore offer a testnet API to play around with?
I'm implementing an Escrow system using the API and Node.js and don't particularly want to use real Bitcoins.
Thanks.
2
Does anyone know if Bitcore offer a testnet API to play around with?
I'm implementing an Escrow system using the API and Node.js and don't particularly want to use real Bitcoins.
Thanks.
2
I figured this out, you need to set the default network after you instantiate bitcore.
var bitcore = require('bitcore');
// Set the network to testnet
bitcore.Networks.defaultNetwork = bitcore.Networks.testnet;
0
I had to mess around with this until I got it. Kinda silly it wasn't any where in the docs...
This is via Typescript
import * as bitcore from 'bitcore-lib'
bitcore.Networks['defaultNetwork'] = bitcore.Networks['testnet']
-1
Close bitcoind and then start bitcoind in a terminal or bash shell like so:
"bitcoind -testnet" Using that should cause bitcoin to use a test network.
Although on windows you might need to find the bitcoind.exe and execute that if the command bitcoind is not added to the system path.
This information was retrieved from bitcoin's core using "bitcoind -help" and a quote from it says "-testnet Use the test network"
2Bitcore != Bitcoin core FWIW – Wizard Of Ozzie – 2015-04-23T05:09:58.957
I asked about Bitcore not bitcoind... – Richard Macarthy – 2015-05-21T12:35:54.723
It seams this does not work anymore.
bitcore.Networksis nowbitcore.networksandbitcore.networks.defaultNetwork = bitcore.networks.testnetthrowsError: Cannot find module './build/Debug/buffertools.node'– Giszmo – 2017-09-06T16:14:02.110