@bsv/wallet-toolbox 2.3.2 → 2.4.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/CHANGELOG.md +6 -0
- package/docs/client.md +547 -191
- package/docs/monitor.md +7 -7
- package/docs/services.md +304 -57
- package/docs/wallet.md +406 -604
- package/out/src/WalletPermissionsManager.d.ts +19 -0
- package/out/src/WalletPermissionsManager.d.ts.map +1 -1
- package/out/src/WalletPermissionsManager.js +55 -0
- package/out/src/WalletPermissionsManager.js.map +1 -1
- package/out/src/monitor/Monitor.d.ts +3 -4
- package/out/src/monitor/Monitor.d.ts.map +1 -1
- package/out/src/monitor/Monitor.js +1 -1
- package/out/src/monitor/Monitor.js.map +1 -1
- package/out/src/monitor/MonitorDaemon.d.ts +2 -2
- package/out/src/monitor/MonitorDaemon.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskArcSSE.d.ts +5 -3
- package/out/src/monitor/tasks/TaskArcSSE.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskArcSSE.js +42 -55
- package/out/src/monitor/tasks/TaskArcSSE.js.map +1 -1
- package/out/src/sdk/WalletServices.interfaces.d.ts +23 -1
- package/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -1
- package/out/src/services/Services.d.ts +3 -0
- package/out/src/services/Services.d.ts.map +1 -1
- package/out/src/services/Services.js +20 -1
- package/out/src/services/Services.js.map +1 -1
- package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts +1 -0
- package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts.map +1 -1
- package/out/src/services/chaintracker/ChaintracksChainTracker.js +9 -6
- package/out/src/services/chaintracker/ChaintracksChainTracker.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts +2 -0
- package/out/src/services/chaintracker/chaintracks/Chaintracks.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Chaintracks.js +29 -1
- package/out/src/services/chaintracker/chaintracks/Chaintracks.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.d.ts +52 -0
- package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.d.ts.map +1 -0
- package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.js +228 -0
- package/out/src/services/chaintracker/chaintracks/GoChaintracksServiceClient.js.map +1 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.d.ts +24 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.d.ts.map +1 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.js +55 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorChaintracksSSE.js.map +1 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.d.ts +13 -0
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js +45 -7
- package/out/src/services/chaintracker/chaintracks/Ingest/LiveIngestorWhatsOnChainPoll.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/index.mobile.d.ts +2 -0
- package/out/src/services/chaintracker/chaintracks/index.mobile.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/index.mobile.js +2 -0
- package/out/src/services/chaintracker/chaintracks/index.mobile.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.d.ts +8 -0
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.js +53 -10
- package/out/src/services/chaintracker/chaintracks/util/ChaintracksFetch.js.map +1 -1
- package/out/src/services/createDefaultWalletServicesOptions.d.ts +19 -1
- package/out/src/services/createDefaultWalletServicesOptions.d.ts.map +1 -1
- package/out/src/services/createDefaultWalletServicesOptions.js +49 -2
- package/out/src/services/createDefaultWalletServicesOptions.js.map +1 -1
- package/out/src/services/providers/ARC.d.ts +4 -0
- package/out/src/services/providers/ARC.d.ts.map +1 -1
- package/out/src/services/providers/ARC.js +65 -4
- package/out/src/services/providers/ARC.js.map +1 -1
- package/out/src/services/providers/ArcSSEClient.d.ts +1 -0
- package/out/src/services/providers/ArcSSEClient.d.ts.map +1 -1
- package/out/src/services/providers/ArcSSEClient.js +12 -9
- package/out/src/services/providers/ArcSSEClient.js.map +1 -1
- package/out/src/services/providers/Arcade.d.ts +72 -0
- package/out/src/services/providers/Arcade.d.ts.map +1 -0
- package/out/src/services/providers/Arcade.js +299 -0
- package/out/src/services/providers/Arcade.js.map +1 -0
- package/out/src/signer/methods/buildSignableTransaction.d.ts +54 -0
- package/out/src/signer/methods/buildSignableTransaction.d.ts.map +1 -1
- package/out/src/signer/methods/buildSignableTransaction.js +118 -2
- package/out/src/signer/methods/buildSignableTransaction.js.map +1 -1
- package/out/src/storage/methods/processAction.d.ts.map +1 -1
- package/out/src/storage/methods/processAction.js +38 -1
- package/out/src/storage/methods/processAction.js.map +1 -1
- package/package.json +5 -5
package/docs/wallet.md
CHANGED
|
@@ -6,73 +6,71 @@ 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
|
-
| [
|
|
26
|
-
| [
|
|
27
|
-
| [
|
|
28
|
-
| [
|
|
29
|
-
| [
|
|
30
|
-
| [
|
|
31
|
-
| [
|
|
32
|
-
| [
|
|
33
|
-
| [
|
|
34
|
-
| [
|
|
35
|
-
| [
|
|
36
|
-
| [
|
|
37
|
-
| [
|
|
38
|
-
| [
|
|
39
|
-
| [
|
|
40
|
-
| [
|
|
41
|
-
| [
|
|
42
|
-
| [
|
|
43
|
-
| [
|
|
44
|
-
| [
|
|
45
|
-
| [
|
|
46
|
-
| [
|
|
47
|
-
| [
|
|
48
|
-
| [
|
|
49
|
-
| [
|
|
50
|
-
| [
|
|
51
|
-
| [
|
|
52
|
-
| [
|
|
53
|
-
| [
|
|
54
|
-
| [
|
|
55
|
-
| [
|
|
56
|
-
| [
|
|
57
|
-
| [
|
|
58
|
-
| [
|
|
59
|
-
| [
|
|
60
|
-
| [
|
|
61
|
-
| [
|
|
62
|
-
| [
|
|
63
|
-
| [
|
|
64
|
-
| [
|
|
65
|
-
| [
|
|
66
|
-
| [
|
|
67
|
-
| [
|
|
68
|
-
| [
|
|
69
|
-
| [
|
|
70
|
-
| [
|
|
71
|
-
| [
|
|
72
|
-
| [
|
|
73
|
-
| [
|
|
74
|
-
| [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs) | [SpentInputTransition](#interface-spentinputtransition) | |
|
|
75
|
-
| [FindTxLabelsArgs](#interface-findtxlabelsargs) | [StatusForTxidResult](#interface-statusfortxidresult) | |
|
|
9
|
+
| [AdminStatsResult](#interface-adminstatsresult) | [GenerateChangeSdkInput](#interface-generatechangesdkinput) | [StorageCreateTransactionSdkInput](#interface-storagecreatetransactionsdkinput) |
|
|
10
|
+
| [AggregatePostBeefTxResult](#interface-aggregatepostbeeftxresult) | [GenerateChangeSdkOutput](#interface-generatechangesdkoutput) | [StorageCreateTransactionSdkOutput](#interface-storagecreatetransactionsdkoutput) |
|
|
11
|
+
| [ArcConfig](#interface-arcconfig) | [GenerateChangeSdkParams](#interface-generatechangesdkparams) | [StorageFeeModel](#interface-storagefeemodel) |
|
|
12
|
+
| [ArcMinerGetTxData](#interface-arcminergettxdata) | [GenerateChangeSdkResult](#interface-generatechangesdkresult) | [StorageGetBeefOptions](#interface-storagegetbeefoptions) |
|
|
13
|
+
| [ArcSSEClientOptions](#interface-arcsseclientoptions) | [GenerateChangeSdkStorageChange](#interface-generatechangesdkstoragechange) | [StorageIdentity](#interface-storageidentity) |
|
|
14
|
+
| [ArcSSEEvent](#interface-arcsseevent) | [GetMerklePathResult](#interface-getmerklepathresult) | [StorageInternalizeActionResult](#interface-storageinternalizeactionresult) |
|
|
15
|
+
| [AuthId](#interface-authid) | [GetRawTxResult](#interface-getrawtxresult) | [StorageProcessActionArgs](#interface-storageprocessactionargs) |
|
|
16
|
+
| [BaseBlockHeader](#interface-baseblockheader) | [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail) | [StorageProcessActionResults](#interface-storageprocessactionresults) |
|
|
17
|
+
| [BitailsConfig](#interface-bitailsconfig) | [GetReqsAndBeefResult](#interface-getreqsandbeefresult) | [StorageProvenOrReq](#interface-storageprovenorreq) |
|
|
18
|
+
| [BitailsMerkleProof](#interface-bitailsmerkleproof) | [GetScriptHashHistory](#interface-getscripthashhistory) | [StorageProviderOptions](#interface-storageprovideroptions) |
|
|
19
|
+
| [BlockHeader](#interface-blockheader) | [GetScriptHashHistoryResult](#interface-getscripthashhistoryresult) | [StorageReaderOptions](#interface-storagereaderoptions) |
|
|
20
|
+
| [BsvExchangeRate](#interface-bsvexchangerate) | [GetStatusForTxidsResult](#interface-getstatusfortxidsresult) | [StorageReaderWriterOptions](#interface-storagereaderwriteroptions) |
|
|
21
|
+
| [BulkFileDataManagerMergeResult](#interface-bulkfiledatamanagermergeresult) | [GetUtxoStatusDetails](#interface-getutxostatusdetails) | [StorageSyncReaderOptions](#interface-storagesyncreaderoptions) |
|
|
22
|
+
| [BulkFileDataManagerOptions](#interface-bulkfiledatamanageroptions) | [GetUtxoStatusResult](#interface-getutxostatusresult) | [SyncChunk](#interface-syncchunk) |
|
|
23
|
+
| [BulkHeaderFileInfo](#interface-bulkheaderfileinfo) | [HeightRangeApi](#interface-heightrangeapi) | [SyncError](#interface-syncerror) |
|
|
24
|
+
| [BulkHeaderFilesInfo](#interface-bulkheaderfilesinfo) | [HeightRanges](#interface-heightranges) | [SyncMap](#interface-syncmap) |
|
|
25
|
+
| [CertOpsWallet](#interface-certopswallet) | [KeyPair](#interface-keypair) | [TableCertificate](#interface-tablecertificate) |
|
|
26
|
+
| [Certifier](#interface-certifier) | [LiveBlockHeader](#interface-liveblockheader) | [TableCertificateField](#interface-tablecertificatefield) |
|
|
27
|
+
| [ChaintracksApi](#interface-chaintracksapi) | [MerklePathNote](#interface-merklepathnote) | [TableCertificateX](#interface-tablecertificatex) |
|
|
28
|
+
| [ChaintracksAppendableFileApi](#interface-chaintracksappendablefileapi) | [MockChainBlockHeaderRow](#interface-mockchainblockheaderrow) | [TableCommission](#interface-tablecommission) |
|
|
29
|
+
| [ChaintracksChainTrackerOptions](#interface-chaintrackschaintrackeroptions) | [MockChainTransactionRow](#interface-mockchaintransactionrow) | [TableMonitorEvent](#interface-tablemonitorevent) |
|
|
30
|
+
| [ChaintracksClientApi](#interface-chaintracksclientapi) | [MockChainUtxoRow](#interface-mockchainutxorow) | [TableOutput](#interface-tableoutput) |
|
|
31
|
+
| [ChaintracksFetchApi](#interface-chaintracksfetchapi) | [MonitorOptions](#interface-monitoroptions) | [TableOutputBasket](#interface-tableoutputbasket) |
|
|
32
|
+
| [ChaintracksFsApi](#interface-chaintracksfsapi) | [OutPoint](#interface-outpoint) | [TableOutputTag](#interface-tableoutputtag) |
|
|
33
|
+
| [ChaintracksInfoApi](#interface-chaintracksinfoapi) | [Paged](#interface-paged) | [TableOutputTagMap](#interface-tableoutputtagmap) |
|
|
34
|
+
| [ChaintracksPackageInfoApi](#interface-chaintrackspackageinfoapi) | [PendingSignAction](#interface-pendingsignaction) | [TableOutputX](#interface-tableoutputx) |
|
|
35
|
+
| [ChaintracksReadableFileApi](#interface-chaintracksreadablefileapi) | [PendingStorageInput](#interface-pendingstorageinput) | [TableProvenTx](#interface-tableproventx) |
|
|
36
|
+
| [ChaintracksServiceClientOptions](#interface-chaintracksserviceclientoptions) | [PostBeefResult](#interface-postbeefresult) | [TableProvenTxReq](#interface-tableproventxreq) |
|
|
37
|
+
| [ChaintracksStorageApi](#interface-chaintracksstorageapi) | [PostBeefResultForTxidApi](#interface-postbeefresultfortxidapi) | [TableProvenTxReqDynamics](#interface-tableproventxreqdynamics) |
|
|
38
|
+
| [ChaintracksStorageBaseOptions](#interface-chaintracksstoragebaseoptions) | [PostReqsToNetworkDetails](#interface-postreqstonetworkdetails) | [TableSettings](#interface-tablesettings) |
|
|
39
|
+
| [ChaintracksStorageBulkFileApi](#interface-chaintracksstoragebulkfileapi) | [PostReqsToNetworkResult](#interface-postreqstonetworkresult) | [TableSyncState](#interface-tablesyncstate) |
|
|
40
|
+
| [ChaintracksStorageIngestApi](#interface-chaintracksstorageingestapi) | [PostTxResultForTxid](#interface-posttxresultfortxid) | [TableTransaction](#interface-tabletransaction) |
|
|
41
|
+
| [ChaintracksStorageQueryApi](#interface-chaintracksstoragequeryapi) | [PostTxResultForTxidError](#interface-posttxresultfortxiderror) | [TableTxLabel](#interface-tabletxlabel) |
|
|
42
|
+
| [ChaintracksWritableFileApi](#interface-chaintrackswritablefileapi) | [PostTxsResult](#interface-posttxsresult) | [TableTxLabelMap](#interface-tabletxlabelmap) |
|
|
43
|
+
| [CommitNewTxResults](#interface-commitnewtxresults) | [ProcessSyncChunkResult](#interface-processsyncchunkresult) | [TableUser](#interface-tableuser) |
|
|
44
|
+
| [ContactRecord](#interface-contactrecord) | [ProvenOrRawTx](#interface-provenorrawtx) | [TaskPurgeParams](#interface-taskpurgeparams) |
|
|
45
|
+
| [ContactSource](#interface-contactsource) | [ProvenTransactionStatus](#interface-proventransactionstatus) | [TrustSettings](#interface-trustsettings) |
|
|
46
|
+
| [CreateActionResultX](#interface-createactionresultx) | [ProvenTxFromTxidResult](#interface-proventxfromtxidresult) | [TrxToken](#interface-trxtoken) |
|
|
47
|
+
| [DeactivedHeader](#interface-deactivedheader) | [ProvenTxReqHistory](#interface-proventxreqhistory) | [TscMerkleProofApi](#interface-tscmerkleproofapi) |
|
|
48
|
+
| [EntitySyncMap](#interface-entitysyncmap) | [ProvenTxReqHistorySummaryApi](#interface-proventxreqhistorysummaryapi) | [TxScriptOffsets](#interface-txscriptoffsets) |
|
|
49
|
+
| [EntityTimeStamp](#interface-entitytimestamp) | [ProvenTxReqNotify](#interface-proventxreqnotify) | [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs) |
|
|
50
|
+
| [ExchangeRatesIoApi](#interface-exchangeratesioapi) | [ProviderCallHistory](#interface-providercallhistory) | [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult) |
|
|
51
|
+
| [ExtendedVerifiableCertificate](#interface-extendedverifiablecertificate) | [PurgeParams](#interface-purgeparams) | [ValidateGenerateChangeSdkParamsResult](#interface-validategeneratechangesdkparamsresult) |
|
|
52
|
+
| [FiatExchangeRates](#interface-fiatexchangerates) | [PurgeResults](#interface-purgeresults) | [VerifyAndRepairBeefResult](#interface-verifyandrepairbeefresult) |
|
|
53
|
+
| [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs) | [ReorgResult](#interface-reorgresult) | [WalletArgs](#interface-walletargs) |
|
|
54
|
+
| [FindCertificatesArgs](#interface-findcertificatesargs) | [ReproveHeaderResult](#interface-reproveheaderresult) | [WalletBalance](#interface-walletbalance) |
|
|
55
|
+
| [FindCommissionsArgs](#interface-findcommissionsargs) | [ReproveProvenResult](#interface-reproveprovenresult) | [WalletLoggerArgs](#interface-walletloggerargs) |
|
|
56
|
+
| [FindForUserSincePagedArgs](#interface-findforusersincepagedargs) | [ReqHistoryNote](#interface-reqhistorynote) | [WalletServices](#interface-walletservices) |
|
|
57
|
+
| [FindMonitorEventsArgs](#interface-findmonitoreventsargs) | [RequestSyncChunkArgs](#interface-requestsyncchunkargs) | [WalletServicesOptions](#interface-walletservicesoptions) |
|
|
58
|
+
| [FindOutputBasketsArgs](#interface-findoutputbasketsargs) | [ReviewActionResult](#interface-reviewactionresult) | [WalletSettings](#interface-walletsettings) |
|
|
59
|
+
| [FindOutputTagMapsArgs](#interface-findoutputtagmapsargs) | [ReviewHeightRangeResult](#interface-reviewheightrangeresult) | [WalletSettingsManagerConfig](#interface-walletsettingsmanagerconfig) |
|
|
60
|
+
| [FindOutputTagsArgs](#interface-findoutputtagsargs) | [ScriptHashHistoryResponse](#interface-scripthashhistoryresponse) | [WalletSigner](#interface-walletsigner) |
|
|
61
|
+
| [FindOutputsArgs](#interface-findoutputsargs) | [ScriptTemplateParamsBRC29](#interface-scripttemplateparamsbrc29) | [WalletStorage](#interface-walletstorage) |
|
|
62
|
+
| [FindPartialSincePagedArgs](#interface-findpartialsincepagedargs) | [ScriptTemplateUnlock](#interface-scripttemplateunlock) | [WalletStorageInfo](#interface-walletstorageinfo) |
|
|
63
|
+
| [FindProvenTxReqsArgs](#interface-findproventxreqsargs) | [ServiceCall](#interface-servicecall) | [WalletStorageProvider](#interface-walletstorageprovider) |
|
|
64
|
+
| [FindProvenTxsArgs](#interface-findproventxsargs) | [ServiceCall](#interface-servicecall) | [WalletStorageReader](#interface-walletstoragereader) |
|
|
65
|
+
| [FindSincePagedArgs](#interface-findsincepagedargs) | [ServiceCallHistory](#interface-servicecallhistory) | [WalletStorageSync](#interface-walletstoragesync) |
|
|
66
|
+
| [FindStaleMerkleRootsArgs](#interface-findstalemerklerootsargs) | [ServiceCallHistoryCounts](#interface-servicecallhistorycounts) | [WalletStorageSyncReader](#interface-walletstoragesyncreader) |
|
|
67
|
+
| [FindSyncStatesArgs](#interface-findsyncstatesargs) | [ServiceToCall](#interface-servicetocall) | [WalletStorageWriter](#interface-walletstoragewriter) |
|
|
68
|
+
| [FindTransactionsArgs](#interface-findtransactionsargs) | [ServicesCallHistory](#interface-servicescallhistory) | [WalletTheme](#interface-wallettheme) |
|
|
69
|
+
| [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs) | [SignActionResultX](#interface-signactionresultx) | [WocChainInfo](#interface-wocchaininfo) |
|
|
70
|
+
| [FindTxLabelsArgs](#interface-findtxlabelsargs) | [SpentInputTransition](#interface-spentinputtransition) | [WocHeader](#interface-wocheader) |
|
|
71
|
+
| [FindUsersArgs](#interface-findusersargs) | [StatusForTxidResult](#interface-statusfortxidresult) | [XValidCreateActionOutput](#interface-xvalidcreateactionoutput) |
|
|
72
|
+
| [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [StorageAdminStats](#interface-storageadminstats) | |
|
|
73
|
+
| [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [StorageCreateActionResult](#interface-storagecreateactionresult) | |
|
|
76
74
|
|
|
77
75
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
78
76
|
|
|
@@ -683,156 +681,6 @@ rootFolder: string
|
|
|
683
681
|
|
|
684
682
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
685
683
|
|
|
686
|
-
---
|
|
687
|
-
##### Interface: BulkIngestorApi
|
|
688
|
-
|
|
689
|
-
```ts
|
|
690
|
-
export interface BulkIngestorApi {
|
|
691
|
-
shutdown(): Promise<void>;
|
|
692
|
-
getPresentHeight(): Promise<number | undefined>;
|
|
693
|
-
fetchHeaders(before: HeightRanges, fetchRange: HeightRange, bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>;
|
|
694
|
-
synchronize(presentHeight: number, before: HeightRanges, priorLiveHeaders: BlockHeader[]): Promise<BulkSyncResult>;
|
|
695
|
-
setStorage(storage: ChaintracksStorageApi, log: (...args: any[]) => void): Promise<void>;
|
|
696
|
-
storage(): ChaintracksStorageApi;
|
|
697
|
-
}
|
|
698
|
-
```
|
|
699
|
-
|
|
700
|
-
See also: [BlockHeader](./client.md#interface-blockheader), [BulkSyncResult](./services.md#interface-bulksyncresult), [ChaintracksStorageApi](./services.md#interface-chaintracksstorageapi), [HeightRange](./services.md#class-heightrange), [HeightRanges](./services.md#interface-heightranges)
|
|
701
|
-
|
|
702
|
-
###### Method fetchHeaders
|
|
703
|
-
|
|
704
|
-
A BulkIngestor fetches and updates storage with bulk headers in bulkRange.
|
|
705
|
-
|
|
706
|
-
If it can, it must also fetch live headers in fetch range that are not in bulkRange and return them as an array.
|
|
707
|
-
|
|
708
|
-
The storage methods `insertBulkFile`, `updateBulkFile`, and `addBulkHeaders` should be used to add bulk headers to storage.
|
|
709
|
-
|
|
710
|
-
```ts
|
|
711
|
-
fetchHeaders(before: HeightRanges, fetchRange: HeightRange, bulkRange: HeightRange, priorLiveHeaders: BlockHeader[]): Promise<BlockHeader[]>
|
|
712
|
-
```
|
|
713
|
-
See also: [BlockHeader](./client.md#interface-blockheader), [HeightRange](./services.md#class-heightrange), [HeightRanges](./services.md#interface-heightranges)
|
|
714
|
-
|
|
715
|
-
Returns
|
|
716
|
-
|
|
717
|
-
new live headers: headers in fetchRange but not in bulkRange
|
|
718
|
-
|
|
719
|
-
Argument Details
|
|
720
|
-
|
|
721
|
-
+ **before**
|
|
722
|
-
+ bulk and live range of headers before ingesting any new headers.
|
|
723
|
-
+ **fetchRange**
|
|
724
|
-
+ range of headers still needed, includes both missing bulk and live headers.
|
|
725
|
-
+ **bulkRange**
|
|
726
|
-
+ range of bulk headers still needed
|
|
727
|
-
+ **priorLiveHeaders**
|
|
728
|
-
+ any headers accumulated by prior bulk ingestor(s) that are too recent for bulk storage.
|
|
729
|
-
|
|
730
|
-
###### Method getPresentHeight
|
|
731
|
-
|
|
732
|
-
If the bulk ingestor is capable, return the approximate
|
|
733
|
-
present height of the actual chain being tracked.
|
|
734
|
-
Otherwise, return undefined.
|
|
735
|
-
|
|
736
|
-
May not assume that setStorage has been called.
|
|
737
|
-
|
|
738
|
-
```ts
|
|
739
|
-
getPresentHeight(): Promise<number | undefined>
|
|
740
|
-
```
|
|
741
|
-
|
|
742
|
-
###### Method setStorage
|
|
743
|
-
|
|
744
|
-
Called before first Synchronize with reference to storage.
|
|
745
|
-
Components requiring asynchronous setup can override base class implementation.
|
|
746
|
-
|
|
747
|
-
```ts
|
|
748
|
-
setStorage(storage: ChaintracksStorageApi, log: (...args: any[]) => void): Promise<void>
|
|
749
|
-
```
|
|
750
|
-
See also: [ChaintracksStorageApi](./services.md#interface-chaintracksstorageapi)
|
|
751
|
-
|
|
752
|
-
###### Method shutdown
|
|
753
|
-
|
|
754
|
-
Close and release all resources.
|
|
755
|
-
|
|
756
|
-
```ts
|
|
757
|
-
shutdown(): Promise<void>
|
|
758
|
-
```
|
|
759
|
-
|
|
760
|
-
###### Method synchronize
|
|
761
|
-
|
|
762
|
-
A BulkIngestor has two potential goals:
|
|
763
|
-
1. To source missing bulk headers and include them in bulk storage.
|
|
764
|
-
2. To source missing live headers to be forwarded to live storage.
|
|
765
|
-
|
|
766
|
-
```ts
|
|
767
|
-
synchronize(presentHeight: number, before: HeightRanges, priorLiveHeaders: BlockHeader[]): Promise<BulkSyncResult>
|
|
768
|
-
```
|
|
769
|
-
See also: [BlockHeader](./client.md#interface-blockheader), [BulkSyncResult](./services.md#interface-bulksyncresult), [HeightRanges](./services.md#interface-heightranges)
|
|
770
|
-
|
|
771
|
-
Returns
|
|
772
|
-
|
|
773
|
-
updated priorLiveHeaders including any accumulated by this ingestor
|
|
774
|
-
|
|
775
|
-
Argument Details
|
|
776
|
-
|
|
777
|
-
+ **presentHeight**
|
|
778
|
-
+ current height of the active chain tip, may lag the true value.
|
|
779
|
-
+ **before**
|
|
780
|
-
+ current bulk and live storage height ranges, either may be empty.
|
|
781
|
-
+ **priorLiveHeaders**
|
|
782
|
-
+ any headers accumulated by prior bulk ingestor(s) that are too recent for bulk storage.
|
|
783
|
-
|
|
784
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
785
|
-
|
|
786
|
-
---
|
|
787
|
-
##### Interface: BulkIngestorBaseOptions
|
|
788
|
-
|
|
789
|
-
```ts
|
|
790
|
-
export interface BulkIngestorBaseOptions {
|
|
791
|
-
chain: Chain;
|
|
792
|
-
jsonResource: string | undefined;
|
|
793
|
-
}
|
|
794
|
-
```
|
|
795
|
-
|
|
796
|
-
See also: [Chain](./client.md#type-chain)
|
|
797
|
-
|
|
798
|
-
###### Property chain
|
|
799
|
-
|
|
800
|
-
The target chain: "main" or "test"
|
|
801
|
-
|
|
802
|
-
```ts
|
|
803
|
-
chain: Chain
|
|
804
|
-
```
|
|
805
|
-
See also: [Chain](./client.md#type-chain)
|
|
806
|
-
|
|
807
|
-
###### Property jsonResource
|
|
808
|
-
|
|
809
|
-
Required.
|
|
810
|
-
|
|
811
|
-
The name of the JSON resource to request from CDN which describes currently
|
|
812
|
-
available bulk block header resources.
|
|
813
|
-
|
|
814
|
-
```ts
|
|
815
|
-
jsonResource: string | undefined
|
|
816
|
-
```
|
|
817
|
-
|
|
818
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
819
|
-
|
|
820
|
-
---
|
|
821
|
-
##### Interface: BulkSyncResult
|
|
822
|
-
|
|
823
|
-
```ts
|
|
824
|
-
export interface BulkSyncResult {
|
|
825
|
-
liveHeaders: BlockHeader[];
|
|
826
|
-
liveRange: HeightRange;
|
|
827
|
-
done: boolean;
|
|
828
|
-
log: string;
|
|
829
|
-
}
|
|
830
|
-
```
|
|
831
|
-
|
|
832
|
-
See also: [BlockHeader](./client.md#interface-blockheader), [HeightRange](./services.md#class-heightrange)
|
|
833
|
-
|
|
834
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
835
|
-
|
|
836
684
|
---
|
|
837
685
|
##### Interface: CertOpsWallet
|
|
838
686
|
|
|
@@ -935,6 +783,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
935
783
|
```ts
|
|
936
784
|
export interface ChaintracksChainTrackerOptions {
|
|
937
785
|
maxRetries?: number;
|
|
786
|
+
retryDelayMs?: number;
|
|
938
787
|
}
|
|
939
788
|
```
|
|
940
789
|
|
|
@@ -1232,111 +1081,6 @@ See also: [Chain](./client.md#type-chain), [ChaintracksPackageInfoApi](./service
|
|
|
1232
1081
|
|
|
1233
1082
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1234
1083
|
|
|
1235
|
-
---
|
|
1236
|
-
##### Interface: ChaintracksManagementApi
|
|
1237
|
-
|
|
1238
|
-
```ts
|
|
1239
|
-
export interface ChaintracksManagementApi extends ChaintracksApi {
|
|
1240
|
-
destroy(): Promise<void>;
|
|
1241
|
-
validate(): Promise<boolean>;
|
|
1242
|
-
exportBulkHeaders(toFolder: string, toFs: ChaintracksFsApi, sourceUrl?: string, toHeadersPerFile?: number, maxHeight?: number): Promise<void>;
|
|
1243
|
-
}
|
|
1244
|
-
```
|
|
1245
|
-
|
|
1246
|
-
See also: [ChaintracksApi](./services.md#interface-chaintracksapi), [ChaintracksFsApi](./services.md#interface-chaintracksfsapi)
|
|
1247
|
-
|
|
1248
|
-
###### Method destroy
|
|
1249
|
-
|
|
1250
|
-
close and release all resources
|
|
1251
|
-
|
|
1252
|
-
```ts
|
|
1253
|
-
destroy(): Promise<void>
|
|
1254
|
-
```
|
|
1255
|
-
|
|
1256
|
-
###### Method exportBulkHeaders
|
|
1257
|
-
|
|
1258
|
-
Exports current bulk headers, including all ingests, excluding live headers to static header files.
|
|
1259
|
-
|
|
1260
|
-
Useful for bulk ingestors such as those derived from BulkIngestorCDN.
|
|
1261
|
-
|
|
1262
|
-
```ts
|
|
1263
|
-
exportBulkHeaders(toFolder: string, toFs: ChaintracksFsApi, sourceUrl?: string, toHeadersPerFile?: number, maxHeight?: number): Promise<void>
|
|
1264
|
-
```
|
|
1265
|
-
See also: [ChaintracksFsApi](./services.md#interface-chaintracksfsapi)
|
|
1266
|
-
|
|
1267
|
-
Argument Details
|
|
1268
|
-
|
|
1269
|
-
+ **toFolder**
|
|
1270
|
-
+ Where the json and headers files will be written
|
|
1271
|
-
+ **toFs**
|
|
1272
|
-
+ The ChaintracksFsApi to use for writing files. If not provided, the default file system will be used.
|
|
1273
|
-
+ **sourceUrl**
|
|
1274
|
-
+ Optional source URL to include in the exported files. Set if exported files will be transferred to a CDN.
|
|
1275
|
-
+ **toHeadersPerFile**
|
|
1276
|
-
+ The maximum headers per file. Default is 100,000 (8MB)
|
|
1277
|
-
+ **maxHeight**
|
|
1278
|
-
+ The maximum height to export. Default is the current bulk storage max height.
|
|
1279
|
-
|
|
1280
|
-
###### Method validate
|
|
1281
|
-
|
|
1282
|
-
Verifies that all headers from the tip back to genesis can be retrieved, in order,
|
|
1283
|
-
by height, and that they obey previousHash constraint.
|
|
1284
|
-
|
|
1285
|
-
Additional validations may be addeded.
|
|
1286
|
-
|
|
1287
|
-
This is a slow operation.
|
|
1288
|
-
|
|
1289
|
-
```ts
|
|
1290
|
-
validate(): Promise<boolean>
|
|
1291
|
-
```
|
|
1292
|
-
|
|
1293
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1294
|
-
|
|
1295
|
-
---
|
|
1296
|
-
##### Interface: ChaintracksOptions
|
|
1297
|
-
|
|
1298
|
-
```ts
|
|
1299
|
-
export interface ChaintracksOptions {
|
|
1300
|
-
chain: Chain;
|
|
1301
|
-
storage?: ChaintracksStorageApi;
|
|
1302
|
-
bulkIngestors: BulkIngestorApi[];
|
|
1303
|
-
liveIngestors: LiveIngestorApi[];
|
|
1304
|
-
addLiveRecursionLimit: number;
|
|
1305
|
-
logging?: (...args: any[]) => void;
|
|
1306
|
-
readonly: boolean;
|
|
1307
|
-
}
|
|
1308
|
-
```
|
|
1309
|
-
|
|
1310
|
-
See also: [BulkIngestorApi](./services.md#interface-bulkingestorapi), [Chain](./client.md#type-chain), [ChaintracksStorageApi](./services.md#interface-chaintracksstorageapi), [LiveIngestorApi](./services.md#interface-liveingestorapi)
|
|
1311
|
-
|
|
1312
|
-
###### Property addLiveRecursionLimit
|
|
1313
|
-
|
|
1314
|
-
Maximum number of missing headers to pursue when listening for new headers.
|
|
1315
|
-
Normally, large numbers of missing headers are handled by bulk ingestors.
|
|
1316
|
-
|
|
1317
|
-
```ts
|
|
1318
|
-
addLiveRecursionLimit: number
|
|
1319
|
-
```
|
|
1320
|
-
|
|
1321
|
-
###### Property logging
|
|
1322
|
-
|
|
1323
|
-
Optional logging method
|
|
1324
|
-
|
|
1325
|
-
```ts
|
|
1326
|
-
logging?: (...args: any[]) => void
|
|
1327
|
-
```
|
|
1328
|
-
|
|
1329
|
-
###### Property readonly
|
|
1330
|
-
|
|
1331
|
-
If true, this chaintracks instance will only service read requests for existing data.
|
|
1332
|
-
Shared storage only requires one readonly false instance to manage and update storage.
|
|
1333
|
-
|
|
1334
|
-
```ts
|
|
1335
|
-
readonly: boolean
|
|
1336
|
-
```
|
|
1337
|
-
|
|
1338
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1339
|
-
|
|
1340
1084
|
---
|
|
1341
1085
|
##### Interface: ChaintracksPackageInfoApi
|
|
1342
1086
|
|
|
@@ -3188,42 +2932,6 @@ previousHeaderId: number | null
|
|
|
3188
2932
|
|
|
3189
2933
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3190
2934
|
|
|
3191
|
-
---
|
|
3192
|
-
##### Interface: LiveIngestorApi
|
|
3193
|
-
|
|
3194
|
-
```ts
|
|
3195
|
-
export interface LiveIngestorApi {
|
|
3196
|
-
shutdown(): Promise<void>;
|
|
3197
|
-
getHeaderByHash(hash: string): Promise<BlockHeader | undefined>;
|
|
3198
|
-
setStorage(storage: ChaintracksStorageApi, log: (...args: any[]) => void): Promise<void>;
|
|
3199
|
-
storage(): ChaintracksStorageApi;
|
|
3200
|
-
startListening(liveHeaders: BlockHeader[]): Promise<void>;
|
|
3201
|
-
stopListening(): void;
|
|
3202
|
-
}
|
|
3203
|
-
```
|
|
3204
|
-
|
|
3205
|
-
See also: [BlockHeader](./client.md#interface-blockheader), [ChaintracksStorageApi](./services.md#interface-chaintracksstorageapi)
|
|
3206
|
-
|
|
3207
|
-
###### Method setStorage
|
|
3208
|
-
|
|
3209
|
-
Called before first Synchronize with reference to storage.
|
|
3210
|
-
Components requiring asynchronous setup can override base class implementation.
|
|
3211
|
-
|
|
3212
|
-
```ts
|
|
3213
|
-
setStorage(storage: ChaintracksStorageApi, log: (...args: any[]) => void): Promise<void>
|
|
3214
|
-
```
|
|
3215
|
-
See also: [ChaintracksStorageApi](./services.md#interface-chaintracksstorageapi)
|
|
3216
|
-
|
|
3217
|
-
###### Method shutdown
|
|
3218
|
-
|
|
3219
|
-
Close and release all resources.
|
|
3220
|
-
|
|
3221
|
-
```ts
|
|
3222
|
-
shutdown(): Promise<void>
|
|
3223
|
-
```
|
|
3224
|
-
|
|
3225
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3226
|
-
|
|
3227
2935
|
---
|
|
3228
2936
|
##### Interface: MerklePathNote
|
|
3229
2937
|
|
|
@@ -3308,7 +3016,7 @@ export interface MonitorOptions {
|
|
|
3308
3016
|
services: Services | WalletServices;
|
|
3309
3017
|
storage: MonitorStorage;
|
|
3310
3018
|
chaintracks: ChaintracksClientApi;
|
|
3311
|
-
chaintracksWithEvents?:
|
|
3019
|
+
chaintracksWithEvents?: ChaintracksClientApi;
|
|
3312
3020
|
startupTaskMode?: MonitorStartupTaskMode;
|
|
3313
3021
|
msecsWaitPerMerkleProofServiceReq: number;
|
|
3314
3022
|
taskRunWaitMsecs: number;
|
|
@@ -3326,7 +3034,7 @@ export interface MonitorOptions {
|
|
|
3326
3034
|
}
|
|
3327
3035
|
```
|
|
3328
3036
|
|
|
3329
|
-
See also: [Chain](./client.md#type-chain), [
|
|
3037
|
+
See also: [Chain](./client.md#type-chain), [ChaintracksClientApi](./services.md#interface-chaintracksclientapi), [MonitorStartupTaskMode](./monitor.md#type-monitorstartuptaskmode), [MonitorStorage](./monitor.md#type-monitorstorage), [ProvenTransactionStatus](./client.md#interface-proventransactionstatus), [ReviewActionResult](./client.md#interface-reviewactionresult), [Services](./services.md#class-services), [WalletServices](./client.md#interface-walletservices)
|
|
3330
3038
|
|
|
3331
3039
|
###### Property EventSourceClass
|
|
3332
3040
|
|
|
@@ -6117,6 +5825,8 @@ export interface WalletServicesOptions {
|
|
|
6117
5825
|
arcConfig: ArcConfig;
|
|
6118
5826
|
arcGorillaPoolUrl?: string;
|
|
6119
5827
|
arcGorillaPoolConfig?: ArcConfig;
|
|
5828
|
+
arcadeUrl?: string;
|
|
5829
|
+
arcadeConfig?: ArcConfig;
|
|
6120
5830
|
}
|
|
6121
5831
|
```
|
|
6122
5832
|
|
|
@@ -6176,6 +5886,36 @@ testnet: `https://arc-test.taal.com`
|
|
|
6176
5886
|
arcUrl: string
|
|
6177
5887
|
```
|
|
6178
5888
|
|
|
5889
|
+
###### Property arcadeConfig
|
|
5890
|
+
|
|
5891
|
+
Arcade service configuration options (used to construct the `Arcade` broadcaster).
|
|
5892
|
+
|
|
5893
|
+
`callbackToken` must equal the Monitor's `callbackToken` so Arcade routes each
|
|
5894
|
+
submitted transaction's status events to this wallet's SSE subscription.
|
|
5895
|
+
|
|
5896
|
+
`callbackUrl` should be left undefined for the SSE (pull) flow — Arcade rejects
|
|
5897
|
+
private/loopback webhook URLs.
|
|
5898
|
+
|
|
5899
|
+
```ts
|
|
5900
|
+
arcadeConfig?: ArcConfig
|
|
5901
|
+
```
|
|
5902
|
+
See also: [ArcConfig](./services.md#interface-arcconfig)
|
|
5903
|
+
|
|
5904
|
+
###### Property arcadeUrl
|
|
5905
|
+
|
|
5906
|
+
Optional bsv-blockchain/arcade endpoint to use as the primary transaction broadcaster.
|
|
5907
|
+
|
|
5908
|
+
When set, an Arcade broadcaster is registered ahead of the ARC providers (Arcade-first,
|
|
5909
|
+
ARC fallback) and the Monitor's SSE/proof task (`TaskArcadeSSE`) targets this URL.
|
|
5910
|
+
|
|
5911
|
+
Default is undefined (Arcade disabled; ARC providers used as before).
|
|
5912
|
+
mainnet: `https://arcade-v2-us-1.bsvblockchain.tech`
|
|
5913
|
+
teratest: `https://arcade-v2-ttn-us-1.bsvblockchain.tech`
|
|
5914
|
+
|
|
5915
|
+
```ts
|
|
5916
|
+
arcadeUrl?: string
|
|
5917
|
+
```
|
|
5918
|
+
|
|
6179
5919
|
###### Property bitailsApiKey
|
|
6180
5920
|
|
|
6181
5921
|
Api key for use accessing Bitails API at
|
|
@@ -6594,36 +6334,37 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6594
6334
|
|
|
6595
6335
|
| | | |
|
|
6596
6336
|
| --- | --- | --- |
|
|
6597
|
-
| [ARC](#class-arc) | [EntityTxLabelMap](#class-entitytxlabelmap) | [
|
|
6598
|
-
| [ArcSSEClient](#class-arcsseclient) | [EntityUser](#class-entityuser) | [
|
|
6599
|
-
| [
|
|
6600
|
-
| [
|
|
6601
|
-
| [
|
|
6602
|
-
| [
|
|
6603
|
-
| [
|
|
6604
|
-
| [
|
|
6605
|
-
| [
|
|
6606
|
-
| [
|
|
6607
|
-
| [
|
|
6608
|
-
| [
|
|
6609
|
-
| [
|
|
6610
|
-
| [ChaintracksChainTracker](#class-chaintrackschaintracker) | [ServiceCollection](#class-servicecollection) | [
|
|
6611
|
-
| [ChaintracksFetch](#class-chaintracksfetch) | [Services](#class-services) | [
|
|
6612
|
-
| [
|
|
6613
|
-
| [
|
|
6614
|
-
| [
|
|
6615
|
-
| [
|
|
6616
|
-
| [
|
|
6617
|
-
| [
|
|
6618
|
-
| [
|
|
6619
|
-
| [
|
|
6620
|
-
| [
|
|
6621
|
-
| [
|
|
6622
|
-
| [
|
|
6623
|
-
| [
|
|
6624
|
-
| [
|
|
6625
|
-
| [
|
|
6626
|
-
| [
|
|
6337
|
+
| [ARC](#class-arc) | [EntityTxLabelMap](#class-entitytxlabelmap) | [TaskReviewDoubleSpends](#class-taskreviewdoublespends) |
|
|
6338
|
+
| [ArcSSEClient](#class-arcsseclient) | [EntityUser](#class-entityuser) | [TaskReviewProvenTxs](#class-taskreviewproventxs) |
|
|
6339
|
+
| [Arcade](#class-arcade) | [HeightRange](#class-heightrange) | [TaskReviewStatus](#class-taskreviewstatus) |
|
|
6340
|
+
| [Bitails](#class-bitails) | [MergeEntity](#class-mergeentity) | [TaskReviewUtxos](#class-taskreviewutxos) |
|
|
6341
|
+
| [BulkFileDataManager](#class-bulkfiledatamanager) | [MockChainMigrations](#class-mockchainmigrations) | [TaskSendWaiting](#class-tasksendwaiting) |
|
|
6342
|
+
| [BulkFileDataReader](#class-bulkfiledatareader) | [MockChainStorage](#class-mockchainstorage) | [TaskUnFail](#class-taskunfail) |
|
|
6343
|
+
| [BulkFilesReader](#class-bulkfilesreader) | [MockChainTracker](#class-mockchaintracker) | [WERR_BAD_REQUEST](#class-werr_bad_request) |
|
|
6344
|
+
| [BulkFilesReaderFs](#class-bulkfilesreaderfs) | [MockMiner](#class-mockminer) | [WERR_BROADCAST_UNAVAILABLE](#class-werr_broadcast_unavailable) |
|
|
6345
|
+
| [BulkFilesReaderStorage](#class-bulkfilesreaderstorage) | [MockServices](#class-mockservices) | [WERR_INSUFFICIENT_FUNDS](#class-werr_insufficient_funds) |
|
|
6346
|
+
| [BulkHeaderFile](#class-bulkheaderfile) | [Monitor](#class-monitor) | [WERR_INTERNAL](#class-werr_internal) |
|
|
6347
|
+
| [BulkHeaderFileFs](#class-bulkheaderfilefs) | [PrivilegedKeyManager](#class-privilegedkeymanager) | [WERR_INVALID_MERKLE_ROOT](#class-werr_invalid_merkle_root) |
|
|
6348
|
+
| [BulkHeaderFileStorage](#class-bulkheaderfilestorage) | [ScriptTemplateBRC29](#class-scripttemplatebrc29) | [WERR_INVALID_OPERATION](#class-werr_invalid_operation) |
|
|
6349
|
+
| [BulkHeaderFiles](#class-bulkheaderfiles) | [SdkWhatsOnChain](#class-sdkwhatsonchain) | [WERR_INVALID_PARAMETER](#class-werr_invalid_parameter) |
|
|
6350
|
+
| [ChaintracksChainTracker](#class-chaintrackschaintracker) | [ServiceCollection](#class-servicecollection) | [WERR_INVALID_PUBLIC_KEY](#class-werr_invalid_public_key) |
|
|
6351
|
+
| [ChaintracksFetch](#class-chaintracksfetch) | [Services](#class-services) | [WERR_MISSING_PARAMETER](#class-werr_missing_parameter) |
|
|
6352
|
+
| [ChaintracksFetchError](#class-chaintracksfetcherror) | [SingleWriterMultiReaderLock](#class-singlewritermultireaderlock) | [WERR_NETWORK_CHAIN](#class-werr_network_chain) |
|
|
6353
|
+
| [ChaintracksServiceClient](#class-chaintracksserviceclient) | [StorageClient](#class-storageclient) | [WERR_NOT_ACTIVE](#class-werr_not_active) |
|
|
6354
|
+
| [ChaintracksStorageBase](#class-chaintracksstoragebase) | [StorageClientBase](#class-storageclientbase) | [WERR_NOT_IMPLEMENTED](#class-werr_not_implemented) |
|
|
6355
|
+
| [EntityBase](#class-entitybase) | [StorageProvider](#class-storageprovider) | [WERR_REVIEW_ACTIONS](#class-werr_review_actions) |
|
|
6356
|
+
| [EntityCertificate](#class-entitycertificate) | [StorageReader](#class-storagereader) | [WERR_UNAUTHORIZED](#class-werr_unauthorized) |
|
|
6357
|
+
| [EntityCertificateField](#class-entitycertificatefield) | [StorageReaderWriter](#class-storagereaderwriter) | [Wallet](#class-wallet) |
|
|
6358
|
+
| [EntityCommission](#class-entitycommission) | [TaskArcadeSSE](#class-taskarcadesse) | [WalletError](#class-walleterror) |
|
|
6359
|
+
| [EntityOutput](#class-entityoutput) | [TaskCheckForProofs](#class-taskcheckforproofs) | [WalletLogger](#class-walletlogger) |
|
|
6360
|
+
| [EntityOutputBasket](#class-entityoutputbasket) | [TaskCheckNoSends](#class-taskchecknosends) | [WalletMonitorTask](#class-walletmonitortask) |
|
|
6361
|
+
| [EntityOutputTag](#class-entityoutputtag) | [TaskClock](#class-taskclock) | [WalletSettingsManager](#class-walletsettingsmanager) |
|
|
6362
|
+
| [EntityOutputTagMap](#class-entityoutputtagmap) | [TaskFailAbandoned](#class-taskfailabandoned) | [WalletSigner](#class-walletsigner) |
|
|
6363
|
+
| [EntityProvenTx](#class-entityproventx) | [TaskMineBlock](#class-taskmineblock) | [WalletStorageManager](#class-walletstoragemanager) |
|
|
6364
|
+
| [EntityProvenTxReq](#class-entityproventxreq) | [TaskMonitorCallHistory](#class-taskmonitorcallhistory) | [WhatsOnChain](#class-whatsonchain) |
|
|
6365
|
+
| [EntitySyncState](#class-entitysyncstate) | [TaskNewHeader](#class-tasknewheader) | [WhatsOnChainNoServices](#class-whatsonchainnoservices) |
|
|
6366
|
+
| [EntityTransaction](#class-entitytransaction) | [TaskPurge](#class-taskpurge) | |
|
|
6367
|
+
| [EntityTxLabel](#class-entitytxlabel) | [TaskReorg](#class-taskreorg) | |
|
|
6627
6368
|
|
|
6628
6369
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6629
6370
|
|
|
@@ -6765,6 +6506,65 @@ async fetchEvents(): Promise<number>
|
|
|
6765
6506
|
|
|
6766
6507
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6767
6508
|
|
|
6509
|
+
---
|
|
6510
|
+
##### Class: Arcade
|
|
6511
|
+
|
|
6512
|
+
```ts
|
|
6513
|
+
export class Arcade {
|
|
6514
|
+
readonly name: string;
|
|
6515
|
+
readonly URL: string;
|
|
6516
|
+
readonly apiKey: string | undefined;
|
|
6517
|
+
readonly deploymentId: string;
|
|
6518
|
+
readonly callbackUrl: string | undefined;
|
|
6519
|
+
readonly callbackToken: string | undefined;
|
|
6520
|
+
readonly headers: Record<string, string> | undefined;
|
|
6521
|
+
constructor(URL: string, config?: ArcConfig, name?: string);
|
|
6522
|
+
constructor(URL: string, apiKey?: string, name?: string);
|
|
6523
|
+
constructor(URL: string, config?: string | ArcConfig, name?: string)
|
|
6524
|
+
async postRawTx(rawTx: HexString, txids?: string[]): Promise<PostTxResultForTxid>
|
|
6525
|
+
async postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult>
|
|
6526
|
+
async getTxData(txid: string): Promise<ArcMinerGetTxData>
|
|
6527
|
+
async getMerklePath(txid: string, services: WalletServices): Promise<GetMerklePathResult>
|
|
6528
|
+
}
|
|
6529
|
+
```
|
|
6530
|
+
|
|
6531
|
+
See also: [ArcConfig](./services.md#interface-arcconfig), [ArcMinerGetTxData](./services.md#interface-arcminergettxdata), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [PostBeefResult](./client.md#interface-postbeefresult), [PostTxResultForTxid](./client.md#interface-posttxresultfortxid), [WalletServices](./client.md#interface-walletservices)
|
|
6532
|
+
|
|
6533
|
+
###### Constructor
|
|
6534
|
+
|
|
6535
|
+
```ts
|
|
6536
|
+
constructor(URL: string, config?: ArcConfig, name?: string)
|
|
6537
|
+
```
|
|
6538
|
+
See also: [ArcConfig](./services.md#interface-arcconfig)
|
|
6539
|
+
|
|
6540
|
+
Argument Details
|
|
6541
|
+
|
|
6542
|
+
+ **URL**
|
|
6543
|
+
+ The Arcade endpoint base URL.
|
|
6544
|
+
|
|
6545
|
+
###### Method getTxData
|
|
6546
|
+
|
|
6547
|
+
Look up a transaction's current status (and merkle path once mined) via `GET /tx/{txid}`.
|
|
6548
|
+
|
|
6549
|
+
```ts
|
|
6550
|
+
async getTxData(txid: string): Promise<ArcMinerGetTxData>
|
|
6551
|
+
```
|
|
6552
|
+
See also: [ArcMinerGetTxData](./services.md#interface-arcminergettxdata)
|
|
6553
|
+
|
|
6554
|
+
###### Method postRawTx
|
|
6555
|
+
|
|
6556
|
+
Submit a single transaction to Arcade's `POST /tx` endpoint.
|
|
6557
|
+
|
|
6558
|
+
`rawTx` must be a single (raw or Extended Format) transaction hex — NOT BEEF. The canonical
|
|
6559
|
+
txid is taken from `txids` when supplied (Arcade derives the same txid from the parsed tx).
|
|
6560
|
+
|
|
6561
|
+
```ts
|
|
6562
|
+
async postRawTx(rawTx: HexString, txids?: string[]): Promise<PostTxResultForTxid>
|
|
6563
|
+
```
|
|
6564
|
+
See also: [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
6565
|
+
|
|
6566
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6567
|
+
|
|
6768
6568
|
---
|
|
6769
6569
|
##### Class: Bitails
|
|
6770
6570
|
|
|
@@ -7117,156 +6917,6 @@ See also: [BulkHeaderFileInfo](./services.md#interface-bulkheaderfileinfo), [Bul
|
|
|
7117
6917
|
|
|
7118
6918
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7119
6919
|
|
|
7120
|
-
---
|
|
7121
|
-
##### Class: Chaintracks
|
|
7122
|
-
|
|
7123
|
-
```ts
|
|
7124
|
-
export class Chaintracks implements ChaintracksManagementApi {
|
|
7125
|
-
static createOptions(chain: Chain): ChaintracksOptions
|
|
7126
|
-
log: (...args: any[]) => void = () => { };
|
|
7127
|
-
readonly chain: Chain;
|
|
7128
|
-
readonly readonly: boolean;
|
|
7129
|
-
constructor(public options: ChaintracksOptions)
|
|
7130
|
-
async getChain(): Promise<Chain>
|
|
7131
|
-
async getPresentHeight(): Promise<number>
|
|
7132
|
-
async currentHeight(): Promise<number>
|
|
7133
|
-
async subscribeHeaders(listener: HeaderListener): Promise<string>
|
|
7134
|
-
async subscribeReorgs(listener: ReorgListener): Promise<string>
|
|
7135
|
-
async unsubscribe(subscriptionId: string): Promise<boolean>
|
|
7136
|
-
async addHeader(header: BaseBlockHeader): Promise<void>
|
|
7137
|
-
async makeAvailable(): Promise<void>
|
|
7138
|
-
async startPromises(): Promise<void>
|
|
7139
|
-
async destroy(): Promise<void>
|
|
7140
|
-
async listening(): Promise<void>
|
|
7141
|
-
async isListening(): Promise<boolean>
|
|
7142
|
-
async isSynchronized(): Promise<boolean>
|
|
7143
|
-
async findHeaderForHeight(height: number): Promise<BlockHeader | undefined>
|
|
7144
|
-
async findHeaderForBlockHash(hash: string): Promise<BlockHeader | undefined>
|
|
7145
|
-
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
7146
|
-
async getInfo(): Promise<ChaintracksInfoApi>
|
|
7147
|
-
async getHeaders(height: number, count: number): Promise<string>
|
|
7148
|
-
async findChainTipHeader(): Promise<BlockHeader>
|
|
7149
|
-
async findChainTipHash(): Promise<string>
|
|
7150
|
-
async findLiveHeaderForBlockHash(hash: string): Promise<LiveBlockHeader | undefined>
|
|
7151
|
-
async findChainWorkForBlockHash(hash: string): Promise<string | undefined>
|
|
7152
|
-
async validate(): Promise<boolean>
|
|
7153
|
-
async exportBulkHeaders(toFolder: string, toFs: ChaintracksFsApi, sourceUrl?: string, toHeadersPerFile?: number, maxHeight?: number): Promise<void>
|
|
7154
|
-
async startListening(): Promise<void>
|
|
7155
|
-
private async syncBulkStorageNoLock(presentHeight: number, initialRanges: HeightRanges): Promise<void> {
|
|
7156
|
-
let newLiveHeaders: BlockHeader[] = [];
|
|
7157
|
-
let before = initialRanges;
|
|
7158
|
-
let after = before;
|
|
7159
|
-
let added = HeightRange.empty;
|
|
7160
|
-
const maxSyncRounds = Math.max(1, this.bulkIngestors.length * 2);
|
|
7161
|
-
for (let round = 1; round <= maxSyncRounds; round++) {
|
|
7162
|
-
const result = await this.runBulkSyncRound(before, presentHeight, newLiveHeaders);
|
|
7163
|
-
after = result.after;
|
|
7164
|
-
newLiveHeaders = result.newLiveHeaders;
|
|
7165
|
-
added = after.bulk.above(before.bulk);
|
|
7166
|
-
before = after;
|
|
7167
|
-
if (this.startupError != null)
|
|
7168
|
-
break;
|
|
7169
|
-
if (result.done)
|
|
7170
|
-
break;
|
|
7171
|
-
if (!result.madeProgress) {
|
|
7172
|
-
this.log(`Bulk sync stalled after round ${round}. Deferring further bulk sync attempts to continue live header processing.`);
|
|
7173
|
-
break;
|
|
7174
|
-
}
|
|
7175
|
-
if (round === maxSyncRounds) {
|
|
7176
|
-
this.log(`Bulk sync paused after ${maxSyncRounds} rounds to avoid runaway retries. Will retry in a later sync cycle.`);
|
|
7177
|
-
}
|
|
7178
|
-
}
|
|
7179
|
-
if (this.startupError == null) {
|
|
7180
|
-
this.liveHeaders.unshift(...newLiveHeaders);
|
|
7181
|
-
added = after.bulk.above(initialRanges.bulk);
|
|
7182
|
-
this.log(`syncBulkStorage done
|
|
7183
|
-
Before sync: bulk ${initialRanges.bulk}, live ${initialRanges.live}
|
|
7184
|
-
After sync: bulk ${after.bulk}, live ${after.live}
|
|
7185
|
-
${added.length} headers added to bulk storage
|
|
7186
|
-
${this.liveHeaders.length} headers forwarded to live header storage
|
|
7187
|
-
`);
|
|
7188
|
-
}
|
|
7189
|
-
}
|
|
7190
|
-
private async runBulkSyncIfNeeded(now: number, lastBulkSync: number, cdnSyncRepeatMsecs: number): Promise<number> {
|
|
7191
|
-
const presentHeight = await this.getPresentHeight();
|
|
7192
|
-
const before = await this.storage.getAvailableHeightRanges();
|
|
7193
|
-
let skipBulkSync = !before.live.isEmpty && before.live.maxHeight >= presentHeight - this.addLiveRecursionLimit / 2;
|
|
7194
|
-
if (skipBulkSync && now - lastBulkSync > cdnSyncRepeatMsecs)
|
|
7195
|
-
skipBulkSync = false;
|
|
7196
|
-
this.log(`Chaintracks Update Services: Bulk Header Sync Review
|
|
7197
|
-
presentHeight=${presentHeight} addLiveRecursionLimit=${this.addLiveRecursionLimit}
|
|
7198
|
-
Before synchronize: bulk ${before.bulk}, live ${before.live}
|
|
7199
|
-
${skipBulkSync ? "Skipping" : "Starting"} syncBulkStorage.
|
|
7200
|
-
`);
|
|
7201
|
-
if (!skipBulkSync) {
|
|
7202
|
-
if (this.available)
|
|
7203
|
-
await this.syncBulkStorage(presentHeight, before);
|
|
7204
|
-
else
|
|
7205
|
-
await this.syncBulkStorageNoLock(presentHeight, before);
|
|
7206
|
-
if (this.startupError != null)
|
|
7207
|
-
throw this.startupError;
|
|
7208
|
-
return now;
|
|
7209
|
-
}
|
|
7210
|
-
return lastBulkSync;
|
|
7211
|
-
}
|
|
7212
|
-
}
|
|
7213
|
-
```
|
|
7214
|
-
|
|
7215
|
-
See also: [BaseBlockHeader](./client.md#interface-baseblockheader), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [ChaintracksFsApi](./services.md#interface-chaintracksfsapi), [ChaintracksInfoApi](./services.md#interface-chaintracksinfoapi), [ChaintracksManagementApi](./services.md#interface-chaintracksmanagementapi), [ChaintracksOptions](./services.md#interface-chaintracksoptions), [HeaderListener](./services.md#type-headerlistener), [HeightRange](./services.md#class-heightrange), [HeightRanges](./services.md#interface-heightranges), [LiveBlockHeader](./services.md#interface-liveblockheader), [ReorgListener](./services.md#type-reorglistener), [Services](./services.md#class-services)
|
|
7216
|
-
|
|
7217
|
-
###### Method addHeader
|
|
7218
|
-
|
|
7219
|
-
Queues a potentially new, unknown header for consideration as an addition to the chain.
|
|
7220
|
-
When the header is considered, if the prior header is unknown, recursive calls to the
|
|
7221
|
-
bulk ingestors will be attempted to resolve the linkage up to a depth of `addLiveRecursionLimit`.
|
|
7222
|
-
|
|
7223
|
-
Headers are considered in the order they were added.
|
|
7224
|
-
|
|
7225
|
-
```ts
|
|
7226
|
-
async addHeader(header: BaseBlockHeader): Promise<void>
|
|
7227
|
-
```
|
|
7228
|
-
See also: [BaseBlockHeader](./client.md#interface-baseblockheader)
|
|
7229
|
-
|
|
7230
|
-
###### Method getPresentHeight
|
|
7231
|
-
|
|
7232
|
-
Caches and returns most recently sourced value if less than one minute old.
|
|
7233
|
-
|
|
7234
|
-
```ts
|
|
7235
|
-
async getPresentHeight(): Promise<number>
|
|
7236
|
-
```
|
|
7237
|
-
|
|
7238
|
-
Returns
|
|
7239
|
-
|
|
7240
|
-
the current externally available chain height (via bulk ingestors).
|
|
7241
|
-
|
|
7242
|
-
###### Method makeAvailable
|
|
7243
|
-
|
|
7244
|
-
If not already available, takes a writer lock to queue calls until available.
|
|
7245
|
-
Becoming available starts by initializing ingestors and main thread,
|
|
7246
|
-
and ends when main thread sets `available`.
|
|
7247
|
-
Note that the main thread continues running and takes additional write locks
|
|
7248
|
-
itself when already available.
|
|
7249
|
-
|
|
7250
|
-
```ts
|
|
7251
|
-
async makeAvailable(): Promise<void>
|
|
7252
|
-
```
|
|
7253
|
-
|
|
7254
|
-
Returns
|
|
7255
|
-
|
|
7256
|
-
when available for client requests
|
|
7257
|
-
|
|
7258
|
-
###### Method validate
|
|
7259
|
-
|
|
7260
|
-
```ts
|
|
7261
|
-
async validate(): Promise<boolean>
|
|
7262
|
-
```
|
|
7263
|
-
|
|
7264
|
-
Returns
|
|
7265
|
-
|
|
7266
|
-
true iff all headers from height zero through current chainTipHeader height can be retreived and form a valid chain.
|
|
7267
|
-
|
|
7268
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7269
|
-
|
|
7270
6920
|
---
|
|
7271
6921
|
##### Class: ChaintracksChainTracker
|
|
7272
6922
|
|
|
@@ -7304,6 +6954,18 @@ See also: [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi)
|
|
|
7304
6954
|
|
|
7305
6955
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7306
6956
|
|
|
6957
|
+
---
|
|
6958
|
+
##### Class: ChaintracksFetchError
|
|
6959
|
+
|
|
6960
|
+
```ts
|
|
6961
|
+
export class ChaintracksFetchError extends Error {
|
|
6962
|
+
constructor(message: string, public readonly url: string, public readonly status: number, public readonly statusText: string, public readonly retryAfterMsecs?: number)
|
|
6963
|
+
get retryable(): boolean
|
|
6964
|
+
}
|
|
6965
|
+
```
|
|
6966
|
+
|
|
6967
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6968
|
+
|
|
7307
6969
|
---
|
|
7308
6970
|
##### Class: ChaintracksServiceClient
|
|
7309
6971
|
|
|
@@ -8741,13 +8403,13 @@ and potentially that reorgs update proofs that were already received.
|
|
|
8741
8403
|
|
|
8742
8404
|
```ts
|
|
8743
8405
|
export class Monitor {
|
|
8744
|
-
static createDefaultWalletMonitorOptions(chain: Chain, storage: MonitorStorage, services?: Services, chaintracks?:
|
|
8406
|
+
static createDefaultWalletMonitorOptions(chain: Chain, storage: MonitorStorage, services?: Services, chaintracks?: ChaintracksClientApi, startupTaskMode: MonitorStartupTaskMode = "none"): MonitorOptions
|
|
8745
8407
|
options: MonitorOptions;
|
|
8746
8408
|
services: Services | WalletServices;
|
|
8747
8409
|
chain: Chain;
|
|
8748
8410
|
storage: MonitorStorage;
|
|
8749
8411
|
chaintracks: ChaintracksClientApi;
|
|
8750
|
-
chaintracksWithEvents?:
|
|
8412
|
+
chaintracksWithEvents?: ChaintracksClientApi;
|
|
8751
8413
|
reorgSubscriptionPromise?: Promise<string>;
|
|
8752
8414
|
headersSubscriptionPromise?: Promise<string>;
|
|
8753
8415
|
onTransactionBroadcasted?: (broadcastResult: ReviewActionResult) => Promise<void>;
|
|
@@ -8798,7 +8460,7 @@ export class Monitor {
|
|
|
8798
8460
|
}
|
|
8799
8461
|
```
|
|
8800
8462
|
|
|
8801
|
-
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [
|
|
8463
|
+
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [ChaintracksClientApi](./services.md#interface-chaintracksclientapi), [DeactivedHeader](./monitor.md#interface-deactivedheader), [MonitorOptions](./monitor.md#interface-monitoroptions), [MonitorStartupTaskMode](./monitor.md#type-monitorstartuptaskmode), [MonitorStorage](./monitor.md#type-monitorstorage), [ProvenTransactionStatus](./client.md#interface-proventransactionstatus), [ReviewActionResult](./client.md#interface-reviewactionresult), [Services](./services.md#class-services), [TaskPurgeParams](./monitor.md#interface-taskpurgeparams), [WalletMonitorTask](./monitor.md#class-walletmonitortask), [WalletServices](./client.md#interface-walletservices)
|
|
8802
8464
|
|
|
8803
8465
|
###### Property _otherTasks
|
|
8804
8466
|
|
|
@@ -9121,6 +8783,7 @@ export class Services implements WalletServices {
|
|
|
9121
8783
|
whatsonchain: WhatsOnChain;
|
|
9122
8784
|
arcTaal: ARC;
|
|
9123
8785
|
arcGorillaPool?: ARC;
|
|
8786
|
+
arcade?: Arcade;
|
|
9124
8787
|
bitails?: Bitails;
|
|
9125
8788
|
getMerklePathServices: ServiceCollection<GetMerklePathService>;
|
|
9126
8789
|
getRawTxServices: ServiceCollection<GetRawTxService>;
|
|
@@ -9162,7 +8825,16 @@ export class Services implements WalletServices {
|
|
|
9162
8825
|
}
|
|
9163
8826
|
```
|
|
9164
8827
|
|
|
9165
|
-
See also: [ARC](./services.md#class-arc), [Bitails](./services.md#class-bitails), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [FiatCurrencyCode](./client.md#type-fiatcurrencycode), [FiatExchangeRates](./client.md#interface-fiatexchangerates), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetMerklePathService](./client.md#type-getmerklepathservice), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetRawTxService](./client.md#type-getrawtxservice), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetScriptHashHistoryService](./client.md#type-getscripthashhistoryservice), [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult), [GetStatusForTxidsService](./client.md#type-getstatusfortxidsservice), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [GetUtxoStatusService](./client.md#type-getutxostatusservice), [PostBeefResult](./client.md#interface-postbeefresult), [PostBeefService](./client.md#type-postbeefservice), [ServiceCollection](./services.md#class-servicecollection), [ServicesCallHistory](./client.md#interface-servicescallhistory), [TableOutput](./storage.md#interface-tableoutput), [UpdateFiatExchangeRateService](./client.md#type-updatefiatexchangerateservice), [WalletServices](./client.md#interface-walletservices), [WalletServicesOptions](./client.md#interface-walletservicesoptions), [WhatsOnChain](./services.md#class-whatsonchain), [getBeefForTxid](./services.md#function-getbeeffortxid), [logger](./client.md#variable-logger)
|
|
8828
|
+
See also: [ARC](./services.md#class-arc), [Arcade](./services.md#class-arcade), [Bitails](./services.md#class-bitails), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [FiatCurrencyCode](./client.md#type-fiatcurrencycode), [FiatExchangeRates](./client.md#interface-fiatexchangerates), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetMerklePathService](./client.md#type-getmerklepathservice), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetRawTxService](./client.md#type-getrawtxservice), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetScriptHashHistoryService](./client.md#type-getscripthashhistoryservice), [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult), [GetStatusForTxidsService](./client.md#type-getstatusfortxidsservice), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [GetUtxoStatusService](./client.md#type-getutxostatusservice), [PostBeefResult](./client.md#interface-postbeefresult), [PostBeefService](./client.md#type-postbeefservice), [ServiceCollection](./services.md#class-servicecollection), [ServicesCallHistory](./client.md#interface-servicescallhistory), [TableOutput](./storage.md#interface-tableoutput), [UpdateFiatExchangeRateService](./client.md#type-updatefiatexchangerateservice), [WalletServices](./client.md#interface-walletservices), [WalletServicesOptions](./client.md#interface-walletservicesoptions), [WhatsOnChain](./services.md#class-whatsonchain), [getBeefForTxid](./services.md#function-getbeeffortxid), [logger](./client.md#variable-logger)
|
|
8829
|
+
|
|
8830
|
+
###### Property arcade
|
|
8831
|
+
|
|
8832
|
+
Primary Arcade (bsv-blockchain/arcade) broadcaster, when `options.arcadeUrl` is set.
|
|
8833
|
+
|
|
8834
|
+
```ts
|
|
8835
|
+
arcade?: Arcade
|
|
8836
|
+
```
|
|
8837
|
+
See also: [Arcade](./services.md#class-arcade)
|
|
9166
8838
|
|
|
9167
8839
|
###### Property postBeefUntilSuccessSoftTimeoutMaxMs
|
|
9168
8840
|
|
|
@@ -12083,55 +11755,58 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
12083
11755
|
|
|
12084
11756
|
| | | |
|
|
12085
11757
|
| --- | --- | --- |
|
|
12086
|
-
| [WalletErrorFromJson](#function-walleterrorfromjson) | [
|
|
12087
|
-
| [acquireDirectCertificate](#function-acquiredirectcertificate) | [
|
|
12088
|
-
| [addWork](#function-addwork) | [
|
|
12089
|
-
| [arcDefaultUrl](#function-arcdefaulturl) | [
|
|
12090
|
-
| [arcGorillaPoolUrl](#function-arcgorillapoolurl) | [
|
|
12091
|
-
| [
|
|
12092
|
-
| [
|
|
12093
|
-
| [
|
|
12094
|
-
| [
|
|
12095
|
-
| [
|
|
12096
|
-
| [
|
|
12097
|
-
| [
|
|
12098
|
-
| [
|
|
12099
|
-
| [
|
|
12100
|
-
| [
|
|
12101
|
-
| [
|
|
12102
|
-
| [
|
|
12103
|
-
| [
|
|
12104
|
-
| [
|
|
12105
|
-
| [
|
|
12106
|
-
| [
|
|
12107
|
-
| [
|
|
12108
|
-
| [
|
|
12109
|
-
| [
|
|
12110
|
-
| [
|
|
12111
|
-
| [
|
|
12112
|
-
| [
|
|
12113
|
-
| [
|
|
12114
|
-
| [createAction](#function-createaction) | [
|
|
12115
|
-
| [
|
|
12116
|
-
| [
|
|
12117
|
-
| [
|
|
12118
|
-
| [
|
|
12119
|
-
| [
|
|
12120
|
-
| [
|
|
12121
|
-
| [
|
|
12122
|
-
| [
|
|
12123
|
-
| [
|
|
12124
|
-
| [
|
|
12125
|
-
| [
|
|
12126
|
-
| [
|
|
12127
|
-
| [
|
|
12128
|
-
| [
|
|
12129
|
-
| [
|
|
12130
|
-
| [
|
|
12131
|
-
| [
|
|
12132
|
-
| [
|
|
12133
|
-
| [
|
|
12134
|
-
| [
|
|
11758
|
+
| [WalletErrorFromJson](#function-walleterrorfromjson) | [handleScriptHashHistoryCatch](#function-handlescripthashhistorycatch) | [sha256Hash](#function-sha256hash) |
|
|
11759
|
+
| [acquireDirectCertificate](#function-acquiredirectcertificate) | [handleScriptHashHistoryResponse](#function-handlescripthashhistoryresponse) | [sha256HashOfBinaryFile](#function-sha256hashofbinaryfile) |
|
|
11760
|
+
| [addWork](#function-addwork) | [handleUtxoConnReset](#function-handleutxoconnreset) | [shareReqsWithWorld](#function-sharereqswithworld) |
|
|
11761
|
+
| [arcDefaultUrl](#function-arcdefaulturl) | [internalizeAction](#function-internalizeaction) | [signAction](#function-signaction) |
|
|
11762
|
+
| [arcGorillaPoolUrl](#function-arcgorillapoolurl) | [internalizeAction](#function-internalizeaction) | [stampLog](#function-stamplog) |
|
|
11763
|
+
| [arcadeDefaultUrl](#function-arcadedefaulturl) | [isArcAcceptedTxStatus](#function-isarcacceptedtxstatus) | [stampLogFormat](#function-stamplogformat) |
|
|
11764
|
+
| [arraysEqual](#function-arraysequal) | [isArcDoubleSpendTxStatus](#function-isarcdoublespendtxstatus) | [subWork](#function-subwork) |
|
|
11765
|
+
| [asArray](#function-asarray) | [isArcInvalidTxStatus](#function-isarcinvalidtxstatus) | [swapByteOrder](#function-swapbyteorder) |
|
|
11766
|
+
| [asBsvSdkPrivateKey](#function-asbsvsdkprivatekey) | [isArcServiceErrorStatus](#function-isarcserviceerrorstatus) | [throwDummyReviewActions](#function-throwdummyreviewactions) |
|
|
11767
|
+
| [asBsvSdkPublickKey](#function-asbsvsdkpublickkey) | [isBaseBlockHeader](#function-isbaseblockheader) | [toBinaryBaseBlockHeader](#function-tobinarybaseblockheader) |
|
|
11768
|
+
| [asBsvSdkScript](#function-asbsvsdkscript) | [isBlockHeader](#function-isblockheader) | [toLookupNetworkPreset](#function-tolookupnetworkpreset) |
|
|
11769
|
+
| [asBsvSdkTx](#function-asbsvsdktx) | [isCreateActionSpecOp](#function-iscreateactionspecop) | [toWalletNetwork](#function-towalletnetwork) |
|
|
11770
|
+
| [asString](#function-asstring) | [isKnownValidBulkHeaderFile](#function-isknownvalidbulkheaderfile) | [transactionInputSize](#function-transactioninputsize) |
|
|
11771
|
+
| [asUint8Array](#function-asuint8array) | [isListActionsSpecOp](#function-islistactionsspecop) | [transactionOutputSize](#function-transactionoutputsize) |
|
|
11772
|
+
| [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [isListOutputsSpecOp](#function-islistoutputsspecop) | [transactionSize](#function-transactionsize) |
|
|
11773
|
+
| [blockHash](#function-blockhash) | [isLive](#function-islive) | [updateChaintracksFiatExchangeRates](#function-updatechaintracksfiatexchangerates) |
|
|
11774
|
+
| [buildSignableTransaction](#function-buildsignabletransaction) | [isLiveBlockHeader](#function-isliveblockheader) | [updateExchangeratesapi](#function-updateexchangeratesapi) |
|
|
11775
|
+
| [classifyMerklePathResponse](#function-classifymerklepathresponse) | [isMoreWork](#function-ismorework) | [updateReqsFromAggregateResults](#function-updatereqsfromaggregateresults) |
|
|
11776
|
+
| [classifyReqStatus](#function-classifyreqstatus) | [keyOffsetToHashedSecret](#function-keyoffsettohashedsecret) | [validBulkHeaderFilesByFileHash](#function-validbulkheaderfilesbyfilehash) |
|
|
11777
|
+
| [completeSignedTransaction](#function-completesignedtransaction) | [listCertificates](#function-listcertificates) | [validateAgainstDirtyHashes](#function-validateagainstdirtyhashes) |
|
|
11778
|
+
| [computeMerklePath](#function-computemerklepath) | [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) | [validateBufferOfHeaders](#function-validatebufferofheaders) |
|
|
11779
|
+
| [computeMerkleRoot](#function-computemerkleroot) | [logCreateActionArgs](#function-logcreateactionargs) | [validateBulkFileData](#function-validatebulkfiledata) |
|
|
11780
|
+
| [convertBitsToTarget](#function-convertbitstotarget) | [logWalletError](#function-logwalleterror) | [validateDate](#function-validatedate) |
|
|
11781
|
+
| [convertBitsToWork](#function-convertbitstowork) | [makeAtomicBeef](#function-makeatomicbeef) | [validateEntities](#function-validateentities) |
|
|
11782
|
+
| [convertBufferToUint32](#function-convertbuffertouint32) | [makeChangeLock](#function-makechangelock) | [validateEntity](#function-validateentity) |
|
|
11783
|
+
| [convertProofToMerklePath](#function-convertprooftomerklepath) | [makeMerklePathNote](#function-makemerklepathnote) | [validateGenerateChangeSdkParams](#function-validategeneratechangesdkparams) |
|
|
11784
|
+
| [convertUint32ToBuffer](#function-convertuint32tobuffer) | [markStaleInputsAsSpent](#function-markstaleinputsasspent) | [validateGenerateChangeSdkResult](#function-validategeneratechangesdkresult) |
|
|
11785
|
+
| [convertWocToBlockHeaderHex](#function-convertwoctoblockheaderhex) | [markUserInputsSpent](#function-markuserinputsspent) | [validateGenesisHeader](#function-validategenesisheader) |
|
|
11786
|
+
| [createAction](#function-createaction) | [maxDate](#function-maxdate) | [validateHeaderDifficulty](#function-validateheaderdifficulty) |
|
|
11787
|
+
| [createAction](#function-createaction) | [mergeInputBeefs](#function-mergeinputbeefs) | [validateHeaderFormat](#function-validateheaderformat) |
|
|
11788
|
+
| [createCoinbaseTransaction](#function-createcoinbasetransaction) | [mergeInputsIntoBeef](#function-mergeinputsintobeef) | [validateScriptHash](#function-validatescripthash) |
|
|
11789
|
+
| [createDefaultWalletServicesOptions](#function-createdefaultwalletservicesoptions) | [notifyTransactionsOfProof](#function-notifytransactionsofproof) | [validateSecondsSinceEpoch](#function-validatesecondssinceepoch) |
|
|
11790
|
+
| [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [offsetPrivKey](#function-offsetprivkey) | [validateStorageFeeModel](#function-validatestoragefeemodel) |
|
|
11791
|
+
| [createSyncMap](#function-createsyncmap) | [offsetPubKey](#function-offsetpubkey) | [validateSyncChunkEntities](#function-validatesyncchunkentities) |
|
|
11792
|
+
| [deserializeBaseBlockHeader](#function-deserializebaseblockheader) | [optionalArraysEqual](#function-optionalarraysequal) | [varUintSize](#function-varuintsize) |
|
|
11793
|
+
| [deserializeBaseBlockHeaders](#function-deserializebaseblockheaders) | [parseResults$](#function-parseresults$) | [verifyHexString](#function-verifyhexstring) |
|
|
11794
|
+
| [deserializeBlockHeader](#function-deserializeblockheader) | [parseTxScriptOffsets](#function-parsetxscriptoffsets) | [verifyId](#function-verifyid) |
|
|
11795
|
+
| [deserializeBlockHeaders](#function-deserializeblockheaders) | [populateUtxoDetails](#function-populateutxodetails) | [verifyInteger](#function-verifyinteger) |
|
|
11796
|
+
| [doubleSha256BE](#function-doublesha256be) | [processAction](#function-processaction) | [verifyNumber](#function-verifynumber) |
|
|
11797
|
+
| [doubleSha256LE](#function-doublesha256le) | [processAction](#function-processaction) | [verifyOne](#function-verifyone) |
|
|
11798
|
+
| [generateChangeSdk](#function-generatechangesdk) | [proveCertificate](#function-provecertificate) | [verifyOneOrNone](#function-verifyoneornone) |
|
|
11799
|
+
| [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [randomBytes](#function-randombytes) | [verifyOptionalHexString](#function-verifyoptionalhexstring) |
|
|
11800
|
+
| [genesisBuffer](#function-genesisbuffer) | [randomBytesBase64](#function-randombytesbase64) | [verifyRequestedOutputsUnchanged](#function-verifyrequestedoutputsunchanged) |
|
|
11801
|
+
| [genesisHeader](#function-genesisheader) | [randomBytesHex](#function-randombyteshex) | [verifyTruthy](#function-verifytruthy) |
|
|
11802
|
+
| [getBeefForTransaction](#function-getbeeffortransaction) | [readUInt32BE](#function-readuint32be) | [verifyUnlockScripts](#function-verifyunlockscripts) |
|
|
11803
|
+
| [getBeefForTxid](#function-getbeeffortxid) | [readUInt32LE](#function-readuint32le) | [verifyUnrequestedOutputsAreChangeOrCommission](#function-verifyunrequestedoutputsarechangeorcommission) |
|
|
11804
|
+
| [getExchangeRatesIo](#function-getexchangeratesio) | [redeemServiceCharges](#function-redeemservicecharges) | [wait](#function-wait) |
|
|
11805
|
+
| [getIdentityKey](#function-getidentitykey) | [restoreInputsToSpendable](#function-restoreinputstospendable) | [workBNtoBuffer](#function-workbntobuffer) |
|
|
11806
|
+
| [getProofs](#function-getproofs) | [selectBulkHeaderFiles](#function-selectbulkheaderfiles) | [writeUInt32BE](#function-writeuint32be) |
|
|
11807
|
+
| [getSyncChunk](#function-getsyncchunk) | [serializeBaseBlockHeader](#function-serializebaseblockheader) | [writeUInt32LE](#function-writeuint32le) |
|
|
11808
|
+
| [getWhatsOnChainBlockHeaderByHash](#function-getwhatsonchainblockheaderbyhash) | [serializeBaseBlockHeaders](#function-serializebaseblockheaders) | |
|
|
11809
|
+
| [handlePostRawTxErrorResponse](#function-handlepostrawtxerrorresponse) | [setDisableDoubleSpendCheckForTest](#function-setdisabledoublespendcheckfortest) | |
|
|
12135
11810
|
|
|
12136
11811
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12137
11812
|
|
|
@@ -12204,6 +11879,20 @@ See also: [Chain](./client.md#type-chain)
|
|
|
12204
11879
|
|
|
12205
11880
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12206
11881
|
|
|
11882
|
+
---
|
|
11883
|
+
##### Function: arcadeDefaultUrl
|
|
11884
|
+
|
|
11885
|
+
Default Arcade (bsv-blockchain/arcade) endpoint per chain.
|
|
11886
|
+
Returns undefined when no public default is known for the chain (e.g. testnet not yet deployed).
|
|
11887
|
+
|
|
11888
|
+
```ts
|
|
11889
|
+
export function arcadeDefaultUrl(chain: Chain): string | undefined
|
|
11890
|
+
```
|
|
11891
|
+
|
|
11892
|
+
See also: [Chain](./client.md#type-chain)
|
|
11893
|
+
|
|
11894
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
11895
|
+
|
|
12207
11896
|
---
|
|
12208
11897
|
##### Function: arraysEqual
|
|
12209
11898
|
|
|
@@ -12661,7 +12350,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
12661
12350
|
##### Function: createDefaultWalletServicesOptions
|
|
12662
12351
|
|
|
12663
12352
|
```ts
|
|
12664
|
-
export function createDefaultWalletServicesOptions(chain: Chain, arcCallbackUrl?: string, arcCallbackToken?: string, taalArcApiKey?: string, gorillaPoolArcApiKey?: string, bitailsApiKey?: string, deploymentId?: string, chaintracks?: ChaintracksClientApi): WalletServicesOptions
|
|
12353
|
+
export function createDefaultWalletServicesOptions(chain: Chain, arcCallbackUrl?: string, arcCallbackToken?: string, taalArcApiKey?: string, gorillaPoolArcApiKey?: string, bitailsApiKey?: string, deploymentId?: string, chaintracks?: ChaintracksClientApi, arcadeUrl?: string, arcadeApiKey?: string, arcadeCallbackToken?: string): WalletServicesOptions
|
|
12665
12354
|
```
|
|
12666
12355
|
|
|
12667
12356
|
See also: [Chain](./client.md#type-chain), [ChaintracksClientApi](./services.md#interface-chaintracksclientapi), [WalletServicesOptions](./client.md#interface-walletservicesoptions)
|
|
@@ -13164,6 +12853,42 @@ See also: [AuthId](./client.md#interface-authid), [StorageInternalizeActionResul
|
|
|
13164
12853
|
|
|
13165
12854
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
13166
12855
|
|
|
12856
|
+
---
|
|
12857
|
+
##### Function: isArcAcceptedTxStatus
|
|
12858
|
+
|
|
12859
|
+
```ts
|
|
12860
|
+
export function isArcAcceptedTxStatus(txStatus: string | undefined): boolean
|
|
12861
|
+
```
|
|
12862
|
+
|
|
12863
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12864
|
+
|
|
12865
|
+
---
|
|
12866
|
+
##### Function: isArcDoubleSpendTxStatus
|
|
12867
|
+
|
|
12868
|
+
```ts
|
|
12869
|
+
export function isArcDoubleSpendTxStatus(txStatus: string | undefined): boolean
|
|
12870
|
+
```
|
|
12871
|
+
|
|
12872
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12873
|
+
|
|
12874
|
+
---
|
|
12875
|
+
##### Function: isArcInvalidTxStatus
|
|
12876
|
+
|
|
12877
|
+
```ts
|
|
12878
|
+
export function isArcInvalidTxStatus(txStatus: string | undefined): boolean
|
|
12879
|
+
```
|
|
12880
|
+
|
|
12881
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12882
|
+
|
|
12883
|
+
---
|
|
12884
|
+
##### Function: isArcServiceErrorStatus
|
|
12885
|
+
|
|
12886
|
+
```ts
|
|
12887
|
+
export function isArcServiceErrorStatus(status: number | undefined, detail?: string): boolean
|
|
12888
|
+
```
|
|
12889
|
+
|
|
12890
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12891
|
+
|
|
13167
12892
|
---
|
|
13168
12893
|
##### Function: isBaseBlockHeader
|
|
13169
12894
|
|
|
@@ -14526,6 +14251,37 @@ export function verifyOptionalHexString(v?: string | null): string | undefined
|
|
|
14526
14251
|
|
|
14527
14252
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
14528
14253
|
|
|
14254
|
+
---
|
|
14255
|
+
##### Function: verifyRequestedOutputsUnchanged
|
|
14256
|
+
|
|
14257
|
+
Verify that the outputs returned by storage for caller-specified outputs match
|
|
14258
|
+
exactly what the caller requested in `args.outputs`.
|
|
14259
|
+
|
|
14260
|
+
The storage response (`StorageCreateActionResult.outputs`) is ordered, by
|
|
14261
|
+
contract, as: the caller's `args.outputs` in their original order, followed by
|
|
14262
|
+
the optional commission output, followed by storage-provided change outputs.
|
|
14263
|
+
Only the `vout` field is randomized when `randomizeOutputs` is set; the array
|
|
14264
|
+
order is stable. Therefore array index `i` (for `i < args.outputs.length`)
|
|
14265
|
+
corresponds to `args.outputs[i]`.
|
|
14266
|
+
|
|
14267
|
+
Because the locking script that is ultimately signed is taken from the storage
|
|
14268
|
+
response, an untrusted storage provider must not be allowed to alter the
|
|
14269
|
+
recipient script (or amount) of a caller-specified output. Any mismatch is a
|
|
14270
|
+
hard error. (GHSA-36f9-7rg5-cpf8)
|
|
14271
|
+
|
|
14272
|
+
```ts
|
|
14273
|
+
export function verifyRequestedOutputsUnchanged(storageOutputs: StorageCreateTransactionSdkOutput[], args: Validation.ValidCreateActionArgs): void
|
|
14274
|
+
```
|
|
14275
|
+
|
|
14276
|
+
See also: [StorageCreateTransactionSdkOutput](./client.md#interface-storagecreatetransactionsdkoutput)
|
|
14277
|
+
|
|
14278
|
+
Throws
|
|
14279
|
+
|
|
14280
|
+
WERR_INVALID_PARAMETER if storage omitted, reclassified, or modified
|
|
14281
|
+
any caller-specified output.
|
|
14282
|
+
|
|
14283
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
14284
|
+
|
|
14529
14285
|
---
|
|
14530
14286
|
##### Function: verifyTruthy
|
|
14531
14287
|
|
|
@@ -14559,6 +14315,42 @@ WERR_INVALID_PARAMETER if any unlocking script is invalid, if sourceTXID is inva
|
|
|
14559
14315
|
|
|
14560
14316
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
14561
14317
|
|
|
14318
|
+
---
|
|
14319
|
+
##### Function: verifyUnrequestedOutputsAreChangeOrCommission
|
|
14320
|
+
|
|
14321
|
+
Verify that every storage output beyond the caller's requested outputs is
|
|
14322
|
+
either a change output or the (single, bounded) commission output.
|
|
14323
|
+
|
|
14324
|
+
The storage response is ordered `[caller outputs][commission?][change...]`;
|
|
14325
|
+
`verifyRequestedOutputsUnchanged` already validates the caller region (indices
|
|
14326
|
+
`< args.outputs.length`). This checks the remainder.
|
|
14327
|
+
|
|
14328
|
+
Change outputs (`providedBy: 'storage', purpose: 'change'`) are safe at any
|
|
14329
|
+
amount: `buildSignableTransaction` ignores the storage-supplied script and
|
|
14330
|
+
re-derives it client-side (`makeChangeLock` / BRC-29 under the client's own
|
|
14331
|
+
change key), so a change output can only ever pay the client. A change output
|
|
14332
|
+
mislabeled by storage is therefore harmless.
|
|
14333
|
+
|
|
14334
|
+
The commission output's script, by contrast, is taken verbatim from storage
|
|
14335
|
+
and cannot be verified client-side. A malicious storage could inject an extra
|
|
14336
|
+
output — or relabel one as commission — to redirect funds to an attacker while
|
|
14337
|
+
the caller/UI only sees the requested recipients. To bound that, at most one
|
|
14338
|
+
commission output is allowed and its amount must not exceed `maxCommission`.
|
|
14339
|
+
Any other unrecognized output is rejected outright.
|
|
14340
|
+
|
|
14341
|
+
```ts
|
|
14342
|
+
export function verifyUnrequestedOutputsAreChangeOrCommission(storageOutputs: StorageCreateTransactionSdkOutput[], args: Validation.ValidCreateActionArgs, maxCommission: number = MAX_STORAGE_COMMISSION_SATOSHIS): void
|
|
14343
|
+
```
|
|
14344
|
+
|
|
14345
|
+
See also: [MAX_STORAGE_COMMISSION_SATOSHIS](./client.md#variable-max_storage_commission_satoshis), [StorageCreateTransactionSdkOutput](./client.md#interface-storagecreatetransactionsdkoutput)
|
|
14346
|
+
|
|
14347
|
+
Throws
|
|
14348
|
+
|
|
14349
|
+
WERR_INVALID_PARAMETER if storage returned an unrecognized output, more
|
|
14350
|
+
than one commission output, or a commission exceeding `maxCommission`.
|
|
14351
|
+
|
|
14352
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
14353
|
+
|
|
14562
14354
|
---
|
|
14563
14355
|
##### Function: wait
|
|
14564
14356
|
|
|
@@ -15040,16 +14832,17 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
15040
14832
|
| | |
|
|
15041
14833
|
| --- | --- |
|
|
15042
14834
|
| [DEFAULT_SETTINGS](#variable-default_settings) | [parseResults](#variable-parseresults) |
|
|
15043
|
-
| [
|
|
15044
|
-
| [
|
|
15045
|
-
| [
|
|
15046
|
-
| [
|
|
15047
|
-
| [
|
|
15048
|
-
| [
|
|
15049
|
-
| [
|
|
15050
|
-
| [
|
|
15051
|
-
| [
|
|
15052
|
-
| [
|
|
14835
|
+
| [MAX_STORAGE_COMMISSION_SATOSHIS](#variable-max_storage_commission_satoshis) | [queryOverlay](#variable-queryoverlay) |
|
|
14836
|
+
| [ProvenTxReqNonTerminalStatus](#variable-proventxreqnonterminalstatus) | [specOpFailedActions](#variable-specopfailedactions) |
|
|
14837
|
+
| [ProvenTxReqTerminalStatus](#variable-proventxreqterminalstatus) | [specOpInvalidChange](#variable-specopinvalidchange) |
|
|
14838
|
+
| [TESTNET_DEFAULT_SETTINGS](#variable-testnet_default_settings) | [specOpNoSendActions](#variable-specopnosendactions) |
|
|
14839
|
+
| [aggregateActionResults](#variable-aggregateactionresults) | [specOpSetWalletChangeParams](#variable-specopsetwalletchangeparams) |
|
|
14840
|
+
| [brc29ProtocolID](#variable-brc29protocolid) | [specOpThrowReviewActions](#variable-specopthrowreviewactions) |
|
|
14841
|
+
| [dirtyHashes](#variable-dirtyhashes) | [specOpWalletBalance](#variable-specopwalletbalance) |
|
|
14842
|
+
| [logger](#variable-logger) | [transactionColumnsWithoutRawTx](#variable-transactioncolumnswithoutrawtx) |
|
|
14843
|
+
| [maxChangeOutputsPerTransaction](#variable-maxchangeoutputspertransaction) | [transformVerifiableCertificatesWithTrust](#variable-transformverifiablecertificateswithtrust) |
|
|
14844
|
+
| [maxPossibleSatoshis](#variable-maxpossiblesatoshis) | [validBulkHeaderFiles](#variable-validbulkheaderfiles) |
|
|
14845
|
+
| [outputColumnsWithoutLockingScript](#variable-outputcolumnswithoutlockingscript) | |
|
|
15053
14846
|
|
|
15054
14847
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
15055
14848
|
|
|
@@ -15087,6 +14880,15 @@ See also: [WalletSettings](./client.md#interface-walletsettings)
|
|
|
15087
14880
|
|
|
15088
14881
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
15089
14882
|
|
|
14883
|
+
---
|
|
14884
|
+
##### Variable: MAX_STORAGE_COMMISSION_SATOSHIS
|
|
14885
|
+
|
|
14886
|
+
```ts
|
|
14887
|
+
MAX_STORAGE_COMMISSION_SATOSHIS = 500000
|
|
14888
|
+
```
|
|
14889
|
+
|
|
14890
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
14891
|
+
|
|
15090
14892
|
---
|
|
15091
14893
|
##### Variable: ProvenTxReqNonTerminalStatus
|
|
15092
14894
|
|