edge-currency-plugins 3.2.1 → 3.3.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/android/src/main/assets/edge-currency-plugins/edge-currency-plugins.js +41 -41
- package/lib/common/plugin/PluginState.js +4 -4
- package/lib/common/plugin/ServerScores.js +10 -0
- package/lib/common/plugin/types.js +1 -1
- package/lib/common/utxobased/db/{Processor.js → DataLayer.js} +15 -11
- package/lib/common/utxobased/db/Models/{ProcessorTransaction.js → TransactionData.js} +4 -6
- package/lib/common/utxobased/db/types.js +4 -4
- package/lib/common/utxobased/db/util/utxo.js +8 -8
- package/lib/common/utxobased/engine/ServerStates.js +137 -98
- package/lib/common/utxobased/engine/UtxoEngine.js +58 -55
- package/lib/common/utxobased/engine/{UtxoEngineState.js → UtxoEngineProcessor.js} +650 -714
- package/lib/common/utxobased/engine/types.js +4 -2
- package/lib/common/utxobased/engine/util/getOwnUtxosFromTx.js +4 -4
- package/lib/common/utxobased/info/bitcoin.js +2 -1
- package/lib/common/utxobased/info/bitcoincash.js +2 -1
- package/lib/common/utxobased/info/dash.js +2 -1
- package/lib/common/utxobased/info/digibyte.js +5 -1
- package/lib/common/utxobased/info/dogecoin.js +2 -1
- package/lib/common/utxobased/info/groestlcoin.js +4 -1
- package/lib/common/utxobased/info/litecoin.js +2 -1
- package/lib/common/utxobased/info/zcoin.js +4 -1
- package/lib/common/utxobased/network/Blockbook.js +33 -30
- package/lib/common/utxobased/network/BlockbookElectrum.js +79 -77
- package/lib/common/utxobased/network/Socket.js +70 -40
- package/lib/src/common/plugin/PluginState.d.ts +3 -3
- package/lib/src/common/plugin/types.d.ts +4 -4
- package/lib/src/common/utxobased/db/{Processor.d.ts → DataLayer.d.ts} +17 -11
- package/lib/src/common/utxobased/db/Models/{ProcessorTransaction.d.ts → TransactionData.d.ts} +5 -5
- package/lib/src/common/utxobased/db/Models/baselet.d.ts +4 -4
- package/lib/src/common/utxobased/db/types.d.ts +9 -9
- package/lib/src/common/utxobased/db/util/utxo.d.ts +3 -3
- package/lib/src/common/utxobased/engine/ServerStates.d.ts +7 -7
- package/lib/src/common/utxobased/engine/{UtxoEngineState.d.ts → UtxoEngineProcessor.d.ts} +44 -42
- package/lib/src/common/utxobased/engine/types.d.ts +4 -4
- package/lib/src/common/utxobased/engine/util/getOwnUtxosFromTx.d.ts +3 -3
- package/lib/src/common/utxobased/engine/utils.d.ts +2 -2
- package/lib/src/common/utxobased/keymanager/keymanager.d.ts +3 -3
- package/lib/src/common/utxobased/network/Blockbook.d.ts +8 -7
- package/lib/src/common/utxobased/network/BlockbookElectrum.d.ts +4 -2
- package/lib/src/common/utxobased/network/Socket.d.ts +10 -8
- package/lib/src/util/uriKeyParams.d.ts +4 -0
- package/lib/util/uriKeyParams.js +20 -0
- package/package.json +1 -1
- /package/lib/test/common/utxobased/db/{Processor.spec.d.ts → DataLayer.spec.d.ts} +0 -0
|
@@ -25,11 +25,11 @@ var _EngineEmitter = require('../../plugin/EngineEmitter');
|
|
|
25
25
|
var _Metadata = require('../../plugin/Metadata');
|
|
26
26
|
|
|
27
27
|
var _upgradeMemos = require('../../upgradeMemos');
|
|
28
|
+
var _DataLayer = require('../db/DataLayer');
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
|
|
31
|
-
var
|
|
32
|
-
var _Processor = require('../db/Processor');
|
|
32
|
+
var _TransactionData = require('../db/Models/TransactionData');
|
|
33
33
|
|
|
34
34
|
var _utxo = require('../db/util/utxo');
|
|
35
35
|
|
|
@@ -61,7 +61,10 @@ var _getOwnUtxosFromTx = require('./util/getOwnUtxosFromTx');
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
var _utils3 = require('./utils');
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
var _UtxoEngineProcessor = require('./UtxoEngineProcessor');
|
|
65
68
|
var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
66
69
|
|
|
67
70
|
async function makeUtxoEngine(
|
|
@@ -125,14 +128,14 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
125
128
|
emitter,
|
|
126
129
|
log
|
|
127
130
|
})
|
|
128
|
-
const
|
|
131
|
+
const dataLayer = await _DataLayer.makeDataLayer.call(void 0, {
|
|
129
132
|
disklet: walletLocalDisklet
|
|
130
133
|
})
|
|
131
|
-
const
|
|
134
|
+
const engineProcessor = _UtxoEngineProcessor.makeUtxoEngineProcessor.call(void 0, {
|
|
132
135
|
...config,
|
|
133
136
|
walletTools,
|
|
134
137
|
walletInfo,
|
|
135
|
-
|
|
138
|
+
dataLayer,
|
|
136
139
|
pluginState
|
|
137
140
|
})
|
|
138
141
|
|
|
@@ -145,9 +148,9 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
145
148
|
if (privateKeyFormat === 'bip32' || privateKeyFormat === 'bip44')
|
|
146
149
|
return null
|
|
147
150
|
|
|
148
|
-
// Get the replaced transaction from the
|
|
151
|
+
// Get the replaced transaction from the DataLayer:
|
|
149
152
|
const replacedTxid = edgeTx.txid
|
|
150
|
-
const [replacedTx] = await
|
|
153
|
+
const [replacedTx] = await dataLayer.fetchTransactions({
|
|
151
154
|
txId: replacedTxid
|
|
152
155
|
})
|
|
153
156
|
|
|
@@ -165,11 +168,11 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
165
168
|
const newFeeRate = Math.round((parseInt(replacedTx.fees) / vBytes) * 2)
|
|
166
169
|
|
|
167
170
|
const replacedTxInputs = replacedTx.inputs
|
|
168
|
-
// Recreate UTXOs from
|
|
171
|
+
// Recreate UTXOs from DataLayer transaction and mark them as unspent:
|
|
169
172
|
const replacedTxUtxos = await Promise.all(
|
|
170
173
|
replacedTxInputs.map(async (_, index) => {
|
|
171
|
-
const utxo = await _utxo.
|
|
172
|
-
|
|
174
|
+
const utxo = await _utxo.utxoFromTransactionDataInput.call(void 0,
|
|
175
|
+
dataLayer,
|
|
173
176
|
replacedTx,
|
|
174
177
|
index
|
|
175
178
|
)
|
|
@@ -189,7 +192,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
189
192
|
let foundChangeAddress
|
|
190
193
|
for (const output of replacedTx.outputs) {
|
|
191
194
|
// Fetch address by output's scriptPubkey to determine output ownership
|
|
192
|
-
const ourAddress = await
|
|
195
|
+
const ourAddress = await dataLayer.fetchAddress(output.scriptPubkey)
|
|
193
196
|
|
|
194
197
|
// This isn't our output, so include it as a target
|
|
195
198
|
if (ourAddress == null) {
|
|
@@ -235,14 +238,14 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
235
238
|
// Use the found change address or generate a new one:
|
|
236
239
|
const freshAddress =
|
|
237
240
|
foundChangeAddress == null
|
|
238
|
-
? await
|
|
241
|
+
? await engineProcessor.getFreshAddress({ branch: 1 })
|
|
239
242
|
: { publicAddress: foundChangeAddress }
|
|
240
243
|
const freshChangeAddress =
|
|
241
244
|
_nullishCoalesce(freshAddress.segwitAddress, () => ( freshAddress.publicAddress))
|
|
242
245
|
|
|
243
246
|
// Get all current UTXOs:
|
|
244
247
|
const currentUtxos = _filterUndefined.filterUndefined.call(void 0,
|
|
245
|
-
await
|
|
248
|
+
await dataLayer.fetchUtxos({
|
|
246
249
|
utxoIds: []
|
|
247
250
|
})
|
|
248
251
|
)
|
|
@@ -305,7 +308,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
305
308
|
let nativeAmount = '0'
|
|
306
309
|
for (const output of newTx.outputs) {
|
|
307
310
|
const scriptPubkey = output.scriptPubkey.toString('hex')
|
|
308
|
-
const own = await
|
|
311
|
+
const own = await dataLayer.fetchAddress(scriptPubkey)
|
|
309
312
|
if (own == null) {
|
|
310
313
|
// Not our output
|
|
311
314
|
nativeAmount = bs.sub(nativeAmount, output.value.toString())
|
|
@@ -357,15 +360,15 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
357
360
|
metadata.state.balance
|
|
358
361
|
)
|
|
359
362
|
|
|
360
|
-
pluginState.addEngine(
|
|
363
|
+
pluginState.addEngine(engineProcessor)
|
|
361
364
|
await fees.start()
|
|
362
|
-
await
|
|
365
|
+
await engineProcessor.start()
|
|
363
366
|
},
|
|
364
367
|
|
|
365
368
|
async killEngine() {
|
|
366
|
-
await
|
|
369
|
+
await engineProcessor.stop()
|
|
367
370
|
fees.stop()
|
|
368
|
-
pluginState.removeEngine(
|
|
371
|
+
pluginState.removeEngine(engineProcessor)
|
|
369
372
|
},
|
|
370
373
|
|
|
371
374
|
getBalance(_opts) {
|
|
@@ -381,7 +384,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
381
384
|
},
|
|
382
385
|
|
|
383
386
|
async addGapLimitAddresses(addresses) {
|
|
384
|
-
return await
|
|
387
|
+
return await engineProcessor.addGapLimitAddresses(addresses)
|
|
385
388
|
},
|
|
386
389
|
|
|
387
390
|
async broadcastTx(transaction) {
|
|
@@ -401,7 +404,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
401
404
|
)
|
|
402
405
|
}
|
|
403
406
|
}
|
|
404
|
-
const id = await
|
|
407
|
+
const id = await engineProcessor.broadcastTx(transaction).catch(err => {
|
|
405
408
|
if (String(err).includes('Error: Blockbook Error: -26: dust')) {
|
|
406
409
|
throw new (0, _edgecorejs.DustSpendError)()
|
|
407
410
|
}
|
|
@@ -432,7 +435,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
432
435
|
walletFormats
|
|
433
436
|
},
|
|
434
437
|
metadataState: metadata.state,
|
|
435
|
-
|
|
438
|
+
storageState: await dataLayer.dumpData(),
|
|
436
439
|
pluginState: pluginState.dumpData()
|
|
437
440
|
}
|
|
438
441
|
}
|
|
@@ -461,11 +464,11 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
461
464
|
opts
|
|
462
465
|
) {
|
|
463
466
|
const { forceIndex } = opts
|
|
464
|
-
return await
|
|
467
|
+
return await engineProcessor.getFreshAddress({ forceIndex })
|
|
465
468
|
},
|
|
466
469
|
|
|
467
470
|
getNumTransactions(_opts) {
|
|
468
|
-
return
|
|
471
|
+
return dataLayer.numTransactions()
|
|
469
472
|
},
|
|
470
473
|
|
|
471
474
|
async getPaymentProtocolInfo(
|
|
@@ -482,16 +485,16 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
482
485
|
options
|
|
483
486
|
) {
|
|
484
487
|
const txs = _filterUndefined.filterUndefined.call(void 0,
|
|
485
|
-
await
|
|
488
|
+
await dataLayer.fetchTransactions({ options })
|
|
486
489
|
)
|
|
487
490
|
return await Promise.all(
|
|
488
491
|
txs.map(
|
|
489
492
|
async (tx) =>
|
|
490
|
-
await
|
|
493
|
+
await _TransactionData.toEdgeTransaction.call(void 0, {
|
|
491
494
|
walletId: walletInfo.id,
|
|
492
495
|
tx,
|
|
493
496
|
walletTools,
|
|
494
|
-
|
|
497
|
+
dataLayer,
|
|
495
498
|
pluginInfo
|
|
496
499
|
})
|
|
497
500
|
)
|
|
@@ -500,7 +503,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
500
503
|
|
|
501
504
|
async isAddressUsed(address) {
|
|
502
505
|
const scriptPubkey = walletTools.addressToScriptPubkey(address)
|
|
503
|
-
const addressData = await
|
|
506
|
+
const addressData = await dataLayer.fetchAddress(scriptPubkey)
|
|
504
507
|
if (addressData == null) throw new Error('Address not found in wallet')
|
|
505
508
|
return addressData.used
|
|
506
509
|
},
|
|
@@ -534,7 +537,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
534
537
|
const utxos =
|
|
535
538
|
await _asyncNullishCoalesce(txOptions.utxos, async () => (
|
|
536
539
|
_filterUndefined.filterUndefined.call(void 0,
|
|
537
|
-
(await
|
|
540
|
+
(await dataLayer.fetchUtxos({
|
|
538
541
|
scriptPubkey: utxoScriptPubkey,
|
|
539
542
|
utxoIds: []
|
|
540
543
|
}))
|
|
@@ -559,7 +562,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
559
562
|
const { script } = target.otherParams
|
|
560
563
|
if (script.type === 'replayProtection') {
|
|
561
564
|
// construct a replay protection p2sh address
|
|
562
|
-
const { publicAddress } = await
|
|
565
|
+
const { publicAddress } = await engineProcessor.deriveScriptAddress(
|
|
563
566
|
script.type
|
|
564
567
|
)
|
|
565
568
|
targets.push({
|
|
@@ -575,7 +578,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
575
578
|
const scriptPubkey = walletTools.addressToScriptPubkey(
|
|
576
579
|
target.publicAddress
|
|
577
580
|
)
|
|
578
|
-
if ((await
|
|
581
|
+
if ((await dataLayer.fetchAddress(scriptPubkey)) != null) {
|
|
579
582
|
ourReceiveAddresses.push(target.publicAddress)
|
|
580
583
|
}
|
|
581
584
|
}
|
|
@@ -593,7 +596,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
593
596
|
throw new Error('Need to provide Spend Targets')
|
|
594
597
|
}
|
|
595
598
|
|
|
596
|
-
const freshAddress = await
|
|
599
|
+
const freshAddress = await engineProcessor.getFreshAddress({ branch: 1 })
|
|
597
600
|
const freshChangeAddress =
|
|
598
601
|
_nullishCoalesce(_nullishCoalesce(forceChangeAddress, () => (
|
|
599
602
|
freshAddress.segwitAddress)), () => (
|
|
@@ -603,13 +606,13 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
603
606
|
|
|
604
607
|
let maxUtxo
|
|
605
608
|
if (txOptions.CPFP != null) {
|
|
606
|
-
const [childTx] = await
|
|
609
|
+
const [childTx] = await dataLayer.fetchTransactions({
|
|
607
610
|
txId: txOptions.CPFP
|
|
608
611
|
})
|
|
609
612
|
if (childTx == null) throw new Error('transaction not found')
|
|
610
613
|
const utxos = []
|
|
611
614
|
for (const txid of childTx.ourOuts) {
|
|
612
|
-
const [output] = await
|
|
615
|
+
const [output] = await dataLayer.fetchUtxos({ utxoIds: [txid] })
|
|
613
616
|
if (output != null) utxos.push(output)
|
|
614
617
|
}
|
|
615
618
|
maxUtxo = utxos.reduce((a, b) => (bs.gt(a.value, b.value) ? a : b))
|
|
@@ -651,7 +654,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
651
654
|
)
|
|
652
655
|
for (const output of tx.outputs) {
|
|
653
656
|
const scriptPubkey = output.scriptPubkey.toString('hex')
|
|
654
|
-
const own = await
|
|
657
|
+
const own = await dataLayer.fetchAddress(scriptPubkey)
|
|
655
658
|
if (own == null) {
|
|
656
659
|
// Not our output
|
|
657
660
|
nativeAmount = bs.sub(nativeAmount, output.value.toString())
|
|
@@ -702,7 +705,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
702
705
|
await engine.killEngine()
|
|
703
706
|
|
|
704
707
|
// Clear cache and state
|
|
705
|
-
await
|
|
708
|
+
await dataLayer.clearAll()
|
|
706
709
|
await pluginState.clearCache()
|
|
707
710
|
await metadata.clear()
|
|
708
711
|
await fees.clearCache()
|
|
@@ -719,32 +722,32 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
719
722
|
const replacedTxid = _optionalChain([edgeTx, 'access', _9 => _9.otherParams, 'optionalAccess', _10 => _10.replacedTxid])
|
|
720
723
|
if (replacedTxid != null) {
|
|
721
724
|
// Get the replaced transaction using the replacedTxid
|
|
722
|
-
const [rbfTx] = await
|
|
725
|
+
const [rbfTx] = await dataLayer.fetchTransactions({
|
|
723
726
|
txId: replacedTxid
|
|
724
727
|
})
|
|
725
728
|
if (rbfTx != null) {
|
|
726
729
|
rbfTx.blockHeight = -1
|
|
727
|
-
await
|
|
730
|
+
await _UtxoEngineProcessor.transactionChanged.call(void 0, {
|
|
728
731
|
walletId: walletInfo.id,
|
|
729
732
|
tx: rbfTx,
|
|
730
733
|
pluginInfo,
|
|
731
734
|
emitter,
|
|
732
735
|
walletTools,
|
|
733
|
-
|
|
736
|
+
dataLayer
|
|
734
737
|
})
|
|
735
738
|
}
|
|
736
739
|
}
|
|
737
740
|
|
|
738
|
-
const tx =
|
|
739
|
-
await
|
|
741
|
+
const tx = _TransactionData.fromEdgeTransaction.call(void 0, edgeTx)
|
|
742
|
+
await _UtxoEngineProcessor.transactionChanged.call(void 0, {
|
|
740
743
|
walletId: walletInfo.id,
|
|
741
744
|
tx,
|
|
742
745
|
pluginInfo,
|
|
743
746
|
emitter,
|
|
744
747
|
walletTools,
|
|
745
|
-
|
|
748
|
+
dataLayer
|
|
746
749
|
})
|
|
747
|
-
await
|
|
750
|
+
await dataLayer.saveTransaction({
|
|
748
751
|
tx,
|
|
749
752
|
scriptPubkeys: _optionalChain([edgeTx, 'access', _11 => _11.otherParams, 'optionalAccess', _12 => _12.ourScriptPubkeys])
|
|
750
753
|
})
|
|
@@ -752,8 +755,8 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
752
755
|
/*
|
|
753
756
|
Get the wallet's UTXOs from the new transaction and save them to the processsor.
|
|
754
757
|
*/
|
|
755
|
-
const ownUtxos = await _getOwnUtxosFromTx.getOwnUtxosFromTx.call(void 0, engineInfo,
|
|
756
|
-
await
|
|
758
|
+
const ownUtxos = await _getOwnUtxosFromTx.getOwnUtxosFromTx.call(void 0, engineInfo, dataLayer, tx)
|
|
759
|
+
await engineProcessor.processUtxos(ownUtxos)
|
|
757
760
|
},
|
|
758
761
|
|
|
759
762
|
async signMessage(
|
|
@@ -764,9 +767,9 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
764
767
|
const otherParams = _types7.asUtxoSignMessageOtherParams.call(void 0, opts.otherParams)
|
|
765
768
|
const { publicAddress } = otherParams
|
|
766
769
|
const scriptPubkey = walletTools.addressToScriptPubkey(publicAddress)
|
|
767
|
-
const
|
|
768
|
-
if (_optionalChain([
|
|
769
|
-
throw new Error('Missing address to sign with')
|
|
770
|
+
const addressData = await dataLayer.fetchAddress(scriptPubkey)
|
|
771
|
+
if (_optionalChain([addressData, 'optionalAccess', _13 => _13.path]) == null) {
|
|
772
|
+
throw new Error('Missing data-layer address to sign with')
|
|
770
773
|
}
|
|
771
774
|
const privateKey = asMaybeCurrencyPrivateKey(privateKeys)
|
|
772
775
|
|
|
@@ -781,7 +784,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
781
784
|
})
|
|
782
785
|
|
|
783
786
|
const signature = await walletTools.signMessageBase64({
|
|
784
|
-
path: _optionalChain([
|
|
787
|
+
path: _optionalChain([addressData, 'optionalAccess', _14 => _14.path]),
|
|
785
788
|
message,
|
|
786
789
|
xprivKeys
|
|
787
790
|
})
|
|
@@ -824,7 +827,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
824
827
|
psbt.inputs.map(async ({ hash, index: vout }) => {
|
|
825
828
|
const txId = Buffer.from(hash).reverse().toString('hex')
|
|
826
829
|
|
|
827
|
-
const [transaction] = await
|
|
830
|
+
const [transaction] = await dataLayer.fetchTransactions({ txId })
|
|
828
831
|
if (transaction == null)
|
|
829
832
|
throw new Error(
|
|
830
833
|
'Unable to find previous transaction data for input'
|
|
@@ -838,7 +841,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
838
841
|
|
|
839
842
|
// Use the scriptPubkey to find the private key from the address
|
|
840
843
|
// derivation path
|
|
841
|
-
const address = await
|
|
844
|
+
const address = await dataLayer.fetchAddress(scriptPubkey)
|
|
842
845
|
if (address == null) {
|
|
843
846
|
throw new Error(
|
|
844
847
|
`Address for scriptPubkey '${scriptPubkey}' not found`
|
|
@@ -931,7 +934,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
931
934
|
log
|
|
932
935
|
}
|
|
933
936
|
const tmpMetadata = await _Metadata.makeMetadata.call(void 0, tmpConfig)
|
|
934
|
-
const
|
|
937
|
+
const tmpDataLayer = await _DataLayer.makeDataLayer.call(void 0, tmpConfig)
|
|
935
938
|
const tmpWalletTools = _UtxoWalletTools.makeUtxoWalletTools.call(void 0, {
|
|
936
939
|
pluginInfo,
|
|
937
940
|
publicKey: tmpWalletInfo.keys.publicKey
|
|
@@ -943,7 +946,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
943
946
|
try {
|
|
944
947
|
await tmpState.stop()
|
|
945
948
|
|
|
946
|
-
const tmpUtxos = (await
|
|
949
|
+
const tmpUtxos = (await tmpDataLayer.fetchUtxos({
|
|
947
950
|
utxoIds: []
|
|
948
951
|
}))
|
|
949
952
|
if (tmpUtxos === null || tmpUtxos.length < 1) {
|
|
@@ -967,7 +970,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
967
970
|
}
|
|
968
971
|
})
|
|
969
972
|
|
|
970
|
-
const tmpState =
|
|
973
|
+
const tmpState = _UtxoEngineProcessor.makeUtxoEngineProcessor.call(void 0, {
|
|
971
974
|
...config,
|
|
972
975
|
options: {
|
|
973
976
|
...config.options,
|
|
@@ -983,7 +986,7 @@ var _UtxoWalletTools = require('./UtxoWalletTools');
|
|
|
983
986
|
gapLimit: 0
|
|
984
987
|
}
|
|
985
988
|
},
|
|
986
|
-
|
|
989
|
+
dataLayer: tmpDataLayer,
|
|
987
990
|
walletTools: tmpWalletTools,
|
|
988
991
|
walletInfo: tmpWalletInfo
|
|
989
992
|
})
|