edge-currency-plugins 2.6.0 → 2.6.2
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/lib/common/utxobased/db/Processor.js +60 -26
- package/lib/common/utxobased/info/badcoin.js +16 -19
- package/lib/common/utxobased/info/bitcoin.js +21 -24
- package/lib/common/utxobased/info/bitcoincash.js +21 -24
- package/lib/common/utxobased/info/bitcoincashtestnet.js +20 -15
- package/lib/common/utxobased/info/bitcoingold.js +16 -19
- package/lib/common/utxobased/info/bitcoingoldtestnet.js +16 -11
- package/lib/common/utxobased/info/bitcoinsv.js +20 -23
- package/lib/common/utxobased/info/bitcointestnet.js +21 -24
- package/lib/common/utxobased/info/commonInfo.js +20 -11
- package/lib/common/utxobased/info/dash.js +17 -20
- package/lib/common/utxobased/info/digibyte.js +16 -19
- package/lib/common/utxobased/info/dogecoin.js +17 -20
- package/lib/common/utxobased/info/eboost.js +16 -19
- package/lib/common/utxobased/info/feathercoin.js +19 -22
- package/lib/common/utxobased/info/groestlcoin.js +18 -21
- package/lib/common/utxobased/info/litecoin.js +21 -24
- package/lib/common/utxobased/info/qtum.js +16 -19
- package/lib/common/utxobased/info/ravencoin.js +16 -19
- package/lib/common/utxobased/info/smartcash.js +16 -19
- package/lib/common/utxobased/info/ufo.js +16 -19
- package/lib/common/utxobased/info/vertcoin.js +16 -19
- package/lib/common/utxobased/info/zcoin.js +19 -22
- package/lib/src/common/utxobased/info/commonInfo.d.ts +4 -2
- package/package.json +3 -3
|
@@ -157,12 +157,17 @@ const BASELET_DIR = 'tables'
|
|
|
157
157
|
},
|
|
158
158
|
|
|
159
159
|
async dumpData() {
|
|
160
|
-
|
|
160
|
+
|
|
161
|
+
const allBases = Object.values(
|
|
162
|
+
baselets.all
|
|
163
|
+
)
|
|
161
164
|
return await Promise.all(
|
|
162
|
-
allBases.map(async base =>
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
165
|
+
allBases.map(async base => {
|
|
166
|
+
return {
|
|
167
|
+
databaseName: base.databaseName,
|
|
168
|
+
data: (await base.dumpData())
|
|
169
|
+
}
|
|
170
|
+
})
|
|
166
171
|
)
|
|
167
172
|
},
|
|
168
173
|
|
|
@@ -399,6 +404,15 @@ const BASELET_DIR = 'tables'
|
|
|
399
404
|
|
|
400
405
|
async saveAddress(address) {
|
|
401
406
|
await baselets.address(async tables => {
|
|
407
|
+
// This variable is used to update the scriptPubkeyByPath table.
|
|
408
|
+
// The path table must be written after the address table because the
|
|
409
|
+
// path table is an index of the address table.
|
|
410
|
+
// This variable acts as a catch for that update to be done after the
|
|
411
|
+
// address table is written.
|
|
412
|
+
let indexTableUpdate
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
402
416
|
const [existingAddress] = await tables.addressByScriptPubkey.query('', [
|
|
403
417
|
address.scriptPubkey
|
|
404
418
|
])
|
|
@@ -415,14 +429,14 @@ const BASELET_DIR = 'tables'
|
|
|
415
429
|
'Attempted to save address with an existing path, but different script pubkey'
|
|
416
430
|
)
|
|
417
431
|
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
address.
|
|
421
|
-
|
|
422
|
-
)
|
|
432
|
+
indexTableUpdate = {
|
|
433
|
+
path: address.path,
|
|
434
|
+
scriptPubkey: address.scriptPubkey
|
|
435
|
+
}
|
|
423
436
|
|
|
424
|
-
// check if this address is used and if so, whether it has a higher
|
|
425
|
-
|
|
437
|
+
// check if this address is used and if so, whether it has a higher
|
|
438
|
+
// last used index
|
|
439
|
+
if (address.used || _optionalChain([existingAddress, 'optionalAccess', _2 => _2.used]) === true) {
|
|
426
440
|
let [lastUsed] = await tables.lastUsedByFormatPath.query('', [
|
|
427
441
|
_baselet3.addressPathToPrefix.call(void 0, address.path)
|
|
428
442
|
])
|
|
@@ -438,6 +452,7 @@ const BASELET_DIR = 'tables'
|
|
|
438
452
|
}
|
|
439
453
|
}
|
|
440
454
|
|
|
455
|
+
// Update routine:
|
|
441
456
|
if (existingAddress != null) {
|
|
442
457
|
// Only update the lastQueriedBlockHeight on the address if one was given and is greater than the existing value
|
|
443
458
|
if (
|
|
@@ -463,16 +478,21 @@ const BASELET_DIR = 'tables'
|
|
|
463
478
|
existingAddress.balance = address.balance
|
|
464
479
|
}
|
|
465
480
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
481
|
+
/*
|
|
482
|
+
Only update the path field if one was given and the existing address
|
|
483
|
+
currently does not have one. We never update paths for addresses, only
|
|
484
|
+
insert paths when they're not present.
|
|
485
|
+
|
|
486
|
+
NOTE: Addresses can be stored in the db without a path due to the
|
|
487
|
+
`EdgeCurrencyEngine.addGapLimitAddresses` function. Once an address
|
|
488
|
+
path is known, it should never be updated
|
|
489
|
+
*/
|
|
469
490
|
if (address.path != null && existingAddress.path == null) {
|
|
470
491
|
existingAddress.path = address.path
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
)
|
|
492
|
+
indexTableUpdate = {
|
|
493
|
+
path: existingAddress.path,
|
|
494
|
+
scriptPubkey: existingAddress.scriptPubkey
|
|
495
|
+
}
|
|
476
496
|
}
|
|
477
497
|
|
|
478
498
|
// Only update the used flag if one was given and is true
|
|
@@ -495,18 +515,32 @@ const BASELET_DIR = 'tables'
|
|
|
495
515
|
)
|
|
496
516
|
}
|
|
497
517
|
}
|
|
518
|
+
|
|
519
|
+
// Update the address table:
|
|
498
520
|
await tables.addressByScriptPubkey.insert(
|
|
499
521
|
'',
|
|
500
522
|
existingAddress.scriptPubkey,
|
|
501
523
|
existingAddress
|
|
502
524
|
)
|
|
503
|
-
return
|
|
504
525
|
}
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
526
|
+
|
|
527
|
+
// Insert routine:
|
|
528
|
+
if (existingAddress == null) {
|
|
529
|
+
await tables.addressByScriptPubkey.insert(
|
|
530
|
+
'',
|
|
531
|
+
address.scriptPubkey,
|
|
532
|
+
address
|
|
533
|
+
)
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
// Insert the path into the index table:
|
|
537
|
+
if (indexTableUpdate != null) {
|
|
538
|
+
await tables.scriptPubkeyByPath.insert(
|
|
539
|
+
_baselet3.addressPathToPrefix.call(void 0, indexTableUpdate.path),
|
|
540
|
+
indexTableUpdate.path.addressIndex,
|
|
541
|
+
indexTableUpdate.scriptPubkey
|
|
542
|
+
)
|
|
543
|
+
}
|
|
510
544
|
})
|
|
511
545
|
},
|
|
512
546
|
|
|
@@ -1,40 +1,37 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
4
8
|
var _commonInfo = require('./commonInfo');
|
|
5
9
|
|
|
6
10
|
const currencyInfo = {
|
|
7
|
-
pluginId: 'badcoin',
|
|
8
|
-
walletType: 'wallet:badcoin',
|
|
9
11
|
currencyCode: 'BAD',
|
|
12
|
+
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
10
13
|
displayName: 'Badcoin',
|
|
14
|
+
memoOptions: _commonInfo.utxoMemoOptions,
|
|
15
|
+
pluginId: 'badcoin',
|
|
16
|
+
walletType: 'wallet:badcoin',
|
|
17
|
+
|
|
18
|
+
// Explorers:
|
|
19
|
+
addressExplorer: 'https://www.blockingbad.com/address/%s',
|
|
20
|
+
blockExplorer: 'https://www.blockingbad.com/block/%s',
|
|
21
|
+
transactionExplorer: 'https://www.blockingbad.com/tx/%s',
|
|
22
|
+
|
|
11
23
|
denominations: [
|
|
12
24
|
{ name: 'BAD', multiplier: '100000000', symbol: 'BAD' },
|
|
13
25
|
{ name: 'mBAD', multiplier: '100000', symbol: 'mBAD' }
|
|
14
26
|
],
|
|
15
27
|
|
|
16
|
-
//
|
|
28
|
+
// Deprecated:
|
|
29
|
+
..._commonInfo.legacyMemoInfo,
|
|
17
30
|
defaultSettings: {
|
|
18
31
|
customFeeSettings: ['satPerByte'],
|
|
19
32
|
blockbookServers: [],
|
|
20
33
|
enableCustomServers: false
|
|
21
34
|
},
|
|
22
|
-
customFeeTemplate: [
|
|
23
|
-
{
|
|
24
|
-
type: 'nativeAmount',
|
|
25
|
-
key: 'satPerByte',
|
|
26
|
-
displayName: 'Satoshis Per Byte',
|
|
27
|
-
displayMultiplier: '0'
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
..._commonInfo.memoInfo,
|
|
31
|
-
|
|
32
|
-
// Explorers:
|
|
33
|
-
addressExplorer: 'https://www.blockingbad.com/address/%s',
|
|
34
|
-
blockExplorer: 'https://www.blockingbad.com/block/%s',
|
|
35
|
-
transactionExplorer: 'https://www.blockingbad.com/tx/%s',
|
|
36
|
-
|
|
37
|
-
// Deprecated:
|
|
38
35
|
metaTokens: []
|
|
39
36
|
}
|
|
40
37
|
|
|
@@ -3,13 +3,30 @@
|
|
|
3
3
|
var _constants = require('../../constants');
|
|
4
4
|
|
|
5
5
|
var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalculator');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
6
10
|
var _commonInfo = require('./commonInfo');
|
|
7
11
|
|
|
8
12
|
const currencyInfo = {
|
|
9
|
-
|
|
10
|
-
walletType: 'wallet:bitcoin',
|
|
13
|
+
canReplaceByFee: true,
|
|
11
14
|
currencyCode: 'BTC',
|
|
15
|
+
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
12
16
|
displayName: 'Bitcoin',
|
|
17
|
+
memoOptions: _commonInfo.utxoMemoOptions,
|
|
18
|
+
pluginId: 'bitcoin',
|
|
19
|
+
walletType: 'wallet:bitcoin',
|
|
20
|
+
|
|
21
|
+
// Explorers:
|
|
22
|
+
blockExplorer: 'https://blockchair.com/bitcoin/block/%s',
|
|
23
|
+
addressExplorer: 'https://blockchair.com/bitcoin/address/%s',
|
|
24
|
+
transactionExplorer: 'https://blockchair.com/bitcoin/transaction/%s',
|
|
25
|
+
|
|
26
|
+
// Images:
|
|
27
|
+
symbolImage: `${_constants.IMAGE_SERVER_URL}/bitcoin-logo-solo-64.png`,
|
|
28
|
+
symbolImageDarkMono: `${_constants.IMAGE_SERVER_URL}/bitcoin-logo-solo-64.png`,
|
|
29
|
+
|
|
13
30
|
denominations: [
|
|
14
31
|
{ name: 'BTC', multiplier: '100000000', symbol: '₿' },
|
|
15
32
|
{ name: 'mBTC', multiplier: '100000', symbol: 'm₿' },
|
|
@@ -17,7 +34,8 @@ const currencyInfo = {
|
|
|
17
34
|
{ name: 'sats', multiplier: '1', symbol: 's' }
|
|
18
35
|
],
|
|
19
36
|
|
|
20
|
-
//
|
|
37
|
+
// Deprecated:
|
|
38
|
+
..._commonInfo.legacyMemoInfo,
|
|
21
39
|
defaultSettings: {
|
|
22
40
|
customFeeSettings: ['satPerByte'],
|
|
23
41
|
blockbookServers: [
|
|
@@ -29,27 +47,6 @@ const currencyInfo = {
|
|
|
29
47
|
],
|
|
30
48
|
enableCustomServers: false
|
|
31
49
|
},
|
|
32
|
-
canReplaceByFee: true,
|
|
33
|
-
customFeeTemplate: [
|
|
34
|
-
{
|
|
35
|
-
type: 'nativeAmount',
|
|
36
|
-
key: 'satPerByte',
|
|
37
|
-
displayName: 'Satoshis Per Byte',
|
|
38
|
-
displayMultiplier: '0'
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
..._commonInfo.memoInfo,
|
|
42
|
-
|
|
43
|
-
// Explorers:
|
|
44
|
-
blockExplorer: 'https://blockchair.com/bitcoin/block/%s',
|
|
45
|
-
addressExplorer: 'https://blockchair.com/bitcoin/address/%s',
|
|
46
|
-
transactionExplorer: 'https://blockchair.com/bitcoin/transaction/%s',
|
|
47
|
-
|
|
48
|
-
// Images:
|
|
49
|
-
symbolImage: `${_constants.IMAGE_SERVER_URL}/bitcoin-logo-solo-64.png`,
|
|
50
|
-
symbolImageDarkMono: `${_constants.IMAGE_SERVER_URL}/bitcoin-logo-solo-64.png`,
|
|
51
|
-
|
|
52
|
-
// Deprecated:
|
|
53
50
|
metaTokens: []
|
|
54
51
|
}
|
|
55
52
|
|
|
@@ -5,21 +5,39 @@ var _cleaners = require('cleaners');
|
|
|
5
5
|
var _constants = require('../../constants');
|
|
6
6
|
|
|
7
7
|
var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalculator');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
8
12
|
var _commonInfo = require('./commonInfo');
|
|
9
13
|
var _bitcoincashScriptTemplates = require('./scriptTemplates/bitcoincashScriptTemplates');
|
|
10
14
|
|
|
11
15
|
const currencyInfo = {
|
|
12
|
-
pluginId: 'bitcoincash',
|
|
13
|
-
walletType: 'wallet:bitcoincash',
|
|
14
16
|
currencyCode: 'BCH',
|
|
17
|
+
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
15
18
|
displayName: 'Bitcoin Cash',
|
|
19
|
+
memoOptions: _commonInfo.utxoMemoOptions,
|
|
20
|
+
pluginId: 'bitcoincash',
|
|
21
|
+
walletType: 'wallet:bitcoincash',
|
|
22
|
+
|
|
23
|
+
// Explorers:
|
|
24
|
+
blockExplorer: 'https://blockchair.com/bitcoin-cash/block/%s',
|
|
25
|
+
addressExplorer: 'https://blockchair.com/bitcoin-cash/address/%s',
|
|
26
|
+
transactionExplorer: 'https://blockchair.com/bitcoin-cash/transaction/%s',
|
|
27
|
+
xpubExplorer: 'https://bch1.trezor.io/xpub/%s',
|
|
28
|
+
|
|
29
|
+
// Images:
|
|
30
|
+
symbolImage: `${_constants.IMAGE_SERVER_URL}/bitcoincash-logo-solo-64.png`,
|
|
31
|
+
symbolImageDarkMono: `${_constants.IMAGE_SERVER_URL}/bitcoincash-logo-solo-64.png`,
|
|
32
|
+
|
|
16
33
|
denominations: [
|
|
17
34
|
{ name: 'BCH', multiplier: '100000000', symbol: '₿' },
|
|
18
35
|
{ name: 'mBCH', multiplier: '100000', symbol: 'm₿' },
|
|
19
36
|
{ name: 'cash', multiplier: '100', symbol: 'ƀ' }
|
|
20
37
|
],
|
|
21
38
|
|
|
22
|
-
//
|
|
39
|
+
// Deprecated:
|
|
40
|
+
..._commonInfo.legacyMemoInfo,
|
|
23
41
|
defaultSettings: {
|
|
24
42
|
customFeeSettings: ['satPerByte'],
|
|
25
43
|
blockbookServers: [
|
|
@@ -31,27 +49,6 @@ const currencyInfo = {
|
|
|
31
49
|
],
|
|
32
50
|
enableCustomServers: false
|
|
33
51
|
},
|
|
34
|
-
customFeeTemplate: [
|
|
35
|
-
{
|
|
36
|
-
type: 'nativeAmount',
|
|
37
|
-
key: 'satPerByte',
|
|
38
|
-
displayName: 'Satoshis Per Byte',
|
|
39
|
-
displayMultiplier: '0'
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
..._commonInfo.memoInfo,
|
|
43
|
-
|
|
44
|
-
// Explorers:
|
|
45
|
-
blockExplorer: 'https://blockchair.com/bitcoin-cash/block/%s',
|
|
46
|
-
addressExplorer: 'https://blockchair.com/bitcoin-cash/address/%s',
|
|
47
|
-
transactionExplorer: 'https://blockchair.com/bitcoin-cash/transaction/%s',
|
|
48
|
-
xpubExplorer: 'https://bch1.trezor.io/xpub/%s',
|
|
49
|
-
|
|
50
|
-
// Images:
|
|
51
|
-
symbolImage: `${_constants.IMAGE_SERVER_URL}/bitcoincash-logo-solo-64.png`,
|
|
52
|
-
symbolImageDarkMono: `${_constants.IMAGE_SERVER_URL}/bitcoincash-logo-solo-64.png`,
|
|
53
|
-
|
|
54
|
-
// Deprecated:
|
|
55
52
|
metaTokens: []
|
|
56
53
|
}
|
|
57
54
|
|
|
@@ -3,27 +3,20 @@
|
|
|
3
3
|
|
|
4
4
|
var _constants = require('../../constants');
|
|
5
5
|
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
6
10
|
var _commonInfo = require('./commonInfo');
|
|
7
11
|
var _bitcoincashScriptTemplates = require('./scriptTemplates/bitcoincashScriptTemplates');
|
|
8
12
|
|
|
9
13
|
const currencyInfo = {
|
|
10
|
-
pluginId: 'bitcoincashtestnet',
|
|
11
|
-
walletType: 'wallet:bitcoincashtestnet',
|
|
12
14
|
currencyCode: 'TBCH',
|
|
13
15
|
displayName: 'Bitcoin Cash',
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
],
|
|
19
|
-
|
|
20
|
-
// Configuration options:
|
|
21
|
-
defaultSettings: {
|
|
22
|
-
customFeeSettings: ['satPerByte'],
|
|
23
|
-
blockbookServers: [],
|
|
24
|
-
enableCustomServers: false
|
|
25
|
-
},
|
|
26
|
-
..._commonInfo.memoInfo,
|
|
16
|
+
memoOptions: _commonInfo.utxoMemoOptions,
|
|
17
|
+
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
18
|
+
pluginId: 'bitcoincashtestnet',
|
|
19
|
+
walletType: 'wallet:bitcoincashtestnet',
|
|
27
20
|
|
|
28
21
|
// Explorers:
|
|
29
22
|
blockExplorer: 'https://blockchair.com/bitcoin-cash/block/%s',
|
|
@@ -35,7 +28,19 @@ const currencyInfo = {
|
|
|
35
28
|
symbolImage: `${_constants.IMAGE_SERVER_URL}/bitcoincash-logo-solo-64.png`,
|
|
36
29
|
symbolImageDarkMono: `${_constants.IMAGE_SERVER_URL}/bitcoincash-logo-solo-64.png`,
|
|
37
30
|
|
|
31
|
+
denominations: [
|
|
32
|
+
{ name: 'TBCH', multiplier: '100000000', symbol: '₿' },
|
|
33
|
+
{ name: 'mTBCH', multiplier: '100000', symbol: 'm₿' },
|
|
34
|
+
{ name: 'cash', multiplier: '100', symbol: 'ƀ' }
|
|
35
|
+
],
|
|
36
|
+
|
|
38
37
|
// Deprecated:
|
|
38
|
+
..._commonInfo.legacyMemoInfo,
|
|
39
|
+
defaultSettings: {
|
|
40
|
+
customFeeSettings: ['satPerByte'],
|
|
41
|
+
blockbookServers: [],
|
|
42
|
+
enableCustomServers: false
|
|
43
|
+
},
|
|
39
44
|
metaTokens: []
|
|
40
45
|
}
|
|
41
46
|
|
|
@@ -3,20 +3,33 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalculator');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
6
10
|
var _commonInfo = require('./commonInfo');
|
|
7
11
|
|
|
8
12
|
const currencyInfo = {
|
|
9
|
-
pluginId: 'bitcoingold',
|
|
10
|
-
walletType: 'wallet:bitcoingold',
|
|
11
13
|
currencyCode: 'BTG',
|
|
14
|
+
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
12
15
|
displayName: 'Bitcoin Gold',
|
|
16
|
+
memoOptions: _commonInfo.utxoMemoOptions,
|
|
17
|
+
pluginId: 'bitcoingold',
|
|
18
|
+
walletType: 'wallet:bitcoingold',
|
|
19
|
+
|
|
20
|
+
// Explorers:
|
|
21
|
+
addressExplorer: 'https://explorer.bitcoingold.org/insight/address/%s',
|
|
22
|
+
blockExplorer: 'https://explorer.bitcoingold.org/insight/block/%s',
|
|
23
|
+
transactionExplorer: 'https://explorer.bitcoingold.org/insight/tx/%s',
|
|
24
|
+
|
|
13
25
|
denominations: [
|
|
14
26
|
{ name: 'BTG', multiplier: '100000000', symbol: '₿' },
|
|
15
27
|
{ name: 'mBTG', multiplier: '100000', symbol: 'm₿' },
|
|
16
28
|
{ name: 'bits', multiplier: '100', symbol: 'ƀ' }
|
|
17
29
|
],
|
|
18
30
|
|
|
19
|
-
//
|
|
31
|
+
// Deprecated:
|
|
32
|
+
..._commonInfo.legacyMemoInfo,
|
|
20
33
|
defaultSettings: {
|
|
21
34
|
customFeeSettings: ['satPerByte'],
|
|
22
35
|
blockbookServers: [
|
|
@@ -28,22 +41,6 @@ const currencyInfo = {
|
|
|
28
41
|
],
|
|
29
42
|
enableCustomServers: false
|
|
30
43
|
},
|
|
31
|
-
customFeeTemplate: [
|
|
32
|
-
{
|
|
33
|
-
type: 'nativeAmount',
|
|
34
|
-
key: 'satPerByte',
|
|
35
|
-
displayName: 'Satoshis Per Byte',
|
|
36
|
-
displayMultiplier: '0'
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
..._commonInfo.memoInfo,
|
|
40
|
-
|
|
41
|
-
// Explorers:
|
|
42
|
-
addressExplorer: 'https://explorer.bitcoingold.org/insight/address/%s',
|
|
43
|
-
blockExplorer: 'https://explorer.bitcoingold.org/insight/block/%s',
|
|
44
|
-
transactionExplorer: 'https://explorer.bitcoingold.org/insight/tx/%s',
|
|
45
|
-
|
|
46
|
-
// Deprecated:
|
|
47
44
|
metaTokens: []
|
|
48
45
|
}
|
|
49
46
|
|
|
@@ -2,33 +2,38 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
5
9
|
var _commonInfo = require('./commonInfo');
|
|
6
10
|
|
|
7
11
|
const currencyInfo = {
|
|
8
|
-
pluginId: 'bitcoingoldtestnet',
|
|
9
|
-
walletType: 'wallet:bitcoingoldtestnet',
|
|
10
12
|
currencyCode: 'TBTG',
|
|
13
|
+
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
11
14
|
displayName: 'Bitcoin Gold',
|
|
15
|
+
memoOptions: _commonInfo.utxoMemoOptions,
|
|
16
|
+
pluginId: 'bitcoingoldtestnet',
|
|
17
|
+
walletType: 'wallet:bitcoingoldtestnet',
|
|
18
|
+
|
|
19
|
+
// Explorers:
|
|
20
|
+
addressExplorer: 'https://explorer.bitcoingold.org/insight/address/%s',
|
|
21
|
+
blockExplorer: 'https://explorer.bitcoingold.org/insight/block/%s',
|
|
22
|
+
transactionExplorer: 'https://explorer.bitcoingold.org/insight/tx/%s',
|
|
23
|
+
|
|
12
24
|
denominations: [
|
|
13
25
|
{ name: 'TBTG', multiplier: '100000000', symbol: '₿' },
|
|
14
26
|
{ name: 'mTBTG', multiplier: '100000', symbol: 'm₿' },
|
|
15
27
|
{ name: 'bits', multiplier: '100', symbol: 'ƀ' }
|
|
16
28
|
],
|
|
17
29
|
|
|
18
|
-
//
|
|
30
|
+
// Deprecated:
|
|
31
|
+
..._commonInfo.legacyMemoInfo,
|
|
19
32
|
defaultSettings: {
|
|
20
33
|
customFeeSettings: ['satPerByte'],
|
|
21
34
|
blockbookServers: [],
|
|
22
35
|
enableCustomServers: false
|
|
23
36
|
},
|
|
24
|
-
..._commonInfo.memoInfo,
|
|
25
|
-
|
|
26
|
-
// Explorers:
|
|
27
|
-
addressExplorer: 'https://explorer.bitcoingold.org/insight/address/%s',
|
|
28
|
-
blockExplorer: 'https://explorer.bitcoingold.org/insight/block/%s',
|
|
29
|
-
transactionExplorer: 'https://explorer.bitcoingold.org/insight/tx/%s',
|
|
30
|
-
|
|
31
|
-
// Deprecated:
|
|
32
37
|
metaTokens: []
|
|
33
38
|
}
|
|
34
39
|
|
|
@@ -10,34 +10,19 @@ var _maximumFeeRateCalculator = require('../../plugin/util/maximumFeeRateCalcula
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
var _keymanager = require('../keymanager/keymanager');
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
13
17
|
var _commonInfo = require('./commonInfo');
|
|
14
18
|
|
|
15
19
|
const currencyInfo = {
|
|
16
|
-
pluginId: 'bitcoinsv',
|
|
17
|
-
walletType: 'wallet:bitcoinsv',
|
|
18
20
|
currencyCode: 'BSV',
|
|
21
|
+
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
19
22
|
displayName: 'Bitcoin SV',
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
{ name: 'cash', multiplier: '100', symbol: 'ƀ' }
|
|
24
|
-
],
|
|
25
|
-
|
|
26
|
-
// Configuration options:
|
|
27
|
-
defaultSettings: {
|
|
28
|
-
customFeeSettings: ['satPerByte'],
|
|
29
|
-
blockbookServers: ['wss://blockbook.siftbitcoin.com:9146'],
|
|
30
|
-
enableCustomServers: false
|
|
31
|
-
},
|
|
32
|
-
customFeeTemplate: [
|
|
33
|
-
{
|
|
34
|
-
type: 'nativeAmount',
|
|
35
|
-
key: 'satPerByte',
|
|
36
|
-
displayName: 'Satoshis Per Byte',
|
|
37
|
-
displayMultiplier: '0'
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
..._commonInfo.memoInfo,
|
|
23
|
+
memoOptions: _commonInfo.utxoMemoOptions,
|
|
24
|
+
pluginId: 'bitcoinsv',
|
|
25
|
+
walletType: 'wallet:bitcoinsv',
|
|
41
26
|
|
|
42
27
|
// Explorers:
|
|
43
28
|
blockExplorer: 'https://whatsonchain.com/block/%s',
|
|
@@ -48,7 +33,19 @@ const currencyInfo = {
|
|
|
48
33
|
symbolImage: `${_constants.IMAGE_SERVER_URL}/bitcoinsv-logo-solo-64.png`,
|
|
49
34
|
symbolImageDarkMono: `${_constants.IMAGE_SERVER_URL}/bitcoinsv-logo-solo-64.png`,
|
|
50
35
|
|
|
36
|
+
denominations: [
|
|
37
|
+
{ name: 'BSV', multiplier: '100000000', symbol: '₿' },
|
|
38
|
+
{ name: 'mBSV', multiplier: '100000', symbol: 'm₿' },
|
|
39
|
+
{ name: 'cash', multiplier: '100', symbol: 'ƀ' }
|
|
40
|
+
],
|
|
41
|
+
|
|
51
42
|
// Deprecated:
|
|
43
|
+
..._commonInfo.legacyMemoInfo,
|
|
44
|
+
defaultSettings: {
|
|
45
|
+
customFeeSettings: ['satPerByte'],
|
|
46
|
+
blockbookServers: ['wss://blockbook.siftbitcoin.com:9146'],
|
|
47
|
+
enableCustomServers: false
|
|
48
|
+
},
|
|
52
49
|
metaTokens: []
|
|
53
50
|
}
|
|
54
51
|
|
|
@@ -2,13 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
var _constants = require('../../constants');
|
|
4
4
|
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
5
9
|
var _commonInfo = require('./commonInfo');
|
|
6
10
|
|
|
7
11
|
const currencyInfo = {
|
|
8
|
-
|
|
9
|
-
walletType: 'wallet:bitcointestnet',
|
|
12
|
+
canReplaceByFee: true,
|
|
10
13
|
currencyCode: 'TESTBTC',
|
|
14
|
+
customFeeTemplate: _commonInfo.utxoCustomFeeTemplate,
|
|
11
15
|
displayName: 'Bitcoin Testnet',
|
|
16
|
+
memoOptions: _commonInfo.utxoMemoOptions,
|
|
17
|
+
pluginId: 'bitcointestnet',
|
|
18
|
+
walletType: 'wallet:bitcointestnet',
|
|
19
|
+
|
|
20
|
+
// Explorers:
|
|
21
|
+
blockExplorer: 'https://blockchair.com/bitcoin/testnet/block/%s',
|
|
22
|
+
addressExplorer: 'https://blockchair.com/bitcoin/testnet/address/%s',
|
|
23
|
+
transactionExplorer: 'https://blockchair.com/bitcoin/testnet/transaction/%s',
|
|
24
|
+
|
|
25
|
+
// Images:
|
|
26
|
+
symbolImage: `${_constants.IMAGE_SERVER_URL}/bitcoin-logo-solo-64.png`,
|
|
27
|
+
symbolImageDarkMono: `${_constants.IMAGE_SERVER_URL}/bitcoin-logo-solo-64.png`,
|
|
28
|
+
|
|
12
29
|
denominations: [
|
|
13
30
|
{ name: 'TESTBTC', multiplier: '100000000', symbol: '₿' },
|
|
14
31
|
{ name: 'mTESTBTC', multiplier: '100000', symbol: 'm₿' },
|
|
@@ -16,33 +33,13 @@ var _commonInfo = require('./commonInfo');
|
|
|
16
33
|
{ name: 'sats', multiplier: '1', symbol: 's' }
|
|
17
34
|
],
|
|
18
35
|
|
|
19
|
-
//
|
|
36
|
+
// Deprecated:
|
|
37
|
+
..._commonInfo.legacyMemoInfo,
|
|
20
38
|
defaultSettings: {
|
|
21
39
|
customFeeSettings: ['satPerByte'],
|
|
22
40
|
blockbookServers: ['wss://tbtc1.trezor.io', 'wss://tbtc2.trezor.io'],
|
|
23
41
|
enableCustomServers: false
|
|
24
42
|
},
|
|
25
|
-
canReplaceByFee: true,
|
|
26
|
-
customFeeTemplate: [
|
|
27
|
-
{
|
|
28
|
-
type: 'nativeAmount',
|
|
29
|
-
key: 'satPerByte',
|
|
30
|
-
displayName: 'Satoshis Per Byte',
|
|
31
|
-
displayMultiplier: '0'
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
..._commonInfo.memoInfo,
|
|
35
|
-
|
|
36
|
-
// Explorers:
|
|
37
|
-
blockExplorer: 'https://blockchair.com/bitcoin/testnet/block/%s',
|
|
38
|
-
addressExplorer: 'https://blockchair.com/bitcoin/testnet/address/%s',
|
|
39
|
-
transactionExplorer: 'https://blockchair.com/bitcoin/testnet/transaction/%s',
|
|
40
|
-
|
|
41
|
-
// Images:
|
|
42
|
-
symbolImage: `${_constants.IMAGE_SERVER_URL}/bitcoin-logo-solo-64.png`,
|
|
43
|
-
symbolImageDarkMono: `${_constants.IMAGE_SERVER_URL}/bitcoin-logo-solo-64.png`,
|
|
44
|
-
|
|
45
|
-
// Deprecated:
|
|
46
43
|
metaTokens: []
|
|
47
44
|
}; exports.currencyInfo = currencyInfo
|
|
48
45
|
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
],
|
|
3
|
+
const utxoCustomFeeTemplate = [
|
|
4
|
+
{
|
|
5
|
+
type: 'nativeAmount',
|
|
6
|
+
key: 'satPerByte',
|
|
7
|
+
displayName: 'Satoshis Per Byte',
|
|
8
|
+
displayMultiplier: '0'
|
|
9
|
+
}
|
|
10
|
+
]; exports.utxoCustomFeeTemplate = utxoCustomFeeTemplate
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
const utxoMemoOptions = [
|
|
13
|
+
{
|
|
14
|
+
type: 'hex',
|
|
15
|
+
hidden: true,
|
|
16
|
+
maxBytes: 80,
|
|
17
|
+
memoName: 'OP_RETURN'
|
|
18
|
+
}
|
|
19
|
+
]; exports.utxoMemoOptions = utxoMemoOptions
|
|
20
|
+
|
|
21
|
+
// Deprecated:
|
|
22
|
+
const legacyMemoInfo = {
|
|
14
23
|
memoMaxLength: 80,
|
|
15
24
|
memoType: 'text'
|
|
16
|
-
}; exports.
|
|
25
|
+
}; exports.legacyMemoInfo = legacyMemoInfo
|