@bsv/wallet-toolbox 1.2.3 → 1.2.5
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/docs/client.md +1617 -113
- package/docs/monitor.md +52 -0
- package/docs/wallet.md +1617 -113
- package/out/src/monitor/Monitor.d.ts.map +1 -1
- package/out/src/monitor/Monitor.js +3 -0
- package/out/src/monitor/Monitor.js.map +1 -1
- package/out/src/monitor/tasks/TaskUnFail.d.ts +40 -0
- package/out/src/monitor/tasks/TaskUnFail.d.ts.map +1 -0
- package/out/src/monitor/tasks/TaskUnFail.js +145 -0
- package/out/src/monitor/tasks/TaskUnFail.js.map +1 -0
- package/out/src/sdk/types.d.ts +3 -1
- package/out/src/sdk/types.d.ts.map +1 -1
- package/out/src/sdk/types.js.map +1 -1
- package/out/src/services/Services.js +1 -1
- package/out/src/services/Services.js.map +1 -1
- package/out/src/storage/StorageKnex.js +1 -1
- package/out/src/storage/StorageKnex.js.map +1 -1
- package/out/src/storage/StorageProvider.d.ts.map +1 -1
- package/out/src/storage/StorageProvider.js +2 -2
- package/out/src/storage/StorageProvider.js.map +1 -1
- package/out/src/storage/sync/StorageMySQLDojoReader.js +1 -1
- package/out/src/storage/sync/StorageMySQLDojoReader.js.map +1 -1
- package/out/test/Wallet/local/localWallet.man.test.js +3 -3
- package/out/test/Wallet/local/localWallet.man.test.js.map +1 -1
- package/out/test/Wallet/sync/Wallet.updateWalletLegacyTestData.man.test.js +14 -13
- package/out/test/Wallet/sync/Wallet.updateWalletLegacyTestData.man.test.js.map +1 -1
- package/out/tsconfig.all.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/monitor/Monitor.ts +3 -0
- package/src/monitor/tasks/TaskUnFail.ts +151 -0
- package/src/sdk/types.ts +3 -0
- package/src/services/Services.ts +1 -1
- package/src/storage/StorageKnex.ts +1 -1
- package/src/storage/StorageProvider.ts +5 -8
- package/src/storage/sync/StorageMySQLDojoReader.ts +1 -1
- package/test/Wallet/local/localWallet.man.test.ts +3 -3
- package/test/Wallet/sync/Wallet.updateWalletLegacyTestData.man.test.ts +14 -14
package/docs/monitor.md
CHANGED
|
@@ -131,6 +131,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
131
131
|
| [TaskReviewStatus](#class-taskreviewstatus) |
|
|
132
132
|
| [TaskSendWaiting](#class-tasksendwaiting) |
|
|
133
133
|
| [TaskSyncWhenIdle](#class-tasksyncwhenidle) |
|
|
134
|
+
| [TaskUnFail](#class-taskunfail) |
|
|
134
135
|
| [WalletMonitorTask](#class-walletmonitortask) |
|
|
135
136
|
|
|
136
137
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -540,6 +541,57 @@ See also: [Monitor](./monitor.md#class-monitor), [WalletMonitorTask](./monitor.m
|
|
|
540
541
|
|
|
541
542
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
542
543
|
|
|
544
|
+
---
|
|
545
|
+
##### Class: TaskUnFail
|
|
546
|
+
|
|
547
|
+
Setting provenTxReq status to 'unfail' when 'invalid' will attempt to find a merklePath, and if successful:
|
|
548
|
+
|
|
549
|
+
1. set the req status to 'unmined'
|
|
550
|
+
2. set the referenced txs to 'unproven'
|
|
551
|
+
3. determine if any inputs match user's existing outputs and if so update spentBy and spendable of those outputs.
|
|
552
|
+
4. set the txs outputs to spendable
|
|
553
|
+
|
|
554
|
+
If it fails (to find a merklePath), returns the req status to 'invalid'.
|
|
555
|
+
|
|
556
|
+
```ts
|
|
557
|
+
export class TaskUnFail extends WalletMonitorTask {
|
|
558
|
+
static taskName = "UnFail";
|
|
559
|
+
static checkNow = false;
|
|
560
|
+
constructor(monitor: Monitor, public triggerMsecs = monitor.oneMinute * 10)
|
|
561
|
+
trigger(nowMsecsSinceEpoch: number): {
|
|
562
|
+
run: boolean;
|
|
563
|
+
}
|
|
564
|
+
async runTask(): Promise<string>
|
|
565
|
+
async unfail(reqs: TableProvenTxReq[], indent = 0): Promise<{
|
|
566
|
+
log: string;
|
|
567
|
+
}>
|
|
568
|
+
async unfailReq(req: EntityProvenTxReq, indent: number): Promise<string>
|
|
569
|
+
}
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
See also: [EntityProvenTxReq](./storage.md#class-entityproventxreq), [Monitor](./monitor.md#class-monitor), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [WalletMonitorTask](./monitor.md#class-walletmonitortask)
|
|
573
|
+
|
|
574
|
+
###### Property checkNow
|
|
575
|
+
|
|
576
|
+
Set to true to trigger running this task
|
|
577
|
+
|
|
578
|
+
```ts
|
|
579
|
+
static checkNow = false
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
###### Method unfailReq
|
|
583
|
+
|
|
584
|
+
2. set the referenced txs to 'unproven'
|
|
585
|
+
3. determine if any inputs match user's existing outputs and if so update spentBy and spendable of those outputs.
|
|
586
|
+
4. set the txs outputs to spendable
|
|
587
|
+
|
|
588
|
+
```ts
|
|
589
|
+
async unfailReq(req: EntityProvenTxReq, indent: number): Promise<string>
|
|
590
|
+
```
|
|
591
|
+
See also: [EntityProvenTxReq](./storage.md#class-entityproventxreq)
|
|
592
|
+
|
|
593
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
594
|
+
|
|
543
595
|
---
|
|
544
596
|
##### Class: WalletMonitorTask
|
|
545
597
|
|