edge-currency-plugins 2.0.4 → 2.1.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/lib/common/constants.js +1 -1
- package/lib/common/fees/calcMinerFeePerByte.js +28 -16
- package/lib/common/fees/makeFees.js +4 -2
- package/lib/common/fees/processInfoServerFees.js +2 -16
- package/lib/common/fees/processMempoolSpaceFees.js +12 -4
- package/lib/common/plugin/types.js +16 -2
- package/lib/common/utxobased/info/badcoin.js +5 -0
- package/lib/common/utxobased/info/bitcoin.js +5 -0
- package/lib/common/utxobased/info/bitcoincash.js +7 -2
- package/lib/common/utxobased/info/bitcoincashtestnet.js +7 -2
- package/lib/common/utxobased/info/bitcoingold.js +5 -0
- package/lib/common/utxobased/info/bitcoingoldtestnet.js +5 -0
- package/lib/common/utxobased/info/bitcoinsv.js +7 -2
- package/lib/common/utxobased/info/bitcointestnet.js +5 -0
- package/lib/common/utxobased/info/dash.js +5 -0
- package/lib/common/utxobased/info/digibyte.js +5 -0
- package/lib/common/utxobased/info/dogecoin.js +5 -0
- package/lib/common/utxobased/info/eboost.js +5 -0
- package/lib/common/utxobased/info/feathercoin.js +5 -0
- package/lib/common/utxobased/info/groestlcoin.js +5 -0
- package/lib/common/utxobased/info/litecoin.js +5 -0
- package/lib/common/utxobased/info/qtum.js +5 -0
- package/lib/common/utxobased/info/ravencoin.js +5 -0
- package/lib/common/utxobased/info/smartcash.js +5 -0
- package/lib/common/utxobased/info/ufo.js +5 -0
- package/lib/common/utxobased/info/vertcoin.js +5 -0
- package/lib/common/utxobased/info/zcoin.js +5 -0
- package/lib/common/utxobased/keymanager/bitcoincashUtils/base32.js +1 -2
- package/lib/common/utxobased/keymanager/bitcoincashUtils/cashAddress.js +1 -4
- package/lib/common/utxobased/keymanager/declarations/bs58smartcheck.d.js +4 -0
- package/lib/common/utxobased/keymanager/declarations/wif-smart.d.js +24 -0
- package/lib/common/utxobased/keymanager/keymanager.js +117 -68
- package/lib/common/utxobased/keymanager/utxopicker/utils.js +1 -3
- package/lib/src/common/constants.d.ts +1 -1
- package/lib/src/common/fees/processMempoolSpaceFees.d.ts +0 -6
- package/lib/src/common/plugin/types.d.ts +10 -4
- package/lib/src/common/utxobased/keymanager/keymanager.d.ts +3 -9
- package/lib/src/util/filterUndefined.d.ts +1 -0
- package/lib/util/filterUndefined.js +15 -0
- package/package.json +12 -4
- package/lib/common/utxobased/keymanager/declarations/base58grscheck.d.js +0 -1
- package/lib/common/utxobased/keymanager/declarations/wifgrs.d.js +0 -1
package/lib/common/constants.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); const IMAGE_SERVER_URL = 'https://content.edge.app'; exports.IMAGE_SERVER_URL = IMAGE_SERVER_URL
|
|
2
|
-
const INFO_SERVER_URI = 'https://info1.
|
|
2
|
+
const INFO_SERVER_URI = 'https://info1.edge.app'; exports.INFO_SERVER_URI = INFO_SERVER_URI
|
|
3
3
|
|
|
4
4
|
// Fees
|
|
5
5
|
const FEES_PATH = 'fees.json'; exports.FEES_PATH = FEES_PATH
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _biggystring = require('biggystring');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -19,36 +19,48 @@
|
|
|
19
19
|
networkFeeOption,
|
|
20
20
|
customNetworkFee
|
|
21
21
|
) => {
|
|
22
|
+
const {
|
|
23
|
+
highFeeFudgeFactor = '1',
|
|
24
|
+
lowFeeFudgeFactor = '1',
|
|
25
|
+
standardFeeHighAmount,
|
|
26
|
+
standardFeeHighFudgeFactor = '1',
|
|
27
|
+
standardFeeLowAmount,
|
|
28
|
+
standardFeeLowFudgeFactor = '1'
|
|
29
|
+
} = fees
|
|
30
|
+
let { highFee, lowFee, standardFeeHigh, standardFeeLow } = fees
|
|
31
|
+
|
|
32
|
+
highFee = _biggystring.round.call(void 0, _biggystring.mul.call(void 0, highFee, highFeeFudgeFactor), 0)
|
|
33
|
+
lowFee = _biggystring.round.call(void 0, _biggystring.mul.call(void 0, lowFee, lowFeeFudgeFactor), 0)
|
|
34
|
+
standardFeeHigh = _biggystring.round.call(void 0, _biggystring.mul.call(void 0, standardFeeHigh, standardFeeHighFudgeFactor), 0)
|
|
35
|
+
standardFeeLow = _biggystring.round.call(void 0, _biggystring.mul.call(void 0, standardFeeLow, standardFeeLowFudgeFactor), 0)
|
|
36
|
+
|
|
22
37
|
switch (networkFeeOption) {
|
|
23
38
|
case 'low':
|
|
24
|
-
return
|
|
39
|
+
return lowFee
|
|
25
40
|
|
|
26
41
|
case 'standard': {
|
|
27
|
-
if (
|
|
28
|
-
return
|
|
42
|
+
if (_biggystring.gte.call(void 0, nativeAmount, standardFeeHighAmount)) {
|
|
43
|
+
return standardFeeHigh
|
|
29
44
|
}
|
|
30
|
-
if (
|
|
31
|
-
return
|
|
45
|
+
if (_biggystring.lte.call(void 0, nativeAmount, standardFeeLowAmount)) {
|
|
46
|
+
return standardFeeLow
|
|
32
47
|
}
|
|
33
48
|
|
|
34
49
|
// Scale the fee by the amount the user is sending scaled between standardFeeLowAmount and standardFeeHighAmount
|
|
35
|
-
const lowHighAmountDiff =
|
|
36
|
-
|
|
37
|
-
fees.standardFeeLowAmount
|
|
38
|
-
)
|
|
39
|
-
const lowHighFeeDiff = bs.sub(fees.standardFeeHigh, fees.standardFeeLow)
|
|
50
|
+
const lowHighAmountDiff = _biggystring.sub.call(void 0, standardFeeHighAmount, standardFeeLowAmount)
|
|
51
|
+
const lowHighFeeDiff = _biggystring.sub.call(void 0, standardFeeHigh, standardFeeLow)
|
|
40
52
|
|
|
41
53
|
// How much above the lowFeeAmount is the user sending
|
|
42
|
-
const amountDiffFromLow =
|
|
54
|
+
const amountDiffFromLow = _biggystring.sub.call(void 0, nativeAmount, standardFeeLowAmount)
|
|
43
55
|
|
|
44
56
|
// Add this much to the low fee = (amountDiffFromLow * lowHighFeeDiff) / lowHighAmountDiff)
|
|
45
|
-
const temp1 =
|
|
46
|
-
const addFeeToLow =
|
|
47
|
-
return
|
|
57
|
+
const temp1 = _biggystring.mul.call(void 0, amountDiffFromLow, lowHighFeeDiff)
|
|
58
|
+
const addFeeToLow = _biggystring.div.call(void 0, temp1, lowHighAmountDiff)
|
|
59
|
+
return _biggystring.add.call(void 0, standardFeeLow, addFeeToLow)
|
|
48
60
|
}
|
|
49
61
|
|
|
50
62
|
case 'high':
|
|
51
|
-
return
|
|
63
|
+
return highFee
|
|
52
64
|
|
|
53
65
|
case 'custom':
|
|
54
66
|
if (customNetworkFee == null || customNetworkFee === '0') {
|
|
@@ -9,6 +9,7 @@ var _cleaners = require('cleaners');
|
|
|
9
9
|
|
|
10
10
|
var _memlet = require('memlet');
|
|
11
11
|
|
|
12
|
+
var _filterUndefined = require('../../util/filterUndefined');
|
|
12
13
|
var _constants = require('../constants');
|
|
13
14
|
|
|
14
15
|
|
|
@@ -57,7 +58,8 @@ var _processMempoolSpaceFees = require('./processMempoolSpaceFees');
|
|
|
57
58
|
...common,
|
|
58
59
|
mempoolSpaceFeeInfoServer: engineInfo.mempoolSpaceFeeInfoServer
|
|
59
60
|
})
|
|
60
|
-
|
|
61
|
+
const cleanedVendorFees = _filterUndefined.removeUndefined.call(void 0, _nullishCoalesce(vendorFees, () => ( {})))
|
|
62
|
+
Object.assign(fees, cleanedVendorFees)
|
|
61
63
|
timestamp = Date.now()
|
|
62
64
|
|
|
63
65
|
await cacheFees(memlet, fees)
|
|
@@ -67,7 +69,7 @@ var _processMempoolSpaceFees = require('./processMempoolSpaceFees');
|
|
|
67
69
|
async start() {
|
|
68
70
|
const edgeFees = await fetchFees({
|
|
69
71
|
...common,
|
|
70
|
-
uri: `${_constants.INFO_SERVER_URI}/networkFees/${currencyInfo.pluginId}`,
|
|
72
|
+
uri: `${_constants.INFO_SERVER_URI}/v1/networkFees/${currencyInfo.pluginId}`,
|
|
71
73
|
processor: _processInfoServerFees.processInfoServerFees
|
|
72
74
|
})
|
|
73
75
|
Object.assign(fees, edgeFees)
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const asInfoServerFees = _cleaners.asObject({
|
|
6
|
-
lowFee: _cleaners.asString,
|
|
7
|
-
standardFeeLow: _cleaners.asString,
|
|
8
|
-
standardFeeHigh: _cleaners.asString,
|
|
9
|
-
highFee: _cleaners.asString,
|
|
10
|
-
|
|
11
|
-
// The amount of satoshis which will be charged the standardFeeLow
|
|
12
|
-
standardFeeLowAmount: _cleaners.asString,
|
|
13
|
-
// The amount of satoshis which will be charged the standardFeeHigh
|
|
14
|
-
standardFeeHighAmount: _cleaners.asString
|
|
15
|
-
})
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _types = require('../plugin/types');
|
|
16
2
|
|
|
17
3
|
/**
|
|
18
4
|
* Processes the fee object from Edge Info Server
|
|
@@ -23,7 +9,7 @@ const asInfoServerFees = _cleaners.asObject({
|
|
|
23
9
|
fees
|
|
24
10
|
) => {
|
|
25
11
|
try {
|
|
26
|
-
return
|
|
12
|
+
return _types.asSimpleFeeSettings.call(void 0, fees)
|
|
27
13
|
} catch (e) {
|
|
28
14
|
return null
|
|
29
15
|
}
|
|
@@ -16,6 +16,10 @@ var _constants = require('../constants');
|
|
|
16
16
|
* @param fees
|
|
17
17
|
* @returns Partial<FeeRates>
|
|
18
18
|
*/
|
|
19
|
+
|
|
20
|
+
const STANDARD_FEE_HIGH_MULTIPLIER = 1.3
|
|
21
|
+
const HIGH_FEE_MULTIPLIER = 2
|
|
22
|
+
|
|
19
23
|
const processMempoolSpaceFees = (fees) => {
|
|
20
24
|
let mempoolFees
|
|
21
25
|
try {
|
|
@@ -24,10 +28,14 @@ var _constants = require('../constants');
|
|
|
24
28
|
return null
|
|
25
29
|
}
|
|
26
30
|
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
+
const { fastestFee, halfHourFee } = mempoolFees
|
|
32
|
+
|
|
33
|
+
const lowFee = halfHourFee.toString()
|
|
34
|
+
const standardFeeLow = fastestFee.toString()
|
|
35
|
+
const standardFeeHigh = Math.round(
|
|
36
|
+
fastestFee * STANDARD_FEE_HIGH_MULTIPLIER
|
|
37
|
+
).toString()
|
|
38
|
+
const highFee = Math.round(fastestFee * HIGH_FEE_MULTIPLIER).toString()
|
|
31
39
|
|
|
32
40
|
return {
|
|
33
41
|
lowFee: bs.max(lowFee, _constants.LOW_FEE.toString()),
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
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; } }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
2
10
|
var _cleaners = require('cleaners');
|
|
3
11
|
|
|
4
12
|
|
|
@@ -17,6 +25,7 @@ var _cleaners = require('cleaners');
|
|
|
17
25
|
|
|
18
26
|
|
|
19
27
|
|
|
28
|
+
|
|
20
29
|
const asCurrencyFormat = _cleaners.asValue.call(void 0, 'bip32', 'bip44', 'bip49', 'bip84'); exports.asCurrencyFormat = asCurrencyFormat
|
|
21
30
|
|
|
22
31
|
// Path up to changeIndex
|
|
@@ -133,7 +142,6 @@ var _cleaners = require('cleaners');
|
|
|
133
142
|
|
|
134
143
|
|
|
135
144
|
|
|
136
|
-
|
|
137
145
|
|
|
138
146
|
|
|
139
147
|
const asFeeRates = _cleaners.asObject.call(void 0, {
|
|
@@ -146,6 +154,12 @@ var _cleaners = require('cleaners');
|
|
|
146
154
|
|
|
147
155
|
const asSimpleFeeSettings = _cleaners.asObject.call(void 0, {
|
|
148
156
|
...exports.asFeeRates.shape,
|
|
157
|
+
|
|
158
|
+
lowFeeFudgeFactor: _cleaners.asMaybe.call(void 0, _cleaners.asString),
|
|
159
|
+
standardFeeLowFudgeFactor: _cleaners.asMaybe.call(void 0, _cleaners.asString),
|
|
160
|
+
standardFeeHighFudgeFactor: _cleaners.asMaybe.call(void 0, _cleaners.asString),
|
|
161
|
+
highFeeFudgeFactor: _cleaners.asMaybe.call(void 0, _cleaners.asString),
|
|
162
|
+
|
|
149
163
|
standardFeeLowAmount: _cleaners.asString,
|
|
150
164
|
standardFeeHighAmount: _cleaners.asString
|
|
151
165
|
}); exports.asSimpleFeeSettings = asSimpleFeeSettings
|
|
@@ -40,6 +40,11 @@ const engineInfo = {
|
|
|
40
40
|
defaultFee: 500000,
|
|
41
41
|
feeUpdateInterval: 60000,
|
|
42
42
|
simpleFeeSettings: {
|
|
43
|
+
lowFeeFudgeFactor: undefined,
|
|
44
|
+
standardFeeLowFudgeFactor: undefined,
|
|
45
|
+
standardFeeHighFudgeFactor: undefined,
|
|
46
|
+
highFeeFudgeFactor: undefined,
|
|
47
|
+
|
|
43
48
|
highFee: '300',
|
|
44
49
|
lowFee: '100',
|
|
45
50
|
standardFeeLow: '150',
|
|
@@ -56,6 +56,11 @@ const engineInfo = {
|
|
|
56
56
|
feeUpdateInterval: 60000,
|
|
57
57
|
mempoolSpaceFeeInfoServer: 'https://mempool.space/api/v1/fees/recommended',
|
|
58
58
|
simpleFeeSettings: {
|
|
59
|
+
lowFeeFudgeFactor: undefined,
|
|
60
|
+
standardFeeLowFudgeFactor: undefined,
|
|
61
|
+
standardFeeHighFudgeFactor: undefined,
|
|
62
|
+
highFeeFudgeFactor: undefined,
|
|
63
|
+
|
|
59
64
|
highFee: '150',
|
|
60
65
|
lowFee: '20',
|
|
61
66
|
standardFeeLow: '50',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _altcoinjs = require('altcoin-js');
|
|
2
2
|
var _cleaners = require('cleaners');
|
|
3
3
|
|
|
4
4
|
|
|
@@ -57,6 +57,11 @@ const engineInfo = {
|
|
|
57
57
|
defaultFee: 10000,
|
|
58
58
|
feeUpdateInterval: 60000,
|
|
59
59
|
simpleFeeSettings: {
|
|
60
|
+
lowFeeFudgeFactor: undefined,
|
|
61
|
+
standardFeeLowFudgeFactor: undefined,
|
|
62
|
+
standardFeeHighFudgeFactor: undefined,
|
|
63
|
+
highFeeFudgeFactor: undefined,
|
|
64
|
+
|
|
60
65
|
highFee: '20',
|
|
61
66
|
lowFee: '3',
|
|
62
67
|
standardFeeLow: '5',
|
|
@@ -76,7 +81,7 @@ const engineInfo = {
|
|
|
76
81
|
const coinInfo = {
|
|
77
82
|
name: 'bitcoincash',
|
|
78
83
|
segwit: false,
|
|
79
|
-
sighash:
|
|
84
|
+
sighash: _altcoinjs.Psbt.BCH_SIGHASH_ALL,
|
|
80
85
|
coinType: 145,
|
|
81
86
|
|
|
82
87
|
prefixes: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _altcoinjs = require('altcoin-js');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _constants = require('../../constants');
|
|
@@ -42,6 +42,11 @@ const engineInfo = {
|
|
|
42
42
|
defaultFee: 10000,
|
|
43
43
|
feeUpdateInterval: 60000,
|
|
44
44
|
simpleFeeSettings: {
|
|
45
|
+
lowFeeFudgeFactor: undefined,
|
|
46
|
+
standardFeeLowFudgeFactor: undefined,
|
|
47
|
+
standardFeeHighFudgeFactor: undefined,
|
|
48
|
+
highFeeFudgeFactor: undefined,
|
|
49
|
+
|
|
45
50
|
highFee: '20',
|
|
46
51
|
lowFee: '3',
|
|
47
52
|
standardFeeLow: '5',
|
|
@@ -55,7 +60,7 @@ const engineInfo = {
|
|
|
55
60
|
const coinInfo = {
|
|
56
61
|
name: 'bitcoincashtestnet',
|
|
57
62
|
segwit: false,
|
|
58
|
-
sighash:
|
|
63
|
+
sighash: _altcoinjs.Psbt.BCH_SIGHASH_ALL,
|
|
59
64
|
coinType: 1,
|
|
60
65
|
|
|
61
66
|
prefixes: {
|
|
@@ -48,6 +48,11 @@ const engineInfo = {
|
|
|
48
48
|
defaultFee: 1000,
|
|
49
49
|
feeUpdateInterval: 60000,
|
|
50
50
|
simpleFeeSettings: {
|
|
51
|
+
lowFeeFudgeFactor: undefined,
|
|
52
|
+
standardFeeLowFudgeFactor: undefined,
|
|
53
|
+
standardFeeHighFudgeFactor: undefined,
|
|
54
|
+
highFeeFudgeFactor: undefined,
|
|
55
|
+
|
|
51
56
|
highFee: '200',
|
|
52
57
|
lowFee: '10',
|
|
53
58
|
standardFeeLow: '15',
|
|
@@ -34,6 +34,11 @@ const engineInfo = {
|
|
|
34
34
|
defaultFee: 1000,
|
|
35
35
|
feeUpdateInterval: 60000,
|
|
36
36
|
simpleFeeSettings: {
|
|
37
|
+
lowFeeFudgeFactor: undefined,
|
|
38
|
+
standardFeeLowFudgeFactor: undefined,
|
|
39
|
+
standardFeeHighFudgeFactor: undefined,
|
|
40
|
+
highFeeFudgeFactor: undefined,
|
|
41
|
+
|
|
37
42
|
highFee: '200',
|
|
38
43
|
lowFee: '10',
|
|
39
44
|
standardFeeLow: '15',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _altcoinjs = require('altcoin-js');
|
|
2
2
|
var _cleaners = require('cleaners');
|
|
3
3
|
|
|
4
4
|
|
|
@@ -54,6 +54,11 @@ const engineInfo = {
|
|
|
54
54
|
defaultFee: 10000,
|
|
55
55
|
feeUpdateInterval: 60000,
|
|
56
56
|
simpleFeeSettings: {
|
|
57
|
+
lowFeeFudgeFactor: undefined,
|
|
58
|
+
standardFeeLowFudgeFactor: undefined,
|
|
59
|
+
standardFeeHighFudgeFactor: undefined,
|
|
60
|
+
highFeeFudgeFactor: undefined,
|
|
61
|
+
|
|
57
62
|
highFee: '20',
|
|
58
63
|
lowFee: '3',
|
|
59
64
|
standardFeeLow: '5',
|
|
@@ -94,7 +99,7 @@ const engineInfo = {
|
|
|
94
99
|
const coinInfo = {
|
|
95
100
|
name: 'bitcoinsv',
|
|
96
101
|
segwit: false,
|
|
97
|
-
sighash:
|
|
102
|
+
sighash: _altcoinjs.Psbt.BCH_SIGHASH_ALL,
|
|
98
103
|
coinType: 236,
|
|
99
104
|
|
|
100
105
|
prefixes: {
|
|
@@ -50,6 +50,11 @@ var _constants = require('../../constants');
|
|
|
50
50
|
feeUpdateInterval: 60000,
|
|
51
51
|
mempoolSpaceFeeInfoServer: 'https://mempool.space/api/v1/fees/recommended',
|
|
52
52
|
simpleFeeSettings: {
|
|
53
|
+
lowFeeFudgeFactor: undefined,
|
|
54
|
+
standardFeeLowFudgeFactor: undefined,
|
|
55
|
+
standardFeeHighFudgeFactor: undefined,
|
|
56
|
+
highFeeFudgeFactor: undefined,
|
|
57
|
+
|
|
53
58
|
highFee: '150',
|
|
54
59
|
lowFee: '20',
|
|
55
60
|
standardFeeLow: '50',
|
|
@@ -48,6 +48,11 @@ const engineInfo = {
|
|
|
48
48
|
defaultFee: 10000,
|
|
49
49
|
feeUpdateInterval: 60000,
|
|
50
50
|
simpleFeeSettings: {
|
|
51
|
+
lowFeeFudgeFactor: undefined,
|
|
52
|
+
standardFeeLowFudgeFactor: undefined,
|
|
53
|
+
standardFeeHighFudgeFactor: undefined,
|
|
54
|
+
highFeeFudgeFactor: undefined,
|
|
55
|
+
|
|
51
56
|
highFee: '300',
|
|
52
57
|
lowFee: '100',
|
|
53
58
|
standardFeeLow: '150',
|
|
@@ -41,6 +41,11 @@ const engineInfo = {
|
|
|
41
41
|
defaultFee: 1000,
|
|
42
42
|
feeUpdateInterval: 60000,
|
|
43
43
|
simpleFeeSettings: {
|
|
44
|
+
lowFeeFudgeFactor: undefined,
|
|
45
|
+
standardFeeLowFudgeFactor: undefined,
|
|
46
|
+
standardFeeHighFudgeFactor: undefined,
|
|
47
|
+
highFeeFudgeFactor: undefined,
|
|
48
|
+
|
|
44
49
|
highFee: '150',
|
|
45
50
|
lowFee: '20',
|
|
46
51
|
standardFeeLow: '50',
|
|
@@ -45,6 +45,11 @@ const engineInfo = {
|
|
|
45
45
|
defaultFee: 1000,
|
|
46
46
|
feeUpdateInterval: 10000,
|
|
47
47
|
simpleFeeSettings: {
|
|
48
|
+
lowFeeFudgeFactor: undefined,
|
|
49
|
+
standardFeeLowFudgeFactor: undefined,
|
|
50
|
+
standardFeeHighFudgeFactor: undefined,
|
|
51
|
+
highFeeFudgeFactor: undefined,
|
|
52
|
+
|
|
48
53
|
highFee: '526316',
|
|
49
54
|
lowFee: '526316',
|
|
50
55
|
standardFeeLow: '526316',
|
|
@@ -40,6 +40,11 @@ const engineInfo = {
|
|
|
40
40
|
defaultFee: 500000,
|
|
41
41
|
feeUpdateInterval: 60000,
|
|
42
42
|
simpleFeeSettings: {
|
|
43
|
+
lowFeeFudgeFactor: undefined,
|
|
44
|
+
standardFeeLowFudgeFactor: undefined,
|
|
45
|
+
standardFeeHighFudgeFactor: undefined,
|
|
46
|
+
highFeeFudgeFactor: undefined,
|
|
47
|
+
|
|
43
48
|
highFee: '300',
|
|
44
49
|
lowFee: '100',
|
|
45
50
|
standardFeeLow: '150',
|
|
@@ -45,6 +45,11 @@ var _constants = require('../../constants');
|
|
|
45
45
|
defaultFee: 1000,
|
|
46
46
|
feeUpdateInterval: 60000,
|
|
47
47
|
simpleFeeSettings: {
|
|
48
|
+
lowFeeFudgeFactor: undefined,
|
|
49
|
+
standardFeeLowFudgeFactor: undefined,
|
|
50
|
+
standardFeeHighFudgeFactor: undefined,
|
|
51
|
+
highFeeFudgeFactor: undefined,
|
|
52
|
+
|
|
48
53
|
highFee: '1200',
|
|
49
54
|
lowFee: '400',
|
|
50
55
|
standardFeeLow: '600',
|
|
@@ -46,6 +46,11 @@ const engineInfo = {
|
|
|
46
46
|
defaultFee: 100000,
|
|
47
47
|
feeUpdateInterval: 60000,
|
|
48
48
|
simpleFeeSettings: {
|
|
49
|
+
lowFeeFudgeFactor: undefined,
|
|
50
|
+
standardFeeLowFudgeFactor: undefined,
|
|
51
|
+
standardFeeHighFudgeFactor: undefined,
|
|
52
|
+
highFeeFudgeFactor: undefined,
|
|
53
|
+
|
|
49
54
|
highFee: '150',
|
|
50
55
|
lowFee: '20',
|
|
51
56
|
standardFeeLow: '50',
|
|
@@ -52,6 +52,11 @@ var _constants = require('../../constants');
|
|
|
52
52
|
defaultFee: 50000,
|
|
53
53
|
feeUpdateInterval: 60000,
|
|
54
54
|
simpleFeeSettings: {
|
|
55
|
+
lowFeeFudgeFactor: undefined,
|
|
56
|
+
standardFeeLowFudgeFactor: undefined,
|
|
57
|
+
standardFeeHighFudgeFactor: undefined,
|
|
58
|
+
highFeeFudgeFactor: undefined,
|
|
59
|
+
|
|
55
60
|
highFee: '300',
|
|
56
61
|
lowFee: '100',
|
|
57
62
|
standardFeeLow: '150',
|
|
@@ -37,6 +37,11 @@ const engineInfo = {
|
|
|
37
37
|
defaultFee: 1000,
|
|
38
38
|
feeUpdateInterval: 60000,
|
|
39
39
|
simpleFeeSettings: {
|
|
40
|
+
lowFeeFudgeFactor: undefined,
|
|
41
|
+
standardFeeLowFudgeFactor: undefined,
|
|
42
|
+
standardFeeHighFudgeFactor: undefined,
|
|
43
|
+
highFeeFudgeFactor: undefined,
|
|
44
|
+
|
|
40
45
|
highFee: '1000',
|
|
41
46
|
lowFee: '400',
|
|
42
47
|
standardFeeLow: '450',
|
|
@@ -37,6 +37,11 @@ const engineInfo = {
|
|
|
37
37
|
defaultFee: 1000,
|
|
38
38
|
feeUpdateInterval: 60000,
|
|
39
39
|
simpleFeeSettings: {
|
|
40
|
+
lowFeeFudgeFactor: undefined,
|
|
41
|
+
standardFeeLowFudgeFactor: undefined,
|
|
42
|
+
standardFeeHighFudgeFactor: undefined,
|
|
43
|
+
highFeeFudgeFactor: undefined,
|
|
44
|
+
|
|
40
45
|
highFee: '150',
|
|
41
46
|
lowFee: '20',
|
|
42
47
|
standardFeeLow: '50',
|
|
@@ -43,6 +43,11 @@ const engineInfo = {
|
|
|
43
43
|
defaultFee: 100000,
|
|
44
44
|
feeUpdateInterval: 60000,
|
|
45
45
|
simpleFeeSettings: {
|
|
46
|
+
lowFeeFudgeFactor: undefined,
|
|
47
|
+
standardFeeLowFudgeFactor: undefined,
|
|
48
|
+
standardFeeHighFudgeFactor: undefined,
|
|
49
|
+
highFeeFudgeFactor: undefined,
|
|
50
|
+
|
|
46
51
|
highFee: '1500',
|
|
47
52
|
lowFee: '200',
|
|
48
53
|
standardFeeLow: '500',
|
|
@@ -40,6 +40,11 @@ const engineInfo = {
|
|
|
40
40
|
defaultFee: 50000,
|
|
41
41
|
feeUpdateInterval: 60000,
|
|
42
42
|
simpleFeeSettings: {
|
|
43
|
+
lowFeeFudgeFactor: undefined,
|
|
44
|
+
standardFeeLowFudgeFactor: undefined,
|
|
45
|
+
standardFeeHighFudgeFactor: undefined,
|
|
46
|
+
highFeeFudgeFactor: undefined,
|
|
47
|
+
|
|
43
48
|
highFee: '2250',
|
|
44
49
|
lowFee: '1000',
|
|
45
50
|
standardFeeLow: '1100',
|
|
@@ -47,6 +47,11 @@ const engineInfo = {
|
|
|
47
47
|
defaultFee: 1000,
|
|
48
48
|
feeUpdateInterval: 60000,
|
|
49
49
|
simpleFeeSettings: {
|
|
50
|
+
lowFeeFudgeFactor: undefined,
|
|
51
|
+
standardFeeLowFudgeFactor: undefined,
|
|
52
|
+
standardFeeHighFudgeFactor: undefined,
|
|
53
|
+
highFeeFudgeFactor: undefined,
|
|
54
|
+
|
|
50
55
|
highFee: '150',
|
|
51
56
|
lowFee: '20',
|
|
52
57
|
standardFeeLow: '50',
|
|
@@ -46,6 +46,11 @@ var _constants = require('../../constants');
|
|
|
46
46
|
defaultFee: 1000,
|
|
47
47
|
feeUpdateInterval: 60000,
|
|
48
48
|
simpleFeeSettings: {
|
|
49
|
+
lowFeeFudgeFactor: undefined,
|
|
50
|
+
standardFeeLowFudgeFactor: undefined,
|
|
51
|
+
standardFeeHighFudgeFactor: undefined,
|
|
52
|
+
highFeeFudgeFactor: undefined,
|
|
53
|
+
|
|
49
54
|
highFee: '150',
|
|
50
55
|
lowFee: '20',
|
|
51
56
|
standardFeeLow: '50',
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true})
|
|
2
|
-
/***
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});/***
|
|
3
2
|
* https://github.com/bitcoincashjs/cashaddr
|
|
4
3
|
* Copyright (c) 2018 Matias Alejo Garcia
|
|
5
4
|
* Copyright (c) 2017 Emilio Almansi
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
-
|
|
3
|
-
// import bcoin from 'bcoin'
|
|
4
|
-
var _buffer = require('buffer');
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _buffer = require('buffer');
|
|
5
2
|
|
|
6
3
|
var _base32 = require('./base32');
|
|
7
4
|
var _bn = require('./bn'); var _bn2 = _interopRequireDefault(_bn);
|
|
@@ -1,9 +1,18 @@
|
|
|
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; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
-
|
|
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; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _altcoinjs = require('altcoin-js');
|
|
3
11
|
var _biggystring = require('biggystring');
|
|
4
12
|
var _bip32 = require('bip32'); var bip32 = _interopRequireWildcard(_bip32);
|
|
5
13
|
var _bip39 = require('bip39'); var bip39 = _interopRequireWildcard(_bip39);
|
|
6
14
|
var _bitcoinjsmessage = require('bitcoinjs-message'); var _bitcoinjsmessage2 = _interopRequireDefault(_bitcoinjsmessage);
|
|
15
|
+
var _ecpair = require('ecpair');
|
|
7
16
|
var _types = require('edge-core-js/types');
|
|
8
17
|
|
|
9
18
|
var _indexAtProtected = require('../../../util/indexAtProtected');
|
|
@@ -21,6 +30,20 @@ var _cashAddress = require('./bitcoincashUtils/cashAddress');
|
|
|
21
30
|
var _coinmapper = require('./coinmapper');
|
|
22
31
|
var _utxopicker = require('./utxopicker'); var utxopicker = _interopRequireWildcard(_utxopicker);
|
|
23
32
|
|
|
33
|
+
let ECPair
|
|
34
|
+
|
|
35
|
+
Promise.resolve().then(() => require('@bitcoin-js/tiny-secp256k1-asmjs'))
|
|
36
|
+
.then(tinysecp => {
|
|
37
|
+
_altcoinjs.initEccLib.call(void 0, tinysecp)
|
|
38
|
+
ECPair = _ecpair.ECPairFactory.call(void 0, tinysecp)
|
|
39
|
+
})
|
|
40
|
+
.catch(error => {
|
|
41
|
+
console.error(error)
|
|
42
|
+
})
|
|
43
|
+
.finally(() => {
|
|
44
|
+
console.log('loaded ECPair!')
|
|
45
|
+
})
|
|
46
|
+
|
|
24
47
|
// in bitcoin these are bip44, bip49, bip84 xpub prefixes
|
|
25
48
|
// other coins contain different formats which still need to be gathered.
|
|
26
49
|
var BIP43PurposeTypeEnum; (function (BIP43PurposeTypeEnum) {
|
|
@@ -37,6 +60,7 @@ var AddressTypeEnum; (function (AddressTypeEnum) {
|
|
|
37
60
|
const p2sh = 'p2sh'; AddressTypeEnum["p2sh"] = p2sh;
|
|
38
61
|
const p2wpkh = 'p2wpkh'; AddressTypeEnum["p2wpkh"] = p2wpkh; // short bech32 address
|
|
39
62
|
const p2wsh = 'p2wsh'; AddressTypeEnum["p2wsh"] = p2wsh; // long bech32 address
|
|
63
|
+
const p2tr = 'p2tr'; AddressTypeEnum["p2tr"] = p2tr; // bech32m address
|
|
40
64
|
})(AddressTypeEnum || (exports.AddressTypeEnum = AddressTypeEnum = {}));
|
|
41
65
|
|
|
42
66
|
var ScriptTypeEnum; (function (ScriptTypeEnum) {
|
|
@@ -46,6 +70,7 @@ var ScriptTypeEnum; (function (ScriptTypeEnum) {
|
|
|
46
70
|
const p2pk = 'p2pk'; ScriptTypeEnum["p2pk"] = p2pk;
|
|
47
71
|
const p2pkh = 'p2pkh'; ScriptTypeEnum["p2pkh"] = p2pkh;
|
|
48
72
|
const p2sh = 'p2sh'; ScriptTypeEnum["p2sh"] = p2sh;
|
|
73
|
+
const p2tr = 'p2tr'; ScriptTypeEnum["p2tr"] = p2tr;
|
|
49
74
|
const replayProtection = 'replayprotection'; ScriptTypeEnum["replayProtection"] = replayProtection;
|
|
50
75
|
const replayProtectionP2SH = 'replayprotectionp2sh'; ScriptTypeEnum["replayProtectionP2SH"] = replayProtectionP2SH;
|
|
51
76
|
})(ScriptTypeEnum || (exports.ScriptTypeEnum = ScriptTypeEnum = {}));
|
|
@@ -224,15 +249,6 @@ var VerifyAddressEnum; (function (VerifyAddressEnum) {
|
|
|
224
249
|
|
|
225
250
|
|
|
226
251
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
252
|
|
|
237
253
|
|
|
238
254
|
|
|
@@ -392,7 +408,7 @@ const xprivToXPubInternal = (
|
|
|
392
408
|
// currently returns the derivation for an empty script template for a bitcoin cash
|
|
393
409
|
// replay protection script (without key material)
|
|
394
410
|
let hash = '0000'
|
|
395
|
-
hash =
|
|
411
|
+
hash = _altcoinjs.crypto
|
|
396
412
|
.hash160(Buffer.from(scriptTemplate(''), 'hex'))
|
|
397
413
|
.slice(0, 4)
|
|
398
414
|
.toString('hex')
|
|
@@ -482,7 +498,7 @@ const addressToScriptPubkeyInternal = (
|
|
|
482
498
|
return scriptPubkey
|
|
483
499
|
}
|
|
484
500
|
}
|
|
485
|
-
payment =
|
|
501
|
+
payment = _altcoinjs.payments.p2pkh
|
|
486
502
|
break
|
|
487
503
|
case AddressTypeEnum.p2sh:
|
|
488
504
|
if (selectedPrefixes.cashaddr != null) {
|
|
@@ -501,13 +517,16 @@ const addressToScriptPubkeyInternal = (
|
|
|
501
517
|
return scriptPubkey
|
|
502
518
|
}
|
|
503
519
|
}
|
|
504
|
-
payment =
|
|
520
|
+
payment = _altcoinjs.payments.p2sh
|
|
505
521
|
break
|
|
506
522
|
case AddressTypeEnum.p2wpkh:
|
|
507
|
-
payment =
|
|
523
|
+
payment = _altcoinjs.payments.p2wpkh
|
|
508
524
|
break
|
|
509
525
|
case AddressTypeEnum.p2wsh:
|
|
510
|
-
payment =
|
|
526
|
+
payment = _altcoinjs.payments.p2wsh
|
|
527
|
+
break
|
|
528
|
+
case AddressTypeEnum.p2tr:
|
|
529
|
+
payment = _altcoinjs.payments.p2tr
|
|
511
530
|
break
|
|
512
531
|
default:
|
|
513
532
|
throw new Error('invalid address type in address to script pubkey')
|
|
@@ -516,7 +535,7 @@ const addressToScriptPubkeyInternal = (
|
|
|
516
535
|
try {
|
|
517
536
|
scriptPubkey = payment({
|
|
518
537
|
address: args.address,
|
|
519
|
-
network
|
|
538
|
+
network,
|
|
520
539
|
bs58DecodeFunc: coin.bs58DecodeFunc,
|
|
521
540
|
bs58EncodeFunc: coin.bs58EncodeFunc
|
|
522
541
|
}).output
|
|
@@ -593,7 +612,7 @@ const addressToScriptPubkeyInternal = (
|
|
|
593
612
|
legacyPrefixes.cashaddr
|
|
594
613
|
)
|
|
595
614
|
}
|
|
596
|
-
payment =
|
|
615
|
+
payment = _altcoinjs.payments.p2pkh
|
|
597
616
|
break
|
|
598
617
|
case AddressTypeEnum.p2sh:
|
|
599
618
|
if (standardPrefixes.cashaddr != null) {
|
|
@@ -618,13 +637,16 @@ const addressToScriptPubkeyInternal = (
|
|
|
618
637
|
legacyPrefixes.cashaddr
|
|
619
638
|
)
|
|
620
639
|
}
|
|
621
|
-
payment =
|
|
640
|
+
payment = _altcoinjs.payments.p2sh
|
|
622
641
|
break
|
|
623
642
|
case AddressTypeEnum.p2wpkh:
|
|
624
|
-
payment =
|
|
643
|
+
payment = _altcoinjs.payments.p2wpkh
|
|
625
644
|
break
|
|
626
645
|
case AddressTypeEnum.p2wsh:
|
|
627
|
-
payment =
|
|
646
|
+
payment = _altcoinjs.payments.p2wsh
|
|
647
|
+
break
|
|
648
|
+
case AddressTypeEnum.p2tr:
|
|
649
|
+
payment = _altcoinjs.payments.p2tr
|
|
628
650
|
break
|
|
629
651
|
default:
|
|
630
652
|
throw new Error('invalid address type in address to script pubkey')
|
|
@@ -634,7 +656,7 @@ const addressToScriptPubkeyInternal = (
|
|
|
634
656
|
_nullishCoalesce(address, () => (
|
|
635
657
|
payment({
|
|
636
658
|
output: Buffer.from(args.scriptPubkey, 'hex'),
|
|
637
|
-
network
|
|
659
|
+
network,
|
|
638
660
|
bs58DecodeFunc: coinClass.bs58DecodeFunc,
|
|
639
661
|
bs58EncodeFunc: coinClass.bs58EncodeFunc
|
|
640
662
|
}).address))
|
|
@@ -668,13 +690,16 @@ const addressToScriptPubkeyInternal = (
|
|
|
668
690
|
let payment
|
|
669
691
|
switch (args.scriptType) {
|
|
670
692
|
case ScriptTypeEnum.p2pkh:
|
|
671
|
-
payment =
|
|
693
|
+
payment = _altcoinjs.payments.p2pkh
|
|
672
694
|
break
|
|
673
695
|
case ScriptTypeEnum.p2sh:
|
|
674
|
-
payment =
|
|
696
|
+
payment = _altcoinjs.payments.p2sh
|
|
675
697
|
break
|
|
676
698
|
case ScriptTypeEnum.p2wpkh:
|
|
677
|
-
payment =
|
|
699
|
+
payment = _altcoinjs.payments.p2wpkh
|
|
700
|
+
break
|
|
701
|
+
case ScriptTypeEnum.p2tr:
|
|
702
|
+
payment = _altcoinjs.payments.p2tr
|
|
678
703
|
break
|
|
679
704
|
default:
|
|
680
705
|
throw new Error('invalid address type in address to script pubkey')
|
|
@@ -683,7 +708,7 @@ const addressToScriptPubkeyInternal = (
|
|
|
683
708
|
try {
|
|
684
709
|
scriptHash = payment({
|
|
685
710
|
output: Buffer.from(args.scriptPubkey, 'hex'),
|
|
686
|
-
network
|
|
711
|
+
network
|
|
687
712
|
}).hash
|
|
688
713
|
} catch (error) {
|
|
689
714
|
console.trace(error)
|
|
@@ -706,15 +731,15 @@ const addressToScriptPubkeyInternal = (
|
|
|
706
731
|
prefixIndex: 0
|
|
707
732
|
})
|
|
708
733
|
}
|
|
709
|
-
const p2sh =
|
|
710
|
-
network: bip32Network,
|
|
734
|
+
const p2sh = _altcoinjs.payments.p2sh({
|
|
735
|
+
...(bip32Network != null ? { network: bip32Network } : {}),
|
|
711
736
|
redeem: {
|
|
712
737
|
output: Buffer.from(scriptPubkey, 'hex')
|
|
713
738
|
}
|
|
714
739
|
})
|
|
715
|
-
const scriptPubkeyFromLib = _optionalChain([p2sh, 'access',
|
|
716
|
-
const redeemScript = _optionalChain([p2sh, 'access',
|
|
717
|
-
const scriptHash = _optionalChain([p2sh, 'access',
|
|
740
|
+
const scriptPubkeyFromLib = _optionalChain([p2sh, 'access', _2 => _2.output, 'optionalAccess', _3 => _3.toString, 'call', _4 => _4('hex')])
|
|
741
|
+
const redeemScript = _optionalChain([p2sh, 'access', _5 => _5.redeem, 'optionalAccess', _6 => _6.output, 'optionalAccess', _7 => _7.toString, 'call', _8 => _8('hex')])
|
|
742
|
+
const scriptHash = _optionalChain([p2sh, 'access', _9 => _9.hash, 'optionalAccess', _10 => _10.toString, 'call', _11 => _11('hex')])
|
|
718
743
|
|
|
719
744
|
if (scriptPubkeyFromLib == null || redeemScript == null) {
|
|
720
745
|
throw new Error('unable to convert script to p2sh')
|
|
@@ -748,29 +773,41 @@ const addressToScriptPubkeyInternal = (
|
|
|
748
773
|
) {
|
|
749
774
|
let payment
|
|
750
775
|
switch (args.scriptType) {
|
|
751
|
-
case ScriptTypeEnum.p2pkh:
|
|
752
|
-
payment =
|
|
776
|
+
case ScriptTypeEnum.p2pkh: {
|
|
777
|
+
payment = _altcoinjs.payments.p2pkh({
|
|
753
778
|
pubkey: Buffer.from(args.pubkey, 'hex')
|
|
754
779
|
})
|
|
755
780
|
if (payment.output == null) {
|
|
756
781
|
throw new Error('failed converting pubkey to script pubkey')
|
|
757
782
|
}
|
|
758
783
|
return { scriptPubkey: payment.output.toString('hex') }
|
|
759
|
-
|
|
784
|
+
}
|
|
785
|
+
case ScriptTypeEnum.p2wpkhp2sh: {
|
|
760
786
|
return scriptPubkeyToP2SH({
|
|
761
787
|
scriptPubkey: pubkeyToScriptPubkey({
|
|
762
788
|
pubkey: args.pubkey,
|
|
763
789
|
scriptType: ScriptTypeEnum.p2wpkh
|
|
764
790
|
}).scriptPubkey
|
|
765
791
|
})
|
|
766
|
-
|
|
767
|
-
|
|
792
|
+
}
|
|
793
|
+
case ScriptTypeEnum.p2wpkh: {
|
|
794
|
+
payment = _altcoinjs.payments.p2wpkh({
|
|
768
795
|
pubkey: Buffer.from(args.pubkey, 'hex')
|
|
769
796
|
})
|
|
770
797
|
if (payment.output == null) {
|
|
771
798
|
throw new Error('failed converting pubkey to script pubkey')
|
|
772
799
|
}
|
|
773
800
|
return { scriptPubkey: payment.output.toString('hex') }
|
|
801
|
+
}
|
|
802
|
+
case ScriptTypeEnum.p2tr: {
|
|
803
|
+
payment = _altcoinjs.payments.p2tr({
|
|
804
|
+
pubkey: Buffer.from(args.pubkey, 'hex')
|
|
805
|
+
})
|
|
806
|
+
if (payment.output == null) {
|
|
807
|
+
throw new Error('failed converting pubkey to script pubkey')
|
|
808
|
+
}
|
|
809
|
+
return { scriptPubkey: payment.output.toString('hex') }
|
|
810
|
+
}
|
|
774
811
|
case ScriptTypeEnum.replayProtection: {
|
|
775
812
|
if (args.scriptTemplates == null)
|
|
776
813
|
throw new Error('Missing replayProtection script template')
|
|
@@ -809,9 +846,9 @@ const xprivToPrivateKeyInternal = (
|
|
|
809
846
|
const bip32FromBase58Func = _nullishCoalesce(coin.bip32FromBase58Func, () => ( bip32.fromBase58))
|
|
810
847
|
const node = bip32FromBase58Func(args.xpriv, network)
|
|
811
848
|
return _optionalChain([node
|
|
812
|
-
, 'access',
|
|
813
|
-
, 'access',
|
|
814
|
-
, 'access',
|
|
849
|
+
, 'access', _12 => _12.derive, 'call', _13 => _13(args.bip44ChangeIndex)
|
|
850
|
+
, 'access', _14 => _14.derive, 'call', _15 => _15(args.bip44AddressIndex)
|
|
851
|
+
, 'access', _16 => _16.privateKey, 'optionalAccess', _17 => _17.toString, 'call', _18 => _18('hex')])
|
|
815
852
|
}
|
|
816
853
|
|
|
817
854
|
const xprivToPrivateKey = (args) => {
|
|
@@ -833,7 +870,7 @@ const xprivToPrivateKeyInternal = (
|
|
|
833
870
|
prefixIndex: 0
|
|
834
871
|
})
|
|
835
872
|
const coinClass = _coinmapper.getCoinFromString.call(void 0, args.coin)
|
|
836
|
-
return
|
|
873
|
+
return ECPair.fromPrivateKey(Buffer.from(args.privateKey, 'hex'), {
|
|
837
874
|
network
|
|
838
875
|
}).toWIF(coinClass.wifEncodeFunc)
|
|
839
876
|
} exports.privateKeyToWIF = privateKeyToWIF;
|
|
@@ -848,11 +885,7 @@ const wifToPrivateKeyEncodingInternal = (
|
|
|
848
885
|
forWIF: true,
|
|
849
886
|
prefixIndex
|
|
850
887
|
})
|
|
851
|
-
const ecPair =
|
|
852
|
-
args.wifKey,
|
|
853
|
-
network,
|
|
854
|
-
coin.bs58DecodeFunc
|
|
855
|
-
)
|
|
888
|
+
const ecPair = ECPair.fromWIF(args.wifKey, network, coin.bs58DecodeFunc)
|
|
856
889
|
if (ecPair.privateKey == null) return
|
|
857
890
|
return {
|
|
858
891
|
hex: ecPair.privateKey.toString('hex'),
|
|
@@ -877,13 +910,13 @@ const wifToPrivateKeyEncodingInternal = (
|
|
|
877
910
|
privateKeyEncoding
|
|
878
911
|
) {
|
|
879
912
|
const { hex, compressed } = privateKeyEncoding
|
|
880
|
-
return
|
|
913
|
+
return ECPair.fromPrivateKey(Buffer.from(hex, 'hex'), {
|
|
881
914
|
compressed
|
|
882
915
|
}).publicKey.toString('hex')
|
|
883
916
|
} exports.privateKeyEncodingToPubkey = privateKeyEncodingToPubkey;
|
|
884
917
|
|
|
885
918
|
function signMessageBase64(message, privateKey) {
|
|
886
|
-
const keyPair =
|
|
919
|
+
const keyPair = ECPair.fromPrivateKey(Buffer.from(privateKey, 'hex'))
|
|
887
920
|
if (keyPair.privateKey == null) {
|
|
888
921
|
throw new Error('Address could not sign message')
|
|
889
922
|
}
|
|
@@ -900,7 +933,7 @@ const wifToPrivateKeyEncodingInternal = (
|
|
|
900
933
|
}
|
|
901
934
|
|
|
902
935
|
// get coin specific replay protection sighhash bits
|
|
903
|
-
let sighashType =
|
|
936
|
+
let sighashType = _altcoinjs.Transaction.SIGHASH_ALL
|
|
904
937
|
const coin = _coinmapper.getCoinFromString.call(void 0, args.coin)
|
|
905
938
|
if (coin.sighash != null) {
|
|
906
939
|
sighashType = coin.sighash
|
|
@@ -991,8 +1024,8 @@ const wifToPrivateKeyEncodingInternal = (
|
|
|
991
1024
|
if (!validatedMemo.passed) {
|
|
992
1025
|
throw new Error('Memo size exceeds 80 bytes')
|
|
993
1026
|
}
|
|
994
|
-
const script =
|
|
995
|
-
.compile([
|
|
1027
|
+
const script = _altcoinjs.script
|
|
1028
|
+
.compile([_altcoinjs.opcodes.OP_RETURN, Buffer.from(target.memo, 'utf8')])
|
|
996
1029
|
.toString('hex')
|
|
997
1030
|
targets.push({
|
|
998
1031
|
script,
|
|
@@ -1035,12 +1068,12 @@ const wifToPrivateKeyEncodingInternal = (
|
|
|
1035
1068
|
}
|
|
1036
1069
|
})()
|
|
1037
1070
|
|
|
1038
|
-
const psbt = new
|
|
1071
|
+
const psbt = new (0, _altcoinjs.Psbt)()
|
|
1039
1072
|
try {
|
|
1040
1073
|
psbt.addInputs(sortedInputs)
|
|
1041
1074
|
psbt.addOutputs(sortedOutputs)
|
|
1042
1075
|
} catch (error) {
|
|
1043
|
-
_optionalChain([log, 'optionalAccess',
|
|
1076
|
+
_optionalChain([log, 'optionalAccess', _19 => _19.error, 'call', _20 => _20(`Failed makeTx: ${String(error)}`)])
|
|
1044
1077
|
throw error
|
|
1045
1078
|
}
|
|
1046
1079
|
|
|
@@ -1050,14 +1083,20 @@ const wifToPrivateKeyEncodingInternal = (
|
|
|
1050
1083
|
changeUsed: result.changeUsed,
|
|
1051
1084
|
fee: result.fee,
|
|
1052
1085
|
psbtBase64: psbt.toBase64(),
|
|
1053
|
-
hex: _optionalChain([psbt, 'access',
|
|
1086
|
+
hex: _optionalChain([psbt, 'access', _21 => _21.data, 'optionalAccess', _22 => _22.globalMap, 'optionalAccess', _23 => _23.unsignedTx, 'optionalAccess', _24 => _24.toBuffer, 'call', _25 => _25(), 'optionalAccess', _26 => _26.toString, 'call', _27 => _27('hex')])
|
|
1054
1087
|
}
|
|
1055
1088
|
} exports.makeTx = makeTx;
|
|
1056
1089
|
|
|
1057
1090
|
async function signTx(args) {
|
|
1058
|
-
const psbt =
|
|
1091
|
+
const psbt = _altcoinjs.Psbt.fromBase64(args.psbtBase64)
|
|
1059
1092
|
const coin = _coinmapper.getCoinFromString.call(void 0, args.coin)
|
|
1060
1093
|
|
|
1094
|
+
const validator = (
|
|
1095
|
+
pubkey,
|
|
1096
|
+
msghash,
|
|
1097
|
+
signature
|
|
1098
|
+
) => ECPair.fromPublicKey(pubkey).verify(msghash, signature)
|
|
1099
|
+
|
|
1061
1100
|
for (let i = 0; i < psbt.inputCount; i++) {
|
|
1062
1101
|
const privateKeyEncoding =
|
|
1063
1102
|
_nullishCoalesce(args.privateKeyEncodings[i], () => (
|
|
@@ -1065,11 +1104,11 @@ const wifToPrivateKeyEncodingInternal = (
|
|
|
1065
1104
|
const { hex, compressed } = privateKeyEncoding
|
|
1066
1105
|
psbt.signInput(
|
|
1067
1106
|
i,
|
|
1068
|
-
|
|
1069
|
-
|
|
1107
|
+
ECPair.fromPrivateKey(Buffer.from(hex, 'hex'), { compressed }),
|
|
1108
|
+
_altcoinjs.Psbt.DEFAULT_SIGHASHES,
|
|
1070
1109
|
coin.sighashFunction
|
|
1071
1110
|
)
|
|
1072
|
-
psbt.validateSignaturesOfInput(i)
|
|
1111
|
+
psbt.validateSignaturesOfInput(i, validator)
|
|
1073
1112
|
psbt.finalizeInput(i)
|
|
1074
1113
|
}
|
|
1075
1114
|
const tx = psbt.extractTransaction(true)
|
|
@@ -1225,31 +1264,38 @@ const guessAddressTypeFromAddress = (
|
|
|
1225
1264
|
}
|
|
1226
1265
|
const coinClass = _coinmapper.getCoinFromString.call(void 0, coin)
|
|
1227
1266
|
try {
|
|
1228
|
-
|
|
1267
|
+
_altcoinjs.payments.p2pkh({
|
|
1229
1268
|
address,
|
|
1230
1269
|
network,
|
|
1231
1270
|
bs58DecodeFunc: coinClass.bs58DecodeFunc,
|
|
1232
1271
|
bs58EncodeFunc: coinClass.bs58EncodeFunc
|
|
1233
1272
|
})
|
|
1234
1273
|
return AddressTypeEnum.p2pkh
|
|
1235
|
-
} catch (
|
|
1274
|
+
} catch (_) {}
|
|
1236
1275
|
try {
|
|
1237
|
-
|
|
1276
|
+
_altcoinjs.payments.p2sh({
|
|
1238
1277
|
address,
|
|
1239
1278
|
network,
|
|
1240
1279
|
bs58DecodeFunc: coinClass.bs58DecodeFunc,
|
|
1241
1280
|
bs58EncodeFunc: coinClass.bs58EncodeFunc
|
|
1242
1281
|
})
|
|
1243
1282
|
return AddressTypeEnum.p2sh
|
|
1244
|
-
} catch (
|
|
1283
|
+
} catch (_) {}
|
|
1245
1284
|
try {
|
|
1246
|
-
|
|
1285
|
+
_altcoinjs.payments.p2wsh({ address, network })
|
|
1247
1286
|
return AddressTypeEnum.p2wsh
|
|
1248
|
-
} catch (
|
|
1287
|
+
} catch (_) {}
|
|
1249
1288
|
try {
|
|
1250
|
-
|
|
1289
|
+
_altcoinjs.payments.p2wpkh({ address, network })
|
|
1251
1290
|
return AddressTypeEnum.p2wpkh
|
|
1252
|
-
} catch (
|
|
1291
|
+
} catch (_) {}
|
|
1292
|
+
try {
|
|
1293
|
+
_altcoinjs.payments.p2tr({
|
|
1294
|
+
address,
|
|
1295
|
+
network
|
|
1296
|
+
})
|
|
1297
|
+
return AddressTypeEnum.p2tr
|
|
1298
|
+
} catch (_) {}
|
|
1253
1299
|
const cashAddrPrefixes = getCashAddrPrefixes(coinClass)
|
|
1254
1300
|
if (cashAddrPrefixes.length > 0) {
|
|
1255
1301
|
try {
|
|
@@ -1295,13 +1341,16 @@ const scriptHashToScriptPubkey = (
|
|
|
1295
1341
|
let payment
|
|
1296
1342
|
switch (args.scriptType) {
|
|
1297
1343
|
case ScriptTypeEnum.p2pkh:
|
|
1298
|
-
payment =
|
|
1344
|
+
payment = _altcoinjs.payments.p2pkh
|
|
1299
1345
|
break
|
|
1300
1346
|
case ScriptTypeEnum.p2sh:
|
|
1301
|
-
payment =
|
|
1347
|
+
payment = _altcoinjs.payments.p2sh
|
|
1302
1348
|
break
|
|
1303
1349
|
case ScriptTypeEnum.p2wpkh:
|
|
1304
|
-
payment =
|
|
1350
|
+
payment = _altcoinjs.payments.p2wpkh
|
|
1351
|
+
break
|
|
1352
|
+
case ScriptTypeEnum.p2tr:
|
|
1353
|
+
payment = _altcoinjs.payments.p2tr
|
|
1305
1354
|
break
|
|
1306
1355
|
default:
|
|
1307
1356
|
throw new Error('invalid address type in address to script pubkey')
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true})
|
|
2
|
-
/* eslint-disable no-duplicate-case */
|
|
3
|
-
var _keymanager = require('../keymanager');
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _keymanager = require('../keymanager');
|
|
4
2
|
|
|
5
3
|
|
|
6
4
|
/*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const IMAGE_SERVER_URL = "https://content.edge.app";
|
|
2
|
-
export declare const INFO_SERVER_URI = "https://info1.
|
|
2
|
+
export declare const INFO_SERVER_URI = "https://info1.edge.app";
|
|
3
3
|
export declare const FEES_PATH = "fees.json";
|
|
4
4
|
export declare const MAX_FEE = 999999999;
|
|
5
5
|
export declare const LOW_FEE = 2;
|
|
@@ -4,10 +4,4 @@ export declare const asMempoolSpaceFees: import("cleaners").ObjectCleaner<{
|
|
|
4
4
|
halfHourFee: number;
|
|
5
5
|
hourFee: number;
|
|
6
6
|
}>;
|
|
7
|
-
/**
|
|
8
|
-
* Calculates the FeeRates object from MempoolSpace
|
|
9
|
-
* Sets the minimum of LOW_FEE on all fee levels
|
|
10
|
-
* @param fees
|
|
11
|
-
* @returns Partial<FeeRates>
|
|
12
|
-
*/
|
|
13
7
|
export declare const processMempoolSpaceFees: (fees: unknown) => FeeRates | null;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import {
|
|
2
|
+
import { BaseConverter } from 'base-x';
|
|
3
|
+
import * as bip32 from 'bip32';
|
|
3
4
|
import { Cleaner } from 'cleaners';
|
|
4
5
|
import { Disklet } from 'disklet';
|
|
5
6
|
import { EdgeCurrencyEngineOptions, EdgeCurrencyInfo, EdgeCurrencyTools, EdgeIo, EdgeParsedUri, EdgeWalletInfo } from 'edge-core-js/types';
|
|
7
|
+
import * as wif from 'wif';
|
|
6
8
|
import { IProcessorTransaction, IUTXO } from '../utxobased/db/types';
|
|
7
9
|
import { ScriptTemplates } from '../utxobased/info/scriptTemplates/types';
|
|
8
10
|
import { UtxoPicker } from '../utxobased/keymanager/utxopicker';
|
|
@@ -53,9 +55,9 @@ export interface CoinInfo {
|
|
|
53
55
|
sighash?: number;
|
|
54
56
|
sighashFunction?: (Hash: Buffer) => Buffer;
|
|
55
57
|
txHashFunction?: (Hash: Buffer) => Buffer;
|
|
56
|
-
bs58DecodeFunc?:
|
|
57
|
-
bs58EncodeFunc?:
|
|
58
|
-
wifEncodeFunc?:
|
|
58
|
+
bs58DecodeFunc?: BaseConverter['decode'];
|
|
59
|
+
bs58EncodeFunc?: BaseConverter['encode'];
|
|
60
|
+
wifEncodeFunc?: typeof wif.encode;
|
|
59
61
|
bip32FromBase58Func?: (xKey: string, network: BitcoinJSNetwork) => bip32.BIP32Interface;
|
|
60
62
|
bip32FromSeedFunc?: (seed: Buffer) => bip32.BIP32Interface;
|
|
61
63
|
utxoPicker?: UtxoPicker;
|
|
@@ -108,6 +110,10 @@ export declare const asFeeRates: import("cleaners").ObjectCleaner<{
|
|
|
108
110
|
}>;
|
|
109
111
|
export declare type SimpleFeeSettings = ReturnType<typeof asSimpleFeeSettings>;
|
|
110
112
|
export declare const asSimpleFeeSettings: import("cleaners").ObjectCleaner<{
|
|
113
|
+
lowFeeFudgeFactor: string | undefined;
|
|
114
|
+
standardFeeLowFudgeFactor: string | undefined;
|
|
115
|
+
standardFeeHighFudgeFactor: string | undefined;
|
|
116
|
+
highFeeFudgeFactor: string | undefined;
|
|
111
117
|
standardFeeLowAmount: string;
|
|
112
118
|
standardFeeHighAmount: string;
|
|
113
119
|
lowFee: string;
|
|
@@ -14,7 +14,8 @@ export declare enum AddressTypeEnum {
|
|
|
14
14
|
p2pkh = "p2pkh",
|
|
15
15
|
p2sh = "p2sh",
|
|
16
16
|
p2wpkh = "p2wpkh",
|
|
17
|
-
p2wsh = "p2wsh"
|
|
17
|
+
p2wsh = "p2wsh",
|
|
18
|
+
p2tr = "p2tr"
|
|
18
19
|
}
|
|
19
20
|
export declare enum ScriptTypeEnum {
|
|
20
21
|
p2wpkh = "p2wpkh",
|
|
@@ -23,6 +24,7 @@ export declare enum ScriptTypeEnum {
|
|
|
23
24
|
p2pk = "p2pk",
|
|
24
25
|
p2pkh = "p2pkh",
|
|
25
26
|
p2sh = "p2sh",
|
|
27
|
+
p2tr = "p2tr",
|
|
26
28
|
replayProtection = "replayprotection",
|
|
27
29
|
replayProtectionP2SH = "replayprotectionp2sh"
|
|
28
30
|
}
|
|
@@ -159,14 +161,6 @@ interface SignTxReturn {
|
|
|
159
161
|
id: string;
|
|
160
162
|
hex: string;
|
|
161
163
|
}
|
|
162
|
-
export interface BitcoinJSNetwork {
|
|
163
|
-
wif: number;
|
|
164
|
-
bip32: Bip32;
|
|
165
|
-
messagePrefix: string;
|
|
166
|
-
bech32: string;
|
|
167
|
-
pubKeyHash: number;
|
|
168
|
-
scriptHash: number;
|
|
169
|
-
}
|
|
170
164
|
export interface Bip32 {
|
|
171
165
|
public: number;
|
|
172
166
|
private: number;
|
|
@@ -2,3 +2,18 @@
|
|
|
2
2
|
const filterUndefined = (values) => {
|
|
3
3
|
return values.filter(value => value !== undefined)
|
|
4
4
|
}; exports.filterUndefined = filterUndefined
|
|
5
|
+
|
|
6
|
+
const removeUndefined = (
|
|
7
|
+
obj
|
|
8
|
+
) => {
|
|
9
|
+
const result = {}
|
|
10
|
+
|
|
11
|
+
for (const key in obj) {
|
|
12
|
+
if (obj[key] !== undefined) {
|
|
13
|
+
// We need to assure TypeScript that the key indeed exists on T
|
|
14
|
+
result[key ] = obj[key]
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return result
|
|
19
|
+
}; exports.removeUndefined = removeUndefined
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edge-currency-plugins",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Edge currency plugins to fetch and process wallet accounts, balances and transactions.",
|
|
5
5
|
"repository": "https://github.com/EdgeApp/edge-currency-plugins",
|
|
6
6
|
"license": "MIT",
|
|
@@ -33,10 +33,11 @@
|
|
|
33
33
|
"*.{js,ts,json}": "eslint"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"
|
|
36
|
+
"@bitcoin-js/tiny-secp256k1-asmjs": "^2.2.3",
|
|
37
|
+
"altcoin-js": "^1.0.0",
|
|
37
38
|
"async-mutex": "^0.2.6",
|
|
38
39
|
"baselet": "^0.2.4",
|
|
39
|
-
"biggystring": "^4.
|
|
40
|
+
"biggystring": "^4.1.3",
|
|
40
41
|
"bip32": "^2.0.5",
|
|
41
42
|
"bip32grs": "^2.0.5",
|
|
42
43
|
"bip39": "^3.0.2",
|
|
@@ -48,6 +49,7 @@
|
|
|
48
49
|
"bs58smartcheck": "^2.0.4",
|
|
49
50
|
"cleaners": "^0.3.12",
|
|
50
51
|
"disklet": "^0.4.5",
|
|
52
|
+
"ecpair": "https://github.com/EdgeApp/ecpair.git#b193eb8ea2ec0c93b528f4b0223a605407ff43e4",
|
|
51
53
|
"edge-sync-client": "^0.2.7",
|
|
52
54
|
"memlet": "^0.1.7",
|
|
53
55
|
"uri-js": "^4.4.0",
|
|
@@ -57,8 +59,10 @@
|
|
|
57
59
|
"ws": "^7.4.6"
|
|
58
60
|
},
|
|
59
61
|
"devDependencies": {
|
|
62
|
+
"@types/base-x": "^3.0.6",
|
|
60
63
|
"@types/bn.js": "^5.1.0",
|
|
61
64
|
"@types/bs58": "^4.0.1",
|
|
65
|
+
"@types/bs58grscheck": "^2.1.0",
|
|
62
66
|
"@types/chai": "^4.2.9",
|
|
63
67
|
"@types/chai-as-promised": "^7.1.3",
|
|
64
68
|
"@types/jsonfile": "^6.0.1",
|
|
@@ -67,9 +71,12 @@
|
|
|
67
71
|
"@types/node-fetch": "2.x",
|
|
68
72
|
"@types/request": "^2.48.7",
|
|
69
73
|
"@types/url-parse": "^1.4.3",
|
|
74
|
+
"@types/wif": "^2.0.2",
|
|
75
|
+
"@types/wifgrs": "^2.0.0",
|
|
70
76
|
"@types/ws": "^7.2.6",
|
|
71
77
|
"@typescript-eslint/eslint-plugin": "^4.8.2",
|
|
72
78
|
"@typescript-eslint/parser": "^4.8.2",
|
|
79
|
+
"base-x": "^4.0.0",
|
|
73
80
|
"chai": "^4.2.0",
|
|
74
81
|
"chai-as-promised": "^7.1.1",
|
|
75
82
|
"edge-core-js": "^0.19.48",
|
|
@@ -97,6 +104,7 @@
|
|
|
97
104
|
"request": "^2.88.2",
|
|
98
105
|
"rimraf": "^3.0.2",
|
|
99
106
|
"sucrase": "^3.12.1",
|
|
100
|
-
"typescript": "^4.1.2"
|
|
107
|
+
"typescript": "^4.1.2",
|
|
108
|
+
"wif": "^2.0.6"
|
|
101
109
|
}
|
|
102
110
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|