edge-currency-plugins 3.0.2 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/android/src/main/assets/edge-currency-plugins/edge-currency-plugins.js +35 -35
- package/lib/common/plugin/CurrencyTools.js +4 -4
- package/lib/common/plugin/types.js +154 -0
- package/lib/common/plugin/utils.js +2 -3
- package/lib/common/utxobased/engine/UtxoEngine.js +9 -13
- package/lib/common/utxobased/engine/types.js +1 -0
- package/lib/common/utxobased/info/badcoin.js +0 -1
- package/lib/common/utxobased/info/bitcoin.js +0 -1
- package/lib/common/utxobased/info/bitcoincash.js +0 -1
- package/lib/common/utxobased/info/bitcoincashtestnet.js +0 -1
- package/lib/common/utxobased/info/bitcoingold.js +0 -1
- package/lib/common/utxobased/info/bitcoingoldtestnet.js +0 -1
- package/lib/common/utxobased/info/bitcoinsv.js +0 -1
- package/lib/common/utxobased/info/bitcointestnet.js +0 -1
- package/lib/common/utxobased/info/dash.js +0 -1
- package/lib/common/utxobased/info/digibyte.js +0 -1
- package/lib/common/utxobased/info/dogecoin.js +0 -1
- package/lib/common/utxobased/info/eboost.js +0 -1
- package/lib/common/utxobased/info/feathercoin.js +0 -1
- package/lib/common/utxobased/info/groestlcoin.js +0 -1
- package/lib/common/utxobased/info/litecoin.js +0 -1
- package/lib/common/utxobased/info/qtum.js +0 -1
- package/lib/common/utxobased/info/ravencoin.js +0 -1
- package/lib/common/utxobased/info/smartcash.js +0 -1
- package/lib/common/utxobased/info/ufo.js +0 -1
- package/lib/common/utxobased/info/vertcoin.js +0 -1
- package/lib/common/utxobased/info/zcoin.js +0 -1
- package/lib/common/utxobased/keymanager/cleaners.js +2 -2
- package/lib/src/common/plugin/types.d.ts +141 -2
- package/package.json +2 -2
|
@@ -63,8 +63,8 @@ var _utils3 = require('./utils');
|
|
|
63
63
|
const privateKey = {
|
|
64
64
|
imported: false,
|
|
65
65
|
seed: mnemonic,
|
|
66
|
-
format: _nullishCoalesce(_nullishCoalesce(_optionalChain([opts, 'optionalAccess', _ => _.format]), () => (
|
|
67
|
-
coinType: _nullishCoalesce(_nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
66
|
+
format: _nullishCoalesce(_nullishCoalesce(_optionalChain([opts, 'optionalAccess', _ => _.format]), () => ( engineInfo.formats[0])), () => ( 'bip44')),
|
|
67
|
+
coinType: _nullishCoalesce(_nullishCoalesce(_optionalChain([opts, 'optionalAccess', _2 => _2.coinType]), () => ( coinInfo.coinType)), () => ( 0))
|
|
68
68
|
}
|
|
69
69
|
|
|
70
70
|
return wasCurrencyPrivateKey(privateKey)
|
|
@@ -90,8 +90,8 @@ var _utils3 = require('./utils');
|
|
|
90
90
|
const privateKey = {
|
|
91
91
|
imported: true,
|
|
92
92
|
seed: entropy,
|
|
93
|
-
format: _nullishCoalesce(_nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
94
|
-
coinType: _nullishCoalesce(_nullishCoalesce(_optionalChain([opts, 'optionalAccess',
|
|
93
|
+
format: _nullishCoalesce(_nullishCoalesce(_optionalChain([opts, 'optionalAccess', _3 => _3.format]), () => ( _optionalChain([engineInfo, 'access', _4 => _4.formats, 'optionalAccess', _5 => _5[0]]))), () => ( 'bip44')),
|
|
94
|
+
coinType: _nullishCoalesce(_nullishCoalesce(_optionalChain([opts, 'optionalAccess', _6 => _6.coinType]), () => ( coinInfo.coinType)), () => ( 0))
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
return wasCurrencyPrivateKey(privateKey)
|
|
@@ -137,6 +137,160 @@ var _types3 = require('../utxobased/db/types');
|
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
|
|
140
294
|
|
|
141
295
|
|
|
142
296
|
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _all = require('../utxobased/info/all');
|
|
2
2
|
|
|
3
3
|
const getFormatsForNetwork = (coinName) => {
|
|
4
4
|
for (const plugin of _all.all) {
|
|
5
|
-
if (plugin.coinInfo.name === coinName)
|
|
6
|
-
return _nullishCoalesce(plugin.engineInfo.formats, () => ( []))
|
|
5
|
+
if (plugin.coinInfo.name === coinName) return plugin.engineInfo.formats
|
|
7
6
|
}
|
|
8
7
|
return []
|
|
9
8
|
}; exports.getFormatsForNetwork = getFormatsForNetwork
|
|
@@ -102,10 +102,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
102
102
|
const walletInfo = _cleaners3.asSafeWalletInfo.call(void 0, pluginInfo)(config.walletInfo)
|
|
103
103
|
const { privateKeyFormat, publicKey, walletFormats } = walletInfo.keys
|
|
104
104
|
|
|
105
|
-
if (
|
|
106
|
-
engineInfo.formats == null ||
|
|
107
|
-
!engineInfo.formats.includes(privateKeyFormat)
|
|
108
|
-
) {
|
|
105
|
+
if (!engineInfo.formats.includes(privateKeyFormat)) {
|
|
109
106
|
const message = `Wallet format is not supported: ${privateKeyFormat}`
|
|
110
107
|
log.error(message)
|
|
111
108
|
throw new Error(message)
|
|
@@ -620,6 +617,13 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
620
617
|
targets = []
|
|
621
618
|
}
|
|
622
619
|
|
|
620
|
+
// Determine whether the transaction should enable RBF given that the
|
|
621
|
+
// currency supports RBF.
|
|
622
|
+
const enableRbf =
|
|
623
|
+
currencyInfo.canReplaceByFee === true
|
|
624
|
+
? _nullishCoalesce(_nullishCoalesce(edgeSpendInfo.enableRbf, () => ( spendInfoOtherParams.enableRbf)), () => ( true))
|
|
625
|
+
: false
|
|
626
|
+
|
|
623
627
|
log.warn(`spend: Using fee rate ${feeRate} sat/B`)
|
|
624
628
|
const subtractFee =
|
|
625
629
|
txOptions.subtractFee != null ? txOptions.subtractFee : false
|
|
@@ -631,10 +635,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
631
635
|
feeRate,
|
|
632
636
|
coin: coinInfo.name,
|
|
633
637
|
currencyCode: currencyInfo.currencyCode,
|
|
634
|
-
enableRbf
|
|
635
|
-
_nullishCoalesce(_nullishCoalesce(spendInfoOtherParams.enableRbf, () => (
|
|
636
|
-
currencyInfo.canReplaceByFee)), () => (
|
|
637
|
-
false)),
|
|
638
|
+
enableRbf,
|
|
638
639
|
freshChangeAddress,
|
|
639
640
|
subtractFee,
|
|
640
641
|
log,
|
|
@@ -904,11 +905,6 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
904
905
|
|
|
905
906
|
// The temporary wallet info should include all formats for the currency
|
|
906
907
|
const allFormats = engineInfo.formats
|
|
907
|
-
if (allFormats == null) {
|
|
908
|
-
throw new Error(
|
|
909
|
-
`Missing formats for wallet type ${currencyInfo.walletType}`
|
|
910
|
-
)
|
|
911
|
-
}
|
|
912
908
|
|
|
913
909
|
const tmpWalletInfo = {
|
|
914
910
|
id: walletInfo.id,
|
|
@@ -48,6 +48,7 @@ const asOutputSort = _cleaners.asValue.call(void 0, 'bip69', 'targets')
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
const asUtxoSpendInfoOtherParams = _cleaners.asObject.call(void 0, {
|
|
51
|
+
/** @deprecated use `EdgeSpendInfo['enableRbf']` */
|
|
51
52
|
enableRbf: _cleaners.asOptional.call(void 0, _cleaners.asBoolean),
|
|
52
53
|
forceChangeAddress: _cleaners.asOptional.call(void 0, _cleaners.asString),
|
|
53
54
|
outputSort: _cleaners.asOptional.call(void 0, asOutputSort, 'bip69'),
|
|
@@ -55,7 +55,6 @@ const engineInfo = {
|
|
|
55
55
|
formats: ['bip49', 'bip84', 'bip44', 'bip32'],
|
|
56
56
|
forks: ['bitcoincash', 'bitcoingold'],
|
|
57
57
|
gapLimit: 25,
|
|
58
|
-
defaultFee: 1000,
|
|
59
58
|
feeUpdateInterval: 60000,
|
|
60
59
|
mempoolSpaceFeeInfoServer: 'https://mempool.space/api/v1/fees/recommended',
|
|
61
60
|
defaultFeeInfo: {
|
|
@@ -42,7 +42,6 @@ var _commonInfo = require('./commonInfo');
|
|
|
42
42
|
formats: ['bip49', 'bip84', 'bip44', 'bip32'],
|
|
43
43
|
forks: ['bitcoincash', 'bitcoingold'],
|
|
44
44
|
gapLimit: 25,
|
|
45
|
-
defaultFee: 1000,
|
|
46
45
|
feeUpdateInterval: 60000,
|
|
47
46
|
mempoolSpaceFeeInfoServer: 'https://mempool.space/api/v1/fees/recommended',
|
|
48
47
|
defaultFeeInfo: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -105,7 +105,7 @@ const asOptionalPrivateKeyFormat = _cleaners.asOptional.call(void 0, asPrivateKe
|
|
|
105
105
|
return ['bip49', 'bip84']
|
|
106
106
|
}
|
|
107
107
|
})()
|
|
108
|
-
const engineInfoFormats =
|
|
108
|
+
const engineInfoFormats = engineInfo.formats
|
|
109
109
|
return formats.filter(format => engineInfoFormats.includes(format))
|
|
110
110
|
}; exports.getSupportedFormats = getSupportedFormats
|
|
111
111
|
|
|
@@ -34,17 +34,85 @@ export interface PluginInfo {
|
|
|
34
34
|
coinInfo: CoinInfo;
|
|
35
35
|
}
|
|
36
36
|
export interface EngineInfo {
|
|
37
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Supported wallet formats for address derivation.
|
|
39
|
+
*
|
|
40
|
+
* See https://github.com/EdgeApp/edge-core-js/blob/master/docs/key-formats.md#detailed-key-formats
|
|
41
|
+
**/
|
|
42
|
+
formats: CurrencyFormat[];
|
|
43
|
+
/**
|
|
44
|
+
* Optional list of currency pluginId strings of which this currency is a fork.
|
|
45
|
+
* These fork currencies are able to be split into this currency.
|
|
46
|
+
**/
|
|
38
47
|
forks?: string[];
|
|
39
48
|
uriPrefix?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The gap limit defines the number of indexes to derive from the last used
|
|
51
|
+
* address. This is typically set to 10 for most currencies with the exception
|
|
52
|
+
* of Bitcoin which is set to 25 for historical reasons.
|
|
53
|
+
*/
|
|
40
54
|
gapLimit: number;
|
|
41
|
-
|
|
55
|
+
/**
|
|
56
|
+
* The number of milliseconds defining the frequency that the engine will
|
|
57
|
+
* fetch new fee rates.
|
|
58
|
+
*/
|
|
42
59
|
feeUpdateInterval: number;
|
|
60
|
+
/**
|
|
61
|
+
* Optional mempool.space URI for fetching fee info.
|
|
62
|
+
*
|
|
63
|
+
* See https://mempool.space/docs/api/rest#get-recommended-fees
|
|
64
|
+
*/
|
|
43
65
|
mempoolSpaceFeeInfoServer?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Default fee info used before fetching up-to-date fee info from Edge
|
|
68
|
+
* Info Servers.
|
|
69
|
+
*/
|
|
44
70
|
defaultFeeInfo: FeeInfo;
|
|
71
|
+
/**
|
|
72
|
+
* Optional script template functions for non-standard output script types.
|
|
73
|
+
* These are used to generate the output scriptPubkey for a transaction given
|
|
74
|
+
* pubkey as an argument.
|
|
75
|
+
*
|
|
76
|
+
* The derivation path includes a changeIndex using the 2 bytes of the hash
|
|
77
|
+
* of the script template function output given an empty pubkey value.
|
|
78
|
+
* The engine will search for funds on this derivation path using address
|
|
79
|
+
* indexes up to the gapLimit.
|
|
80
|
+
*
|
|
81
|
+
* This feature is mainly used for replay-protection script templates for
|
|
82
|
+
* Bitcoin Cash and Bitcoin SV replay protection. It it currently limited
|
|
83
|
+
* to supporting only `replayProtection` keyed entries.
|
|
84
|
+
*/
|
|
45
85
|
scriptTemplates?: ScriptTemplates;
|
|
86
|
+
/**
|
|
87
|
+
* Optional server configurations for the currency engine. Currently only supports
|
|
88
|
+
* NOWNode Blockbook servers configuration types for HTTP fallback.
|
|
89
|
+
*
|
|
90
|
+
* Use `blockbookServers` config in `EdgeCurrencyInfo['defaultSettings']` for
|
|
91
|
+
* the time being. This config controls the WebSocket URI for Blockbook
|
|
92
|
+
* connections over the WebSocket protocol.
|
|
93
|
+
*/
|
|
46
94
|
serverConfigs?: ServerConfig[];
|
|
95
|
+
/**
|
|
96
|
+
* An optional codec cleaner (asCodec) for serializing and deserializing an
|
|
97
|
+
* address over network interfaces. This can be used to resolve issues with
|
|
98
|
+
* network interfaces that expect addresses to be formatted differently than
|
|
99
|
+
* what is expected by the engine.
|
|
100
|
+
*
|
|
101
|
+
* For example, if a Blockbook server expects
|
|
102
|
+
* an address URI prefix (mycurrency:), then this cleaner codec can add the
|
|
103
|
+
* necessary translations.
|
|
104
|
+
*
|
|
105
|
+
* See https://cleaners.js.org/#/reference?id=ascodec cleaner codec
|
|
106
|
+
* documentation.
|
|
107
|
+
*/
|
|
47
108
|
asBlockbookAddress?: Cleaner<string>;
|
|
109
|
+
/**
|
|
110
|
+
* Some currencies require an additional blockbook payload
|
|
111
|
+
* 'getTransactionSpecific' in order to provide all relevant transaction
|
|
112
|
+
* data. If this function is defined, it should merge the unknown `specialTx`
|
|
113
|
+
* data from the Blockbook endpoint with the `IProcessorTransaction` object
|
|
114
|
+
* which is stored to disk.
|
|
115
|
+
**/
|
|
48
116
|
txSpecificHandling?: (tx: IProcessorTransaction, specialTx: unknown) => IProcessorTransaction;
|
|
49
117
|
}
|
|
50
118
|
export interface ServerConfig {
|
|
@@ -54,21 +122,92 @@ export interface ServerConfig {
|
|
|
54
122
|
/**
|
|
55
123
|
* Coin Info
|
|
56
124
|
*/
|
|
125
|
+
/**
|
|
126
|
+
* This info is to be used to interface with the AltcoinJs library. It contains
|
|
127
|
+
* network and encoding parameters for the currency.
|
|
128
|
+
*/
|
|
57
129
|
export interface CoinInfo {
|
|
130
|
+
/**
|
|
131
|
+
* The official network name in lower case. This is a unique network name
|
|
132
|
+
* to identify the `CoinInfo`. It should not conflict with other currency
|
|
133
|
+
* plugins using the same UTXO plugin implementation.
|
|
134
|
+
*/
|
|
58
135
|
name: string;
|
|
136
|
+
/**
|
|
137
|
+
* Whether the currency uses segwit addresses (wrapped-segwit P2SH, P2WSH, etc).
|
|
138
|
+
*/
|
|
59
139
|
segwit: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* The SLIP-0044 coin type number. This is used to derive the BIP32 path for
|
|
142
|
+
* addresses.
|
|
143
|
+
*/
|
|
60
144
|
coinType: number;
|
|
145
|
+
/**
|
|
146
|
+
* Optional sighash value to be passed to AltcoinJS as the sighashType field
|
|
147
|
+
* on inputs. This is primarily used by currencies that leverage it as
|
|
148
|
+
* build-in replay-protection mechanisms.
|
|
149
|
+
*/
|
|
61
150
|
sighash?: number;
|
|
151
|
+
/**
|
|
152
|
+
* A function to be passed to AltcoinJS `signInput` method. This is used to
|
|
153
|
+
* get the input hash for the signature algorithm before signing the input.
|
|
154
|
+
*
|
|
155
|
+
* This is used if the currency has a custom signature hash function that
|
|
156
|
+
* deviates from the default `bcrypto.hash256` function used for Bitcoin.
|
|
157
|
+
*/
|
|
62
158
|
sighashFunction?: (Hash: Buffer) => Buffer;
|
|
159
|
+
/**
|
|
160
|
+
* A function to be passed to AltcoinJS `getId` method. This is used to get
|
|
161
|
+
* the transaction hash (txid) for a transaction.
|
|
162
|
+
*
|
|
163
|
+
* This is used if the currency has a custom signature hash function that
|
|
164
|
+
* deviates from the default `bcrypto.hash256` function used for Bitcoin.
|
|
165
|
+
*/
|
|
63
166
|
txHashFunction?: (Hash: Buffer) => Buffer;
|
|
167
|
+
/**
|
|
168
|
+
* A optional custom decode function passed to AltcoinJS `PaymentCreator`
|
|
169
|
+
* function. This is used to decode the base58 address encoding.
|
|
170
|
+
*/
|
|
64
171
|
bs58DecodeFunc?: BaseConverter['decode'];
|
|
172
|
+
/**
|
|
173
|
+
* A optional custom encode function passed to AltcoinJS `PaymentCreator`
|
|
174
|
+
* function. This is used to encode the address to a base58 encoding.
|
|
175
|
+
*/
|
|
65
176
|
bs58EncodeFunc?: BaseConverter['encode'];
|
|
177
|
+
/**
|
|
178
|
+
* A optional custom WIF encoding function passed to AltcoinJS `toWIF` method.
|
|
179
|
+
* This is used to encode the private key into a WIF.
|
|
180
|
+
*/
|
|
66
181
|
wifEncodeFunc?: typeof wif.encode;
|
|
182
|
+
/**
|
|
183
|
+
* A optional custom extended public/private key encoding function.
|
|
184
|
+
* This is used when converting a public or private key to an xpub/xpriv.
|
|
185
|
+
*/
|
|
67
186
|
bip32FromBase58Func?: (xKey: string, network: BitcoinJSNetwork) => bip32.BIP32Interface;
|
|
187
|
+
/**
|
|
188
|
+
* A optional custom seed encoding function.
|
|
189
|
+
* This is used when converting a seed to root private key.
|
|
190
|
+
*/
|
|
68
191
|
bip32FromSeedFunc?: (seed: Buffer) => bip32.BIP32Interface;
|
|
192
|
+
/**
|
|
193
|
+
* A optional custom UTXO picker function for currencies that may require
|
|
194
|
+
* different UTXO selection algorithms.
|
|
195
|
+
*/
|
|
69
196
|
utxoPicker?: UtxoPicker;
|
|
197
|
+
/**
|
|
198
|
+
* This is all the currency specific prefixes for encoding and decoding
|
|
199
|
+
* of various data types.
|
|
200
|
+
*/
|
|
70
201
|
prefixes: CoinPrefixes;
|
|
71
202
|
}
|
|
203
|
+
/**
|
|
204
|
+
* This is all the currency specific prefixes for encoding and decoding
|
|
205
|
+
* of various data types.
|
|
206
|
+
*
|
|
207
|
+
* The first entry in the array is used for standard serialization.
|
|
208
|
+
* The second entry in the array is used for legacy serialization.
|
|
209
|
+
* All entries in the array are checked whether they can de-serialize the content
|
|
210
|
+
*/
|
|
72
211
|
export interface CoinPrefixes {
|
|
73
212
|
messagePrefix: string[];
|
|
74
213
|
wif: number[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edge-currency-plugins",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "Edge currency plugins to fetch and process wallet accounts, balances and transactions.",
|
|
5
5
|
"homepage": "https://edge.app/",
|
|
6
6
|
"repository": "https://github.com/EdgeApp/edge-currency-plugins",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"base-x": "^4.0.0",
|
|
88
88
|
"chai": "^4.2.0",
|
|
89
89
|
"chai-as-promised": "^7.1.1",
|
|
90
|
-
"edge-core-js": "^2.
|
|
90
|
+
"edge-core-js": "^2.7.0",
|
|
91
91
|
"esbuild-loader": "^4.1.0",
|
|
92
92
|
"eslint": "^7.14.0",
|
|
93
93
|
"eslint-config-standard-kit": "0.15.1",
|