@bsv/wallet-toolbox 1.2.10 → 1.2.12
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 +120 -71
- package/docs/monitor.md +79 -35
- package/docs/wallet.md +120 -71
- package/out/src/__tests/WalletPermissionsManager.fixtures.d.ts.map +1 -1
- package/out/src/monitor/Monitor.d.ts.map +1 -1
- package/out/src/monitor/Monitor.js +8 -2
- package/out/src/monitor/Monitor.js.map +1 -1
- package/out/src/monitor/tasks/TaskCheckForProofs.d.ts +20 -20
- package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskCheckForProofs.js +131 -130
- package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -1
- package/out/src/monitor/tasks/TaskCheckNoSends.d.ts +33 -0
- package/out/src/monitor/tasks/TaskCheckNoSends.d.ts.map +1 -0
- package/out/src/monitor/tasks/TaskCheckNoSends.js +65 -0
- package/out/src/monitor/tasks/TaskCheckNoSends.js.map +1 -0
- package/out/src/services/providers/Bitails.d.ts.map +1 -1
- package/out/src/services/providers/Bitails.js +8 -2
- package/out/src/services/providers/Bitails.js.map +1 -1
- package/out/src/services/providers/WhatsOnChain.d.ts.map +1 -1
- package/out/src/services/providers/WhatsOnChain.js +3 -0
- package/out/src/services/providers/WhatsOnChain.js.map +1 -1
- package/out/src/storage/__test/getBeefForTransaction.test.js +0 -3
- package/out/src/storage/__test/getBeefForTransaction.test.js.map +1 -1
- package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageClient.js +0 -5
- package/out/src/storage/remoting/StorageClient.js.map +1 -1
- package/out/src/utility/identityUtils.d.ts.map +1 -1
- package/out/test/Wallet/local/localWallet.man.test.d.ts +1 -4
- package/out/test/Wallet/local/localWallet.man.test.d.ts.map +1 -1
- package/out/test/Wallet/local/localWallet.man.test.js +4 -55
- package/out/test/Wallet/local/localWallet.man.test.js.map +1 -1
- package/out/test/Wallet/support/janitor.man.test.js +13 -10
- package/out/test/Wallet/support/janitor.man.test.js.map +1 -1
- package/out/test/utils/TestUtilsWalletStorage.d.ts +2 -1
- package/out/test/utils/TestUtilsWalletStorage.d.ts.map +1 -1
- package/out/test/wallet/action/createAction2.test.d.ts.map +1 -1
- package/out/tsconfig.all.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/monitor/Monitor.ts +8 -2
- package/src/monitor/tasks/TaskCheckForProofs.ts +142 -142
- package/src/monitor/tasks/TaskCheckNoSends.ts +69 -0
- package/src/services/providers/Bitails.ts +7 -2
- package/src/services/providers/WhatsOnChain.ts +3 -0
- package/src/storage/__test/getBeefForTransaction.test.ts +0 -3
- package/src/storage/remoting/StorageClient.ts +0 -6
- package/test/Wallet/local/localWallet.man.test.ts +5 -85
- package/test/Wallet/support/janitor.man.test.ts +3 -2
package/docs/client.md
CHANGED
|
@@ -4864,30 +4864,30 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
4864
4864
|
|
|
4865
4865
|
| | | |
|
|
4866
4866
|
| --- | --- | --- |
|
|
4867
|
-
| [ARC](#class-arc) | [PersonaIDInteractor](#class-personaidinteractor) | [
|
|
4868
|
-
| [AuthMethodInteractor](#class-authmethodinteractor) | [PrivilegedKeyManager](#class-privilegedkeymanager) | [
|
|
4869
|
-
| [Bitails](#class-bitails) | [ScriptTemplateBRC29](#class-scripttemplatebrc29) | [
|
|
4870
|
-
| [CWIStyleWalletManager](#class-cwistylewalletmanager) | [SdkWhatsOnChain](#class-sdkwhatsonchain) | [
|
|
4871
|
-
| [EntityBase](#class-entitybase) | [ServiceCollection](#class-servicecollection) | [
|
|
4872
|
-
| [EntityCertificate](#class-entitycertificate) | [Services](#class-services) | [
|
|
4873
|
-
| [EntityCertificateField](#class-entitycertificatefield) | [Setup](#class-setup) | [
|
|
4874
|
-
| [EntityCommission](#class-entitycommission) | [SimpleWalletManager](#class-simplewalletmanager) | [
|
|
4875
|
-
| [EntityOutput](#class-entityoutput) | [StorageClient](#class-storageclient) | [
|
|
4876
|
-
| [EntityOutputBasket](#class-entityoutputbasket) | [StorageKnex](#class-storageknex) | [
|
|
4877
|
-
| [EntityOutputTag](#class-entityoutputtag) | [StorageProvider](#class-storageprovider) | [
|
|
4878
|
-
| [EntityOutputTagMap](#class-entityoutputtagmap) | [StorageReader](#class-storagereader) | [
|
|
4879
|
-
| [EntityProvenTx](#class-entityproventx) | [StorageReaderWriter](#class-storagereaderwriter) | [
|
|
4880
|
-
| [EntityProvenTxReq](#class-entityproventxreq) | [StorageServer](#class-storageserver) | [
|
|
4881
|
-
| [EntitySyncState](#class-entitysyncstate) | [StorageSyncReader](#class-storagesyncreader) | [
|
|
4882
|
-
| [EntityTransaction](#class-entitytransaction) | [TaskCheckForProofs](#class-taskcheckforproofs) | [
|
|
4883
|
-
| [EntityTxLabel](#class-entitytxlabel) | [
|
|
4884
|
-
| [EntityTxLabelMap](#class-entitytxlabelmap) | [
|
|
4885
|
-
| [EntityUser](#class-entityuser) | [
|
|
4886
|
-
| [KnexMigrations](#class-knexmigrations) | [
|
|
4887
|
-
| [MergeEntity](#class-mergeentity) | [
|
|
4888
|
-
| [Monitor](#class-monitor) | [
|
|
4889
|
-
| [MonitorDaemon](#class-monitordaemon) | [
|
|
4890
|
-
| [OverlayUMPTokenInteractor](#class-overlayumptokeninteractor) | [
|
|
4867
|
+
| [ARC](#class-arc) | [PersonaIDInteractor](#class-personaidinteractor) | [TaskUnFail](#class-taskunfail) |
|
|
4868
|
+
| [AuthMethodInteractor](#class-authmethodinteractor) | [PrivilegedKeyManager](#class-privilegedkeymanager) | [TwilioPhoneInteractor](#class-twiliophoneinteractor) |
|
|
4869
|
+
| [Bitails](#class-bitails) | [ScriptTemplateBRC29](#class-scripttemplatebrc29) | [WABClient](#class-wabclient) |
|
|
4870
|
+
| [CWIStyleWalletManager](#class-cwistylewalletmanager) | [SdkWhatsOnChain](#class-sdkwhatsonchain) | [WERR_BAD_REQUEST](#class-werr_bad_request) |
|
|
4871
|
+
| [EntityBase](#class-entitybase) | [ServiceCollection](#class-servicecollection) | [WERR_BROADCAST_UNAVAILABLE](#class-werr_broadcast_unavailable) |
|
|
4872
|
+
| [EntityCertificate](#class-entitycertificate) | [Services](#class-services) | [WERR_INSUFFICIENT_FUNDS](#class-werr_insufficient_funds) |
|
|
4873
|
+
| [EntityCertificateField](#class-entitycertificatefield) | [Setup](#class-setup) | [WERR_INTERNAL](#class-werr_internal) |
|
|
4874
|
+
| [EntityCommission](#class-entitycommission) | [SimpleWalletManager](#class-simplewalletmanager) | [WERR_INVALID_OPERATION](#class-werr_invalid_operation) |
|
|
4875
|
+
| [EntityOutput](#class-entityoutput) | [StorageClient](#class-storageclient) | [WERR_INVALID_PARAMETER](#class-werr_invalid_parameter) |
|
|
4876
|
+
| [EntityOutputBasket](#class-entityoutputbasket) | [StorageKnex](#class-storageknex) | [WERR_INVALID_PUBLIC_KEY](#class-werr_invalid_public_key) |
|
|
4877
|
+
| [EntityOutputTag](#class-entityoutputtag) | [StorageProvider](#class-storageprovider) | [WERR_MISSING_PARAMETER](#class-werr_missing_parameter) |
|
|
4878
|
+
| [EntityOutputTagMap](#class-entityoutputtagmap) | [StorageReader](#class-storagereader) | [WERR_NETWORK_CHAIN](#class-werr_network_chain) |
|
|
4879
|
+
| [EntityProvenTx](#class-entityproventx) | [StorageReaderWriter](#class-storagereaderwriter) | [WERR_NOT_ACTIVE](#class-werr_not_active) |
|
|
4880
|
+
| [EntityProvenTxReq](#class-entityproventxreq) | [StorageServer](#class-storageserver) | [WERR_NOT_IMPLEMENTED](#class-werr_not_implemented) |
|
|
4881
|
+
| [EntitySyncState](#class-entitysyncstate) | [StorageSyncReader](#class-storagesyncreader) | [WERR_UNAUTHORIZED](#class-werr_unauthorized) |
|
|
4882
|
+
| [EntityTransaction](#class-entitytransaction) | [TaskCheckForProofs](#class-taskcheckforproofs) | [Wallet](#class-wallet) |
|
|
4883
|
+
| [EntityTxLabel](#class-entitytxlabel) | [TaskCheckNoSends](#class-taskchecknosends) | [WalletAuthenticationManager](#class-walletauthenticationmanager) |
|
|
4884
|
+
| [EntityTxLabelMap](#class-entitytxlabelmap) | [TaskClock](#class-taskclock) | [WalletError](#class-walleterror) |
|
|
4885
|
+
| [EntityUser](#class-entityuser) | [TaskFailAbandoned](#class-taskfailabandoned) | [WalletMonitorTask](#class-walletmonitortask) |
|
|
4886
|
+
| [KnexMigrations](#class-knexmigrations) | [TaskNewHeader](#class-tasknewheader) | [WalletPermissionsManager](#class-walletpermissionsmanager) |
|
|
4887
|
+
| [MergeEntity](#class-mergeentity) | [TaskPurge](#class-taskpurge) | [WalletSettingsManager](#class-walletsettingsmanager) |
|
|
4888
|
+
| [Monitor](#class-monitor) | [TaskReviewStatus](#class-taskreviewstatus) | [WalletSigner](#class-walletsigner) |
|
|
4889
|
+
| [MonitorDaemon](#class-monitordaemon) | [TaskSendWaiting](#class-tasksendwaiting) | [WalletStorageManager](#class-walletstoragemanager) |
|
|
4890
|
+
| [OverlayUMPTokenInteractor](#class-overlayumptokeninteractor) | [TaskSyncWhenIdle](#class-tasksyncwhenidle) | [WhatsOnChain](#class-whatsonchain) |
|
|
4891
4891
|
|
|
4892
4892
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4893
4893
|
|
|
@@ -8878,15 +8878,10 @@ export class TaskCheckForProofs extends WalletMonitorTask {
|
|
|
8878
8878
|
run: boolean;
|
|
8879
8879
|
}
|
|
8880
8880
|
async runTask(): Promise<string>
|
|
8881
|
-
async getProofs(reqs: TableProvenTxReq[], indent = 0, countsAsAttempt = false, ignoreStatus = false): Promise<{
|
|
8882
|
-
proven: TableProvenTxReq[];
|
|
8883
|
-
invalid: TableProvenTxReq[];
|
|
8884
|
-
log: string;
|
|
8885
|
-
}>
|
|
8886
8881
|
}
|
|
8887
8882
|
```
|
|
8888
8883
|
|
|
8889
|
-
See also: [Monitor](./monitor.md#class-monitor), [
|
|
8884
|
+
See also: [Monitor](./monitor.md#class-monitor), [WalletMonitorTask](./monitor.md#class-walletmonitortask)
|
|
8890
8885
|
|
|
8891
8886
|
###### Property checkNow
|
|
8892
8887
|
|
|
@@ -8897,31 +8892,55 @@ listener can set this true to cause
|
|
|
8897
8892
|
static checkNow = false
|
|
8898
8893
|
```
|
|
8899
8894
|
|
|
8900
|
-
###### Method
|
|
8895
|
+
###### Method trigger
|
|
8901
8896
|
|
|
8902
|
-
|
|
8897
|
+
Normally triggered by checkNow getting set by new block header found event from chaintracks
|
|
8903
8898
|
|
|
8904
|
-
|
|
8899
|
+
```ts
|
|
8900
|
+
trigger(nowMsecsSinceEpoch: number): {
|
|
8901
|
+
run: boolean;
|
|
8902
|
+
}
|
|
8903
|
+
```
|
|
8905
8904
|
|
|
8906
|
-
|
|
8905
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8907
8906
|
|
|
8908
|
-
|
|
8909
|
-
|
|
8907
|
+
---
|
|
8908
|
+
##### Class: TaskCheckNoSends
|
|
8910
8909
|
|
|
8911
|
-
|
|
8910
|
+
`TaskCheckNoSends` is a WalletMonitor task that retreives merkle proofs for
|
|
8911
|
+
'nosend' transactions that MAY have been shared externally.
|
|
8912
|
+
|
|
8913
|
+
Unlike intentionally processed transactions, 'nosend' transactions are fully valid
|
|
8914
|
+
transactions which have not been processed by the wallet.
|
|
8915
|
+
|
|
8916
|
+
By default, this task runs once a day to check if any 'nosend' transaction has
|
|
8917
|
+
managed to get mined by some external process.
|
|
8918
|
+
|
|
8919
|
+
If a proof is obtained and validated, a new ProvenTx record is created and
|
|
8920
|
+
the original ProvenTxReq status is advanced to 'notifying'.
|
|
8912
8921
|
|
|
8913
8922
|
```ts
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8923
|
+
export class TaskCheckNoSends extends WalletMonitorTask {
|
|
8924
|
+
static taskName = "CheckNoSends";
|
|
8925
|
+
static checkNow = false;
|
|
8926
|
+
constructor(monitor: Monitor, public triggerMsecs = monitor.oneDay * 1)
|
|
8927
|
+
trigger(nowMsecsSinceEpoch: number): {
|
|
8928
|
+
run: boolean;
|
|
8929
|
+
}
|
|
8930
|
+
async runTask(): Promise<string>
|
|
8931
|
+
}
|
|
8919
8932
|
```
|
|
8920
|
-
See also: [TableProvenTxReq](./storage.md#interface-tableproventxreq)
|
|
8921
8933
|
|
|
8922
|
-
|
|
8934
|
+
See also: [Monitor](./monitor.md#class-monitor), [WalletMonitorTask](./monitor.md#class-walletmonitortask)
|
|
8923
8935
|
|
|
8924
|
-
|
|
8936
|
+
###### Property checkNow
|
|
8937
|
+
|
|
8938
|
+
An external service such as the chaintracks new block header
|
|
8939
|
+
listener can set this true to cause
|
|
8940
|
+
|
|
8941
|
+
```ts
|
|
8942
|
+
static checkNow = false
|
|
8943
|
+
```
|
|
8925
8944
|
|
|
8926
8945
|
###### Method trigger
|
|
8927
8946
|
|
|
@@ -10716,35 +10735,36 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
10716
10735
|
|
|
10717
10736
|
| | | |
|
|
10718
10737
|
| --- | --- | --- |
|
|
10719
|
-
| [acquireDirectCertificate](#function-acquiredirectcertificate) | [
|
|
10720
|
-
| [arcDefaultUrl](#function-arcdefaulturl) | [
|
|
10721
|
-
| [arraysEqual](#function-arraysequal) | [makeAtomicBeef](#function-makeatomicbeef) | [
|
|
10738
|
+
| [acquireDirectCertificate](#function-acquiredirectcertificate) | [listOutputs](#function-listoutputs) | [validateCreateActionOutput](#function-validatecreateactionoutput) |
|
|
10739
|
+
| [arcDefaultUrl](#function-arcdefaulturl) | [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) | [validateDiscoverByAttributesArgs](#function-validatediscoverbyattributesargs) |
|
|
10740
|
+
| [arraysEqual](#function-arraysequal) | [makeAtomicBeef](#function-makeatomicbeef) | [validateDiscoverByIdentityKeyArgs](#function-validatediscoverbyidentitykeyargs) |
|
|
10741
|
+
| [asArray](#function-asarray) | [makeAtomicBeef](#function-makeatomicbeef) | [validateGenerateChangeSdkParams](#function-validategeneratechangesdkparams) |
|
|
10722
10742
|
| [asArray](#function-asarray) | [makeChangeLock](#function-makechangelock) | [validateGenerateChangeSdkResult](#function-validategeneratechangesdkresult) |
|
|
10723
|
-
| [
|
|
10724
|
-
| [
|
|
10725
|
-
| [
|
|
10726
|
-
| [
|
|
10727
|
-
| [
|
|
10728
|
-
| [
|
|
10743
|
+
| [asBsvSdkPrivateKey](#function-asbsvsdkprivatekey) | [maxDate](#function-maxdate) | [validateInteger](#function-validateinteger) |
|
|
10744
|
+
| [asBsvSdkPublickKey](#function-asbsvsdkpublickkey) | [offsetPubKey](#function-offsetpubkey) | [validateInternalizeActionArgs](#function-validateinternalizeactionargs) |
|
|
10745
|
+
| [asBsvSdkScript](#function-asbsvsdkscript) | [optionalArraysEqual](#function-optionalarraysequal) | [validateInternalizeOutput](#function-validateinternalizeoutput) |
|
|
10746
|
+
| [asBsvSdkTx](#function-asbsvsdktx) | [parseTxScriptOffsets](#function-parsetxscriptoffsets) | [validateListActionsArgs](#function-validatelistactionsargs) |
|
|
10747
|
+
| [asBuffer](#function-asbuffer) | [parseWalletOutpoint](#function-parsewalletoutpoint) | [validateListCertificatesArgs](#function-validatelistcertificatesargs) |
|
|
10748
|
+
| [asString](#function-asstring) | [processAction](#function-processaction) | [validateListOutputsArgs](#function-validatelistoutputsargs) |
|
|
10729
10749
|
| [asString](#function-asstring) | [processAction](#function-processaction) | [validateOptionalInteger](#function-validateoptionalinteger) |
|
|
10730
|
-
| [
|
|
10731
|
-
| [
|
|
10732
|
-
| [
|
|
10750
|
+
| [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [proveCertificate](#function-provecertificate) | [validateOptionalOutpointString](#function-validateoptionaloutpointstring) |
|
|
10751
|
+
| [buildSignableTransaction](#function-buildsignabletransaction) | [purgeData](#function-purgedata) | [validateOriginator](#function-validateoriginator) |
|
|
10752
|
+
| [completeSignedTransaction](#function-completesignedtransaction) | [randomBytes](#function-randombytes) | [validateOutpointString](#function-validateoutpointstring) |
|
|
10733
10753
|
| [completeSignedTransaction](#function-completesignedtransaction) | [randomBytesBase64](#function-randombytesbase64) | [validatePositiveIntegerOrZero](#function-validatepositiveintegerorzero) |
|
|
10734
|
-
| [
|
|
10735
|
-
| [
|
|
10754
|
+
| [convertProofToMerklePath](#function-convertprooftomerklepath) | [randomBytesHex](#function-randombyteshex) | [validateProveCertificateArgs](#function-validateprovecertificateargs) |
|
|
10755
|
+
| [createAction](#function-createaction) | [reviewStatus](#function-reviewstatus) | [validateRelinquishCertificateArgs](#function-validaterelinquishcertificateargs) |
|
|
10736
10756
|
| [createAction](#function-createaction) | [sha256Hash](#function-sha256hash) | [validateRelinquishOutputArgs](#function-validaterelinquishoutputargs) |
|
|
10737
|
-
| [
|
|
10738
|
-
| [
|
|
10739
|
-
| [
|
|
10740
|
-
| [
|
|
10741
|
-
| [
|
|
10742
|
-
| [
|
|
10743
|
-
| [
|
|
10744
|
-
| [
|
|
10745
|
-
| [
|
|
10746
|
-
| [
|
|
10747
|
-
| [
|
|
10757
|
+
| [createDefaultWalletServicesOptions](#function-createdefaultwalletservicesoptions) | [signAction](#function-signaction) | [validateSatoshis](#function-validatesatoshis) |
|
|
10758
|
+
| [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [stampLog](#function-stamplog) | [validateScriptHash](#function-validatescripthash) |
|
|
10759
|
+
| [createSyncMap](#function-createsyncmap) | [stampLogFormat](#function-stamplogformat) | [validateSecondsSinceEpoch](#function-validatesecondssinceepoch) |
|
|
10760
|
+
| [doubleSha256BE](#function-doublesha256be) | [toBinaryBaseBlockHeader](#function-tobinarybaseblockheader) | [validateSignActionArgs](#function-validatesignactionargs) |
|
|
10761
|
+
| [doubleSha256HashLE](#function-doublesha256hashle) | [toWalletNetwork](#function-towalletnetwork) | [validateSignActionOptions](#function-validatesignactionoptions) |
|
|
10762
|
+
| [generateChangeSdk](#function-generatechangesdk) | [transactionInputSize](#function-transactioninputsize) | [validateStorageFeeModel](#function-validatestoragefeemodel) |
|
|
10763
|
+
| [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [transactionOutputSize](#function-transactionoutputsize) | [validateStringLength](#function-validatestringlength) |
|
|
10764
|
+
| [getBeefForTransaction](#function-getbeeffortransaction) | [transactionSize](#function-transactionsize) | [validateWalletPayment](#function-validatewalletpayment) |
|
|
10765
|
+
| [getExchangeRatesIo](#function-getexchangeratesio) | [updateChaintracksFiatExchangeRates](#function-updatechaintracksfiatexchangerates) | [varUintSize](#function-varuintsize) |
|
|
10766
|
+
| [getIdentityKey](#function-getidentitykey) | [updateExchangeratesapi](#function-updateexchangeratesapi) | [verifyHexString](#function-verifyhexstring) |
|
|
10767
|
+
| [getProofs](#function-getproofs) | [validateAbortActionArgs](#function-validateabortactionargs) | [verifyId](#function-verifyid) |
|
|
10748
10768
|
| [getSyncChunk](#function-getsyncchunk) | [validateAcquireCertificateArgs](#function-validateacquirecertificateargs) | [verifyInteger](#function-verifyinteger) |
|
|
10749
10769
|
| [internalizeAction](#function-internalizeaction) | [validateAcquireDirectCertificateArgs](#function-validateacquiredirectcertificateargs) | [verifyNumber](#function-verifynumber) |
|
|
10750
10770
|
| [internalizeAction](#function-internalizeaction) | [validateAcquireIssuanceCertificateArgs](#function-validateacquireissuancecertificateargs) | [verifyOne](#function-verifyone) |
|
|
@@ -10752,7 +10772,6 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
10752
10772
|
| [isSpecOp](#function-isspecop) | [validateCreateActionArgs](#function-validatecreateactionargs) | [verifyOptionalHexString](#function-verifyoptionalhexstring) |
|
|
10753
10773
|
| [listActions](#function-listactions) | [validateCreateActionInput](#function-validatecreateactioninput) | [verifyTruthy](#function-verifytruthy) |
|
|
10754
10774
|
| [listCertificates](#function-listcertificates) | [validateCreateActionOptions](#function-validatecreateactionoptions) | [wait](#function-wait) |
|
|
10755
|
-
| [listOutputs](#function-listoutputs) | [validateCreateActionOutput](#function-validatecreateactionoutput) | |
|
|
10756
10775
|
|
|
10757
10776
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
10758
10777
|
|
|
@@ -11209,6 +11228,36 @@ See also: [CertOpsWallet](./client.md#interface-certopswallet)
|
|
|
11209
11228
|
|
|
11210
11229
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
11211
11230
|
|
|
11231
|
+
---
|
|
11232
|
+
##### Function: getProofs
|
|
11233
|
+
|
|
11234
|
+
Process an array of table.ProvenTxReq (typically with status 'unmined' or 'unknown')
|
|
11235
|
+
|
|
11236
|
+
If req is invalid, set status 'invalid'
|
|
11237
|
+
|
|
11238
|
+
Verify the requests are valid, lookup proofs or updated transaction status using the array of getProofServices,
|
|
11239
|
+
|
|
11240
|
+
When proofs are found, create new ProvenTxApi records and transition the requests' status to 'unconfirmed' or 'notifying',
|
|
11241
|
+
depending on chaintracks succeeding on proof verification.
|
|
11242
|
+
|
|
11243
|
+
Increments attempts if proofs where requested.
|
|
11244
|
+
|
|
11245
|
+
```ts
|
|
11246
|
+
export async function getProofs(task: WalletMonitorTask, reqs: TableProvenTxReq[], indent = 0, countsAsAttempt = false, ignoreStatus = false): Promise<{
|
|
11247
|
+
proven: TableProvenTxReq[];
|
|
11248
|
+
invalid: TableProvenTxReq[];
|
|
11249
|
+
log: string;
|
|
11250
|
+
}>
|
|
11251
|
+
```
|
|
11252
|
+
|
|
11253
|
+
See also: [TableProvenTxReq](./storage.md#interface-tableproventxreq), [WalletMonitorTask](./monitor.md#class-walletmonitortask)
|
|
11254
|
+
|
|
11255
|
+
Returns
|
|
11256
|
+
|
|
11257
|
+
reqs partitioned by status
|
|
11258
|
+
|
|
11259
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
11260
|
+
|
|
11212
11261
|
---
|
|
11213
11262
|
##### Function: getSyncChunk
|
|
11214
11263
|
|
package/docs/monitor.md
CHANGED
|
@@ -119,20 +119,15 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
119
119
|
---
|
|
120
120
|
#### Classes
|
|
121
121
|
|
|
122
|
-
| |
|
|
123
|
-
| --- |
|
|
124
|
-
| [Monitor](#class-monitor) |
|
|
125
|
-
| [MonitorDaemon](#class-monitordaemon) |
|
|
126
|
-
| [TaskCheckForProofs](#class-taskcheckforproofs) |
|
|
127
|
-
| [
|
|
128
|
-
| [
|
|
129
|
-
| [
|
|
130
|
-
| [
|
|
131
|
-
| [TaskReviewStatus](#class-taskreviewstatus) |
|
|
132
|
-
| [TaskSendWaiting](#class-tasksendwaiting) |
|
|
133
|
-
| [TaskSyncWhenIdle](#class-tasksyncwhenidle) |
|
|
134
|
-
| [TaskUnFail](#class-taskunfail) |
|
|
135
|
-
| [WalletMonitorTask](#class-walletmonitortask) |
|
|
122
|
+
| | |
|
|
123
|
+
| --- | --- |
|
|
124
|
+
| [Monitor](#class-monitor) | [TaskPurge](#class-taskpurge) |
|
|
125
|
+
| [MonitorDaemon](#class-monitordaemon) | [TaskReviewStatus](#class-taskreviewstatus) |
|
|
126
|
+
| [TaskCheckForProofs](#class-taskcheckforproofs) | [TaskSendWaiting](#class-tasksendwaiting) |
|
|
127
|
+
| [TaskCheckNoSends](#class-taskchecknosends) | [TaskSyncWhenIdle](#class-tasksyncwhenidle) |
|
|
128
|
+
| [TaskClock](#class-taskclock) | [TaskUnFail](#class-taskunfail) |
|
|
129
|
+
| [TaskFailAbandoned](#class-taskfailabandoned) | [WalletMonitorTask](#class-walletmonitortask) |
|
|
130
|
+
| [TaskNewHeader](#class-tasknewheader) | |
|
|
136
131
|
|
|
137
132
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
138
133
|
|
|
@@ -299,15 +294,10 @@ export class TaskCheckForProofs extends WalletMonitorTask {
|
|
|
299
294
|
run: boolean;
|
|
300
295
|
}
|
|
301
296
|
async runTask(): Promise<string>
|
|
302
|
-
async getProofs(reqs: TableProvenTxReq[], indent = 0, countsAsAttempt = false, ignoreStatus = false): Promise<{
|
|
303
|
-
proven: TableProvenTxReq[];
|
|
304
|
-
invalid: TableProvenTxReq[];
|
|
305
|
-
log: string;
|
|
306
|
-
}>
|
|
307
297
|
}
|
|
308
298
|
```
|
|
309
299
|
|
|
310
|
-
See also: [Monitor](./monitor.md#class-monitor), [
|
|
300
|
+
See also: [Monitor](./monitor.md#class-monitor), [WalletMonitorTask](./monitor.md#class-walletmonitortask)
|
|
311
301
|
|
|
312
302
|
###### Property checkNow
|
|
313
303
|
|
|
@@ -318,31 +308,55 @@ listener can set this true to cause
|
|
|
318
308
|
static checkNow = false
|
|
319
309
|
```
|
|
320
310
|
|
|
321
|
-
###### Method
|
|
311
|
+
###### Method trigger
|
|
322
312
|
|
|
323
|
-
|
|
313
|
+
Normally triggered by checkNow getting set by new block header found event from chaintracks
|
|
324
314
|
|
|
325
|
-
|
|
315
|
+
```ts
|
|
316
|
+
trigger(nowMsecsSinceEpoch: number): {
|
|
317
|
+
run: boolean;
|
|
318
|
+
}
|
|
319
|
+
```
|
|
326
320
|
|
|
327
|
-
|
|
321
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
328
322
|
|
|
329
|
-
|
|
330
|
-
|
|
323
|
+
---
|
|
324
|
+
##### Class: TaskCheckNoSends
|
|
331
325
|
|
|
332
|
-
|
|
326
|
+
`TaskCheckNoSends` is a WalletMonitor task that retreives merkle proofs for
|
|
327
|
+
'nosend' transactions that MAY have been shared externally.
|
|
328
|
+
|
|
329
|
+
Unlike intentionally processed transactions, 'nosend' transactions are fully valid
|
|
330
|
+
transactions which have not been processed by the wallet.
|
|
331
|
+
|
|
332
|
+
By default, this task runs once a day to check if any 'nosend' transaction has
|
|
333
|
+
managed to get mined by some external process.
|
|
334
|
+
|
|
335
|
+
If a proof is obtained and validated, a new ProvenTx record is created and
|
|
336
|
+
the original ProvenTxReq status is advanced to 'notifying'.
|
|
333
337
|
|
|
334
338
|
```ts
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
339
|
+
export class TaskCheckNoSends extends WalletMonitorTask {
|
|
340
|
+
static taskName = "CheckNoSends";
|
|
341
|
+
static checkNow = false;
|
|
342
|
+
constructor(monitor: Monitor, public triggerMsecs = monitor.oneDay * 1)
|
|
343
|
+
trigger(nowMsecsSinceEpoch: number): {
|
|
344
|
+
run: boolean;
|
|
345
|
+
}
|
|
346
|
+
async runTask(): Promise<string>
|
|
347
|
+
}
|
|
340
348
|
```
|
|
341
|
-
See also: [TableProvenTxReq](./storage.md#interface-tableproventxreq)
|
|
342
349
|
|
|
343
|
-
|
|
350
|
+
See also: [Monitor](./monitor.md#class-monitor), [WalletMonitorTask](./monitor.md#class-walletmonitortask)
|
|
344
351
|
|
|
345
|
-
|
|
352
|
+
###### Property checkNow
|
|
353
|
+
|
|
354
|
+
An external service such as the chaintracks new block header
|
|
355
|
+
listener can set this true to cause
|
|
356
|
+
|
|
357
|
+
```ts
|
|
358
|
+
static checkNow = false
|
|
359
|
+
```
|
|
346
360
|
|
|
347
361
|
###### Method trigger
|
|
348
362
|
|
|
@@ -657,6 +671,36 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
657
671
|
---
|
|
658
672
|
#### Functions
|
|
659
673
|
|
|
674
|
+
##### Function: getProofs
|
|
675
|
+
|
|
676
|
+
Process an array of table.ProvenTxReq (typically with status 'unmined' or 'unknown')
|
|
677
|
+
|
|
678
|
+
If req is invalid, set status 'invalid'
|
|
679
|
+
|
|
680
|
+
Verify the requests are valid, lookup proofs or updated transaction status using the array of getProofServices,
|
|
681
|
+
|
|
682
|
+
When proofs are found, create new ProvenTxApi records and transition the requests' status to 'unconfirmed' or 'notifying',
|
|
683
|
+
depending on chaintracks succeeding on proof verification.
|
|
684
|
+
|
|
685
|
+
Increments attempts if proofs where requested.
|
|
686
|
+
|
|
687
|
+
```ts
|
|
688
|
+
export async function getProofs(task: WalletMonitorTask, reqs: TableProvenTxReq[], indent = 0, countsAsAttempt = false, ignoreStatus = false): Promise<{
|
|
689
|
+
proven: TableProvenTxReq[];
|
|
690
|
+
invalid: TableProvenTxReq[];
|
|
691
|
+
log: string;
|
|
692
|
+
}>
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
See also: [TableProvenTxReq](./storage.md#interface-tableproventxreq), [WalletMonitorTask](./monitor.md#class-walletmonitortask)
|
|
696
|
+
|
|
697
|
+
Returns
|
|
698
|
+
|
|
699
|
+
reqs partitioned by status
|
|
700
|
+
|
|
701
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
702
|
+
|
|
703
|
+
---
|
|
660
704
|
#### Types
|
|
661
705
|
|
|
662
706
|
##### Type: MonitorStorage
|