edge-currency-plugins 1.0.0-rc.1
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/LICENSE +21 -0
- package/README.md +3 -0
- package/lib/bch.js +15 -0
- package/lib/bsv.js +15 -0
- package/lib/btc.js +15 -0
- package/lib/common/constants.js +11 -0
- package/lib/common/fees/calcMinerFeePerByte.js +62 -0
- package/lib/common/fees/makeFees.js +182 -0
- package/lib/common/fees/processInfoServerFees.js +30 -0
- package/lib/common/fees/processMempoolSpaceFees.js +38 -0
- package/lib/common/plugin/makeCurrencyPlugin.js +66 -0
- package/lib/common/plugin/makeCurrencyTools.js +211 -0
- package/lib/common/plugin/makeEngineEmitter.js +102 -0
- package/lib/common/plugin/makeMetadata.js +99 -0
- package/lib/common/plugin/pluginState.js +253 -0
- package/lib/common/plugin/serverScores.js +328 -0
- package/lib/common/plugin/types.js +173 -0
- package/lib/common/plugin/utils.js +18 -0
- package/lib/common/utxobased/db/Models/ProcessorTransaction.js +122 -0
- package/lib/common/utxobased/db/Models/baselet.js +81 -0
- package/lib/common/utxobased/db/makeBaselets.js +123 -0
- package/lib/common/utxobased/db/makeMutex.js +17 -0
- package/lib/common/utxobased/db/makeProcessor.js +554 -0
- package/lib/common/utxobased/db/types.js +67 -0
- package/lib/common/utxobased/engine/await-lock.js +65 -0
- package/lib/common/utxobased/engine/constants.js +7 -0
- package/lib/common/utxobased/engine/makeServerStates.js +394 -0
- package/lib/common/utxobased/engine/makeUtxoEngine.js +690 -0
- package/lib/common/utxobased/engine/makeUtxoEngineState.js +1443 -0
- package/lib/common/utxobased/engine/makeUtxoWalletTools.js +216 -0
- package/lib/common/utxobased/engine/paymentRequest.js +102 -0
- package/lib/common/utxobased/engine/types.js +21 -0
- package/lib/common/utxobased/engine/util/defaultValidateConfirmations.js +19 -0
- package/lib/common/utxobased/engine/util/getOwnUtxosFromTx.js +54 -0
- package/lib/common/utxobased/engine/utils.js +239 -0
- package/lib/common/utxobased/info/all.js +67 -0
- package/lib/common/utxobased/info/badcoin.js +73 -0
- package/lib/common/utxobased/info/bitcoin.js +91 -0
- package/lib/common/utxobased/info/bitcoincash.js +93 -0
- package/lib/common/utxobased/info/bitcoincashtestnet.js +72 -0
- package/lib/common/utxobased/info/bitcoingold.js +85 -0
- package/lib/common/utxobased/info/bitcoingoldtestnet.js +71 -0
- package/lib/common/utxobased/info/bitcoinsv.js +76 -0
- package/lib/common/utxobased/info/bitcointestnet.js +81 -0
- package/lib/common/utxobased/info/dash.js +76 -0
- package/lib/common/utxobased/info/digibyte.js +76 -0
- package/lib/common/utxobased/info/dogecoin.js +76 -0
- package/lib/common/utxobased/info/eboost.js +70 -0
- package/lib/common/utxobased/info/feathercoin.js +76 -0
- package/lib/common/utxobased/info/groestlcoin.js +88 -0
- package/lib/common/utxobased/info/litecoin.js +82 -0
- package/lib/common/utxobased/info/qtum.js +67 -0
- package/lib/common/utxobased/info/ravencoin.js +70 -0
- package/lib/common/utxobased/info/scriptTemplates/bitcoincashScriptTemplates.js +56 -0
- package/lib/common/utxobased/info/scriptTemplates/types.js +14 -0
- package/lib/common/utxobased/info/smartcash.js +78 -0
- package/lib/common/utxobased/info/ufo.js +75 -0
- package/lib/common/utxobased/info/utxoPickers/dogeUtxoPicker.js +34 -0
- package/lib/common/utxobased/info/vertcoin.js +82 -0
- package/lib/common/utxobased/info/zcoin.js +72 -0
- package/lib/common/utxobased/keymanager/base.js +60 -0
- package/lib/common/utxobased/keymanager/bip69.js +31 -0
- package/lib/common/utxobased/keymanager/bitcoincashUtils/base32.js +88 -0
- package/lib/common/utxobased/keymanager/bitcoincashUtils/bn.js +210 -0
- package/lib/common/utxobased/keymanager/bitcoincashUtils/cashAddress.js +282 -0
- package/lib/common/utxobased/keymanager/cleaners.js +198 -0
- package/lib/common/utxobased/keymanager/coinmapper.js +12 -0
- package/lib/common/utxobased/keymanager/declarations/base58grscheck.d.js +1 -0
- package/lib/common/utxobased/keymanager/declarations/blake-hash.d.js +1 -0
- package/lib/common/utxobased/keymanager/declarations/bn.d.js +1 -0
- package/lib/common/utxobased/keymanager/declarations/bs58smartcheck.d.js +1 -0
- package/lib/common/utxobased/keymanager/declarations/wif-smart.d.js +1 -0
- package/lib/common/utxobased/keymanager/declarations/wifgrs.d.js +1 -0
- package/lib/common/utxobased/keymanager/keymanager.js +1214 -0
- package/lib/common/utxobased/keymanager/utxopicker/accumulative.js +52 -0
- package/lib/common/utxobased/keymanager/utxopicker/forceUseUtxo.js +59 -0
- package/lib/common/utxobased/keymanager/utxopicker/subtractFee.js +17 -0
- package/lib/common/utxobased/keymanager/utxopicker/types.js +42 -0
- package/lib/common/utxobased/keymanager/utxopicker/utils.js +159 -0
- package/lib/common/utxobased/keymanager/utxopicker.js +17 -0
- package/lib/common/utxobased/network/BlockBook.js +200 -0
- package/lib/common/utxobased/network/BlockBookAPI.js +335 -0
- package/lib/common/utxobased/network/Deferred.js +29 -0
- package/lib/common/utxobased/network/MakeSocketEmitter.js +35 -0
- package/lib/common/utxobased/network/Socket.js +362 -0
- package/lib/common/utxobased/network/nodejsWS.js +59 -0
- package/lib/common/utxobased/network/socketQueue.js +60 -0
- package/lib/common/utxobased/network/types.js +19 -0
- package/lib/common/utxobased/network/windowWS.js +54 -0
- package/lib/firo.js +15 -0
- package/lib/ftc.js +15 -0
- package/lib/index.js +19 -0
- package/lib/ltc.js +15 -0
- package/lib/src/bch.d.ts +3 -0
- package/lib/src/bsv.d.ts +3 -0
- package/lib/src/btc.d.ts +3 -0
- package/lib/src/common/constants.d.ts +9 -0
- package/lib/src/common/fees/calcMinerFeePerByte.d.ts +13 -0
- package/lib/src/common/fees/makeFees.d.ts +20 -0
- package/lib/src/common/fees/processInfoServerFees.d.ts +7 -0
- package/lib/src/common/fees/processMempoolSpaceFees.d.ts +13 -0
- package/lib/src/common/plugin/makeCurrencyPlugin.d.ts +3 -0
- package/lib/src/common/plugin/makeCurrencyTools.d.ts +8 -0
- package/lib/src/common/plugin/makeEngineEmitter.d.ts +23 -0
- package/lib/src/common/plugin/makeMetadata.d.ts +14 -0
- package/lib/src/common/plugin/pluginState.d.ts +34 -0
- package/lib/src/common/plugin/serverScores.d.ts +61 -0
- package/lib/src/common/plugin/types.d.ts +135 -0
- package/lib/src/common/plugin/utils.d.ts +6 -0
- package/lib/src/common/utxobased/db/Models/ProcessorTransaction.d.ts +16 -0
- package/lib/src/common/utxobased/db/Models/baselet.d.ts +28 -0
- package/lib/src/common/utxobased/db/makeBaselets.d.ts +33 -0
- package/lib/src/common/utxobased/db/makeMutex.d.ts +3 -0
- package/lib/src/common/utxobased/db/makeProcessor.d.ts +42 -0
- package/lib/src/common/utxobased/db/types.d.ts +47 -0
- package/lib/src/common/utxobased/engine/await-lock.d.ts +29 -0
- package/lib/src/common/utxobased/engine/constants.d.ts +4 -0
- package/lib/src/common/utxobased/engine/makeServerStates.d.ts +37 -0
- package/lib/src/common/utxobased/engine/makeUtxoEngine.d.ts +3 -0
- package/lib/src/common/utxobased/engine/makeUtxoEngineState.d.ts +108 -0
- package/lib/src/common/utxobased/engine/makeUtxoWalletTools.d.ts +52 -0
- package/lib/src/common/utxobased/engine/paymentRequest.d.ts +18 -0
- package/lib/src/common/utxobased/engine/types.d.ts +19 -0
- package/lib/src/common/utxobased/engine/util/defaultValidateConfirmations.d.ts +3 -0
- package/lib/src/common/utxobased/engine/util/getOwnUtxosFromTx.d.ts +4 -0
- package/lib/src/common/utxobased/engine/utils.d.ts +43 -0
- package/lib/src/common/utxobased/info/all.d.ts +22 -0
- package/lib/src/common/utxobased/info/badcoin.d.ts +3 -0
- package/lib/src/common/utxobased/info/bitcoin.d.ts +3 -0
- package/lib/src/common/utxobased/info/bitcoincash.d.ts +3 -0
- package/lib/src/common/utxobased/info/bitcoincashtestnet.d.ts +3 -0
- package/lib/src/common/utxobased/info/bitcoingold.d.ts +3 -0
- package/lib/src/common/utxobased/info/bitcoingoldtestnet.d.ts +3 -0
- package/lib/src/common/utxobased/info/bitcoinsv.d.ts +3 -0
- package/lib/src/common/utxobased/info/bitcointestnet.d.ts +6 -0
- package/lib/src/common/utxobased/info/dash.d.ts +3 -0
- package/lib/src/common/utxobased/info/digibyte.d.ts +3 -0
- package/lib/src/common/utxobased/info/dogecoin.d.ts +3 -0
- package/lib/src/common/utxobased/info/eboost.d.ts +3 -0
- package/lib/src/common/utxobased/info/feathercoin.d.ts +6 -0
- package/lib/src/common/utxobased/info/groestlcoin.d.ts +3 -0
- package/lib/src/common/utxobased/info/litecoin.d.ts +6 -0
- package/lib/src/common/utxobased/info/qtum.d.ts +3 -0
- package/lib/src/common/utxobased/info/ravencoin.d.ts +3 -0
- package/lib/src/common/utxobased/info/scriptTemplates/bitcoincashScriptTemplates.d.ts +2 -0
- package/lib/src/common/utxobased/info/scriptTemplates/types.d.ts +9 -0
- package/lib/src/common/utxobased/info/smartcash.d.ts +3 -0
- package/lib/src/common/utxobased/info/ufo.d.ts +3 -0
- package/lib/src/common/utxobased/info/utxoPickers/dogeUtxoPicker.d.ts +2 -0
- package/lib/src/common/utxobased/info/vertcoin.d.ts +3 -0
- package/lib/src/common/utxobased/info/zcoin.d.ts +6 -0
- package/lib/src/common/utxobased/keymanager/base.d.ts +9 -0
- package/lib/src/common/utxobased/keymanager/bip69.d.ts +19 -0
- package/lib/src/common/utxobased/keymanager/bitcoincashUtils/base32.d.ts +19 -0
- package/lib/src/common/utxobased/keymanager/bitcoincashUtils/bn.d.ts +2 -0
- package/lib/src/common/utxobased/keymanager/bitcoincashUtils/cashAddress.d.ts +12 -0
- package/lib/src/common/utxobased/keymanager/cleaners.d.ts +55 -0
- package/lib/src/common/utxobased/keymanager/coinmapper.d.ts +2 -0
- package/lib/src/common/utxobased/keymanager/keymanager.d.ts +198 -0
- package/lib/src/common/utxobased/keymanager/utxopicker/accumulative.d.ts +2 -0
- package/lib/src/common/utxobased/keymanager/utxopicker/forceUseUtxo.d.ts +2 -0
- package/lib/src/common/utxobased/keymanager/utxopicker/subtractFee.d.ts +2 -0
- package/lib/src/common/utxobased/keymanager/utxopicker/types.d.ts +36 -0
- package/lib/src/common/utxobased/keymanager/utxopicker/utils.d.ts +15 -0
- package/lib/src/common/utxobased/keymanager/utxopicker.d.ts +8 -0
- package/lib/src/common/utxobased/network/BlockBook.d.ts +33 -0
- package/lib/src/common/utxobased/network/BlockBookAPI.d.ts +163 -0
- package/lib/src/common/utxobased/network/Deferred.d.ts +8 -0
- package/lib/src/common/utxobased/network/MakeSocketEmitter.d.ts +13 -0
- package/lib/src/common/utxobased/network/Socket.d.ts +41 -0
- package/lib/src/common/utxobased/network/nodejsWS.d.ts +2 -0
- package/lib/src/common/utxobased/network/socketQueue.d.ts +8 -0
- package/lib/src/common/utxobased/network/types.d.ts +17 -0
- package/lib/src/common/utxobased/network/windowWS.d.ts +2 -0
- package/lib/src/firo.d.ts +3 -0
- package/lib/src/ftc.d.ts +3 -0
- package/lib/src/index.d.ts +4 -0
- package/lib/src/ltc.d.ts +3 -0
- package/lib/src/tbch.d.ts +3 -0
- package/lib/src/tbtc.d.ts +3 -0
- package/lib/src/tbtg.d.ts +3 -0
- package/lib/src/types.d.ts +6 -0
- package/lib/src/util/delay.d.ts +1 -0
- package/lib/src/util/filterUndefined.d.ts +1 -0
- package/lib/src/util/indexAtProtected.d.ts +5 -0
- package/lib/src/util/typeUtil.d.ts +8 -0
- package/lib/src/util/undefinedIfEmptyString.d.ts +1 -0
- package/lib/src/util/unixTime.d.ts +1 -0
- package/lib/tbch.js +15 -0
- package/lib/tbtc.js +15 -0
- package/lib/tbtg.js +15 -0
- package/lib/test/common/fees/calcMinerFeePerByte.spec.d.ts +1 -0
- package/lib/test/common/fees/fees.spec.d.ts +1 -0
- package/lib/test/common/plugin/currencyPlugin.fixtures/common.d.ts +29 -0
- package/lib/test/common/plugin/currencyPlugin.fixtures/currencies/bitcoin.d.ts +2 -0
- package/lib/test/common/plugin/currencyPlugin.fixtures/currencies/bitcoincash.d.ts +2 -0
- package/lib/test/common/plugin/currencyPlugin.fixtures/currencies/bitcoinsv.d.ts +2 -0
- package/lib/test/common/plugin/currencyPlugin.fixtures/currencies/digibyte.d.ts +2 -0
- package/lib/test/common/plugin/currencyPlugin.fixtures/currencies/feathercoin.d.ts +2 -0
- package/lib/test/common/plugin/currencyPlugin.fixtures/currencies/groestlcoin.d.ts +2 -0
- package/lib/test/common/plugin/currencyPlugin.fixtures/currencies/litecoin.d.ts +2 -0
- package/lib/test/common/plugin/currencyPlugin.fixtures/currencies/smartcash.d.ts +2 -0
- package/lib/test/common/plugin/currencyPlugin.fixtures/currencies/zcoin.d.ts +2 -0
- package/lib/test/common/plugin/currencyPlugin.fixtures/index.d.ts +2 -0
- package/lib/test/common/plugin/currencyPlugin.spec.d.ts +1 -0
- package/lib/test/common/plugin/makeMetadata.spec.d.ts +1 -0
- package/lib/test/common/plugin/serverScores.spec.d.ts +1 -0
- package/lib/test/common/utxobased/addressFormat/addressFormatIndex/addressFormat.spec.d.ts +1 -0
- package/lib/test/common/utxobased/db/Processor.spec.d.ts +1 -0
- package/lib/test/common/utxobased/engine/PaymentRequest.spec.d.ts +1 -0
- package/lib/test/common/utxobased/engine/UtxoWalletTools.spec.d.ts +1 -0
- package/lib/test/common/utxobased/engine/engine.fixtures/bitcoinTestnet/tests.d.ts +70 -0
- package/lib/test/common/utxobased/engine/engine.fixtures/index.d.ts +65 -0
- package/lib/test/common/utxobased/engine/engine.spec.d.ts +1 -0
- package/lib/test/common/utxobased/keymanager/coins/altcointestfixtures.d.ts +54 -0
- package/lib/test/common/utxobased/keymanager/coins/bitcoincashtransactiontest.spec.d.ts +1 -0
- package/lib/test/common/utxobased/keymanager/coins/bitcointransactiontest.spec.d.ts +1 -0
- package/lib/test/common/utxobased/keymanager/coins/cashaddr.spec.d.ts +1 -0
- package/lib/test/common/utxobased/keymanager/coins/checkdatasig.spec.d.ts +1 -0
- package/lib/test/common/utxobased/keymanager/coins/groestlcointransactiontest.spec.d.ts +1 -0
- package/lib/test/common/utxobased/keymanager/coins/keymanagertest.spec.d.ts +1 -0
- package/lib/test/common/utxobased/network/BlockBook.spec.d.ts +1 -0
- package/lib/test/util/objectKeys.d.ts +8 -0
- package/lib/test/util/testLog.d.ts +3 -0
- package/lib/test/utils.d.ts +10 -0
- package/lib/types.js +7 -0
- package/lib/util/delay.js +4 -0
- package/lib/util/filterUndefined.js +4 -0
- package/lib/util/indexAtProtected.js +9 -0
- package/lib/util/typeUtil.js +9 -0
- package/lib/util/undefinedIfEmptyString.js +2 -0
- package/lib/util/unixTime.js +2 -0
- package/package.json +101 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createNamedExportFrom(obj, localName, importedName) { Object.defineProperty(exports, localName, {enumerable: true, get: () => obj[importedName]}); }var _badcoin = require('./badcoin'); _createNamedExportFrom(_badcoin, 'badcoin', 'info');
|
|
2
|
+
var _bitcoin = require('./bitcoin'); _createNamedExportFrom(_bitcoin, 'bitcoin', 'info');
|
|
3
|
+
var _bitcoincash = require('./bitcoincash'); _createNamedExportFrom(_bitcoincash, 'bitcoincash', 'info');
|
|
4
|
+
var _bitcoincashtestnet = require('./bitcoincashtestnet'); _createNamedExportFrom(_bitcoincashtestnet, 'bitcoincashtestnet', 'info');
|
|
5
|
+
var _bitcoingold = require('./bitcoingold'); _createNamedExportFrom(_bitcoingold, 'bitcoingold', 'info');
|
|
6
|
+
var _bitcoingoldtestnet = require('./bitcoingoldtestnet'); _createNamedExportFrom(_bitcoingoldtestnet, 'bitcoingoldtestnet', 'info');
|
|
7
|
+
var _bitcoinsv = require('./bitcoinsv'); _createNamedExportFrom(_bitcoinsv, 'bitcoinsv', 'info');
|
|
8
|
+
var _bitcointestnet = require('./bitcointestnet'); _createNamedExportFrom(_bitcointestnet, 'bitcointestnet', 'info');
|
|
9
|
+
var _dash = require('./dash'); _createNamedExportFrom(_dash, 'dash', 'info');
|
|
10
|
+
var _digibyte = require('./digibyte'); _createNamedExportFrom(_digibyte, 'digibyte', 'info');
|
|
11
|
+
var _dogecoin = require('./dogecoin'); _createNamedExportFrom(_dogecoin, 'dogecoin', 'info');
|
|
12
|
+
var _eboost = require('./eboost'); _createNamedExportFrom(_eboost, 'eboost', 'info');
|
|
13
|
+
var _feathercoin = require('./feathercoin'); _createNamedExportFrom(_feathercoin, 'feathercoin', 'info');
|
|
14
|
+
var _groestlcoin = require('./groestlcoin'); _createNamedExportFrom(_groestlcoin, 'groestlcoin', 'info');
|
|
15
|
+
var _litecoin = require('./litecoin'); _createNamedExportFrom(_litecoin, 'litecoin', 'info');
|
|
16
|
+
var _qtum = require('./qtum'); _createNamedExportFrom(_qtum, 'qtum', 'info');
|
|
17
|
+
var _ravencoin = require('./ravencoin'); _createNamedExportFrom(_ravencoin, 'ravencoin', 'info');
|
|
18
|
+
var _smartcash = require('./smartcash'); _createNamedExportFrom(_smartcash, 'smartcash', 'info');
|
|
19
|
+
var _ufo = require('./ufo'); _createNamedExportFrom(_ufo, 'ufo', 'info');
|
|
20
|
+
var _vertcoin = require('./vertcoin'); _createNamedExportFrom(_vertcoin, 'vertcoin', 'info');
|
|
21
|
+
var _zcoin = require('./zcoin'); _createNamedExportFrom(_zcoin, 'zcoin', 'info');
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
const all = [
|
|
46
|
+
_badcoin.info,
|
|
47
|
+
_bitcoin.info,
|
|
48
|
+
_bitcoincash.info,
|
|
49
|
+
_bitcoincashtestnet.info,
|
|
50
|
+
_bitcoingold.info,
|
|
51
|
+
_bitcoingoldtestnet.info,
|
|
52
|
+
_bitcoinsv.info,
|
|
53
|
+
_bitcointestnet.info,
|
|
54
|
+
_dash.info,
|
|
55
|
+
_digibyte.info,
|
|
56
|
+
_dogecoin.info,
|
|
57
|
+
_eboost.info,
|
|
58
|
+
_feathercoin.info,
|
|
59
|
+
_groestlcoin.info,
|
|
60
|
+
_litecoin.info,
|
|
61
|
+
_qtum.info,
|
|
62
|
+
_ravencoin.info,
|
|
63
|
+
_smartcash.info,
|
|
64
|
+
_ufo.info,
|
|
65
|
+
_vertcoin.info,
|
|
66
|
+
_zcoin.info
|
|
67
|
+
]; exports.all = all
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
const currencyInfo = {
|
|
6
|
+
pluginId: 'badcoin',
|
|
7
|
+
walletType: 'wallet:badcoin',
|
|
8
|
+
currencyCode: 'BAD',
|
|
9
|
+
displayName: 'Badcoin',
|
|
10
|
+
denominations: [
|
|
11
|
+
{ name: 'BAD', multiplier: '100000000', symbol: 'BAD' },
|
|
12
|
+
{ name: 'mBAD', multiplier: '100000', symbol: 'mBAD' }
|
|
13
|
+
],
|
|
14
|
+
|
|
15
|
+
// Configuration options:
|
|
16
|
+
defaultSettings: {
|
|
17
|
+
customFeeSettings: ['satPerByte'],
|
|
18
|
+
blockbookServers: [],
|
|
19
|
+
enableCustomServers: false
|
|
20
|
+
},
|
|
21
|
+
customFeeTemplate: [
|
|
22
|
+
{
|
|
23
|
+
type: 'nativeAmount',
|
|
24
|
+
key: 'satPerByte',
|
|
25
|
+
displayName: 'Satoshis Per Byte',
|
|
26
|
+
displayMultiplier: '0'
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
metaTokens: [],
|
|
30
|
+
|
|
31
|
+
// Explorers:
|
|
32
|
+
addressExplorer: 'https://www.blockingbad.com/address/%s',
|
|
33
|
+
blockExplorer: 'https://www.blockingbad.com/block/%s',
|
|
34
|
+
transactionExplorer: 'https://www.blockingbad.com/tx/%s'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const engineInfo = {
|
|
38
|
+
formats: ['bip49', 'bip44', 'bip32'],
|
|
39
|
+
gapLimit: 10,
|
|
40
|
+
defaultFee: 500000,
|
|
41
|
+
feeUpdateInterval: 60000,
|
|
42
|
+
simpleFeeSettings: {
|
|
43
|
+
highFee: '300',
|
|
44
|
+
lowFee: '100',
|
|
45
|
+
standardFeeLow: '150',
|
|
46
|
+
standardFeeHigh: '200',
|
|
47
|
+
standardFeeLowAmount: '20000000',
|
|
48
|
+
standardFeeHighAmount: '981000000'
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const coinInfo = {
|
|
53
|
+
name: 'badcoin',
|
|
54
|
+
segwit: false,
|
|
55
|
+
coinType: 324,
|
|
56
|
+
prefixes: {
|
|
57
|
+
messagePrefix: [
|
|
58
|
+
'\x18Badcoin Signed Message:\n',
|
|
59
|
+
'\x18Bitcoin Signed Message:\n'
|
|
60
|
+
],
|
|
61
|
+
wif: [0xb0, 0x80],
|
|
62
|
+
legacyXPriv: [0x06c4abc9, 0x0488ade4],
|
|
63
|
+
legacyXPub: [0x06c4abc8, 0x0488b21e],
|
|
64
|
+
pubkeyHash: [0x1c, 0x00],
|
|
65
|
+
scriptHash: [0x19, 0x05]
|
|
66
|
+
}
|
|
67
|
+
}; exports.coinInfo = coinInfo
|
|
68
|
+
|
|
69
|
+
const info = {
|
|
70
|
+
currencyInfo,
|
|
71
|
+
engineInfo,
|
|
72
|
+
coinInfo: exports.coinInfo
|
|
73
|
+
}; exports.info = info
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _constants = require('../../constants');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const currencyInfo = {
|
|
7
|
+
pluginId: 'bitcoin',
|
|
8
|
+
walletType: 'wallet:bitcoin',
|
|
9
|
+
currencyCode: 'BTC',
|
|
10
|
+
displayName: 'Bitcoin',
|
|
11
|
+
denominations: [
|
|
12
|
+
{ name: 'BTC', multiplier: '100000000', symbol: '₿' },
|
|
13
|
+
{ name: 'mBTC', multiplier: '100000', symbol: 'm₿' },
|
|
14
|
+
{ name: 'bits', multiplier: '100', symbol: 'ƀ' },
|
|
15
|
+
{ name: 'sats', multiplier: '1', symbol: 's' }
|
|
16
|
+
],
|
|
17
|
+
|
|
18
|
+
// Configuration options:
|
|
19
|
+
defaultSettings: {
|
|
20
|
+
customFeeSettings: ['satPerByte'],
|
|
21
|
+
blockbookServers: [
|
|
22
|
+
'wss://btc1.trezor.io',
|
|
23
|
+
'wss://btc2.trezor.io',
|
|
24
|
+
'wss://btc3.trezor.io',
|
|
25
|
+
'wss://btc4.trezor.io',
|
|
26
|
+
'wss://btc5.trezor.io'
|
|
27
|
+
],
|
|
28
|
+
enableCustomServers: false
|
|
29
|
+
},
|
|
30
|
+
customFeeTemplate: [
|
|
31
|
+
{
|
|
32
|
+
type: 'nativeAmount',
|
|
33
|
+
key: 'satPerByte',
|
|
34
|
+
displayName: 'Satoshis Per Byte',
|
|
35
|
+
displayMultiplier: '0'
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
metaTokens: [],
|
|
39
|
+
|
|
40
|
+
// Explorers:
|
|
41
|
+
blockExplorer: 'https://blockchair.com/bitcoin/block/%s',
|
|
42
|
+
addressExplorer: 'https://blockchair.com/bitcoin/address/%s',
|
|
43
|
+
transactionExplorer: 'https://blockchair.com/bitcoin/transaction/%s',
|
|
44
|
+
|
|
45
|
+
// Images:
|
|
46
|
+
symbolImage: `${_constants.IMAGE_SERVER_URL}/bitcoin-logo-solo-64.png`,
|
|
47
|
+
symbolImageDarkMono: `${_constants.IMAGE_SERVER_URL}/bitcoin-logo-solo-64.png`
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const engineInfo = {
|
|
51
|
+
formats: ['bip49', 'bip84', 'bip44', 'bip32'],
|
|
52
|
+
forks: ['bitcoincash', 'bitcoingold'],
|
|
53
|
+
gapLimit: 25,
|
|
54
|
+
defaultFee: 1000,
|
|
55
|
+
feeUpdateInterval: 60000,
|
|
56
|
+
mempoolSpaceFeeInfoServer: 'https://mempool.space/api/v1/fees/recommended',
|
|
57
|
+
simpleFeeSettings: {
|
|
58
|
+
highFee: '150',
|
|
59
|
+
lowFee: '20',
|
|
60
|
+
standardFeeLow: '50',
|
|
61
|
+
standardFeeHigh: '100',
|
|
62
|
+
standardFeeLowAmount: '173200',
|
|
63
|
+
standardFeeHighAmount: '8670000'
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const coinInfo = {
|
|
68
|
+
name: 'bitcoin',
|
|
69
|
+
segwit: true,
|
|
70
|
+
coinType: 0,
|
|
71
|
+
|
|
72
|
+
prefixes: {
|
|
73
|
+
messagePrefix: ['\x18Bitcoin Signed Message:\n'],
|
|
74
|
+
wif: [0x80],
|
|
75
|
+
legacyXPriv: [0x0488ade4],
|
|
76
|
+
legacyXPub: [0x0488b21e],
|
|
77
|
+
wrappedSegwitXPriv: [0x049d7878],
|
|
78
|
+
wrappedSegwitXPub: [0x049d7cb2],
|
|
79
|
+
segwitXPriv: [0x04b2430c],
|
|
80
|
+
segwitXPub: [0x04b24746],
|
|
81
|
+
pubkeyHash: [0x00],
|
|
82
|
+
scriptHash: [0x05],
|
|
83
|
+
bech32: ['bc']
|
|
84
|
+
}
|
|
85
|
+
}; exports.coinInfo = coinInfo
|
|
86
|
+
|
|
87
|
+
const info = {
|
|
88
|
+
currencyInfo,
|
|
89
|
+
engineInfo,
|
|
90
|
+
coinInfo: exports.coinInfo
|
|
91
|
+
}; exports.info = info
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _altcoinjs = require('altcoin-js'); var bitcoin = _interopRequireWildcard(_altcoinjs);
|
|
2
|
+
var _cleaners = require('cleaners');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
var _constants = require('../../constants');
|
|
6
|
+
|
|
7
|
+
var _bitcoincashScriptTemplates = require('./scriptTemplates/bitcoincashScriptTemplates');
|
|
8
|
+
|
|
9
|
+
const currencyInfo = {
|
|
10
|
+
pluginId: 'bitcoincash',
|
|
11
|
+
walletType: 'wallet:bitcoincash',
|
|
12
|
+
currencyCode: 'BCH',
|
|
13
|
+
displayName: 'Bitcoin Cash',
|
|
14
|
+
denominations: [
|
|
15
|
+
{ name: 'BCH', multiplier: '100000000', symbol: '₿' },
|
|
16
|
+
{ name: 'mBCH', multiplier: '100000', symbol: 'm₿' },
|
|
17
|
+
{ name: 'cash', multiplier: '100', symbol: 'ƀ' }
|
|
18
|
+
],
|
|
19
|
+
|
|
20
|
+
// Configuration options:
|
|
21
|
+
defaultSettings: {
|
|
22
|
+
customFeeSettings: ['satPerByte'],
|
|
23
|
+
blockbookServers: [
|
|
24
|
+
'wss://bch1.trezor.io',
|
|
25
|
+
'wss://bch2.trezor.io',
|
|
26
|
+
'wss://bch3.trezor.io',
|
|
27
|
+
'wss://bch4.trezor.io',
|
|
28
|
+
'wss://bch5.trezor.io'
|
|
29
|
+
],
|
|
30
|
+
enableCustomServers: false
|
|
31
|
+
},
|
|
32
|
+
customFeeTemplate: [
|
|
33
|
+
{
|
|
34
|
+
type: 'nativeAmount',
|
|
35
|
+
key: 'satPerByte',
|
|
36
|
+
displayName: 'Satoshis Per Byte',
|
|
37
|
+
displayMultiplier: '0'
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
metaTokens: [],
|
|
41
|
+
|
|
42
|
+
// Explorers:
|
|
43
|
+
blockExplorer: 'https://blockchair.com/bitcoin-cash/block/%s',
|
|
44
|
+
addressExplorer: 'https://blockchair.com/bitcoin-cash/address/%s',
|
|
45
|
+
transactionExplorer: 'https://blockchair.com/bitcoin-cash/transaction/%s',
|
|
46
|
+
xpubExplorer: 'https://bch1.trezor.io/xpub/%s',
|
|
47
|
+
|
|
48
|
+
// Images:
|
|
49
|
+
symbolImage: `${_constants.IMAGE_SERVER_URL}/bitcoincash-logo-solo-64.png`,
|
|
50
|
+
symbolImageDarkMono: `${_constants.IMAGE_SERVER_URL}/bitcoincash-logo-solo-64.png`
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const engineInfo = {
|
|
54
|
+
formats: ['bip44', 'bip32'],
|
|
55
|
+
forks: ['bitcoinsv'],
|
|
56
|
+
gapLimit: 10,
|
|
57
|
+
defaultFee: 10000,
|
|
58
|
+
feeUpdateInterval: 60000,
|
|
59
|
+
simpleFeeSettings: {
|
|
60
|
+
highFee: '20',
|
|
61
|
+
lowFee: '3',
|
|
62
|
+
standardFeeLow: '5',
|
|
63
|
+
standardFeeHigh: '10',
|
|
64
|
+
standardFeeLowAmount: '1000000',
|
|
65
|
+
standardFeeHighAmount: '65000000'
|
|
66
|
+
},
|
|
67
|
+
scriptTemplates: _bitcoincashScriptTemplates.scriptTemplates,
|
|
68
|
+
asBlockbookAddress: _cleaners.asCodec.call(void 0,
|
|
69
|
+
raw => {
|
|
70
|
+
return _cleaners.asString.call(void 0, raw).split(':')[1]
|
|
71
|
+
},
|
|
72
|
+
address => `bitcoincash:${address}`
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const coinInfo = {
|
|
77
|
+
name: 'bitcoincash',
|
|
78
|
+
segwit: false,
|
|
79
|
+
sighash: bitcoin.Psbt.BCH_SIGHASH_ALL,
|
|
80
|
+
coinType: 145,
|
|
81
|
+
|
|
82
|
+
prefixes: {
|
|
83
|
+
messagePrefix: ['\x18Bitcoin Signed Message:\n'],
|
|
84
|
+
wif: [0x80],
|
|
85
|
+
legacyXPriv: [0x0488ade4],
|
|
86
|
+
legacyXPub: [0x0488b21e],
|
|
87
|
+
pubkeyHash: [0x00],
|
|
88
|
+
scriptHash: [0x05],
|
|
89
|
+
cashaddr: ['bitcoincash']
|
|
90
|
+
}
|
|
91
|
+
}; exports.coinInfo = coinInfo
|
|
92
|
+
|
|
93
|
+
const info = { currencyInfo, engineInfo, coinInfo: exports.coinInfo }; exports.info = info
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _altcoinjs = require('altcoin-js'); var bitcoin = _interopRequireWildcard(_altcoinjs);
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _constants = require('../../constants');
|
|
5
|
+
|
|
6
|
+
var _bitcoincashScriptTemplates = require('./scriptTemplates/bitcoincashScriptTemplates');
|
|
7
|
+
|
|
8
|
+
const currencyInfo = {
|
|
9
|
+
pluginId: 'bitcoincashtestnet',
|
|
10
|
+
walletType: 'wallet:bitcoincashtestnet',
|
|
11
|
+
currencyCode: 'TBCH',
|
|
12
|
+
displayName: 'Bitcoin Cash',
|
|
13
|
+
denominations: [
|
|
14
|
+
{ name: 'TBCH', multiplier: '100000000', symbol: '₿' },
|
|
15
|
+
{ name: 'mTBCH', multiplier: '100000', symbol: 'm₿' },
|
|
16
|
+
{ name: 'cash', multiplier: '100', symbol: 'ƀ' }
|
|
17
|
+
],
|
|
18
|
+
|
|
19
|
+
// Configuration options:
|
|
20
|
+
defaultSettings: {
|
|
21
|
+
customFeeSettings: ['satPerByte'],
|
|
22
|
+
blockbookServers: [],
|
|
23
|
+
enableCustomServers: false
|
|
24
|
+
},
|
|
25
|
+
metaTokens: [],
|
|
26
|
+
|
|
27
|
+
// Explorers:
|
|
28
|
+
blockExplorer: 'https://blockchair.com/bitcoin-cash/block/%s',
|
|
29
|
+
addressExplorer: 'https://blockchair.com/bitcoin-cash/address/%s',
|
|
30
|
+
transactionExplorer: 'https://blockchair.com/bitcoin-cash/transaction/%s',
|
|
31
|
+
xpubExplorer: 'https://blockchair.com/bitcoin-cash/xpub/%s',
|
|
32
|
+
|
|
33
|
+
// Images:
|
|
34
|
+
symbolImage: `${_constants.IMAGE_SERVER_URL}/bitcoincash-logo-solo-64.png`,
|
|
35
|
+
symbolImageDarkMono: `${_constants.IMAGE_SERVER_URL}/bitcoincash-logo-solo-64.png`
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const engineInfo = {
|
|
39
|
+
formats: ['bip44', 'bip32'],
|
|
40
|
+
forks: ['bitcoinsv'],
|
|
41
|
+
gapLimit: 10,
|
|
42
|
+
defaultFee: 10000,
|
|
43
|
+
feeUpdateInterval: 60000,
|
|
44
|
+
simpleFeeSettings: {
|
|
45
|
+
highFee: '20',
|
|
46
|
+
lowFee: '3',
|
|
47
|
+
standardFeeLow: '5',
|
|
48
|
+
standardFeeHigh: '10',
|
|
49
|
+
standardFeeLowAmount: '1000000',
|
|
50
|
+
standardFeeHighAmount: '65000000'
|
|
51
|
+
},
|
|
52
|
+
scriptTemplates: _bitcoincashScriptTemplates.scriptTemplates
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const coinInfo = {
|
|
56
|
+
name: 'bitcoincashtestnet',
|
|
57
|
+
segwit: false,
|
|
58
|
+
sighash: bitcoin.Psbt.BCH_SIGHASH_ALL,
|
|
59
|
+
coinType: 1,
|
|
60
|
+
|
|
61
|
+
prefixes: {
|
|
62
|
+
messagePrefix: ['\x18Bitcoin Signed Message:\n'],
|
|
63
|
+
wif: [0xef],
|
|
64
|
+
legacyXPriv: [0x04358394],
|
|
65
|
+
legacyXPub: [0x043587cf],
|
|
66
|
+
pubkeyHash: [0x6f],
|
|
67
|
+
scriptHash: [0xc4],
|
|
68
|
+
cashaddr: ['bchtest']
|
|
69
|
+
}
|
|
70
|
+
}; exports.coinInfo = coinInfo
|
|
71
|
+
|
|
72
|
+
const info = { currencyInfo, engineInfo, coinInfo: exports.coinInfo }; exports.info = info
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _altcoinjs = require('altcoin-js');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const currencyInfo = {
|
|
7
|
+
pluginId: 'bitcoingold',
|
|
8
|
+
walletType: 'wallet:bitcoingold',
|
|
9
|
+
currencyCode: 'BTG',
|
|
10
|
+
displayName: 'Bitcoin Gold',
|
|
11
|
+
denominations: [
|
|
12
|
+
{ name: 'BTG', multiplier: '100000000', symbol: '₿' },
|
|
13
|
+
{ name: 'mBTG', multiplier: '100000', symbol: 'm₿' },
|
|
14
|
+
{ name: 'bits', multiplier: '100', symbol: 'ƀ' }
|
|
15
|
+
],
|
|
16
|
+
|
|
17
|
+
// Configuration options:
|
|
18
|
+
defaultSettings: {
|
|
19
|
+
customFeeSettings: ['satPerByte'],
|
|
20
|
+
blockbookServers: [
|
|
21
|
+
'wss://btg1.trezor.io',
|
|
22
|
+
'wss://btg2.trezor.io',
|
|
23
|
+
'wss://btg3.trezor.io',
|
|
24
|
+
'wss://btg4.trezor.io',
|
|
25
|
+
'wss://btg5.trezor.io'
|
|
26
|
+
],
|
|
27
|
+
enableCustomServers: false
|
|
28
|
+
},
|
|
29
|
+
customFeeTemplate: [
|
|
30
|
+
{
|
|
31
|
+
type: 'nativeAmount',
|
|
32
|
+
key: 'satPerByte',
|
|
33
|
+
displayName: 'Satoshis Per Byte',
|
|
34
|
+
displayMultiplier: '0'
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
metaTokens: [],
|
|
38
|
+
|
|
39
|
+
// Explorers:
|
|
40
|
+
addressExplorer: 'https://explorer.bitcoingold.org/insight/address/%s',
|
|
41
|
+
blockExplorer: 'https://explorer.bitcoingold.org/insight/block/%s',
|
|
42
|
+
transactionExplorer: 'https://explorer.bitcoingold.org/insight/tx/%s'
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const engineInfo = {
|
|
46
|
+
formats: ['bip49', 'bip84', 'bip44', 'bip32'],
|
|
47
|
+
gapLimit: 10,
|
|
48
|
+
defaultFee: 1000,
|
|
49
|
+
feeUpdateInterval: 60000,
|
|
50
|
+
simpleFeeSettings: {
|
|
51
|
+
highFee: '200',
|
|
52
|
+
lowFee: '10',
|
|
53
|
+
standardFeeLow: '15',
|
|
54
|
+
standardFeeHigh: '140',
|
|
55
|
+
standardFeeLowAmount: '17320',
|
|
56
|
+
standardFeeHighAmount: '86700000'
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const coinInfo = {
|
|
61
|
+
name: 'bitcoingold',
|
|
62
|
+
segwit: true,
|
|
63
|
+
sighash: _altcoinjs.Psbt.BTG_SIGHASH_ALL,
|
|
64
|
+
coinType: 156,
|
|
65
|
+
|
|
66
|
+
prefixes: {
|
|
67
|
+
messagePrefix: ['\x18Bitcoin Gold Signed Message:\n'],
|
|
68
|
+
wif: [0x80],
|
|
69
|
+
legacyXPriv: [0x0488ade4],
|
|
70
|
+
legacyXPub: [0x0488b21e],
|
|
71
|
+
wrappedSegwitXPriv: [0x049d7878],
|
|
72
|
+
wrappedSegwitXPub: [0x049d7cb2],
|
|
73
|
+
segwitXPriv: [0x04b2430c],
|
|
74
|
+
segwitXPub: [0x04b24746],
|
|
75
|
+
pubkeyHash: [0x26],
|
|
76
|
+
scriptHash: [0x17],
|
|
77
|
+
bech32: ['btg']
|
|
78
|
+
}
|
|
79
|
+
}; exports.coinInfo = coinInfo
|
|
80
|
+
|
|
81
|
+
const info = {
|
|
82
|
+
currencyInfo,
|
|
83
|
+
engineInfo,
|
|
84
|
+
coinInfo: exports.coinInfo
|
|
85
|
+
}; exports.info = info
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _altcoinjs = require('altcoin-js');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const currencyInfo = {
|
|
7
|
+
pluginId: 'bitcoingoldtestnet',
|
|
8
|
+
walletType: 'wallet:bitcoingoldtestnet',
|
|
9
|
+
currencyCode: 'TBTG',
|
|
10
|
+
displayName: 'Bitcoin Gold',
|
|
11
|
+
denominations: [
|
|
12
|
+
{ name: 'TBTG', multiplier: '100000000', symbol: '₿' },
|
|
13
|
+
{ name: 'mTBTG', multiplier: '100000', symbol: 'm₿' },
|
|
14
|
+
{ name: 'bits', multiplier: '100', symbol: 'ƀ' }
|
|
15
|
+
],
|
|
16
|
+
|
|
17
|
+
// Configuration options:
|
|
18
|
+
defaultSettings: {
|
|
19
|
+
customFeeSettings: ['satPerByte'],
|
|
20
|
+
blockbookServers: [],
|
|
21
|
+
enableCustomServers: false
|
|
22
|
+
},
|
|
23
|
+
metaTokens: [],
|
|
24
|
+
|
|
25
|
+
// Explorers:
|
|
26
|
+
addressExplorer: 'https://explorer.bitcoingold.org/insight/address/%s',
|
|
27
|
+
blockExplorer: 'https://explorer.bitcoingold.org/insight/block/%s',
|
|
28
|
+
transactionExplorer: 'https://explorer.bitcoingold.org/insight/tx/%s'
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const engineInfo = {
|
|
32
|
+
formats: ['bip49', 'bip84', 'bip44', 'bip32'],
|
|
33
|
+
gapLimit: 10,
|
|
34
|
+
defaultFee: 1000,
|
|
35
|
+
feeUpdateInterval: 60000,
|
|
36
|
+
simpleFeeSettings: {
|
|
37
|
+
highFee: '200',
|
|
38
|
+
lowFee: '10',
|
|
39
|
+
standardFeeLow: '15',
|
|
40
|
+
standardFeeHigh: '140',
|
|
41
|
+
standardFeeLowAmount: '17320',
|
|
42
|
+
standardFeeHighAmount: '86700000'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const coinInfo = {
|
|
47
|
+
name: 'bitcoingoldtestnet',
|
|
48
|
+
segwit: true,
|
|
49
|
+
sighash: _altcoinjs.Psbt.BTG_SIGHASH_ALL,
|
|
50
|
+
coinType: 1,
|
|
51
|
+
|
|
52
|
+
prefixes: {
|
|
53
|
+
messagePrefix: ['\x18Bitcoin Gold Signed Message:\n'],
|
|
54
|
+
wif: [0xef],
|
|
55
|
+
legacyXPriv: [0x04358394],
|
|
56
|
+
legacyXPub: [0x043587cf],
|
|
57
|
+
wrappedSegwitXPriv: [0x044a4e28],
|
|
58
|
+
wrappedSegwitXPub: [0x044a5262],
|
|
59
|
+
segwitXPriv: [0x045f18bc],
|
|
60
|
+
segwitXPub: [0x045f1cf6],
|
|
61
|
+
pubkeyHash: [0x6f],
|
|
62
|
+
scriptHash: [0xc4],
|
|
63
|
+
bech32: ['btg']
|
|
64
|
+
}
|
|
65
|
+
}; exports.coinInfo = coinInfo
|
|
66
|
+
|
|
67
|
+
const info = {
|
|
68
|
+
currencyInfo,
|
|
69
|
+
engineInfo,
|
|
70
|
+
coinInfo: exports.coinInfo
|
|
71
|
+
}; exports.info = info
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _altcoinjs = require('altcoin-js'); var bitcoin = _interopRequireWildcard(_altcoinjs);
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _constants = require('../../constants');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
const currencyInfo = {
|
|
8
|
+
pluginId: 'bitcoinsv',
|
|
9
|
+
walletType: 'wallet:bitcoinsv',
|
|
10
|
+
currencyCode: 'BSV',
|
|
11
|
+
displayName: 'Bitcoin SV',
|
|
12
|
+
denominations: [
|
|
13
|
+
{ name: 'BSV', multiplier: '100000000', symbol: '₿' },
|
|
14
|
+
{ name: 'mBSV', multiplier: '100000', symbol: 'm₿' },
|
|
15
|
+
{ name: 'cash', multiplier: '100', symbol: 'ƀ' }
|
|
16
|
+
],
|
|
17
|
+
|
|
18
|
+
// Configuration options:
|
|
19
|
+
defaultSettings: {
|
|
20
|
+
customFeeSettings: ['satPerByte'],
|
|
21
|
+
blockbookServers: ['wss://bsv-bbwrap1.edge.app'],
|
|
22
|
+
enableCustomServers: false
|
|
23
|
+
},
|
|
24
|
+
customFeeTemplate: [
|
|
25
|
+
{
|
|
26
|
+
type: 'nativeAmount',
|
|
27
|
+
key: 'satPerByte',
|
|
28
|
+
displayName: 'Satoshis Per Byte',
|
|
29
|
+
displayMultiplier: '0'
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
metaTokens: [],
|
|
33
|
+
|
|
34
|
+
// Explorers:
|
|
35
|
+
blockExplorer: 'https://blockchair.com/bitcoin-sv/block/%s',
|
|
36
|
+
addressExplorer: 'https://blockchair.com/bitcoin-sv/address/%s',
|
|
37
|
+
transactionExplorer: 'https://blockchair.com/bitcoin-sv/transaction/%s',
|
|
38
|
+
|
|
39
|
+
// Images:
|
|
40
|
+
symbolImage: `${_constants.IMAGE_SERVER_URL}/bitcoinsv-logo-solo-64.png`,
|
|
41
|
+
symbolImageDarkMono: `${_constants.IMAGE_SERVER_URL}/bitcoinsv-logo-solo-64.png`
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const engineInfo = {
|
|
45
|
+
formats: ['bip44', 'bip32'],
|
|
46
|
+
uriPrefix: 'bitcoin',
|
|
47
|
+
gapLimit: 10,
|
|
48
|
+
defaultFee: 10000,
|
|
49
|
+
feeUpdateInterval: 60000,
|
|
50
|
+
simpleFeeSettings: {
|
|
51
|
+
highFee: '20',
|
|
52
|
+
lowFee: '3',
|
|
53
|
+
standardFeeLow: '5',
|
|
54
|
+
standardFeeHigh: '10',
|
|
55
|
+
standardFeeLowAmount: '1000000',
|
|
56
|
+
standardFeeHighAmount: '65000000'
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const coinInfo = {
|
|
61
|
+
name: 'bitcoinsv',
|
|
62
|
+
segwit: false,
|
|
63
|
+
sighash: bitcoin.Psbt.BCH_SIGHASH_ALL,
|
|
64
|
+
coinType: 236,
|
|
65
|
+
|
|
66
|
+
prefixes: {
|
|
67
|
+
messagePrefix: ['\x18Bitcoin Signed Message:\n'],
|
|
68
|
+
wif: [0x80],
|
|
69
|
+
legacyXPriv: [0x0488ade4],
|
|
70
|
+
legacyXPub: [0x0488b21e],
|
|
71
|
+
pubkeyHash: [0x00],
|
|
72
|
+
scriptHash: [0x05]
|
|
73
|
+
}
|
|
74
|
+
}; exports.coinInfo = coinInfo
|
|
75
|
+
|
|
76
|
+
const info = { currencyInfo, engineInfo, coinInfo: exports.coinInfo }; exports.info = info
|