@exodus/bitcoin-plugin 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/bitcoin-plugin",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Exodus bitcoin-plugin",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -26,5 +26,5 @@
26
26
  "devDependencies": {
27
27
  "@exodus/keychain": "^3.0.0"
28
28
  },
29
- "gitHead": "f21eede554fe7a0b99f2f65121457ece5d18f2b6"
29
+ "gitHead": "4d882676a056823765b0856f94c5c664351e9f2e"
30
30
  }
@@ -104,7 +104,14 @@ export const createBitcoinAssetFactory = ({ base, apiUrl, coinInfoNetwork }) =>
104
104
 
105
105
  const accountStateClass = createAccountState({ asset })
106
106
 
107
+ const addressHasHistory = async (address) => {
108
+ assert(typeof address === 'string', 'Address is required')
109
+ const result = await insightClient.fetchTxData([address], { from: 0, to: 1 })
110
+ return !!result?.items.length
111
+ }
112
+
107
113
  const api = {
114
+ addressHasHistory,
108
115
  defaultAddressPath: 'm/0/0',
109
116
  broadcastTx: (...args) => insightClient.broadcastTx(...args),
110
117
  createFeeMonitor: (args) =>