@bsv/wallet-toolbox 2.1.26 → 2.1.28
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/CHANGELOG.md +17 -0
- package/README.md +8 -17
- package/docs/client.md +441 -181
- package/docs/monitor.md +69 -1
- package/docs/storage.md +107 -31
- package/docs/wallet.md +379 -142
- package/out/src/Wallet.d.ts +46 -2
- package/out/src/Wallet.d.ts.map +1 -1
- package/out/src/Wallet.js +65 -4
- package/out/src/Wallet.js.map +1 -1
- package/out/src/monitor/Monitor.d.ts.map +1 -1
- package/out/src/monitor/Monitor.js +12 -0
- package/out/src/monitor/Monitor.js.map +1 -1
- package/out/src/monitor/tasks/TaskCheckNoSends.d.ts +59 -1
- package/out/src/monitor/tasks/TaskCheckNoSends.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskCheckNoSends.js +93 -4
- package/out/src/monitor/tasks/TaskCheckNoSends.js.map +1 -1
- package/out/src/services/__tests/getFiatExchangeRate.test.js +25 -0
- package/out/src/services/__tests/getFiatExchangeRate.test.js.map +1 -1
- package/out/src/services/__tests/getMerklePath.test.js +8 -0
- package/out/src/services/__tests/getMerklePath.test.js.map +1 -1
- package/out/src/services/__tests/verifyBeef.test.js +37 -0
- package/out/src/services/__tests/verifyBeef.test.js.map +1 -1
- package/out/src/services/chaintracker/__tests/ChaintracksChainTracker.test.js +36 -0
- package/out/src/services/chaintracker/__tests/ChaintracksChainTracker.test.js.map +1 -1
- package/out/src/services/chaintracker/__tests/ChaintracksServiceClient.test.js +34 -0
- package/out/src/services/chaintracker/__tests/ChaintracksServiceClient.test.js.map +1 -1
- package/out/src/signer/methods/internalizeAction.d.ts +8 -1
- package/out/src/signer/methods/internalizeAction.d.ts.map +1 -1
- package/out/src/signer/methods/internalizeAction.js +8 -1
- package/out/src/signer/methods/internalizeAction.js.map +1 -1
- package/out/src/storage/StorageProvider.d.ts.map +1 -1
- package/out/src/storage/StorageProvider.js +80 -2
- package/out/src/storage/StorageProvider.js.map +1 -1
- package/out/src/storage/methods/ListActionsSpecOp.d.ts.map +1 -1
- package/out/src/storage/methods/ListActionsSpecOp.js +68 -5
- package/out/src/storage/methods/ListActionsSpecOp.js.map +1 -1
- package/out/src/storage/methods/createAction.js +27 -13
- package/out/src/storage/methods/createAction.js.map +1 -1
- package/out/src/storage/methods/internalizeAction.d.ts +69 -2
- package/out/src/storage/methods/internalizeAction.d.ts.map +1 -1
- package/out/src/storage/methods/internalizeAction.js +206 -26
- package/out/src/storage/methods/internalizeAction.js.map +1 -1
- package/out/src/storage/portable/index.d.ts.map +1 -1
- package/out/src/storage/portable/index.js +160 -114
- package/out/src/storage/portable/index.js.map +1 -1
- package/out/src/utility/identityUtils.d.ts +12 -6
- package/out/src/utility/identityUtils.d.ts.map +1 -1
- package/out/src/utility/identityUtils.js +78 -30
- package/out/src/utility/identityUtils.js.map +1 -1
- package/package.json +6 -6
package/docs/wallet.md
CHANGED
|
@@ -6,72 +6,73 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6
6
|
|
|
7
7
|
| | | |
|
|
8
8
|
| --- | --- | --- |
|
|
9
|
-
| [AdminStatsResult](#interface-adminstatsresult) | [
|
|
10
|
-
| [AggregatePostBeefTxResult](#interface-aggregatepostbeeftxresult) | [
|
|
11
|
-
| [ArcConfig](#interface-arcconfig) | [
|
|
12
|
-
| [ArcMinerGetTxData](#interface-arcminergettxdata) | [
|
|
13
|
-
| [ArcSSEClientOptions](#interface-arcsseclientoptions) | [
|
|
14
|
-
| [ArcSSEEvent](#interface-arcsseevent) | [
|
|
15
|
-
| [AuthId](#interface-authid) | [
|
|
16
|
-
| [BaseBlockHeader](#interface-baseblockheader) | [
|
|
17
|
-
| [BitailsConfig](#interface-bitailsconfig) | [
|
|
18
|
-
| [BitailsMerkleProof](#interface-bitailsmerkleproof) | [
|
|
19
|
-
| [BlockHeader](#interface-blockheader) | [
|
|
20
|
-
| [BsvExchangeRate](#interface-bsvexchangerate) | [
|
|
21
|
-
| [BulkFileDataManagerMergeResult](#interface-bulkfiledatamanagermergeresult) | [
|
|
22
|
-
| [BulkFileDataManagerOptions](#interface-bulkfiledatamanageroptions) | [
|
|
23
|
-
| [BulkHeaderFileInfo](#interface-bulkheaderfileinfo) | [
|
|
24
|
-
| [BulkHeaderFilesInfo](#interface-bulkheaderfilesinfo) | [
|
|
25
|
-
| [BulkIngestorApi](#interface-bulkingestorapi) | [
|
|
26
|
-
| [BulkIngestorBaseOptions](#interface-bulkingestorbaseoptions) | [
|
|
27
|
-
| [BulkSyncResult](#interface-bulksyncresult) | [
|
|
28
|
-
| [CertOpsWallet](#interface-certopswallet) | [
|
|
29
|
-
| [Certifier](#interface-certifier) | [
|
|
30
|
-
| [ChaintracksApi](#interface-chaintracksapi) | [
|
|
31
|
-
| [ChaintracksAppendableFileApi](#interface-chaintracksappendablefileapi) | [
|
|
32
|
-
| [ChaintracksChainTrackerOptions](#interface-chaintrackschaintrackeroptions) | [
|
|
33
|
-
| [ChaintracksClientApi](#interface-chaintracksclientapi) | [
|
|
34
|
-
| [ChaintracksFetchApi](#interface-chaintracksfetchapi) | [
|
|
35
|
-
| [ChaintracksFsApi](#interface-chaintracksfsapi) | [
|
|
36
|
-
| [ChaintracksInfoApi](#interface-chaintracksinfoapi) | [
|
|
37
|
-
| [ChaintracksManagementApi](#interface-chaintracksmanagementapi) | [
|
|
38
|
-
| [ChaintracksOptions](#interface-chaintracksoptions) | [
|
|
39
|
-
| [ChaintracksPackageInfoApi](#interface-chaintrackspackageinfoapi) | [
|
|
40
|
-
| [ChaintracksReadableFileApi](#interface-chaintracksreadablefileapi) | [
|
|
41
|
-
| [ChaintracksServiceClientOptions](#interface-chaintracksserviceclientoptions) | [
|
|
42
|
-
| [ChaintracksStorageApi](#interface-chaintracksstorageapi) | [
|
|
43
|
-
| [ChaintracksStorageBaseOptions](#interface-chaintracksstoragebaseoptions) | [
|
|
44
|
-
| [ChaintracksStorageBulkFileApi](#interface-chaintracksstoragebulkfileapi) | [
|
|
45
|
-
| [ChaintracksStorageIngestApi](#interface-chaintracksstorageingestapi) | [
|
|
46
|
-
| [ChaintracksStorageQueryApi](#interface-chaintracksstoragequeryapi) | [
|
|
47
|
-
| [ChaintracksWritableFileApi](#interface-chaintrackswritablefileapi) | [
|
|
48
|
-
| [CommitNewTxResults](#interface-commitnewtxresults) | [
|
|
49
|
-
| [
|
|
50
|
-
| [
|
|
51
|
-
| [
|
|
52
|
-
| [
|
|
53
|
-
| [
|
|
54
|
-
| [
|
|
55
|
-
| [
|
|
56
|
-
| [
|
|
57
|
-
| [
|
|
58
|
-
| [
|
|
59
|
-
| [
|
|
60
|
-
| [
|
|
61
|
-
| [
|
|
62
|
-
| [
|
|
63
|
-
| [
|
|
64
|
-
| [
|
|
65
|
-
| [
|
|
66
|
-
| [
|
|
67
|
-
| [
|
|
68
|
-
| [
|
|
69
|
-
| [
|
|
70
|
-
| [
|
|
71
|
-
| [
|
|
72
|
-
| [
|
|
9
|
+
| [AdminStatsResult](#interface-adminstatsresult) | [FindUsersArgs](#interface-findusersargs) | [StorageAdminStats](#interface-storageadminstats) |
|
|
10
|
+
| [AggregatePostBeefTxResult](#interface-aggregatepostbeeftxresult) | [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [StorageCreateActionResult](#interface-storagecreateactionresult) |
|
|
11
|
+
| [ArcConfig](#interface-arcconfig) | [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [StorageCreateTransactionSdkInput](#interface-storagecreatetransactionsdkinput) |
|
|
12
|
+
| [ArcMinerGetTxData](#interface-arcminergettxdata) | [GenerateChangeSdkInput](#interface-generatechangesdkinput) | [StorageCreateTransactionSdkOutput](#interface-storagecreatetransactionsdkoutput) |
|
|
13
|
+
| [ArcSSEClientOptions](#interface-arcsseclientoptions) | [GenerateChangeSdkOutput](#interface-generatechangesdkoutput) | [StorageFeeModel](#interface-storagefeemodel) |
|
|
14
|
+
| [ArcSSEEvent](#interface-arcsseevent) | [GenerateChangeSdkParams](#interface-generatechangesdkparams) | [StorageGetBeefOptions](#interface-storagegetbeefoptions) |
|
|
15
|
+
| [AuthId](#interface-authid) | [GenerateChangeSdkResult](#interface-generatechangesdkresult) | [StorageIdentity](#interface-storageidentity) |
|
|
16
|
+
| [BaseBlockHeader](#interface-baseblockheader) | [GenerateChangeSdkStorageChange](#interface-generatechangesdkstoragechange) | [StorageInternalizeActionResult](#interface-storageinternalizeactionresult) |
|
|
17
|
+
| [BitailsConfig](#interface-bitailsconfig) | [GetMerklePathResult](#interface-getmerklepathresult) | [StorageProcessActionArgs](#interface-storageprocessactionargs) |
|
|
18
|
+
| [BitailsMerkleProof](#interface-bitailsmerkleproof) | [GetRawTxResult](#interface-getrawtxresult) | [StorageProcessActionResults](#interface-storageprocessactionresults) |
|
|
19
|
+
| [BlockHeader](#interface-blockheader) | [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail) | [StorageProvenOrReq](#interface-storageprovenorreq) |
|
|
20
|
+
| [BsvExchangeRate](#interface-bsvexchangerate) | [GetReqsAndBeefResult](#interface-getreqsandbeefresult) | [StorageProviderOptions](#interface-storageprovideroptions) |
|
|
21
|
+
| [BulkFileDataManagerMergeResult](#interface-bulkfiledatamanagermergeresult) | [GetScriptHashHistory](#interface-getscripthashhistory) | [StorageReaderOptions](#interface-storagereaderoptions) |
|
|
22
|
+
| [BulkFileDataManagerOptions](#interface-bulkfiledatamanageroptions) | [GetScriptHashHistoryResult](#interface-getscripthashhistoryresult) | [StorageReaderWriterOptions](#interface-storagereaderwriteroptions) |
|
|
23
|
+
| [BulkHeaderFileInfo](#interface-bulkheaderfileinfo) | [GetStatusForTxidsResult](#interface-getstatusfortxidsresult) | [StorageSyncReaderOptions](#interface-storagesyncreaderoptions) |
|
|
24
|
+
| [BulkHeaderFilesInfo](#interface-bulkheaderfilesinfo) | [GetUtxoStatusDetails](#interface-getutxostatusdetails) | [SyncChunk](#interface-syncchunk) |
|
|
25
|
+
| [BulkIngestorApi](#interface-bulkingestorapi) | [GetUtxoStatusResult](#interface-getutxostatusresult) | [SyncError](#interface-syncerror) |
|
|
26
|
+
| [BulkIngestorBaseOptions](#interface-bulkingestorbaseoptions) | [HeightRangeApi](#interface-heightrangeapi) | [SyncMap](#interface-syncmap) |
|
|
27
|
+
| [BulkSyncResult](#interface-bulksyncresult) | [HeightRanges](#interface-heightranges) | [TableCertificate](#interface-tablecertificate) |
|
|
28
|
+
| [CertOpsWallet](#interface-certopswallet) | [KeyPair](#interface-keypair) | [TableCertificateField](#interface-tablecertificatefield) |
|
|
29
|
+
| [Certifier](#interface-certifier) | [LiveBlockHeader](#interface-liveblockheader) | [TableCertificateX](#interface-tablecertificatex) |
|
|
30
|
+
| [ChaintracksApi](#interface-chaintracksapi) | [LiveIngestorApi](#interface-liveingestorapi) | [TableCommission](#interface-tablecommission) |
|
|
31
|
+
| [ChaintracksAppendableFileApi](#interface-chaintracksappendablefileapi) | [MerklePathNote](#interface-merklepathnote) | [TableMonitorEvent](#interface-tablemonitorevent) |
|
|
32
|
+
| [ChaintracksChainTrackerOptions](#interface-chaintrackschaintrackeroptions) | [MockChainBlockHeaderRow](#interface-mockchainblockheaderrow) | [TableOutput](#interface-tableoutput) |
|
|
33
|
+
| [ChaintracksClientApi](#interface-chaintracksclientapi) | [MockChainTransactionRow](#interface-mockchaintransactionrow) | [TableOutputBasket](#interface-tableoutputbasket) |
|
|
34
|
+
| [ChaintracksFetchApi](#interface-chaintracksfetchapi) | [MockChainUtxoRow](#interface-mockchainutxorow) | [TableOutputTag](#interface-tableoutputtag) |
|
|
35
|
+
| [ChaintracksFsApi](#interface-chaintracksfsapi) | [MonitorOptions](#interface-monitoroptions) | [TableOutputTagMap](#interface-tableoutputtagmap) |
|
|
36
|
+
| [ChaintracksInfoApi](#interface-chaintracksinfoapi) | [OutPoint](#interface-outpoint) | [TableOutputX](#interface-tableoutputx) |
|
|
37
|
+
| [ChaintracksManagementApi](#interface-chaintracksmanagementapi) | [Paged](#interface-paged) | [TableProvenTx](#interface-tableproventx) |
|
|
38
|
+
| [ChaintracksOptions](#interface-chaintracksoptions) | [PendingSignAction](#interface-pendingsignaction) | [TableProvenTxReq](#interface-tableproventxreq) |
|
|
39
|
+
| [ChaintracksPackageInfoApi](#interface-chaintrackspackageinfoapi) | [PendingStorageInput](#interface-pendingstorageinput) | [TableProvenTxReqDynamics](#interface-tableproventxreqdynamics) |
|
|
40
|
+
| [ChaintracksReadableFileApi](#interface-chaintracksreadablefileapi) | [PostBeefResult](#interface-postbeefresult) | [TableSettings](#interface-tablesettings) |
|
|
41
|
+
| [ChaintracksServiceClientOptions](#interface-chaintracksserviceclientoptions) | [PostBeefResultForTxidApi](#interface-postbeefresultfortxidapi) | [TableSyncState](#interface-tablesyncstate) |
|
|
42
|
+
| [ChaintracksStorageApi](#interface-chaintracksstorageapi) | [PostReqsToNetworkDetails](#interface-postreqstonetworkdetails) | [TableTransaction](#interface-tabletransaction) |
|
|
43
|
+
| [ChaintracksStorageBaseOptions](#interface-chaintracksstoragebaseoptions) | [PostReqsToNetworkResult](#interface-postreqstonetworkresult) | [TableTxLabel](#interface-tabletxlabel) |
|
|
44
|
+
| [ChaintracksStorageBulkFileApi](#interface-chaintracksstoragebulkfileapi) | [PostTxResultForTxid](#interface-posttxresultfortxid) | [TableTxLabelMap](#interface-tabletxlabelmap) |
|
|
45
|
+
| [ChaintracksStorageIngestApi](#interface-chaintracksstorageingestapi) | [PostTxResultForTxidError](#interface-posttxresultfortxiderror) | [TableUser](#interface-tableuser) |
|
|
46
|
+
| [ChaintracksStorageQueryApi](#interface-chaintracksstoragequeryapi) | [PostTxsResult](#interface-posttxsresult) | [TaskPurgeParams](#interface-taskpurgeparams) |
|
|
47
|
+
| [ChaintracksWritableFileApi](#interface-chaintrackswritablefileapi) | [ProcessSyncChunkResult](#interface-processsyncchunkresult) | [TrustSettings](#interface-trustsettings) |
|
|
48
|
+
| [CommitNewTxResults](#interface-commitnewtxresults) | [ProvenOrRawTx](#interface-provenorrawtx) | [TrxToken](#interface-trxtoken) |
|
|
49
|
+
| [ContactRecord](#interface-contactrecord) | [ProvenTransactionStatus](#interface-proventransactionstatus) | [TscMerkleProofApi](#interface-tscmerkleproofapi) |
|
|
50
|
+
| [ContactSource](#interface-contactsource) | [ProvenTxFromTxidResult](#interface-proventxfromtxidresult) | [TxScriptOffsets](#interface-txscriptoffsets) |
|
|
51
|
+
| [CreateActionResultX](#interface-createactionresultx) | [ProvenTxReqHistory](#interface-proventxreqhistory) | [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs) |
|
|
52
|
+
| [DeactivedHeader](#interface-deactivedheader) | [ProvenTxReqHistorySummaryApi](#interface-proventxreqhistorysummaryapi) | [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult) |
|
|
53
|
+
| [EntitySyncMap](#interface-entitysyncmap) | [ProvenTxReqNotify](#interface-proventxreqnotify) | [ValidateGenerateChangeSdkParamsResult](#interface-validategeneratechangesdkparamsresult) |
|
|
54
|
+
| [EntityTimeStamp](#interface-entitytimestamp) | [ProviderCallHistory](#interface-providercallhistory) | [VerifyAndRepairBeefResult](#interface-verifyandrepairbeefresult) |
|
|
55
|
+
| [ExchangeRatesIoApi](#interface-exchangeratesioapi) | [PurgeParams](#interface-purgeparams) | [WalletArgs](#interface-walletargs) |
|
|
56
|
+
| [ExtendedVerifiableCertificate](#interface-extendedverifiablecertificate) | [PurgeResults](#interface-purgeresults) | [WalletBalance](#interface-walletbalance) |
|
|
57
|
+
| [FiatExchangeRates](#interface-fiatexchangerates) | [ReorgResult](#interface-reorgresult) | [WalletLoggerArgs](#interface-walletloggerargs) |
|
|
58
|
+
| [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs) | [ReproveHeaderResult](#interface-reproveheaderresult) | [WalletServices](#interface-walletservices) |
|
|
59
|
+
| [FindCertificatesArgs](#interface-findcertificatesargs) | [ReproveProvenResult](#interface-reproveprovenresult) | [WalletServicesOptions](#interface-walletservicesoptions) |
|
|
60
|
+
| [FindCommissionsArgs](#interface-findcommissionsargs) | [ReqHistoryNote](#interface-reqhistorynote) | [WalletSettings](#interface-walletsettings) |
|
|
61
|
+
| [FindForUserSincePagedArgs](#interface-findforusersincepagedargs) | [RequestSyncChunkArgs](#interface-requestsyncchunkargs) | [WalletSettingsManagerConfig](#interface-walletsettingsmanagerconfig) |
|
|
62
|
+
| [FindMonitorEventsArgs](#interface-findmonitoreventsargs) | [ReviewActionResult](#interface-reviewactionresult) | [WalletSigner](#interface-walletsigner) |
|
|
63
|
+
| [FindOutputBasketsArgs](#interface-findoutputbasketsargs) | [ReviewHeightRangeResult](#interface-reviewheightrangeresult) | [WalletStorage](#interface-walletstorage) |
|
|
64
|
+
| [FindOutputTagMapsArgs](#interface-findoutputtagmapsargs) | [ScriptHashHistoryResponse](#interface-scripthashhistoryresponse) | [WalletStorageInfo](#interface-walletstorageinfo) |
|
|
65
|
+
| [FindOutputTagsArgs](#interface-findoutputtagsargs) | [ScriptTemplateParamsBRC29](#interface-scripttemplateparamsbrc29) | [WalletStorageProvider](#interface-walletstorageprovider) |
|
|
66
|
+
| [FindOutputsArgs](#interface-findoutputsargs) | [ScriptTemplateUnlock](#interface-scripttemplateunlock) | [WalletStorageReader](#interface-walletstoragereader) |
|
|
67
|
+
| [FindPartialSincePagedArgs](#interface-findpartialsincepagedargs) | [ServiceCall](#interface-servicecall) | [WalletStorageSync](#interface-walletstoragesync) |
|
|
68
|
+
| [FindProvenTxReqsArgs](#interface-findproventxreqsargs) | [ServiceCall](#interface-servicecall) | [WalletStorageSyncReader](#interface-walletstoragesyncreader) |
|
|
69
|
+
| [FindProvenTxsArgs](#interface-findproventxsargs) | [ServiceCallHistory](#interface-servicecallhistory) | [WalletStorageWriter](#interface-walletstoragewriter) |
|
|
70
|
+
| [FindSincePagedArgs](#interface-findsincepagedargs) | [ServiceCallHistoryCounts](#interface-servicecallhistorycounts) | [WalletTheme](#interface-wallettheme) |
|
|
71
|
+
| [FindStaleMerkleRootsArgs](#interface-findstalemerklerootsargs) | [ServiceToCall](#interface-servicetocall) | [WocChainInfo](#interface-wocchaininfo) |
|
|
72
|
+
| [FindSyncStatesArgs](#interface-findsyncstatesargs) | [ServicesCallHistory](#interface-servicescallhistory) | [WocHeader](#interface-wocheader) |
|
|
73
|
+
| [FindTransactionsArgs](#interface-findtransactionsargs) | [SignActionResultX](#interface-signactionresultx) | [XValidCreateActionOutput](#interface-xvalidcreateactionoutput) |
|
|
74
|
+
| [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs) | [SpentInputTransition](#interface-spentinputtransition) | |
|
|
73
75
|
| [FindTxLabelsArgs](#interface-findtxlabelsargs) | [StatusForTxidResult](#interface-statusfortxidresult) | |
|
|
74
|
-
| [FindUsersArgs](#interface-findusersargs) | [StorageAdminStats](#interface-storageadminstats) | |
|
|
75
76
|
|
|
76
77
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
77
78
|
|
|
@@ -2047,6 +2048,95 @@ See also: [EntityProvenTxReq](./storage.md#class-entityproventxreq)
|
|
|
2047
2048
|
|
|
2048
2049
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2049
2050
|
|
|
2051
|
+
---
|
|
2052
|
+
##### Interface: ContactRecord
|
|
2053
|
+
|
|
2054
|
+
```ts
|
|
2055
|
+
export interface ContactRecord {
|
|
2056
|
+
identityKey: PubKeyHex;
|
|
2057
|
+
type?: string;
|
|
2058
|
+
decryptedFields?: Record<string, string>;
|
|
2059
|
+
certifierInfo?: {
|
|
2060
|
+
name?: string;
|
|
2061
|
+
iconUrl?: string;
|
|
2062
|
+
description?: string;
|
|
2063
|
+
trust?: number;
|
|
2064
|
+
};
|
|
2065
|
+
}
|
|
2066
|
+
```
|
|
2067
|
+
|
|
2068
|
+
###### Property certifierInfo
|
|
2069
|
+
|
|
2070
|
+
Optional certifier metadata; missing trust defaults to `Infinity` (contacts override overlay trust).
|
|
2071
|
+
|
|
2072
|
+
```ts
|
|
2073
|
+
certifierInfo?: {
|
|
2074
|
+
name?: string;
|
|
2075
|
+
iconUrl?: string;
|
|
2076
|
+
description?: string;
|
|
2077
|
+
trust?: number;
|
|
2078
|
+
}
|
|
2079
|
+
```
|
|
2080
|
+
|
|
2081
|
+
###### Property decryptedFields
|
|
2082
|
+
|
|
2083
|
+
Optional decrypted fields. Whatever the app stored when saving the contact.
|
|
2084
|
+
|
|
2085
|
+
```ts
|
|
2086
|
+
decryptedFields?: Record<string, string>
|
|
2087
|
+
```
|
|
2088
|
+
|
|
2089
|
+
###### Property type
|
|
2090
|
+
|
|
2091
|
+
Optional certificate type (e.g. xCert / discordCert) so callers can render a badge.
|
|
2092
|
+
|
|
2093
|
+
```ts
|
|
2094
|
+
type?: string
|
|
2095
|
+
```
|
|
2096
|
+
|
|
2097
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2098
|
+
|
|
2099
|
+
---
|
|
2100
|
+
##### Interface: ContactSource
|
|
2101
|
+
|
|
2102
|
+
The preferred means of constructing a `Wallet` is with a `WalletArgs` instance.
|
|
2103
|
+
|
|
2104
|
+
Minimal interface the wallet uses to short-circuit identity discovery against the user's local
|
|
2105
|
+
contacts before hitting the overlay. The result shape matches what `discoverByIdentityKey` /
|
|
2106
|
+
`discoverByAttributes` return so callers don't have to special-case contact-sourced records.
|
|
2107
|
+
|
|
2108
|
+
Implementations typically wrap `@bsv/sdk` `ContactsManager` or another on-device source. Reads
|
|
2109
|
+
are expected to be very fast (single-digit ms against local SQLite is typical).
|
|
2110
|
+
|
|
2111
|
+
```ts
|
|
2112
|
+
export interface ContactSource {
|
|
2113
|
+
findByIdentityKey: (identityKey: PubKeyHex) => Promise<ContactRecord | null | undefined>;
|
|
2114
|
+
findByAttributes?: (attributes: Record<string, string> | string[]) => Promise<ContactRecord[]>;
|
|
2115
|
+
}
|
|
2116
|
+
```
|
|
2117
|
+
|
|
2118
|
+
See also: [ContactRecord](./client.md#interface-contactrecord)
|
|
2119
|
+
|
|
2120
|
+
###### Property findByAttributes
|
|
2121
|
+
|
|
2122
|
+
Look up contacts matching a set of attributes. May be a no-op if attribute search is unsupported.
|
|
2123
|
+
|
|
2124
|
+
```ts
|
|
2125
|
+
findByAttributes?: (attributes: Record<string, string> | string[]) => Promise<ContactRecord[]>
|
|
2126
|
+
```
|
|
2127
|
+
See also: [ContactRecord](./client.md#interface-contactrecord)
|
|
2128
|
+
|
|
2129
|
+
###### Property findByIdentityKey
|
|
2130
|
+
|
|
2131
|
+
Look up a contact by identity key. Return `null` (or undefined) if unknown.
|
|
2132
|
+
|
|
2133
|
+
```ts
|
|
2134
|
+
findByIdentityKey: (identityKey: PubKeyHex) => Promise<ContactRecord | null | undefined>
|
|
2135
|
+
```
|
|
2136
|
+
See also: [ContactRecord](./client.md#interface-contactrecord)
|
|
2137
|
+
|
|
2138
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2139
|
+
|
|
2050
2140
|
---
|
|
2051
2141
|
##### Interface: CreateActionResultX
|
|
2052
2142
|
|
|
@@ -4380,6 +4470,26 @@ See also: [ReviewActionResult](./client.md#interface-reviewactionresult)
|
|
|
4380
4470
|
|
|
4381
4471
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4382
4472
|
|
|
4473
|
+
---
|
|
4474
|
+
##### Interface: SpentInputTransition
|
|
4475
|
+
|
|
4476
|
+
```ts
|
|
4477
|
+
export interface SpentInputTransition {
|
|
4478
|
+
outputId: number;
|
|
4479
|
+
setSpentBy: boolean;
|
|
4480
|
+
}
|
|
4481
|
+
```
|
|
4482
|
+
|
|
4483
|
+
###### Property setSpentBy
|
|
4484
|
+
|
|
4485
|
+
true if the call set spentBy; false if only spendable was flipped.
|
|
4486
|
+
|
|
4487
|
+
```ts
|
|
4488
|
+
setSpentBy: boolean
|
|
4489
|
+
```
|
|
4490
|
+
|
|
4491
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4492
|
+
|
|
4383
4493
|
---
|
|
4384
4494
|
##### Interface: StatusForTxidResult
|
|
4385
4495
|
|
|
@@ -5712,8 +5822,6 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
5712
5822
|
---
|
|
5713
5823
|
##### Interface: WalletArgs
|
|
5714
5824
|
|
|
5715
|
-
The preferred means of constructing a `Wallet` is with a `WalletArgs` instance.
|
|
5716
|
-
|
|
5717
5825
|
```ts
|
|
5718
5826
|
export interface WalletArgs {
|
|
5719
5827
|
chain: Chain;
|
|
@@ -5724,11 +5832,24 @@ export interface WalletArgs {
|
|
|
5724
5832
|
privilegedKeyManager?: PrivilegedKeyManager;
|
|
5725
5833
|
settingsManager?: WalletSettingsManager;
|
|
5726
5834
|
lookupResolver?: LookupResolver;
|
|
5835
|
+
contactSource?: ContactSource;
|
|
5727
5836
|
makeLogger?: MakeWalletLogger;
|
|
5728
5837
|
}
|
|
5729
5838
|
```
|
|
5730
5839
|
|
|
5731
|
-
See also: [Chain](./client.md#type-chain), [Monitor](./monitor.md#class-monitor), [PrivilegedKeyManager](./client.md#class-privilegedkeymanager), [WalletServices](./client.md#interface-walletservices), [WalletSettingsManager](./client.md#class-walletsettingsmanager), [WalletStorageManager](./storage.md#class-walletstoragemanager)
|
|
5840
|
+
See also: [Chain](./client.md#type-chain), [ContactSource](./client.md#interface-contactsource), [Monitor](./monitor.md#class-monitor), [PrivilegedKeyManager](./client.md#class-privilegedkeymanager), [WalletServices](./client.md#interface-walletservices), [WalletSettingsManager](./client.md#class-walletsettingsmanager), [WalletStorageManager](./storage.md#class-walletstoragemanager)
|
|
5841
|
+
|
|
5842
|
+
###### Property contactSource
|
|
5843
|
+
|
|
5844
|
+
Optional contact source consulted before the overlay in `discoverByIdentityKey` /
|
|
5845
|
+
`discoverByAttributes`. When a contact matches, the overlay call is skipped entirely.
|
|
5846
|
+
Pass `forceRefresh: true` on the discover args to bypass both contacts and the overlay
|
|
5847
|
+
cache.
|
|
5848
|
+
|
|
5849
|
+
```ts
|
|
5850
|
+
contactSource?: ContactSource
|
|
5851
|
+
```
|
|
5852
|
+
See also: [ContactSource](./client.md#interface-contactsource)
|
|
5732
5853
|
|
|
5733
5854
|
###### Property makeLogger
|
|
5734
5855
|
|
|
@@ -9521,7 +9642,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
9521
9642
|
---
|
|
9522
9643
|
##### Class: TaskCheckNoSends
|
|
9523
9644
|
|
|
9524
|
-
`TaskCheckNoSends` is a WalletMonitor task that
|
|
9645
|
+
`TaskCheckNoSends` is a WalletMonitor task that retrieves merkle proofs for
|
|
9525
9646
|
'nosend' transactions that MAY have been shared externally.
|
|
9526
9647
|
|
|
9527
9648
|
Unlike intentionally processed transactions, 'nosend' transactions are fully valid
|
|
@@ -9533,10 +9654,54 @@ managed to get mined by some external process.
|
|
|
9533
9654
|
If a proof is obtained and validated, a new ProvenTx record is created and
|
|
9534
9655
|
the original ProvenTxReq status is advanced to 'notifying'.
|
|
9535
9656
|
|
|
9657
|
+
# Aging schedule on the checkNow path
|
|
9658
|
+
|
|
9659
|
+
When this task is triggered by a new block header (`checkNow = true`, wired in
|
|
9660
|
+
`Monitor.processNewBlockHeader`), it does NOT scan every `nosend` row on every
|
|
9661
|
+
block. The set of `nosend` rows can grow large over a wallet's lifetime
|
|
9662
|
+
(txs sitting in escrow, un-aborted tests, abandoned batches), and a fast,
|
|
9663
|
+
unfiltered scan on every block would do an unbounded number of external
|
|
9664
|
+
`getMerklePath` lookups per block.
|
|
9665
|
+
|
|
9666
|
+
Instead, the row's age (now - `created_at`) determines how often it is
|
|
9667
|
+
eligible for a checkNow-triggered chain check. The schedule starts at "skip
|
|
9668
|
+
entirely" for very fresh rows (to protect in-flight batched-tx workflows
|
|
9669
|
+
where chained `createAction({ noSend: true, sendWith: [...] })` builds
|
|
9670
|
+
deliberately keep rows in `nosend` until a single terminator broadcasts the
|
|
9671
|
+
whole BEEF), then progresses to "every block", "hourly", "daily", and
|
|
9672
|
+
"weekly" as rows age:
|
|
9673
|
+
|
|
9674
|
+
age < 5 min → skip (in-flight batch protection)
|
|
9675
|
+
5 min ≤ age < 1 hr → check on every checkNow trigger
|
|
9676
|
+
1 hr ≤ age < 24 hr → check on ~hourly cadence (block-height % 6)
|
|
9677
|
+
24 hr ≤ age < 7 days → check on ~daily cadence (block-height % 144)
|
|
9678
|
+
age ≥ 7 days → check on ~weekly cadence (block-height % 1008)
|
|
9679
|
+
|
|
9680
|
+
Block-height modulo gives a deterministic, stateless way to schedule
|
|
9681
|
+
checks for older rows; no per-row "last checked" persistence is required.
|
|
9682
|
+
Each row's modulo offset is keyed by its `provenTxReqId` so that rows in
|
|
9683
|
+
the same age tier are staggered across the modulo cycle rather than all
|
|
9684
|
+
firing on the same block — `(blockHeight + provenTxReqId) % tierInterval`.
|
|
9685
|
+
For a wallet with N rows in tier T and tier interval K, this gives
|
|
9686
|
+
roughly N/K rows fired per block instead of N rows fired every K blocks.
|
|
9687
|
+
|
|
9688
|
+
The scheduled daily cadence (no `checkNow`) is unaffected — it still scans
|
|
9689
|
+
every row regardless of age. That path is the once-per-day fallback that
|
|
9690
|
+
guarantees externally-broadcast `nosend` txs are eventually recognized
|
|
9691
|
+
even if the aging schedule on the checkNow path defers them.
|
|
9692
|
+
|
|
9536
9693
|
```ts
|
|
9537
9694
|
export class TaskCheckNoSends extends WalletMonitorTask {
|
|
9538
9695
|
static readonly taskName = "CheckNoSends";
|
|
9539
9696
|
static checkNow = false;
|
|
9697
|
+
static readonly tier0FreshSkipMsecs = 5 * 60 * 1000;
|
|
9698
|
+
static readonly tier1EveryBlockMsecs = 60 * 60 * 1000;
|
|
9699
|
+
static readonly tier2HourlyMsecs = 24 * 60 * 60 * 1000;
|
|
9700
|
+
static readonly tier3DailyMsecs = 7 * 24 * 60 * 60 * 1000;
|
|
9701
|
+
static readonly tier2BlockInterval = 6;
|
|
9702
|
+
static readonly tier3BlockInterval = 144;
|
|
9703
|
+
static readonly tier4BlockInterval = 1008;
|
|
9704
|
+
static shouldCheckOnCheckNow(createdAt: Date, nowMs: number, currentBlockHeight: number, provenTxReqId: number): boolean
|
|
9540
9705
|
constructor(monitor: Monitor, public triggerMsecs = Monitor.oneDay * 1)
|
|
9541
9706
|
trigger(nowMsecsSinceEpoch: number): {
|
|
9542
9707
|
run: boolean;
|
|
@@ -9556,6 +9721,30 @@ listener can set this true to cause
|
|
|
9556
9721
|
static checkNow = false
|
|
9557
9722
|
```
|
|
9558
9723
|
|
|
9724
|
+
###### Property tier0FreshSkipMsecs
|
|
9725
|
+
|
|
9726
|
+
Aging-schedule constants for the `checkNow` path. Rows below `tier0FreshSkipMsecs`
|
|
9727
|
+
are never checked via checkNow (batched-tx protection). Rows from tier 0 up
|
|
9728
|
+
to `tier1EveryBlockMsecs` are checked on every checkNow trigger. Beyond that,
|
|
9729
|
+
checks happen on `block-height % tierNBlockInterval === 0` cadences with
|
|
9730
|
+
growing intervals. The scheduled daily cadence (no checkNow) is unaffected.
|
|
9731
|
+
|
|
9732
|
+
```ts
|
|
9733
|
+
static readonly tier0FreshSkipMsecs = 5 * 60 * 1000
|
|
9734
|
+
```
|
|
9735
|
+
|
|
9736
|
+
###### Method shouldCheckOnCheckNow
|
|
9737
|
+
|
|
9738
|
+
Decide whether a single `nosend` row should be chain-checked on the
|
|
9739
|
+
current `checkNow` trigger, based on its age, the current block
|
|
9740
|
+
height, and its `provenTxReqId` (used to stagger same-tier rows
|
|
9741
|
+
across the modulo cycle). See class docstring for the full schedule
|
|
9742
|
+
and staggering rationale.
|
|
9743
|
+
|
|
9744
|
+
```ts
|
|
9745
|
+
static shouldCheckOnCheckNow(createdAt: Date, nowMs: number, currentBlockHeight: number, provenTxReqId: number): boolean
|
|
9746
|
+
```
|
|
9747
|
+
|
|
9559
9748
|
###### Method trigger
|
|
9560
9749
|
|
|
9561
9750
|
Normally triggered by checkNow getting set by new block header found event from chaintracks
|
|
@@ -10317,6 +10506,7 @@ export class Wallet implements WalletInterface, ProtoWallet {
|
|
|
10317
10506
|
lookupResolver: LookupResolver;
|
|
10318
10507
|
services?: WalletServices;
|
|
10319
10508
|
monitor?: Monitor;
|
|
10509
|
+
contactSource?: ContactSource;
|
|
10320
10510
|
identityKey: string;
|
|
10321
10511
|
beef: BeefParty;
|
|
10322
10512
|
includeAllSourceTransactions: boolean = true;
|
|
@@ -10352,8 +10542,12 @@ export class Wallet implements WalletInterface, ProtoWallet {
|
|
|
10352
10542
|
async acquireCertificate(args: AcquireCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<AcquireCertificateResult>
|
|
10353
10543
|
async relinquishCertificate(args: RelinquishCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<RelinquishCertificateResult>
|
|
10354
10544
|
async proveCertificate(args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ProveCertificateResult>
|
|
10355
|
-
async discoverByIdentityKey(args: DiscoverByIdentityKeyArgs
|
|
10356
|
-
|
|
10545
|
+
async discoverByIdentityKey(args: DiscoverByIdentityKeyArgs & {
|
|
10546
|
+
forceRefresh?: boolean;
|
|
10547
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<DiscoverCertificatesResult>
|
|
10548
|
+
async discoverByAttributes(args: DiscoverByAttributesArgs & {
|
|
10549
|
+
forceRefresh?: boolean;
|
|
10550
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<DiscoverCertificatesResult>
|
|
10357
10551
|
verifyReturnedTxidOnly(beef: Beef, knownTxids?: string[]): Beef
|
|
10358
10552
|
verifyReturnedTxidOnlyAtomicBEEF(beef: AtomicBEEF, knownTxids?: string[]): AtomicBEEF
|
|
10359
10553
|
verifyReturnedTxidOnlyBEEF(beef: BEEF): BEEF
|
|
@@ -10382,7 +10576,7 @@ export class Wallet implements WalletInterface, ProtoWallet {
|
|
|
10382
10576
|
}
|
|
10383
10577
|
```
|
|
10384
10578
|
|
|
10385
|
-
See also: [Chain](./client.md#type-chain), [KeyPair](./client.md#interface-keypair), [Monitor](./monitor.md#class-monitor), [PendingSignAction](./client.md#interface-pendingsignaction), [PrivilegedKeyManager](./client.md#class-privilegedkeymanager), [StorageIdentity](./client.md#interface-storageidentity), [WalletArgs](./client.md#interface-walletargs), [WalletBalance](./client.md#interface-walletbalance), [WalletServices](./client.md#interface-walletservices), [WalletSettingsManager](./client.md#class-walletsettingsmanager), [WalletSigner](./client.md#class-walletsigner), [WalletStorageManager](./storage.md#class-walletstoragemanager), [createAction](./storage.md#function-createaction), [getIdentityKey](./client.md#function-getidentitykey), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [logWalletError](./client.md#function-logwalleterror), [logger](./client.md#variable-logger), [proveCertificate](./client.md#function-provecertificate), [signAction](./client.md#function-signaction)
|
|
10579
|
+
See also: [Chain](./client.md#type-chain), [ContactSource](./client.md#interface-contactsource), [KeyPair](./client.md#interface-keypair), [Monitor](./monitor.md#class-monitor), [PendingSignAction](./client.md#interface-pendingsignaction), [PrivilegedKeyManager](./client.md#class-privilegedkeymanager), [StorageIdentity](./client.md#interface-storageidentity), [WalletArgs](./client.md#interface-walletargs), [WalletBalance](./client.md#interface-walletbalance), [WalletServices](./client.md#interface-walletservices), [WalletSettingsManager](./client.md#class-walletsettingsmanager), [WalletSigner](./client.md#class-walletsigner), [WalletStorageManager](./storage.md#class-walletstoragemanager), [createAction](./storage.md#function-createaction), [getIdentityKey](./client.md#function-getidentitykey), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [logWalletError](./client.md#function-logwalleterror), [logger](./client.md#variable-logger), [proveCertificate](./client.md#function-provecertificate), [signAction](./client.md#function-signaction)
|
|
10386
10580
|
|
|
10387
10581
|
###### Property autoKnownTxids
|
|
10388
10582
|
|
|
@@ -11217,54 +11411,55 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
11217
11411
|
|
|
11218
11412
|
| | | |
|
|
11219
11413
|
| --- | --- | --- |
|
|
11220
|
-
| [WalletErrorFromJson](#function-walleterrorfromjson) | [
|
|
11221
|
-
| [acquireDirectCertificate](#function-acquiredirectcertificate) | [
|
|
11222
|
-
| [addWork](#function-addwork) | [
|
|
11223
|
-
| [arcDefaultUrl](#function-arcdefaulturl) | [
|
|
11224
|
-
| [arcGorillaPoolUrl](#function-arcgorillapoolurl) | [
|
|
11225
|
-
| [arraysEqual](#function-arraysequal) | [
|
|
11226
|
-
| [asArray](#function-asarray) | [internalizeAction](#function-internalizeaction) | [
|
|
11227
|
-
| [asBsvSdkPrivateKey](#function-asbsvsdkprivatekey) | [
|
|
11228
|
-
| [asBsvSdkPublickKey](#function-asbsvsdkpublickkey) | [
|
|
11229
|
-
| [asBsvSdkScript](#function-asbsvsdkscript) | [
|
|
11230
|
-
| [asBsvSdkTx](#function-asbsvsdktx) | [
|
|
11231
|
-
| [asString](#function-asstring) | [
|
|
11232
|
-
| [asUint8Array](#function-asuint8array) | [
|
|
11233
|
-
| [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [
|
|
11234
|
-
| [blockHash](#function-blockhash) | [
|
|
11235
|
-
| [buildSignableTransaction](#function-buildsignabletransaction) | [
|
|
11236
|
-
| [classifyMerklePathResponse](#function-classifymerklepathresponse) | [
|
|
11237
|
-
| [classifyReqStatus](#function-classifyreqstatus) | [
|
|
11238
|
-
| [completeSignedTransaction](#function-completesignedtransaction) | [
|
|
11239
|
-
| [computeMerklePath](#function-computemerklepath) | [
|
|
11240
|
-
| [computeMerkleRoot](#function-computemerkleroot) | [
|
|
11241
|
-
| [convertBitsToTarget](#function-convertbitstotarget) | [
|
|
11242
|
-
| [convertBitsToWork](#function-convertbitstowork) | [
|
|
11243
|
-
| [convertBufferToUint32](#function-convertbuffertouint32) | [
|
|
11244
|
-
| [convertProofToMerklePath](#function-convertprooftomerklepath) | [
|
|
11245
|
-
| [convertUint32ToBuffer](#function-convertuint32tobuffer) | [
|
|
11246
|
-
| [convertWocToBlockHeaderHex](#function-convertwoctoblockheaderhex) | [maxDate](#function-maxdate) | [
|
|
11247
|
-
| [createAction](#function-createaction) | [mergeInputBeefs](#function-mergeinputbeefs) | [
|
|
11248
|
-
| [createAction](#function-createaction) | [mergeInputsIntoBeef](#function-mergeinputsintobeef) | [
|
|
11249
|
-
| [createCoinbaseTransaction](#function-createcoinbasetransaction) | [notifyTransactionsOfProof](#function-notifytransactionsofproof) | [
|
|
11250
|
-
| [createDefaultWalletServicesOptions](#function-createdefaultwalletservicesoptions) | [offsetPrivKey](#function-offsetprivkey) | [
|
|
11251
|
-
| [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [offsetPubKey](#function-offsetpubkey) | [
|
|
11252
|
-
| [createSyncMap](#function-createsyncmap) | [optionalArraysEqual](#function-optionalarraysequal) | [
|
|
11253
|
-
| [deserializeBaseBlockHeader](#function-deserializebaseblockheader) | [
|
|
11254
|
-
| [deserializeBaseBlockHeaders](#function-deserializebaseblockheaders) | [
|
|
11255
|
-
| [deserializeBlockHeader](#function-deserializeblockheader) | [
|
|
11256
|
-
| [deserializeBlockHeaders](#function-deserializeblockheaders) | [processAction](#function-processaction) | [
|
|
11257
|
-
| [doubleSha256BE](#function-doublesha256be) | [
|
|
11258
|
-
| [doubleSha256LE](#function-doublesha256le) | [
|
|
11259
|
-
| [generateChangeSdk](#function-generatechangesdk) | [
|
|
11260
|
-
| [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [
|
|
11261
|
-
| [genesisBuffer](#function-genesisbuffer) | [
|
|
11262
|
-
| [genesisHeader](#function-genesisheader) | [
|
|
11263
|
-
| [getBeefForTransaction](#function-getbeeffortransaction) | [
|
|
11264
|
-
| [getBeefForTxid](#function-getbeeffortxid) | [
|
|
11265
|
-
| [getExchangeRatesIo](#function-getexchangeratesio) | [
|
|
11266
|
-
| [getIdentityKey](#function-getidentitykey) | [
|
|
11267
|
-
| [getProofs](#function-getproofs) | [
|
|
11414
|
+
| [WalletErrorFromJson](#function-walleterrorfromjson) | [getWhatsOnChainBlockHeaderByHash](#function-getwhatsonchainblockheaderbyhash) | [setDisableDoubleSpendCheckForTest](#function-setdisabledoublespendcheckfortest) |
|
|
11415
|
+
| [acquireDirectCertificate](#function-acquiredirectcertificate) | [handlePostRawTxErrorResponse](#function-handlepostrawtxerrorresponse) | [sha256Hash](#function-sha256hash) |
|
|
11416
|
+
| [addWork](#function-addwork) | [handleScriptHashHistoryCatch](#function-handlescripthashhistorycatch) | [sha256HashOfBinaryFile](#function-sha256hashofbinaryfile) |
|
|
11417
|
+
| [arcDefaultUrl](#function-arcdefaulturl) | [handleScriptHashHistoryResponse](#function-handlescripthashhistoryresponse) | [shareReqsWithWorld](#function-sharereqswithworld) |
|
|
11418
|
+
| [arcGorillaPoolUrl](#function-arcgorillapoolurl) | [handleUtxoConnReset](#function-handleutxoconnreset) | [signAction](#function-signaction) |
|
|
11419
|
+
| [arraysEqual](#function-arraysequal) | [internalizeAction](#function-internalizeaction) | [stampLog](#function-stamplog) |
|
|
11420
|
+
| [asArray](#function-asarray) | [internalizeAction](#function-internalizeaction) | [stampLogFormat](#function-stamplogformat) |
|
|
11421
|
+
| [asBsvSdkPrivateKey](#function-asbsvsdkprivatekey) | [isBaseBlockHeader](#function-isbaseblockheader) | [subWork](#function-subwork) |
|
|
11422
|
+
| [asBsvSdkPublickKey](#function-asbsvsdkpublickkey) | [isBlockHeader](#function-isblockheader) | [swapByteOrder](#function-swapbyteorder) |
|
|
11423
|
+
| [asBsvSdkScript](#function-asbsvsdkscript) | [isCreateActionSpecOp](#function-iscreateactionspecop) | [throwDummyReviewActions](#function-throwdummyreviewactions) |
|
|
11424
|
+
| [asBsvSdkTx](#function-asbsvsdktx) | [isKnownValidBulkHeaderFile](#function-isknownvalidbulkheaderfile) | [toBinaryBaseBlockHeader](#function-tobinarybaseblockheader) |
|
|
11425
|
+
| [asString](#function-asstring) | [isListActionsSpecOp](#function-islistactionsspecop) | [toLookupNetworkPreset](#function-tolookupnetworkpreset) |
|
|
11426
|
+
| [asUint8Array](#function-asuint8array) | [isListOutputsSpecOp](#function-islistoutputsspecop) | [toWalletNetwork](#function-towalletnetwork) |
|
|
11427
|
+
| [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [isLive](#function-islive) | [transactionInputSize](#function-transactioninputsize) |
|
|
11428
|
+
| [blockHash](#function-blockhash) | [isLiveBlockHeader](#function-isliveblockheader) | [transactionOutputSize](#function-transactionoutputsize) |
|
|
11429
|
+
| [buildSignableTransaction](#function-buildsignabletransaction) | [isMoreWork](#function-ismorework) | [transactionSize](#function-transactionsize) |
|
|
11430
|
+
| [classifyMerklePathResponse](#function-classifymerklepathresponse) | [keyOffsetToHashedSecret](#function-keyoffsettohashedsecret) | [updateChaintracksFiatExchangeRates](#function-updatechaintracksfiatexchangerates) |
|
|
11431
|
+
| [classifyReqStatus](#function-classifyreqstatus) | [listCertificates](#function-listcertificates) | [updateExchangeratesapi](#function-updateexchangeratesapi) |
|
|
11432
|
+
| [completeSignedTransaction](#function-completesignedtransaction) | [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) | [updateReqsFromAggregateResults](#function-updatereqsfromaggregateresults) |
|
|
11433
|
+
| [computeMerklePath](#function-computemerklepath) | [logCreateActionArgs](#function-logcreateactionargs) | [validBulkHeaderFilesByFileHash](#function-validbulkheaderfilesbyfilehash) |
|
|
11434
|
+
| [computeMerkleRoot](#function-computemerkleroot) | [logWalletError](#function-logwalleterror) | [validateAgainstDirtyHashes](#function-validateagainstdirtyhashes) |
|
|
11435
|
+
| [convertBitsToTarget](#function-convertbitstotarget) | [makeAtomicBeef](#function-makeatomicbeef) | [validateBufferOfHeaders](#function-validatebufferofheaders) |
|
|
11436
|
+
| [convertBitsToWork](#function-convertbitstowork) | [makeChangeLock](#function-makechangelock) | [validateBulkFileData](#function-validatebulkfiledata) |
|
|
11437
|
+
| [convertBufferToUint32](#function-convertbuffertouint32) | [makeMerklePathNote](#function-makemerklepathnote) | [validateDate](#function-validatedate) |
|
|
11438
|
+
| [convertProofToMerklePath](#function-convertprooftomerklepath) | [markStaleInputsAsSpent](#function-markstaleinputsasspent) | [validateEntities](#function-validateentities) |
|
|
11439
|
+
| [convertUint32ToBuffer](#function-convertuint32tobuffer) | [markUserInputsSpent](#function-markuserinputsspent) | [validateEntity](#function-validateentity) |
|
|
11440
|
+
| [convertWocToBlockHeaderHex](#function-convertwoctoblockheaderhex) | [maxDate](#function-maxdate) | [validateGenerateChangeSdkParams](#function-validategeneratechangesdkparams) |
|
|
11441
|
+
| [createAction](#function-createaction) | [mergeInputBeefs](#function-mergeinputbeefs) | [validateGenerateChangeSdkResult](#function-validategeneratechangesdkresult) |
|
|
11442
|
+
| [createAction](#function-createaction) | [mergeInputsIntoBeef](#function-mergeinputsintobeef) | [validateGenesisHeader](#function-validategenesisheader) |
|
|
11443
|
+
| [createCoinbaseTransaction](#function-createcoinbasetransaction) | [notifyTransactionsOfProof](#function-notifytransactionsofproof) | [validateHeaderDifficulty](#function-validateheaderdifficulty) |
|
|
11444
|
+
| [createDefaultWalletServicesOptions](#function-createdefaultwalletservicesoptions) | [offsetPrivKey](#function-offsetprivkey) | [validateHeaderFormat](#function-validateheaderformat) |
|
|
11445
|
+
| [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [offsetPubKey](#function-offsetpubkey) | [validateScriptHash](#function-validatescripthash) |
|
|
11446
|
+
| [createSyncMap](#function-createsyncmap) | [optionalArraysEqual](#function-optionalarraysequal) | [validateSecondsSinceEpoch](#function-validatesecondssinceepoch) |
|
|
11447
|
+
| [deserializeBaseBlockHeader](#function-deserializebaseblockheader) | [parseResults$](#function-parseresults$) | [validateStorageFeeModel](#function-validatestoragefeemodel) |
|
|
11448
|
+
| [deserializeBaseBlockHeaders](#function-deserializebaseblockheaders) | [parseTxScriptOffsets](#function-parsetxscriptoffsets) | [validateSyncChunkEntities](#function-validatesyncchunkentities) |
|
|
11449
|
+
| [deserializeBlockHeader](#function-deserializeblockheader) | [populateUtxoDetails](#function-populateutxodetails) | [varUintSize](#function-varuintsize) |
|
|
11450
|
+
| [deserializeBlockHeaders](#function-deserializeblockheaders) | [processAction](#function-processaction) | [verifyHexString](#function-verifyhexstring) |
|
|
11451
|
+
| [doubleSha256BE](#function-doublesha256be) | [processAction](#function-processaction) | [verifyId](#function-verifyid) |
|
|
11452
|
+
| [doubleSha256LE](#function-doublesha256le) | [proveCertificate](#function-provecertificate) | [verifyInteger](#function-verifyinteger) |
|
|
11453
|
+
| [generateChangeSdk](#function-generatechangesdk) | [randomBytes](#function-randombytes) | [verifyNumber](#function-verifynumber) |
|
|
11454
|
+
| [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [randomBytesBase64](#function-randombytesbase64) | [verifyOne](#function-verifyone) |
|
|
11455
|
+
| [genesisBuffer](#function-genesisbuffer) | [randomBytesHex](#function-randombyteshex) | [verifyOneOrNone](#function-verifyoneornone) |
|
|
11456
|
+
| [genesisHeader](#function-genesisheader) | [readUInt32BE](#function-readuint32be) | [verifyOptionalHexString](#function-verifyoptionalhexstring) |
|
|
11457
|
+
| [getBeefForTransaction](#function-getbeeffortransaction) | [readUInt32LE](#function-readuint32le) | [verifyTruthy](#function-verifytruthy) |
|
|
11458
|
+
| [getBeefForTxid](#function-getbeeffortxid) | [redeemServiceCharges](#function-redeemservicecharges) | [verifyUnlockScripts](#function-verifyunlockscripts) |
|
|
11459
|
+
| [getExchangeRatesIo](#function-getexchangeratesio) | [restoreInputsToSpendable](#function-restoreinputstospendable) | [wait](#function-wait) |
|
|
11460
|
+
| [getIdentityKey](#function-getidentitykey) | [selectBulkHeaderFiles](#function-selectbulkheaderfiles) | [workBNtoBuffer](#function-workbntobuffer) |
|
|
11461
|
+
| [getProofs](#function-getproofs) | [serializeBaseBlockHeader](#function-serializebaseblockheader) | [writeUInt32BE](#function-writeuint32be) |
|
|
11462
|
+
| [getSyncChunk](#function-getsyncchunk) | [serializeBaseBlockHeaders](#function-serializebaseblockheaders) | [writeUInt32LE](#function-writeuint32le) |
|
|
11268
11463
|
|
|
11269
11464
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
11270
11465
|
|
|
@@ -12219,7 +12414,14 @@ A "wallet payment" adds an outputs value to the wallet's change "balance". These
|
|
|
12219
12414
|
Processing starts with simple validation and then checks for a pre-existing transaction.
|
|
12220
12415
|
If the transaction is already known to the user, then the outputs are reviewed against the existing outputs treatment,
|
|
12221
12416
|
and merge rules are added to the arguments passed to the storage layer.
|
|
12222
|
-
|
|
12417
|
+
|
|
12418
|
+
The existing transaction's `status` determines what the merge path does next:
|
|
12419
|
+
- `'unproven'` or `'completed'`: outputs are merged; status is left as-is.
|
|
12420
|
+
- `'nosend'`: the `internalizeAction` call is treated as explicit authorization to advance the lifecycle.
|
|
12421
|
+
`transactions.status` is promoted to `'completed'` (BUMP-bearing BEEF) or `'unproven'` (otherwise), and the
|
|
12422
|
+
`proven_tx_req` is moved out of `'nosend'` so Monitor's proof-fetching flow can finalize it. See storage-layer
|
|
12423
|
+
`internalizeAction` docs for the full rationale.
|
|
12424
|
+
- Any other status: an error.
|
|
12223
12425
|
|
|
12224
12426
|
When the transaction already exists, the description is updated. The isOutgoing sense is not changed.
|
|
12225
12427
|
|
|
@@ -12255,7 +12457,17 @@ A "wallet payment" adds an outputs value to the wallet's change "balance". These
|
|
|
12255
12457
|
Processing starts with simple validation and then checks for a pre-existing transaction.
|
|
12256
12458
|
If the transaction is already known to the user, then the outputs are reviewed against the existing outputs treatment,
|
|
12257
12459
|
and merge rules are added to the arguments passed to the storage layer.
|
|
12258
|
-
|
|
12460
|
+
|
|
12461
|
+
The existing transaction's `status` determines what the merge path does next:
|
|
12462
|
+
- `'unproven'` or `'completed'`: outputs are merged into the existing record. The transaction status is left as-is.
|
|
12463
|
+
- `'nosend'`: an ambiguous case. The transaction was created with `noSend: true` and may have been externally
|
|
12464
|
+
broadcast, may be sitting in a sendWith chain, or may be stuck mid-flight. The merge path treats the
|
|
12465
|
+
`internalizeAction` call as explicit authorization to advance the lifecycle. Specifically: `transactions.status`
|
|
12466
|
+
is promoted to `'completed'` (when a BUMP is included in the BEEF) or `'unproven'` (otherwise), and the
|
|
12467
|
+
`proven_tx_req` is moved out of `'nosend'` so Monitor's standard proof-fetching flow can finalize it.
|
|
12468
|
+
This makes the `internalizeAction` semantics consistent regardless of whether the originator shares the
|
|
12469
|
+
same storage as the internalizer or not.
|
|
12470
|
+
- Any other status: an error.
|
|
12259
12471
|
|
|
12260
12472
|
When the transaction already exists, the description is updated. The isOutgoing sense is not changed.
|
|
12261
12473
|
|
|
@@ -12590,6 +12802,17 @@ See also: [AggregatePostBeefTxResult](./storage.md#interface-aggregatepostbeeftx
|
|
|
12590
12802
|
|
|
12591
12803
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12592
12804
|
|
|
12805
|
+
---
|
|
12806
|
+
##### Function: markUserInputsSpent
|
|
12807
|
+
|
|
12808
|
+
```ts
|
|
12809
|
+
export async function markUserInputsSpent(storage: StorageProvider, userId: number, tx: BsvTransaction, transactionId: number): Promise<SpentInputTransition[]>
|
|
12810
|
+
```
|
|
12811
|
+
|
|
12812
|
+
See also: [SpentInputTransition](./storage.md#interface-spentinputtransition), [StorageProvider](./storage.md#class-storageprovider)
|
|
12813
|
+
|
|
12814
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12815
|
+
|
|
12593
12816
|
---
|
|
12594
12817
|
##### Function: maxDate
|
|
12595
12818
|
|
|
@@ -12682,6 +12905,17 @@ export function optionalArraysEqual(arr1?: Number[], arr2?: Number[]): boolean
|
|
|
12682
12905
|
|
|
12683
12906
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12684
12907
|
|
|
12908
|
+
---
|
|
12909
|
+
##### Function: parseResults$
|
|
12910
|
+
|
|
12911
|
+
```ts
|
|
12912
|
+
export async function* parseResults$(lookupResult: LookupAnswer): AsyncIterable<VerifiableCertificate>
|
|
12913
|
+
```
|
|
12914
|
+
|
|
12915
|
+
See also: [parseResults](./client.md#variable-parseresults)
|
|
12916
|
+
|
|
12917
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12918
|
+
|
|
12685
12919
|
---
|
|
12686
12920
|
##### Function: parseTxScriptOffsets
|
|
12687
12921
|
|
|
@@ -12812,6 +13046,17 @@ See also: [TableCommission](./storage.md#interface-tablecommission)
|
|
|
12812
13046
|
|
|
12813
13047
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12814
13048
|
|
|
13049
|
+
---
|
|
13050
|
+
##### Function: restoreInputsToSpendable
|
|
13051
|
+
|
|
13052
|
+
```ts
|
|
13053
|
+
export async function restoreInputsToSpendable(storage: StorageProvider, transitions: SpentInputTransition[]): Promise<void>
|
|
13054
|
+
```
|
|
13055
|
+
|
|
13056
|
+
See also: [SpentInputTransition](./storage.md#interface-spentinputtransition), [StorageProvider](./storage.md#class-storageprovider)
|
|
13057
|
+
|
|
13058
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
13059
|
+
|
|
12815
13060
|
---
|
|
12816
13061
|
##### Function: selectBulkHeaderFiles
|
|
12817
13062
|
|
|
@@ -14360,26 +14605,18 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
14360
14605
|
|
|
14361
14606
|
```ts
|
|
14362
14607
|
parseResults = async (lookupResult: LookupAnswer): Promise<VerifiableCertificate[]> => {
|
|
14363
|
-
if (lookupResult.type
|
|
14364
|
-
|
|
14365
|
-
|
|
14366
|
-
|
|
14367
|
-
|
|
14368
|
-
|
|
14369
|
-
|
|
14370
|
-
|
|
14371
|
-
|
|
14372
|
-
|
|
14373
|
-
verifiableCert.decryptedFields = decryptedFields;
|
|
14374
|
-
parsedResults.push(verifiableCert);
|
|
14375
|
-
}
|
|
14376
|
-
catch (error) {
|
|
14377
|
-
console.error(error);
|
|
14378
|
-
}
|
|
14379
|
-
}
|
|
14380
|
-
return parsedResults;
|
|
14608
|
+
if (lookupResult.type !== "output-list")
|
|
14609
|
+
return [];
|
|
14610
|
+
const parsedResults: VerifiableCertificate[] = [];
|
|
14611
|
+
const shouldYield = isUiRuntime();
|
|
14612
|
+
for (const output of lookupResult.outputs) {
|
|
14613
|
+
if (shouldYield)
|
|
14614
|
+
await yieldToUi();
|
|
14615
|
+
const cert = await parseOne(output);
|
|
14616
|
+
if (cert != null)
|
|
14617
|
+
parsedResults.push(cert);
|
|
14381
14618
|
}
|
|
14382
|
-
return
|
|
14619
|
+
return parsedResults;
|
|
14383
14620
|
}
|
|
14384
14621
|
```
|
|
14385
14622
|
|
|
@@ -14393,7 +14630,7 @@ queryOverlay = async (query: unknown, resolver: LookupResolver): Promise<Verifia
|
|
|
14393
14630
|
const results = await resolver.query({
|
|
14394
14631
|
service: "ls_identity",
|
|
14395
14632
|
query
|
|
14396
|
-
});
|
|
14633
|
+
}, undefined, { graceMs: 300 });
|
|
14397
14634
|
return await parseResults(results);
|
|
14398
14635
|
}
|
|
14399
14636
|
```
|