diff --git a/README.md b/README.md index d5fd07c..66d7d2c 100644 --- a/README.md +++ b/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. diff --git a/docker/my-dojo/node/keys.index.js b/docker/my-dojo/node/keys.index.js index eac0fed..5d433c4 100644 --- a/docker/my-dojo/node/keys.index.js +++ b/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 diff --git a/keys/index-example.js b/keys/index-example.js index 8a915dd..8f1621c 100644 --- a/keys/index-example.js +++ b/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: [ diff --git a/lib/remote-importer/btccom-wrapper.js b/lib/remote-importer/btccom-wrapper.js index 767f4b5..28e1f4e 100644 --- a/lib/remote-importer/btccom-wrapper.js +++ b/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) diff --git a/lib/remote-importer/esplora-wrapper.js b/lib/remote-importer/esplora-wrapper.js index 458c245..a962867 100644 --- a/lib/remote-importer/esplora-wrapper.js +++ b/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) diff --git a/lib/remote-importer/insight-wrapper.js b/lib/remote-importer/insight-wrapper.js index c11045f..54a4935 100644 --- a/lib/remote-importer/insight-wrapper.js +++ b/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) diff --git a/lib/remote-importer/oxt-wrapper.js b/lib/remote-importer/oxt-wrapper.js index dd63fa7..31a2bc1 100644 --- a/lib/remote-importer/oxt-wrapper.js +++ b/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) diff --git a/lib/remote-importer/remote-importer.js b/lib/remote-importer/remote-importer.js index c48a8db..72b7473 100644 --- a/lib/remote-importer/remote-importer.js +++ b/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 diff --git a/lib/remote-importer/sources-mainnet.js b/lib/remote-importer/sources-mainnet.js index 6bc1121..4621bb2 100644 --- a/lib/remote-importer/sources-mainnet.js +++ b/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') } } diff --git a/lib/remote-importer/sources-testnet.js b/lib/remote-importer/sources-testnet.js index 8b89c38..8201d35 100644 --- a/lib/remote-importer/sources-testnet.js +++ b/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') } }