Browse Source

rename config key "explorers"

umbrel
kenshin-samourai 5 years ago
parent
commit
fde63a6c83
  1. 4
      README.md
  2. 4
      docker/my-dojo/node/keys.index.js
  3. 6
      keys/index-example.js
  4. 4
      lib/remote-importer/btccom-wrapper.js
  5. 4
      lib/remote-importer/esplora-wrapper.js
  6. 4
      lib/remote-importer/insight-wrapper.js
  7. 4
      lib/remote-importer/oxt-wrapper.js
  8. 2
      lib/remote-importer/remote-importer.js
  9. 4
      lib/remote-importer/sources-mainnet.js
  10. 4
      lib/remote-importer/sources-testnet.js

4
README.md

@ -65,10 +65,10 @@ Authentication is enforced by an API key and Json Web Tokens.
* Default option relies on the local bitcoind and makes you 100% independent of Samourai Wallet's infrastructure. This option is recommended for better privacy.
* Activation of bitcoind as the data source:
* Edit /keys/index.js and set "explorers.bitcoind" to "active". OXT API will be ignored.
* Edit /keys/index.js and set "indexer.bitcoind" to "active". OXT API will be ignored.
* Activation of OXT as the data source (through socks5):
* Edit /keys/index.js and set "explorers.bitcoind" to "inactive".
* Edit /keys/index.js and set "indexer.bitcoind" to "inactive".
* Main drawbacks of using your local bitcoind for these imports:
* This option is considered as experimental.

4
docker/my-dojo/node/keys.index.js

@ -151,10 +151,10 @@ module.exports = {
transactions: 50
},
/*
* Third party explorers
* Indexer or third party service
* used for fast scan of addresses
*/
explorers: {
indexer: {
// Use local bitcoind for imports and rescans
// or use OXT as a fallback
// Values: active | inactive

6
keys/index-example.js

@ -147,10 +147,10 @@ module.exports = {
transactions: 50
},
/*
* Third party explorers
* Indexer or third party service
* used for fast scan of addresses
*/
explorers: {
indexer: {
// Use local bitcoind for imports and rescans
// or use OXT as a fallback
// Values: active | inactive
@ -270,7 +270,7 @@ module.exports = {
multiaddr: {
transactions: 50
},
explorers: {
indexer: {
bitcoind: 'inactive',
socks5Proxy: null,
insight: [

4
lib/remote-importer/btccom-wrapper.js

@ -22,7 +22,7 @@ class BtcComWrapper extends Wrapper {
* Constructor
*/
constructor(url) {
super(url, keys.explorers.socks5Proxy)
super(url, keys.indexer.socks5Proxy)
}
/**
@ -39,7 +39,7 @@ class BtcComWrapper extends Wrapper {
}
// Sets socks proxy agent if required
if (keys.explorers.socks5Proxy != null)
if (keys.indexer.socks5Proxy != null)
params['agent'] = this.socksProxyAgent
return rp(params)

4
lib/remote-importer/esplora-wrapper.js

@ -22,7 +22,7 @@ class EsploraWrapper extends Wrapper {
* Constructor
*/
constructor(url) {
super(url, keys.explorers.socks5Proxy)
super(url, keys.indexer.socks5Proxy)
}
/**
@ -39,7 +39,7 @@ class EsploraWrapper extends Wrapper {
}
// Sets socks proxy agent if required
if (keys.explorers.socks5Proxy != null)
if (keys.indexer.socks5Proxy != null)
params['agent'] = this.socksProxyAgent
return rp(params)

4
lib/remote-importer/insight-wrapper.js

@ -20,7 +20,7 @@ class InsightWrapper extends Wrapper {
* Constructor
*/
constructor(url) {
super(url, keys.explorers.socks5Proxy)
super(url, keys.indexer.socks5Proxy)
}
/**
@ -37,7 +37,7 @@ class InsightWrapper extends Wrapper {
}
// Sets socks proxy agent if required
if (keys.explorers.socks5Proxy != null)
if (keys.indexer.socks5Proxy != null)
params['agent'] = this.socksProxyAgent
return rp(params)

4
lib/remote-importer/oxt-wrapper.js

@ -20,7 +20,7 @@ class OxtWrapper extends Wrapper {
* Constructor
*/
constructor(url) {
super(url, keys.explorers.socks5Proxy)
super(url, keys.indexer.socks5Proxy)
}
/**
@ -37,7 +37,7 @@ class OxtWrapper extends Wrapper {
}
// Sets socks proxy agent if required
if (keys.explorers.socks5Proxy != null)
if (keys.indexer.socks5Proxy != null)
params['agent'] = this.socksProxyAgent
return rp(params)

2
lib/remote-importer/remote-importer.js

@ -145,7 +145,7 @@ class RemoteImporter {
let gaps = [gap.external, gap.internal]
// Allow custom higher gap limits
// for local scans relying on bitcoind
if (gapLimit && keys.explorers.bitcoind)
if (gapLimit && keys.indexer.bitcoind)
gaps = [gapLimit, gapLimit]
startIndex = (startIndex == null) ? -1 : startIndex - 1

4
lib/remote-importer/sources-mainnet.js

@ -29,14 +29,14 @@ class SourcesMainnet extends Sources {
* Initialize the external data source
*/
_initSource() {
if (keys.explorers.bitcoind == 'active') {
if (keys.indexer.bitcoind == 'active') {
// If local bitcoind option is activated
// we'll use the local node as our unique source
this.source = new BitcoindWrapper()
Logger.info('Activated Bitcoind as the data source for imports')
} else {
// Otherwise, we'll use the rest api provided by OXT
this.source = new OxtWrapper(keys.explorers.oxt)
this.source = new OxtWrapper(keys.indexer.oxt)
Logger.info('Activated OXT API as the data source for imports')
}
}

4
lib/remote-importer/sources-testnet.js

@ -30,14 +30,14 @@ class SourcesTestnet extends Sources {
* Initialize the external data source
*/
_initSource() {
if (keys.explorers.bitcoind == 'active') {
if (keys.indexer.bitcoind == 'active') {
// If local bitcoind option is activated
// we'll use the local node as our unique source
this.source = new BitcoindWrapper()
Logger.info('Activated Bitcoind as the data source for imports')
} else {
// Otherwise, we'll use the rest api provided by Esplora
this.source = new EsploraWrapper(keys.explorers.esplora)
this.source = new EsploraWrapper(keys.indexer.esplora)
Logger.info('Activated Esplora API as the data source for imports')
}
}

Loading…
Cancel
Save