edge-currency-plugins 3.4.5 → 3.5.0
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/android/src/main/assets/edge-currency-plugins/edge-currency-plugins.js +50 -48
- package/lib/common/plugin/CurrencyPlugin.js +23 -11
- package/lib/common/plugin/EngineEmitter.js +27 -3
- package/lib/common/plugin/PluginState.js +20 -37
- package/lib/common/plugin/types.js +5 -3
- package/lib/common/utxobased/db/Models/TransactionData.js +6 -0
- package/lib/common/utxobased/engine/UtxoEngine.js +55 -35
- package/lib/common/utxobased/engine/UtxoEngineProcessor.js +91 -43
- package/lib/common/utxobased/info/badcoin.js +3 -1
- package/lib/common/utxobased/info/bitcoin.js +3 -1
- package/lib/common/utxobased/info/bitcoincash.js +3 -1
- package/lib/common/utxobased/info/bitcoincashtestnet.js +3 -1
- package/lib/common/utxobased/info/bitcoingold.js +3 -1
- package/lib/common/utxobased/info/bitcoingoldtestnet.js +3 -1
- package/lib/common/utxobased/info/bitcoinsv.js +3 -1
- package/lib/common/utxobased/info/bitcointestnet.js +3 -1
- package/lib/common/utxobased/info/dash.js +3 -1
- package/lib/common/utxobased/info/digibyte.js +3 -1
- package/lib/common/utxobased/info/dogecoin.js +3 -1
- package/lib/common/utxobased/info/eboost.js +3 -1
- package/lib/common/utxobased/info/feathercoin.js +3 -1
- package/lib/common/utxobased/info/groestlcoin.js +3 -1
- package/lib/common/utxobased/info/litecoin.js +3 -1
- package/lib/common/utxobased/info/qtum.js +3 -1
- package/lib/common/utxobased/info/ravencoin.js +3 -1
- package/lib/common/utxobased/info/smartcash.js +3 -1
- package/lib/common/utxobased/info/ufo.js +3 -1
- package/lib/common/utxobased/info/vertcoin.js +3 -1
- package/lib/common/utxobased/info/zcoin.js +3 -1
- package/lib/common/utxobased/network/blockbookApi.js +1 -1
- package/lib/src/common/plugin/EngineEmitter.d.ts +6 -3
- package/lib/src/common/plugin/PluginState.d.ts +7 -4
- package/lib/src/common/plugin/types.d.ts +8 -4
- package/lib/src/common/utxobased/engine/UtxoEngineProcessor.d.ts +6 -10
- package/package.json +2 -2
|
@@ -8,9 +8,10 @@
|
|
|
8
8
|
var _commonInfo = require('./commonInfo');
|
|
9
9
|
|
|
10
10
|
const currencyInfo = {
|
|
11
|
+
assetDisplayName: 'Badcoin',
|
|
12
|
+
chainDisplayName: 'Badcoin',
|
|
11
13
|
currencyCode: 'BAD',
|
|
12
14
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
13
|
-
displayName: 'Badcoin',
|
|
14
15
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
15
16
|
pluginId: 'badcoin',
|
|
16
17
|
walletType: 'wallet:badcoin',
|
|
@@ -32,6 +33,7 @@ const currencyInfo = {
|
|
|
32
33
|
blockbookServers: [],
|
|
33
34
|
enableCustomServers: false
|
|
34
35
|
},
|
|
36
|
+
displayName: 'Badcoin',
|
|
35
37
|
metaTokens: []
|
|
36
38
|
}
|
|
37
39
|
|
|
@@ -9,10 +9,11 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
9
9
|
var _commonInfo = require('./commonInfo');
|
|
10
10
|
|
|
11
11
|
const currencyInfo = {
|
|
12
|
+
assetDisplayName: 'Bitcoin',
|
|
12
13
|
canReplaceByFee: true,
|
|
14
|
+
chainDisplayName: 'Bitcoin',
|
|
13
15
|
currencyCode: 'BTC',
|
|
14
16
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
15
|
-
displayName: 'Bitcoin',
|
|
16
17
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
17
18
|
pluginId: 'bitcoin',
|
|
18
19
|
walletType: 'wallet:bitcoin',
|
|
@@ -44,6 +45,7 @@ const currencyInfo = {
|
|
|
44
45
|
],
|
|
45
46
|
enableCustomServers: false
|
|
46
47
|
},
|
|
48
|
+
displayName: 'Bitcoin',
|
|
47
49
|
metaTokens: []
|
|
48
50
|
}
|
|
49
51
|
|
|
@@ -12,9 +12,10 @@ var _commonInfo = require('./commonInfo');
|
|
|
12
12
|
var _bitcoincashScriptTemplates = require('./scriptTemplates/bitcoincashScriptTemplates');
|
|
13
13
|
|
|
14
14
|
const currencyInfo = {
|
|
15
|
+
assetDisplayName: 'Bitcoin Cash',
|
|
16
|
+
chainDisplayName: 'Bitcoin Cash',
|
|
15
17
|
currencyCode: 'BCH',
|
|
16
18
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
17
|
-
displayName: 'Bitcoin Cash',
|
|
18
19
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
19
20
|
pluginId: 'bitcoincash',
|
|
20
21
|
walletType: 'wallet:bitcoincash',
|
|
@@ -45,6 +46,7 @@ const currencyInfo = {
|
|
|
45
46
|
],
|
|
46
47
|
enableCustomServers: false
|
|
47
48
|
},
|
|
49
|
+
displayName: 'Bitcoin Cash',
|
|
48
50
|
metaTokens: []
|
|
49
51
|
}
|
|
50
52
|
|
|
@@ -10,8 +10,9 @@ var _commonInfo = require('./commonInfo');
|
|
|
10
10
|
var _bitcoincashScriptTemplates = require('./scriptTemplates/bitcoincashScriptTemplates');
|
|
11
11
|
|
|
12
12
|
const currencyInfo = {
|
|
13
|
+
assetDisplayName: 'Bitcoin Cash Testnet',
|
|
14
|
+
chainDisplayName: 'Bitcoin Cash Testnet',
|
|
13
15
|
currencyCode: 'TBCH',
|
|
14
|
-
displayName: 'Bitcoin Cash',
|
|
15
16
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
16
17
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
17
18
|
pluginId: 'bitcoincashtestnet',
|
|
@@ -36,6 +37,7 @@ const currencyInfo = {
|
|
|
36
37
|
blockbookServers: [],
|
|
37
38
|
enableCustomServers: false
|
|
38
39
|
},
|
|
40
|
+
displayName: 'Bitcoin Cash',
|
|
39
41
|
metaTokens: []
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -10,9 +10,10 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
10
10
|
var _commonInfo = require('./commonInfo');
|
|
11
11
|
|
|
12
12
|
const currencyInfo = {
|
|
13
|
+
assetDisplayName: 'Bitcoin Gold',
|
|
14
|
+
chainDisplayName: 'Bitcoin Gold',
|
|
13
15
|
currencyCode: 'BTG',
|
|
14
16
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
15
|
-
displayName: 'Bitcoin Gold',
|
|
16
17
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
17
18
|
pluginId: 'bitcoingold',
|
|
18
19
|
walletType: 'wallet:bitcoingold',
|
|
@@ -41,6 +42,7 @@ const currencyInfo = {
|
|
|
41
42
|
],
|
|
42
43
|
enableCustomServers: false
|
|
43
44
|
},
|
|
45
|
+
displayName: 'Bitcoin Gold',
|
|
44
46
|
metaTokens: []
|
|
45
47
|
}
|
|
46
48
|
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
var _commonInfo = require('./commonInfo');
|
|
10
10
|
|
|
11
11
|
const currencyInfo = {
|
|
12
|
+
assetDisplayName: 'Bitcoin Gold Testnet',
|
|
13
|
+
chainDisplayName: 'Bitcoin Gold Testnet',
|
|
12
14
|
currencyCode: 'TBTG',
|
|
13
15
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
14
|
-
displayName: 'Bitcoin Gold',
|
|
15
16
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
16
17
|
pluginId: 'bitcoingoldtestnet',
|
|
17
18
|
walletType: 'wallet:bitcoingoldtestnet',
|
|
@@ -34,6 +35,7 @@ const currencyInfo = {
|
|
|
34
35
|
blockbookServers: [],
|
|
35
36
|
enableCustomServers: false
|
|
36
37
|
},
|
|
38
|
+
displayName: 'Bitcoin Gold Testnet',
|
|
37
39
|
metaTokens: []
|
|
38
40
|
}
|
|
39
41
|
|
|
@@ -16,9 +16,10 @@ var _keymanager = require('../keymanager/keymanager');
|
|
|
16
16
|
var _commonInfo = require('./commonInfo');
|
|
17
17
|
|
|
18
18
|
const currencyInfo = {
|
|
19
|
+
assetDisplayName: 'Bitcoin SV',
|
|
20
|
+
chainDisplayName: 'Bitcoin SV',
|
|
19
21
|
currencyCode: 'BSV',
|
|
20
22
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
21
|
-
displayName: 'Bitcoin SV',
|
|
22
23
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
23
24
|
pluginId: 'bitcoinsv',
|
|
24
25
|
walletType: 'wallet:bitcoinsv',
|
|
@@ -41,6 +42,7 @@ const currencyInfo = {
|
|
|
41
42
|
blockbookServers: ['wss://blockbook.siftbitcoin.com:9146'],
|
|
42
43
|
enableCustomServers: false
|
|
43
44
|
},
|
|
45
|
+
displayName: 'Bitcoin SV',
|
|
44
46
|
metaTokens: []
|
|
45
47
|
}
|
|
46
48
|
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
var _commonInfo = require('./commonInfo');
|
|
9
9
|
|
|
10
10
|
const currencyInfo = {
|
|
11
|
+
assetDisplayName: 'Bitcoin Testnet',
|
|
12
|
+
chainDisplayName: 'Bitcoin Testnet',
|
|
11
13
|
canReplaceByFee: true,
|
|
12
14
|
currencyCode: 'TESTBTC',
|
|
13
15
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
14
|
-
displayName: 'Bitcoin Testnet',
|
|
15
16
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
16
17
|
pluginId: 'bitcointestnet',
|
|
17
18
|
walletType: 'wallet:bitcointestnet',
|
|
@@ -35,6 +36,7 @@ var _commonInfo = require('./commonInfo');
|
|
|
35
36
|
blockbookServers: ['wss://tbtc1.trezor.io', 'wss://tbtc2.trezor.io'],
|
|
36
37
|
enableCustomServers: false
|
|
37
38
|
},
|
|
39
|
+
displayName: 'Bitcoin Testnet',
|
|
38
40
|
metaTokens: []
|
|
39
41
|
}; exports.currencyInfo = currencyInfo
|
|
40
42
|
|
|
@@ -11,9 +11,10 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
11
11
|
var _commonInfo = require('./commonInfo');
|
|
12
12
|
|
|
13
13
|
const currencyInfo = {
|
|
14
|
+
assetDisplayName: 'Dash',
|
|
15
|
+
chainDisplayName: 'Dash',
|
|
14
16
|
currencyCode: 'DASH',
|
|
15
17
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
16
|
-
displayName: 'Dash',
|
|
17
18
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
18
19
|
pluginId: 'dash',
|
|
19
20
|
walletType: 'wallet:dash',
|
|
@@ -44,6 +45,7 @@ const currencyInfo = {
|
|
|
44
45
|
],
|
|
45
46
|
enableCustomServers: false
|
|
46
47
|
},
|
|
48
|
+
displayName: 'Dash',
|
|
47
49
|
metaTokens: []
|
|
48
50
|
}
|
|
49
51
|
|
|
@@ -9,9 +9,10 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
9
9
|
var _commonInfo = require('./commonInfo');
|
|
10
10
|
|
|
11
11
|
const currencyInfo = {
|
|
12
|
+
assetDisplayName: 'DigiByte',
|
|
13
|
+
chainDisplayName: 'DigiByte',
|
|
12
14
|
currencyCode: 'DGB',
|
|
13
15
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
14
|
-
displayName: 'DigiByte',
|
|
15
16
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
16
17
|
pluginId: 'digibyte',
|
|
17
18
|
walletType: 'wallet:digibyte',
|
|
@@ -37,6 +38,7 @@ const currencyInfo = {
|
|
|
37
38
|
],
|
|
38
39
|
enableCustomServers: false
|
|
39
40
|
},
|
|
41
|
+
displayName: 'DigiByte',
|
|
40
42
|
metaTokens: []
|
|
41
43
|
}
|
|
42
44
|
|
|
@@ -10,9 +10,10 @@ var _commonInfo = require('./commonInfo');
|
|
|
10
10
|
var _dogeUtxoPicker = require('./utxoPickers/dogeUtxoPicker');
|
|
11
11
|
|
|
12
12
|
const currencyInfo = {
|
|
13
|
+
assetDisplayName: 'Dogecoin',
|
|
14
|
+
chainDisplayName: 'Dogecoin',
|
|
13
15
|
currencyCode: 'DOGE',
|
|
14
16
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
15
|
-
displayName: 'Dogecoin',
|
|
16
17
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
17
18
|
pluginId: 'dogecoin',
|
|
18
19
|
walletType: 'wallet:dogecoin',
|
|
@@ -40,6 +41,7 @@ const currencyInfo = {
|
|
|
40
41
|
],
|
|
41
42
|
enableCustomServers: false
|
|
42
43
|
},
|
|
44
|
+
displayName: 'Dogecoin',
|
|
43
45
|
metaTokens: []
|
|
44
46
|
}
|
|
45
47
|
|
|
@@ -9,9 +9,10 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
9
9
|
var _commonInfo = require('./commonInfo');
|
|
10
10
|
|
|
11
11
|
const currencyInfo = {
|
|
12
|
+
assetDisplayName: 'eBoost',
|
|
13
|
+
chainDisplayName: 'eBoost',
|
|
12
14
|
currencyCode: 'EBST',
|
|
13
15
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
14
|
-
displayName: 'eBoost',
|
|
15
16
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
16
17
|
pluginId: 'eboost',
|
|
17
18
|
walletType: 'wallet:eboost',
|
|
@@ -33,6 +34,7 @@ const currencyInfo = {
|
|
|
33
34
|
blockbookServers: [],
|
|
34
35
|
enableCustomServers: false
|
|
35
36
|
},
|
|
37
|
+
displayName: 'eBoost',
|
|
36
38
|
metaTokens: []
|
|
37
39
|
}
|
|
38
40
|
|
|
@@ -9,9 +9,10 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
9
9
|
var _commonInfo = require('./commonInfo');
|
|
10
10
|
|
|
11
11
|
const currencyInfo = {
|
|
12
|
+
assetDisplayName: 'Feathercoin',
|
|
13
|
+
chainDisplayName: 'Feathercoin',
|
|
12
14
|
currencyCode: 'FTC',
|
|
13
15
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
14
|
-
displayName: 'Feathercoin',
|
|
15
16
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
16
17
|
pluginId: 'feathercoin',
|
|
17
18
|
walletType: 'wallet:feathercoin',
|
|
@@ -33,6 +34,7 @@ var _commonInfo = require('./commonInfo');
|
|
|
33
34
|
blockbookServers: ['wss://blockbook.feathercoin.com'],
|
|
34
35
|
enableCustomServers: false
|
|
35
36
|
},
|
|
37
|
+
displayName: 'Feathercoin',
|
|
36
38
|
metaTokens: []
|
|
37
39
|
}; exports.currencyInfo = currencyInfo
|
|
38
40
|
|
|
@@ -13,9 +13,10 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
13
13
|
var _commonInfo = require('./commonInfo');
|
|
14
14
|
|
|
15
15
|
const currencyInfo = {
|
|
16
|
+
assetDisplayName: 'Groestlcoin',
|
|
17
|
+
chainDisplayName: 'Groestlcoin',
|
|
16
18
|
currencyCode: 'GRS',
|
|
17
19
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
18
|
-
displayName: 'Groestlcoin',
|
|
19
20
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
20
21
|
pluginId: 'groestlcoin',
|
|
21
22
|
walletType: 'wallet:groestlcoin',
|
|
@@ -42,6 +43,7 @@ const currencyInfo = {
|
|
|
42
43
|
],
|
|
43
44
|
enableCustomServers: false
|
|
44
45
|
},
|
|
46
|
+
displayName: 'Groestlcoin',
|
|
45
47
|
metaTokens: []
|
|
46
48
|
}
|
|
47
49
|
|
|
@@ -10,9 +10,10 @@ var _commonInfo = require('./commonInfo');
|
|
|
10
10
|
|
|
11
11
|
const currencyInfo = {
|
|
12
12
|
canReplaceByFee: false,
|
|
13
|
+
assetDisplayName: 'Litecoin',
|
|
14
|
+
chainDisplayName: 'Litecoin',
|
|
13
15
|
currencyCode: 'LTC',
|
|
14
16
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
15
|
-
displayName: 'Litecoin',
|
|
16
17
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
17
18
|
pluginId: 'litecoin',
|
|
18
19
|
walletType: 'wallet:litecoin',
|
|
@@ -42,6 +43,7 @@ var _commonInfo = require('./commonInfo');
|
|
|
42
43
|
],
|
|
43
44
|
enableCustomServers: false
|
|
44
45
|
},
|
|
46
|
+
displayName: 'Litecoin',
|
|
45
47
|
metaTokens: []
|
|
46
48
|
}; exports.currencyInfo = currencyInfo
|
|
47
49
|
|
|
@@ -9,9 +9,10 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
9
9
|
var _commonInfo = require('./commonInfo');
|
|
10
10
|
|
|
11
11
|
const currencyInfo = {
|
|
12
|
+
assetDisplayName: 'Qtum',
|
|
13
|
+
chainDisplayName: 'Qtum',
|
|
12
14
|
currencyCode: 'QTUM',
|
|
13
15
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
14
|
-
displayName: 'Qtum',
|
|
15
16
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
16
17
|
pluginId: 'qtum',
|
|
17
18
|
walletType: 'wallet:qtum',
|
|
@@ -30,6 +31,7 @@ const currencyInfo = {
|
|
|
30
31
|
blockbookServers: [],
|
|
31
32
|
enableCustomServers: false
|
|
32
33
|
},
|
|
34
|
+
displayName: 'Qtum',
|
|
33
35
|
metaTokens: []
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -9,9 +9,10 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
9
9
|
var _commonInfo = require('./commonInfo');
|
|
10
10
|
|
|
11
11
|
const currencyInfo = {
|
|
12
|
+
assetDisplayName: 'Ravencoin',
|
|
13
|
+
chainDisplayName: 'Ravencoin',
|
|
12
14
|
currencyCode: 'RVN',
|
|
13
15
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
14
|
-
displayName: 'Ravencoin',
|
|
15
16
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
16
17
|
pluginId: 'ravencoin',
|
|
17
18
|
walletType: 'wallet:ravencoin',
|
|
@@ -30,6 +31,7 @@ const currencyInfo = {
|
|
|
30
31
|
blockbookServers: ['wss://blockbook.ravencoin.org'],
|
|
31
32
|
enableCustomServers: false
|
|
32
33
|
},
|
|
34
|
+
displayName: 'Ravencoin',
|
|
33
35
|
metaTokens: []
|
|
34
36
|
}
|
|
35
37
|
|
|
@@ -12,9 +12,10 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
12
12
|
var _commonInfo = require('./commonInfo');
|
|
13
13
|
|
|
14
14
|
const currencyInfo = {
|
|
15
|
+
assetDisplayName: 'SmartCash',
|
|
16
|
+
chainDisplayName: 'SmartCash',
|
|
15
17
|
currencyCode: 'SMART',
|
|
16
18
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
17
|
-
displayName: 'SmartCash',
|
|
18
19
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
19
20
|
pluginId: 'smartcash',
|
|
20
21
|
walletType: 'wallet:smartcash',
|
|
@@ -36,6 +37,7 @@ const currencyInfo = {
|
|
|
36
37
|
blockbookServers: [],
|
|
37
38
|
enableCustomServers: false
|
|
38
39
|
},
|
|
40
|
+
displayName: 'SmartCash',
|
|
39
41
|
metaTokens: []
|
|
40
42
|
}
|
|
41
43
|
|
|
@@ -9,9 +9,10 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
9
9
|
var _commonInfo = require('./commonInfo');
|
|
10
10
|
|
|
11
11
|
const currencyInfo = {
|
|
12
|
+
assetDisplayName: 'UFO',
|
|
13
|
+
chainDisplayName: 'UFO',
|
|
12
14
|
currencyCode: 'UFO',
|
|
13
15
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
14
|
-
displayName: 'UFO',
|
|
15
16
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
16
17
|
pluginId: 'ufo',
|
|
17
18
|
walletType: 'wallet:ufo',
|
|
@@ -33,6 +34,7 @@ const currencyInfo = {
|
|
|
33
34
|
blockbookServers: ['wss://blockbook.ufobject.com'],
|
|
34
35
|
enableCustomServers: false
|
|
35
36
|
},
|
|
37
|
+
displayName: 'UFO',
|
|
36
38
|
metaTokens: []
|
|
37
39
|
}
|
|
38
40
|
|
|
@@ -9,9 +9,10 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
9
9
|
var _commonInfo = require('./commonInfo');
|
|
10
10
|
|
|
11
11
|
const currencyInfo = {
|
|
12
|
+
assetDisplayName: 'Vertcoin',
|
|
13
|
+
chainDisplayName: 'Vertcoin',
|
|
12
14
|
currencyCode: 'VTC',
|
|
13
15
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
14
|
-
displayName: 'Vertcoin',
|
|
15
16
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
16
17
|
pluginId: 'vertcoin',
|
|
17
18
|
walletType: 'wallet:vertcoin',
|
|
@@ -39,6 +40,7 @@ const currencyInfo = {
|
|
|
39
40
|
],
|
|
40
41
|
enableCustomServers: false
|
|
41
42
|
},
|
|
43
|
+
displayName: 'Vertcoin',
|
|
42
44
|
metaTokens: []
|
|
43
45
|
}
|
|
44
46
|
|
|
@@ -9,9 +9,10 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
9
9
|
var _commonInfo = require('./commonInfo');
|
|
10
10
|
|
|
11
11
|
const currencyInfo = {
|
|
12
|
+
assetDisplayName: 'Firo',
|
|
13
|
+
chainDisplayName: 'Firo',
|
|
12
14
|
currencyCode: 'FIRO',
|
|
13
15
|
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
14
|
-
displayName: 'Firo',
|
|
15
16
|
memoOptions: _commonInfo.utxoMemoOptions,
|
|
16
17
|
pluginId: 'zcoin',
|
|
17
18
|
walletType: 'wallet:zcoin',
|
|
@@ -37,6 +38,7 @@ var _commonInfo = require('./commonInfo');
|
|
|
37
38
|
],
|
|
38
39
|
enableCustomServers: false
|
|
39
40
|
},
|
|
41
|
+
displayName: 'Firo',
|
|
40
42
|
metaTokens: []
|
|
41
43
|
}; exports.currencyInfo = currencyInfo
|
|
42
44
|
|
|
@@ -200,7 +200,7 @@ var _cleaners = require('cleaners');
|
|
|
200
200
|
bestHash: _cleaners.asString,
|
|
201
201
|
block0Hash: _cleaners.asString,
|
|
202
202
|
testnet: _cleaners.asBoolean,
|
|
203
|
-
backend: _cleaners.
|
|
203
|
+
backend: _cleaners.asMaybe.call(void 0,
|
|
204
204
|
_cleaners.asObject.call(void 0, {
|
|
205
205
|
version: _cleaners.asString,
|
|
206
206
|
subversion: _cleaners.asString
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { EdgeCurrencyEngineCallbacks, EdgeTransaction, EdgeTxidMap } from 'edge-core-js/types';
|
|
2
|
+
import { EdgeCurrencyEngineCallbacks, EdgeTransaction, EdgeTransactionEvent, EdgeTxidMap } from 'edge-core-js/types';
|
|
3
3
|
import { EventEmitter } from 'events';
|
|
4
4
|
import { SubscribeAddressResponse } from '../utxobased/network/blockbookApi';
|
|
5
5
|
export declare interface EngineEmitter {
|
|
6
|
-
emit: ((event: EngineEvent.TRANSACTIONS_CHANGED, transactions: EdgeTransaction[]) => boolean) & ((event: EngineEvent.ADDRESS_BALANCE_CHANGED, currencyCode: string, addressBalanceChanges: Array<{
|
|
6
|
+
emit: ((event: EngineEvent.SEEN_TX_CHECKPOINT, checkpoint: string) => boolean) & ((event: EngineEvent.TRANSACTIONS, transactionEvents: EdgeTransactionEvent[]) => boolean) & ((event: EngineEvent.TRANSACTIONS_CHANGED, transactions: EdgeTransaction[]) => boolean) & ((event: EngineEvent.ADDRESS_BALANCE_CHANGED, currencyCode: string, addressBalanceChanges: Array<{
|
|
7
7
|
scriptPubkey: string;
|
|
8
8
|
balance: string;
|
|
9
9
|
}>) => boolean) & ((event: EngineEvent.WALLET_BALANCE_CHANGED, currencyCode: string, nativeBalance: string) => boolean) & ((event: EngineEvent.BLOCK_HEIGHT_CHANGED, uri: string, blockHeight: number) => boolean) & ((event: EngineEvent.NEW_ADDRESS_TRANSACTION, uri: string, newTx: SubscribeAddressResponse) => boolean) & ((event: EngineEvent.ADDRESSES_CHECKED, progressRatio: number) => boolean) & ((event: EngineEvent.TXIDS_CHANGED, txids: EdgeTxidMap) => boolean);
|
|
10
|
-
on: ((event: EngineEvent.TRANSACTIONS_CHANGED, listener: (transactions: EdgeTransaction[]) => Promise<void> | void) => this) & ((event: EngineEvent.ADDRESS_BALANCE_CHANGED, listener: (currencyCode: string, addressBalanceChanges: Array<{
|
|
10
|
+
on: ((event: EngineEvent.SEEN_TX_CHECKPOINT, listener: (checkpoint: string) => Promise<void> | void) => this) & ((event: EngineEvent.TRANSACTIONS, listener: (transactionEvents: EdgeTransactionEvent[]) => Promise<void> | void) => boolean) & ((event: EngineEvent.TRANSACTIONS_CHANGED, listener: (transactions: EdgeTransaction[]) => Promise<void> | void) => this) & ((event: EngineEvent.ADDRESS_BALANCE_CHANGED, listener: (currencyCode: string, addressBalanceChanges: Array<{
|
|
11
11
|
scriptPubkey: string;
|
|
12
12
|
balance: string;
|
|
13
13
|
}>) => Promise<void> | void) => this) & ((event: EngineEvent.WALLET_BALANCE_CHANGED, listener: (currencyCode: string, nativeBalance: string) => Promise<void> | void) => this) & ((event: EngineEvent.BLOCK_HEIGHT_CHANGED, listener: (uri: string, blockHeight: number) => Promise<void> | void) => this) & ((event: EngineEvent.NEW_ADDRESS_TRANSACTION, listener: (uri: string, newTx: SubscribeAddressResponse) => Promise<void> | void) => this) & ((event: EngineEvent.ADDRESSES_CHECKED, listener: (progressRatio: number) => Promise<void> | void) => this) & ((event: EngineEvent.TXIDS_CHANGED, listener: (txids: EdgeTxidMap) => Promise<void> | void) => this);
|
|
@@ -15,6 +15,9 @@ export declare interface EngineEmitter {
|
|
|
15
15
|
export declare class EngineEmitter extends EventEmitter {
|
|
16
16
|
}
|
|
17
17
|
export declare enum EngineEvent {
|
|
18
|
+
SEEN_TX_CHECKPOINT = "seen:tx:checkpoint",
|
|
19
|
+
TRANSACTIONS = "transactions",
|
|
20
|
+
/** @deprecated Use TRANSACTIONS */
|
|
18
21
|
TRANSACTIONS_CHANGED = "transactions:changed",
|
|
19
22
|
WALLET_BALANCE_CHANGED = "wallet:balance:changed",
|
|
20
23
|
ADDRESS_BALANCE_CHANGED = "address:balance:changed",
|
|
@@ -2,6 +2,7 @@ import { Disklet } from 'disklet';
|
|
|
2
2
|
import { EdgeIo, EdgeLog } from 'edge-core-js/types';
|
|
3
3
|
import { UtxoUserSettings } from '../utxobased/engine/types';
|
|
4
4
|
import { UtxoEngineProcessor } from '../utxobased/engine/UtxoEngineProcessor';
|
|
5
|
+
import { InfoPayload } from './types';
|
|
5
6
|
/** A JSON object (as opposed to an array or primitive). */
|
|
6
7
|
interface JsonObject {
|
|
7
8
|
[name: string]: unknown;
|
|
@@ -11,14 +12,16 @@ interface JsonObject {
|
|
|
11
12
|
* Engine plugins are responsible for keeping it up to date.
|
|
12
13
|
*/
|
|
13
14
|
export interface PluginStateSettings {
|
|
14
|
-
io: EdgeIo;
|
|
15
|
-
defaultSettings: UtxoUserSettings;
|
|
16
15
|
currencyCode: string;
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
defaultSettings: UtxoUserSettings;
|
|
17
|
+
infoPayload: InfoPayload | undefined;
|
|
18
|
+
io: EdgeIo;
|
|
19
19
|
log: EdgeLog;
|
|
20
|
+
pluginDisklet: Disklet;
|
|
21
|
+
pluginId: string;
|
|
20
22
|
}
|
|
21
23
|
export interface PluginState {
|
|
24
|
+
infoPayload: InfoPayload | undefined;
|
|
22
25
|
addEngine: (engineProcessor: UtxoEngineProcessor) => void;
|
|
23
26
|
removeEngine: (engineProcessor: UtxoEngineProcessor) => void;
|
|
24
27
|
dumpData: () => JsonObject;
|
|
@@ -268,14 +268,12 @@ export interface EngineConfig {
|
|
|
268
268
|
pluginInfo: PluginInfo;
|
|
269
269
|
pluginDisklet: Disklet;
|
|
270
270
|
currencyTools: EdgeCurrencyTools;
|
|
271
|
-
|
|
271
|
+
engineOptions: EdgeCurrencyEngineOptions;
|
|
272
|
+
emitter: EngineEmitter;
|
|
272
273
|
initOptions: UtxoInitOptions;
|
|
273
274
|
io: EdgeIo;
|
|
274
275
|
pluginState: PluginState;
|
|
275
276
|
}
|
|
276
|
-
export interface EngineOptions extends EdgeCurrencyEngineOptions {
|
|
277
|
-
emitter: EngineEmitter;
|
|
278
|
-
}
|
|
279
277
|
export declare type LocalWalletMetadata = ReturnType<typeof asLocalWalletMetadata>;
|
|
280
278
|
export declare const asLocalWalletMetadata: import("cleaners").ObjectCleaner<{
|
|
281
279
|
balance: string;
|
|
@@ -284,4 +282,10 @@ export declare const asLocalWalletMetadata: import("cleaners").ObjectCleaner<{
|
|
|
284
282
|
};
|
|
285
283
|
lastSeenBlockHeight: number;
|
|
286
284
|
}>;
|
|
285
|
+
export declare const asInfoPayload: import("cleaners").ObjectCleaner<{
|
|
286
|
+
blockbookServers: {
|
|
287
|
+
[keys: string]: boolean;
|
|
288
|
+
};
|
|
289
|
+
}>;
|
|
290
|
+
export declare type InfoPayload = ReturnType<typeof asInfoPayload>;
|
|
287
291
|
export {};
|
|
@@ -2,7 +2,7 @@ import { EdgeFreshAddress, EdgeIo, EdgeLog, EdgeTransaction } from 'edge-core-js
|
|
|
2
2
|
import { EngineEmitter } from '../../plugin/EngineEmitter';
|
|
3
3
|
import { ChangePath, CurrencyFormat, EngineConfig, PluginInfo } from '../../plugin/types';
|
|
4
4
|
import { DataLayer } from '../db/DataLayer';
|
|
5
|
-
import { AddressData,
|
|
5
|
+
import { AddressData, UtxoData } from '../db/types';
|
|
6
6
|
import { SafeWalletInfo } from '../keymanager/cleaners';
|
|
7
7
|
import { AddressResponse, AddressUtxosResponse, BlockbookAccountUtxo, TransactionResponse } from '../network/blockbookApi';
|
|
8
8
|
import { WsTask } from '../network/Socket';
|
|
@@ -27,9 +27,10 @@ export interface UtxoEngineProcessor {
|
|
|
27
27
|
processUtxos: (utxos: UtxoData[]) => Promise<void>;
|
|
28
28
|
}
|
|
29
29
|
export interface UtxoEngineProcessorConfig extends EngineConfig {
|
|
30
|
+
dataLayer: DataLayer;
|
|
31
|
+
seenTxCheckpoint: (value?: string) => string | undefined;
|
|
30
32
|
walletTools: UtxoWalletTools;
|
|
31
33
|
walletInfo: SafeWalletInfo;
|
|
32
|
-
dataLayer: DataLayer;
|
|
33
34
|
}
|
|
34
35
|
export declare function makeUtxoEngineProcessor(config: UtxoEngineProcessorConfig): UtxoEngineProcessor;
|
|
35
36
|
interface CommonParams {
|
|
@@ -40,8 +41,11 @@ interface CommonParams {
|
|
|
40
41
|
emitter: EngineEmitter;
|
|
41
42
|
taskCache: TaskCache;
|
|
42
43
|
updateProgressRatio: () => void;
|
|
44
|
+
updateSeenTxCheckpoint: () => void;
|
|
43
45
|
io: EdgeIo;
|
|
44
46
|
log: EdgeLog;
|
|
47
|
+
maxSeenTxBlockHeight: number;
|
|
48
|
+
seenTxCheckpoint: (value?: string) => string | undefined;
|
|
45
49
|
serverStates: ServerStates;
|
|
46
50
|
walletFormats: CurrencyFormat[];
|
|
47
51
|
lock: AwaitLock;
|
|
@@ -102,14 +106,6 @@ interface TransactionUpdateCache {
|
|
|
102
106
|
processing: boolean;
|
|
103
107
|
};
|
|
104
108
|
}
|
|
105
|
-
export declare const transactionChanged: (args: {
|
|
106
|
-
dataLayer: DataLayer;
|
|
107
|
-
emitter: EngineEmitter;
|
|
108
|
-
pluginInfo: PluginInfo;
|
|
109
|
-
tx: TransactionData;
|
|
110
|
-
walletTools: UtxoWalletTools;
|
|
111
|
-
walletId: string;
|
|
112
|
-
}) => Promise<void>;
|
|
113
109
|
/**
|
|
114
110
|
* The pickNextTask generator is responsible for selecting the next WsTask
|
|
115
111
|
* to be done by the network layer. It will yield WsTasks or booleans for early
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edge-currency-plugins",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "Edge currency plugins to fetch and process wallet accounts, balances and transactions.",
|
|
5
5
|
"homepage": "https://edge.app/",
|
|
6
6
|
"repository": "https://github.com/EdgeApp/edge-currency-plugins",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"base-x": "^4.0.0",
|
|
88
88
|
"chai": "^4.2.0",
|
|
89
89
|
"chai-as-promised": "^7.1.1",
|
|
90
|
-
"edge-core-js": "^2.
|
|
90
|
+
"edge-core-js": "^2.24.0",
|
|
91
91
|
"esbuild-loader": "^4.1.0",
|
|
92
92
|
"eslint": "^7.14.0",
|
|
93
93
|
"eslint-config-standard-kit": "0.15.1",
|