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.
Files changed (31) hide show
  1. package/README.md +10 -0
  2. package/android/src/main/assets/edge-currency-plugins/edge-currency-plugins.js +35 -35
  3. package/lib/common/plugin/CurrencyTools.js +4 -4
  4. package/lib/common/plugin/types.js +154 -0
  5. package/lib/common/plugin/utils.js +2 -3
  6. package/lib/common/utxobased/engine/UtxoEngine.js +9 -13
  7. package/lib/common/utxobased/engine/types.js +1 -0
  8. package/lib/common/utxobased/info/badcoin.js +0 -1
  9. package/lib/common/utxobased/info/bitcoin.js +0 -1
  10. package/lib/common/utxobased/info/bitcoincash.js +0 -1
  11. package/lib/common/utxobased/info/bitcoincashtestnet.js +0 -1
  12. package/lib/common/utxobased/info/bitcoingold.js +0 -1
  13. package/lib/common/utxobased/info/bitcoingoldtestnet.js +0 -1
  14. package/lib/common/utxobased/info/bitcoinsv.js +0 -1
  15. package/lib/common/utxobased/info/bitcointestnet.js +0 -1
  16. package/lib/common/utxobased/info/dash.js +0 -1
  17. package/lib/common/utxobased/info/digibyte.js +0 -1
  18. package/lib/common/utxobased/info/dogecoin.js +0 -1
  19. package/lib/common/utxobased/info/eboost.js +0 -1
  20. package/lib/common/utxobased/info/feathercoin.js +0 -1
  21. package/lib/common/utxobased/info/groestlcoin.js +0 -1
  22. package/lib/common/utxobased/info/litecoin.js +0 -1
  23. package/lib/common/utxobased/info/qtum.js +0 -1
  24. package/lib/common/utxobased/info/ravencoin.js +0 -1
  25. package/lib/common/utxobased/info/smartcash.js +0 -1
  26. package/lib/common/utxobased/info/ufo.js +0 -1
  27. package/lib/common/utxobased/info/vertcoin.js +0 -1
  28. package/lib/common/utxobased/info/zcoin.js +0 -1
  29. package/lib/common/utxobased/keymanager/cleaners.js +2 -2
  30. package/lib/src/common/plugin/types.d.ts +141 -2
  31. 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]), () => ( _optionalChain([engineInfo, 'access', _2 => _2.formats, 'optionalAccess', _3 => _3[0]]))), () => ( 'bip44')),
67
- coinType: _nullishCoalesce(_nullishCoalesce(_optionalChain([opts, 'optionalAccess', _4 => _4.coinType]), () => ( coinInfo.coinType)), () => ( 0))
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', _5 => _5.format]), () => ( _optionalChain([engineInfo, 'access', _6 => _6.formats, 'optionalAccess', _7 => _7[0]]))), () => ( 'bip44')),
94
- coinType: _nullishCoalesce(_nullishCoalesce(_optionalChain([opts, 'optionalAccess', _8 => _8.coinType]), () => ( coinInfo.coinType)), () => ( 0))
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)
@@ -1,9 +1,8 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }var _all = require('../utxobased/info/all');
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'),
@@ -38,7 +38,6 @@ const currencyInfo = {
38
38
  const engineInfo = {
39
39
  formats: ['bip49', 'bip44', 'bip32'],
40
40
  gapLimit: 10,
41
- defaultFee: 500000,
42
41
  feeUpdateInterval: 60000,
43
42
  defaultFeeInfo: {
44
43
  lowFeeFudgeFactor: undefined,
@@ -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: {
@@ -57,7 +57,6 @@ const engineInfo = {
57
57
  formats: ['bip44', 'bip32'],
58
58
  forks: [], // 'bitcoinsv' is currently disabled, so not included in the forks
59
59
  gapLimit: 10,
60
- defaultFee: 10000,
61
60
  feeUpdateInterval: 60000,
62
61
  defaultFeeInfo: {
63
62
  lowFeeFudgeFactor: undefined,
@@ -43,7 +43,6 @@ const engineInfo = {
43
43
  formats: ['bip44', 'bip32'],
44
44
  forks: ['bitcoinsv'],
45
45
  gapLimit: 10,
46
- defaultFee: 10000,
47
46
  feeUpdateInterval: 60000,
48
47
  defaultFeeInfo: {
49
48
  lowFeeFudgeFactor: undefined,
@@ -47,7 +47,6 @@ const currencyInfo = {
47
47
  const engineInfo = {
48
48
  formats: ['bip49', 'bip84', 'bip44', 'bip32'],
49
49
  gapLimit: 10,
50
- defaultFee: 1000,
51
50
  feeUpdateInterval: 60000,
52
51
  defaultFeeInfo: {
53
52
  lowFeeFudgeFactor: undefined,
@@ -40,7 +40,6 @@ const currencyInfo = {
40
40
  const engineInfo = {
41
41
  formats: ['bip49', 'bip84', 'bip44', 'bip32'],
42
42
  gapLimit: 10,
43
- defaultFee: 1000,
44
43
  feeUpdateInterval: 60000,
45
44
  defaultFeeInfo: {
46
45
  lowFeeFudgeFactor: undefined,
@@ -48,7 +48,6 @@ const engineInfo = {
48
48
  formats: ['bip44', 'bip32'],
49
49
  uriPrefix: 'bitcoin',
50
50
  gapLimit: 10,
51
- defaultFee: 10000,
52
51
  feeUpdateInterval: 60000,
53
52
  defaultFeeInfo: {
54
53
  lowFeeFudgeFactor: undefined,
@@ -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: {
@@ -54,7 +54,6 @@ const engineInfo = {
54
54
  ],
55
55
  formats: ['bip44', 'bip32'],
56
56
  gapLimit: 10,
57
- defaultFee: 10000,
58
57
  feeUpdateInterval: 60000,
59
58
  defaultFeeInfo: {
60
59
  lowFeeFudgeFactor: undefined,
@@ -46,7 +46,6 @@ const engineInfo = {
46
46
  formats: ['bip49', 'bip84', 'bip44', 'bip32'],
47
47
  forks: [],
48
48
  gapLimit: 10,
49
- defaultFee: 1000,
50
49
  feeUpdateInterval: 60000,
51
50
  defaultFeeInfo: {
52
51
  lowFeeFudgeFactor: undefined,
@@ -50,7 +50,6 @@ const engineInfo = {
50
50
  ],
51
51
  formats: ['bip44', 'bip32'],
52
52
  gapLimit: 10,
53
- defaultFee: 1000,
54
53
  feeUpdateInterval: 10000,
55
54
  defaultFeeInfo: {
56
55
  lowFeeFudgeFactor: undefined,
@@ -39,7 +39,6 @@ const currencyInfo = {
39
39
  const engineInfo = {
40
40
  formats: ['bip44', 'bip32'],
41
41
  gapLimit: 10,
42
- defaultFee: 500000,
43
42
  feeUpdateInterval: 60000,
44
43
  defaultFeeInfo: {
45
44
  lowFeeFudgeFactor: undefined,
@@ -39,7 +39,6 @@ var _commonInfo = require('./commonInfo');
39
39
  const engineInfo = {
40
40
  formats: ['bip49', 'bip84', 'bip44', 'bip32'],
41
41
  gapLimit: 10,
42
- defaultFee: 1000,
43
42
  feeUpdateInterval: 60000,
44
43
  defaultFeeInfo: {
45
44
  lowFeeFudgeFactor: undefined,
@@ -51,7 +51,6 @@ const engineInfo = {
51
51
  ],
52
52
  formats: ['bip49', 'bip84', 'bip44', 'bip32'],
53
53
  gapLimit: 10,
54
- defaultFee: 100000,
55
54
  feeUpdateInterval: 60000,
56
55
  defaultFeeInfo: {
57
56
  lowFeeFudgeFactor: undefined,
@@ -52,7 +52,6 @@ var _commonInfo = require('./commonInfo');
52
52
  ],
53
53
  formats: ['bip49', 'bip84', 'bip44', 'bip32'],
54
54
  gapLimit: 10,
55
- defaultFee: 50000,
56
55
  feeUpdateInterval: 60000,
57
56
  defaultFeeInfo: {
58
57
  lowFeeFudgeFactor: undefined,
@@ -36,7 +36,6 @@ const currencyInfo = {
36
36
  const engineInfo = {
37
37
  formats: ['bip44', 'bip32'],
38
38
  gapLimit: 10,
39
- defaultFee: 1000,
40
39
  feeUpdateInterval: 60000,
41
40
  defaultFeeInfo: {
42
41
  lowFeeFudgeFactor: undefined,
@@ -36,7 +36,6 @@ const currencyInfo = {
36
36
  const engineInfo = {
37
37
  formats: ['bip44', 'bip32'],
38
38
  gapLimit: 10,
39
- defaultFee: 1000,
40
39
  feeUpdateInterval: 60000,
41
40
  defaultFeeInfo: {
42
41
  lowFeeFudgeFactor: undefined,
@@ -42,7 +42,6 @@ const currencyInfo = {
42
42
  const engineInfo = {
43
43
  formats: ['bip44', 'bip32'],
44
44
  gapLimit: 10,
45
- defaultFee: 100000,
46
45
  feeUpdateInterval: 60000,
47
46
  defaultFeeInfo: {
48
47
  lowFeeFudgeFactor: undefined,
@@ -39,7 +39,6 @@ const currencyInfo = {
39
39
  const engineInfo = {
40
40
  formats: ['bip49', 'bip84', 'bip44', 'bip32'],
41
41
  gapLimit: 10,
42
- defaultFee: 50000,
43
42
  feeUpdateInterval: 60000,
44
43
  defaultFeeInfo: {
45
44
  lowFeeFudgeFactor: undefined,
@@ -46,7 +46,6 @@ const engineInfo = {
46
46
  formats: ['bip49', 'bip84', 'bip44', 'bip32'],
47
47
  forks: [],
48
48
  gapLimit: 10,
49
- defaultFee: 1000,
50
49
  feeUpdateInterval: 60000,
51
50
  defaultFeeInfo: {
52
51
  lowFeeFudgeFactor: undefined,
@@ -46,7 +46,6 @@ var _commonInfo = require('./commonInfo');
46
46
  formats: ['bip44', 'bip32'],
47
47
  uriPrefix: 'firo',
48
48
  gapLimit: 10,
49
- defaultFee: 1000,
50
49
  feeUpdateInterval: 60000,
51
50
  defaultFeeInfo: {
52
51
  lowFeeFudgeFactor: undefined,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
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 = _nullishCoalesce(engineInfo.formats, () => ( ['bip44', 'bip32']))
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
- formats?: CurrencyFormat[];
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
- defaultFee: number;
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.2",
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.5.0",
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",