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.
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;
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']
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"