@bsv/wallet-toolbox 2.1.25 → 2.1.27
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 +11 -0
- package/README.md +8 -17
- package/docs/client.md +1671 -989
- package/docs/monitor.md +34 -19
- package/docs/services.md +303 -279
- package/docs/setup.md +24 -24
- package/docs/storage.md +864 -199
- package/docs/wallet.md +5285 -10988
- 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/__tests/CWIStyleWalletManager.test.js +3 -2
- package/out/src/__tests/CWIStyleWalletManager.test.js.map +1 -1
- package/out/src/__tests/ShamirWalletManager.test.js +4 -0
- package/out/src/__tests/ShamirWalletManager.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.callbacks.test.js +9 -17
- package/out/src/__tests/WalletPermissionsManager.callbacks.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.checks.test.js +4 -4
- package/out/src/__tests/WalletPermissionsManager.checks.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.encryption.test.js +8 -8
- package/out/src/__tests/WalletPermissionsManager.encryption.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.fixtures.d.ts +2 -1
- package/out/src/__tests/WalletPermissionsManager.fixtures.d.ts.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.fixtures.js +7 -5
- package/out/src/__tests/WalletPermissionsManager.fixtures.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.flows.test.js +14 -14
- package/out/src/__tests/WalletPermissionsManager.flows.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.initialization.test.js +4 -4
- package/out/src/__tests/WalletPermissionsManager.initialization.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.pmodules.test.js +4 -4
- package/out/src/__tests/WalletPermissionsManager.pmodules.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.proxying.test.js +6 -5
- package/out/src/__tests/WalletPermissionsManager.proxying.test.js.map +1 -1
- package/out/src/__tests/WalletPermissionsManager.tokens.test.js +2 -1
- package/out/src/__tests/WalletPermissionsManager.tokens.test.js.map +1 -1
- package/out/src/entropy/EntropyCollector.js.map +1 -1
- package/out/src/mockchain/MockChainMigrations.d.ts.map +1 -1
- package/out/src/mockchain/MockChainStorage.js +3 -3
- package/out/src/mockchain/MockChainStorage.js.map +1 -1
- package/out/src/mockchain/MockMiner.js +1 -1
- package/out/src/mockchain/MockMiner.js.map +1 -1
- package/out/src/mockchain/MockServices.js +14 -13
- package/out/src/mockchain/MockServices.js.map +1 -1
- package/out/src/monitor/Monitor.js +8 -6
- package/out/src/monitor/Monitor.js.map +1 -1
- package/out/src/monitor/MonitorDaemon.d.ts.map +1 -1
- package/out/src/monitor/MonitorDaemon.js +11 -13
- package/out/src/monitor/MonitorDaemon.js.map +1 -1
- package/out/src/sdk/PrivilegedKeyManager.d.ts.map +1 -1
- package/out/src/sdk/PrivilegedKeyManager.js +6 -3
- package/out/src/sdk/PrivilegedKeyManager.js.map +1 -1
- package/out/src/sdk/WalletError.d.ts.map +1 -1
- package/out/src/sdk/WalletError.js +19 -18
- package/out/src/sdk/WalletError.js.map +1 -1
- package/out/src/sdk/WalletErrorFromJson.js +1 -1
- package/out/src/sdk/WalletErrorFromJson.js.map +1 -1
- package/out/src/sdk/WalletStorage.interfaces.d.ts +59 -59
- package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
- package/out/src/services/ServiceCollection.d.ts.map +1 -1
- package/out/src/services/ServiceCollection.js +3 -4
- package/out/src/services/ServiceCollection.js.map +1 -1
- package/out/src/services/Services.d.ts.map +1 -1
- package/out/src/services/Services.js +27 -25
- package/out/src/services/Services.js.map +1 -1
- package/out/src/storage/StorageIdb.d.ts.map +1 -1
- package/out/src/storage/StorageIdb.js +99 -94
- package/out/src/storage/StorageIdb.js.map +1 -1
- package/out/src/storage/StorageKnex.d.ts +1 -1
- package/out/src/storage/StorageKnex.d.ts.map +1 -1
- package/out/src/storage/StorageKnex.js +159 -156
- package/out/src/storage/StorageKnex.js.map +1 -1
- package/out/src/storage/StorageProvider.d.ts.map +1 -1
- package/out/src/storage/StorageProvider.js +35 -31
- package/out/src/storage/StorageProvider.js.map +1 -1
- package/out/src/storage/StorageReader.js +7 -7
- package/out/src/storage/StorageReader.js.map +1 -1
- package/out/src/storage/StorageReaderWriter.d.ts +0 -1
- package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
- package/out/src/storage/StorageReaderWriter.js +0 -3
- package/out/src/storage/StorageReaderWriter.js.map +1 -1
- package/out/src/storage/StorageSyncReader.js +1 -1
- package/out/src/storage/StorageSyncReader.js.map +1 -1
- package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
- package/out/src/storage/WalletStorageManager.js +22 -21
- package/out/src/storage/WalletStorageManager.js.map +1 -1
- package/out/src/storage/index.all.d.ts +3 -0
- package/out/src/storage/index.all.d.ts.map +1 -1
- package/out/src/storage/index.all.js +3 -0
- package/out/src/storage/index.all.js.map +1 -1
- package/out/src/storage/index.client.d.ts +3 -0
- package/out/src/storage/index.client.d.ts.map +1 -1
- package/out/src/storage/index.client.js +3 -0
- package/out/src/storage/index.client.js.map +1 -1
- package/out/src/storage/index.mobile.d.ts +3 -0
- package/out/src/storage/index.mobile.d.ts.map +1 -1
- package/out/src/storage/index.mobile.js +3 -0
- package/out/src/storage/index.mobile.js.map +1 -1
- package/out/src/storage/portable/index.d.ts +55 -0
- package/out/src/storage/portable/index.d.ts.map +1 -0
- package/out/src/storage/portable/index.js +830 -0
- package/out/src/storage/portable/index.js.map +1 -0
- package/out/src/storage/storageProviderHelpers.js +2 -2
- package/out/src/storage/storageProviderHelpers.js.map +1 -1
- package/out/src/utility/Format.d.ts.map +1 -1
- package/out/src/utility/Format.js +10 -45
- package/out/src/utility/Format.js.map +1 -1
- package/out/src/utility/ScriptTemplateBRC29.d.ts.map +1 -1
- package/out/src/utility/ScriptTemplateBRC29.js +3 -2
- package/out/src/utility/ScriptTemplateBRC29.js.map +1 -1
- package/out/src/utility/brc114ActionTimeLabels.js +1 -1
- package/out/src/utility/brc114ActionTimeLabels.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 +83 -35
- package/out/src/utility/identityUtils.js.map +1 -1
- package/out/src/utility/index.all.d.ts +1 -0
- package/out/src/utility/index.all.d.ts.map +1 -1
- package/out/src/utility/index.all.js +1 -0
- package/out/src/utility/index.all.js.map +1 -1
- package/out/src/utility/index.client.d.ts +1 -0
- package/out/src/utility/index.client.d.ts.map +1 -1
- package/out/src/utility/index.client.js +1 -0
- package/out/src/utility/index.client.js.map +1 -1
- package/out/src/utility/stampLog.js +3 -3
- package/out/src/utility/stampLog.js.map +1 -1
- package/out/src/utility/utilityHelpers.buffer.js +1 -1
- package/out/src/utility/utilityHelpers.buffer.js.map +1 -1
- package/out/src/utility/utilityHelpers.d.ts.map +1 -1
- package/out/src/utility/utilityHelpers.js +2 -2
- package/out/src/utility/utilityHelpers.js.map +1 -1
- package/out/src/wab-client/WABClient.d.ts +2 -2
- package/out/src/wab-client/WABClient.d.ts.map +1 -1
- package/package.json +2 -2
- package/out/src/storage/schema/__tests/v7Backfill.runner.test.d.ts +0 -2
- package/out/src/storage/schema/__tests/v7Backfill.runner.test.d.ts.map +0 -1
- package/out/src/storage/schema/__tests/v7Backfill.runner.test.js +0 -148
- package/out/src/storage/schema/__tests/v7Backfill.runner.test.js.map +0 -1
- package/out/src/storage/schema/__tests/v7Backfill.test.d.ts +0 -2
- package/out/src/storage/schema/__tests/v7Backfill.test.d.ts.map +0 -1
- package/out/src/storage/schema/__tests/v7Backfill.test.js +0 -96
- package/out/src/storage/schema/__tests/v7Backfill.test.js.map +0 -1
- package/out/src/storage/schema/__tests/v7Fsm.test.d.ts +0 -2
- package/out/src/storage/schema/__tests/v7Fsm.test.d.ts.map +0 -1
- package/out/src/storage/schema/__tests/v7Fsm.test.js +0 -42
- package/out/src/storage/schema/__tests/v7Fsm.test.js.map +0 -1
- package/out/src/storage/schema/__tests/v7Spendability.test.d.ts +0 -2
- package/out/src/storage/schema/__tests/v7Spendability.test.d.ts.map +0 -1
- package/out/src/storage/schema/__tests/v7Spendability.test.js +0 -29
- package/out/src/storage/schema/__tests/v7Spendability.test.js.map +0 -1
- package/out/src/storage/schema/tables/TableAction.d.ts +0 -38
- package/out/src/storage/schema/tables/TableAction.d.ts.map +0 -1
- package/out/src/storage/schema/tables/TableAction.js +0 -3
- package/out/src/storage/schema/tables/TableAction.js.map +0 -1
- package/out/src/storage/schema/tables/TableChainTip.d.ts +0 -17
- package/out/src/storage/schema/tables/TableChainTip.d.ts.map +0 -1
- package/out/src/storage/schema/tables/TableChainTip.js +0 -3
- package/out/src/storage/schema/tables/TableChainTip.js.map +0 -1
- package/out/src/storage/schema/tables/TableMonitorLease.d.ts +0 -23
- package/out/src/storage/schema/tables/TableMonitorLease.d.ts.map +0 -1
- package/out/src/storage/schema/tables/TableMonitorLease.js +0 -3
- package/out/src/storage/schema/tables/TableMonitorLease.js.map +0 -1
- package/out/src/storage/schema/tables/TableTransactionV7.d.ts +0 -50
- package/out/src/storage/schema/tables/TableTransactionV7.d.ts.map +0 -1
- package/out/src/storage/schema/tables/TableTransactionV7.js +0 -3
- package/out/src/storage/schema/tables/TableTransactionV7.js.map +0 -1
- package/out/src/storage/schema/tables/TableTxAudit.d.ts +0 -26
- package/out/src/storage/schema/tables/TableTxAudit.d.ts.map +0 -1
- package/out/src/storage/schema/tables/TableTxAudit.js +0 -3
- package/out/src/storage/schema/tables/TableTxAudit.js.map +0 -1
- package/out/src/storage/schema/v7Backfill.d.ts +0 -35
- package/out/src/storage/schema/v7Backfill.d.ts.map +0 -1
- package/out/src/storage/schema/v7Backfill.idb.d.ts +0 -32
- package/out/src/storage/schema/v7Backfill.idb.d.ts.map +0 -1
- package/out/src/storage/schema/v7Backfill.idb.js +0 -95
- package/out/src/storage/schema/v7Backfill.idb.js.map +0 -1
- package/out/src/storage/schema/v7Backfill.js +0 -147
- package/out/src/storage/schema/v7Backfill.js.map +0 -1
- package/out/src/storage/schema/v7Backfill.knex.d.ts +0 -32
- package/out/src/storage/schema/v7Backfill.knex.d.ts.map +0 -1
- package/out/src/storage/schema/v7Backfill.knex.js +0 -240
- package/out/src/storage/schema/v7Backfill.knex.js.map +0 -1
- package/out/src/storage/schema/v7Backfill.runner.d.ts +0 -63
- package/out/src/storage/schema/v7Backfill.runner.d.ts.map +0 -1
- package/out/src/storage/schema/v7Backfill.runner.js +0 -62
- package/out/src/storage/schema/v7Backfill.runner.js.map +0 -1
- package/out/src/storage/schema/v7Crud.d.ts +0 -39
- package/out/src/storage/schema/v7Crud.d.ts.map +0 -1
- package/out/src/storage/schema/v7Crud.js +0 -203
- package/out/src/storage/schema/v7Crud.js.map +0 -1
- package/out/src/storage/schema/v7Fsm.d.ts +0 -27
- package/out/src/storage/schema/v7Fsm.d.ts.map +0 -1
- package/out/src/storage/schema/v7Fsm.js +0 -108
- package/out/src/storage/schema/v7Fsm.js.map +0 -1
- package/out/src/storage/schema/v7MonitorLease.d.ts +0 -57
- package/out/src/storage/schema/v7MonitorLease.d.ts.map +0 -1
- package/out/src/storage/schema/v7MonitorLease.js +0 -101
- package/out/src/storage/schema/v7MonitorLease.js.map +0 -1
- package/out/src/storage/schema/v7Spendability.d.ts +0 -45
- package/out/src/storage/schema/v7Spendability.d.ts.map +0 -1
- package/out/src/storage/schema/v7Spendability.js +0 -52
- package/out/src/storage/schema/v7Spendability.js.map +0 -1
- package/out/src/storage/schema/v7TxAudit.d.ts +0 -33
- package/out/src/storage/schema/v7TxAudit.d.ts.map +0 -1
- package/out/src/storage/schema/v7TxAudit.js +0 -64
- package/out/src/storage/schema/v7TxAudit.js.map +0 -1
package/docs/client.md
CHANGED
|
@@ -6,84 +6,87 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
6
6
|
|
|
7
7
|
| | | |
|
|
8
8
|
| --- | --- | --- |
|
|
9
|
-
| [AdminStatsResult](#interface-adminstatsresult) | [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [
|
|
10
|
-
| [
|
|
11
|
-
| [
|
|
12
|
-
| [
|
|
13
|
-
| [
|
|
14
|
-
| [
|
|
15
|
-
| [
|
|
16
|
-
| [
|
|
17
|
-
| [
|
|
18
|
-
| [
|
|
19
|
-
| [
|
|
20
|
-
| [
|
|
21
|
-
| [
|
|
22
|
-
| [
|
|
23
|
-
| [
|
|
24
|
-
| [
|
|
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
|
-
| [
|
|
9
|
+
| [AdminStatsResult](#interface-adminstatsresult) | [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [SetupWalletClient](#interface-setupwalletclient) |
|
|
10
|
+
| [AggregatePostBeefTxResult](#interface-aggregatepostbeeftxresult) | [GenerateChangeSdkInput](#interface-generatechangesdkinput) | [SetupWalletIdb](#interface-setupwalletidb) |
|
|
11
|
+
| [ArcConfig](#interface-arcconfig) | [GenerateChangeSdkOutput](#interface-generatechangesdkoutput) | [SetupWalletIdbArgs](#interface-setupwalletidbargs) |
|
|
12
|
+
| [ArcMinerGetTxData](#interface-arcminergettxdata) | [GenerateChangeSdkParams](#interface-generatechangesdkparams) | [SignActionResultX](#interface-signactionresultx) |
|
|
13
|
+
| [ArcSSEClientOptions](#interface-arcsseclientoptions) | [GenerateChangeSdkResult](#interface-generatechangesdkresult) | [StartAuthResponse](#interface-startauthresponse) |
|
|
14
|
+
| [ArcSSEEvent](#interface-arcsseevent) | [GenerateChangeSdkStorageChange](#interface-generatechangesdkstoragechange) | [StatusForTxidResult](#interface-statusfortxidresult) |
|
|
15
|
+
| [AuthId](#interface-authid) | [GetHeaderByteFileLinksResult](#interface-getheaderbytefilelinksresult) | [StopListenerToken](#interface-stoplistenertoken) |
|
|
16
|
+
| [AuthPayload](#interface-authpayload) | [GetMerklePathResult](#interface-getmerklepathresult) | [StorageAdminStats](#interface-storageadminstats) |
|
|
17
|
+
| [BaseBlockHeader](#interface-baseblockheader) | [GetRawTxResult](#interface-getrawtxresult) | [StorageCreateActionResult](#interface-storagecreateactionresult) |
|
|
18
|
+
| [BitailsConfig](#interface-bitailsconfig) | [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail) | [StorageCreateTransactionSdkInput](#interface-storagecreatetransactionsdkinput) |
|
|
19
|
+
| [BitailsMerkleProof](#interface-bitailsmerkleproof) | [GetReqsAndBeefResult](#interface-getreqsandbeefresult) | [StorageCreateTransactionSdkOutput](#interface-storagecreatetransactionsdkoutput) |
|
|
20
|
+
| [BlockHeader](#interface-blockheader) | [GetScriptHashHistory](#interface-getscripthashhistory) | [StorageFeeModel](#interface-storagefeemodel) |
|
|
21
|
+
| [BsvExchangeRate](#interface-bsvexchangerate) | [GetScriptHashHistoryResult](#interface-getscripthashhistoryresult) | [StorageGetBeefOptions](#interface-storagegetbeefoptions) |
|
|
22
|
+
| [BulkFileDataManagerMergeResult](#interface-bulkfiledatamanagermergeresult) | [GetStatusForTxidsResult](#interface-getstatusfortxidsresult) | [StorageIdbOptions](#interface-storageidboptions) |
|
|
23
|
+
| [BulkFileDataManagerOptions](#interface-bulkfiledatamanageroptions) | [GetUtxoStatusDetails](#interface-getutxostatusdetails) | [StorageIdbSchema](#interface-storageidbschema) |
|
|
24
|
+
| [BulkHeaderFileInfo](#interface-bulkheaderfileinfo) | [GetUtxoStatusResult](#interface-getutxostatusresult) | [StorageIdentity](#interface-storageidentity) |
|
|
25
|
+
| [BulkHeaderFilesInfo](#interface-bulkheaderfilesinfo) | [GroupedPermissionRequest](#interface-groupedpermissionrequest) | [StorageInternalizeActionResult](#interface-storageinternalizeactionresult) |
|
|
26
|
+
| [BulkIngestorApi](#interface-bulkingestorapi) | [GroupedPermissions](#interface-groupedpermissions) | [StorageProcessActionArgs](#interface-storageprocessactionargs) |
|
|
27
|
+
| [BulkIngestorBaseOptions](#interface-bulkingestorbaseoptions) | [HeightRangeApi](#interface-heightrangeapi) | [StorageProcessActionResults](#interface-storageprocessactionresults) |
|
|
28
|
+
| [BulkIngestorCDNOptions](#interface-bulkingestorcdnoptions) | [HeightRanges](#interface-heightranges) | [StorageProvenOrReq](#interface-storageprovenorreq) |
|
|
29
|
+
| [BulkIngestorWhatsOnChainOptions](#interface-bulkingestorwhatsonchainoptions) | [KdfConfig](#interface-kdfconfig) | [StorageProviderOptions](#interface-storageprovideroptions) |
|
|
30
|
+
| [BulkStorageApi](#interface-bulkstorageapi) | [KeyPair](#interface-keypair) | [StorageReaderOptions](#interface-storagereaderoptions) |
|
|
31
|
+
| [BulkStorageBaseOptions](#interface-bulkstoragebaseoptions) | [KeyPairAddress](#interface-keypairaddress) | [StorageReaderWriterOptions](#interface-storagereaderwriteroptions) |
|
|
32
|
+
| [BulkSyncResult](#interface-bulksyncresult) | [ListActionsSpecOp](#interface-listactionsspecop) | [StorageSyncReaderOptions](#interface-storagesyncreaderoptions) |
|
|
33
|
+
| [CertOpsWallet](#interface-certopswallet) | [ListOutputsSpecOp](#interface-listoutputsspecop) | [SyncChunk](#interface-syncchunk) |
|
|
34
|
+
| [Certifier](#interface-certifier) | [LiveBlockHeader](#interface-liveblockheader) | [SyncError](#interface-syncerror) |
|
|
35
|
+
| [ChaintracksApi](#interface-chaintracksapi) | [LiveIngestorApi](#interface-liveingestorapi) | [SyncMap](#interface-syncmap) |
|
|
36
|
+
| [ChaintracksAppendableFileApi](#interface-chaintracksappendablefileapi) | [LiveIngestorBaseOptions](#interface-liveingestorbaseoptions) | [TableCertificate](#interface-tablecertificate) |
|
|
37
|
+
| [ChaintracksChainTrackerOptions](#interface-chaintrackschaintrackeroptions) | [LiveIngestorWhatsOnChainOptions](#interface-liveingestorwhatsonchainoptions) | [TableCertificateField](#interface-tablecertificatefield) |
|
|
38
|
+
| [ChaintracksClientApi](#interface-chaintracksclientapi) | [MerklePathNote](#interface-merklepathnote) | [TableCertificateX](#interface-tablecertificatex) |
|
|
39
|
+
| [ChaintracksFetchApi](#interface-chaintracksfetchapi) | [MockChainBlockHeaderRow](#interface-mockchainblockheaderrow) | [TableCommission](#interface-tablecommission) |
|
|
40
|
+
| [ChaintracksFsApi](#interface-chaintracksfsapi) | [MockChainTransactionRow](#interface-mockchaintransactionrow) | [TableMonitorEvent](#interface-tablemonitorevent) |
|
|
41
|
+
| [ChaintracksInfoApi](#interface-chaintracksinfoapi) | [MockChainUtxoRow](#interface-mockchainutxorow) | [TableOutput](#interface-tableoutput) |
|
|
42
|
+
| [ChaintracksIngestorParams](#interface-chaintracksingestorparams) | [MonitorOptions](#interface-monitoroptions) | [TableOutputBasket](#interface-tableoutputbasket) |
|
|
43
|
+
| [ChaintracksManagementApi](#interface-chaintracksmanagementapi) | [OutPoint](#interface-outpoint) | [TableOutputTag](#interface-tableoutputtag) |
|
|
44
|
+
| [ChaintracksOptions](#interface-chaintracksoptions) | [Paged](#interface-paged) | [TableOutputTagMap](#interface-tableoutputtagmap) |
|
|
45
|
+
| [ChaintracksPackageInfoApi](#interface-chaintrackspackageinfoapi) | [ParsedBrc114ActionTimeLabels](#interface-parsedbrc114actiontimelabels) | [TableOutputX](#interface-tableoutputx) |
|
|
46
|
+
| [ChaintracksReadableFileApi](#interface-chaintracksreadablefileapi) | [ParsedOutpoint](#interface-parsedoutpoint) | [TableProvenTx](#interface-tableproventx) |
|
|
47
|
+
| [ChaintracksServiceClientOptions](#interface-chaintracksserviceclientoptions) | [PendingSignAction](#interface-pendingsignaction) | [TableProvenTxReq](#interface-tableproventxreq) |
|
|
48
|
+
| [ChaintracksStorageApi](#interface-chaintracksstorageapi) | [PendingStorageInput](#interface-pendingstorageinput) | [TableProvenTxReqDynamics](#interface-tableproventxreqdynamics) |
|
|
49
|
+
| [ChaintracksStorageBaseOptions](#interface-chaintracksstoragebaseoptions) | [PermissionRequest](#interface-permissionrequest) | [TableSettings](#interface-tablesettings) |
|
|
50
|
+
| [ChaintracksStorageBulkFileApi](#interface-chaintracksstoragebulkfileapi) | [PermissionToken](#interface-permissiontoken) | [TableSyncState](#interface-tablesyncstate) |
|
|
51
|
+
| [ChaintracksStorageIdbOptions](#interface-chaintracksstorageidboptions) | [PermissionsManagerConfig](#interface-permissionsmanagerconfig) | [TableTransaction](#interface-tabletransaction) |
|
|
52
|
+
| [ChaintracksStorageIdbSchema](#interface-chaintracksstorageidbschema) | [PermissionsModule](#interface-permissionsmodule) | [TableTxLabel](#interface-tabletxlabel) |
|
|
53
|
+
| [ChaintracksStorageIngestApi](#interface-chaintracksstorageingestapi) | [PostBeefResult](#interface-postbeefresult) | [TableTxLabelMap](#interface-tabletxlabelmap) |
|
|
54
|
+
| [ChaintracksStorageNoDbOptions](#interface-chaintracksstoragenodboptions) | [PostBeefResultForTxidApi](#interface-postbeefresultfortxidapi) | [TableUser](#interface-tableuser) |
|
|
55
|
+
| [ChaintracksStorageQueryApi](#interface-chaintracksstoragequeryapi) | [PostReqsToNetworkDetails](#interface-postreqstonetworkdetails) | [TaskPurgeParams](#interface-taskpurgeparams) |
|
|
56
|
+
| [ChaintracksWritableFileApi](#interface-chaintrackswritablefileapi) | [PostReqsToNetworkResult](#interface-postreqstonetworkresult) | [TrustSettings](#interface-trustsettings) |
|
|
57
|
+
| [CommitNewTxResults](#interface-commitnewtxresults) | [PostTxResultForTxid](#interface-posttxresultfortxid) | [TrxToken](#interface-trxtoken) |
|
|
58
|
+
| [CompleteAuthResponse](#interface-completeauthresponse) | [PostTxResultForTxidError](#interface-posttxresultfortxiderror) | [TscMerkleProofApi](#interface-tscmerkleproofapi) |
|
|
59
|
+
| [ContactRecord](#interface-contactrecord) | [PostTxsResult](#interface-posttxsresult) | [TxScriptOffsets](#interface-txscriptoffsets) |
|
|
60
|
+
| [ContactSource](#interface-contactsource) | [ProcessSyncChunkResult](#interface-processsyncchunkresult) | [UMPToken](#interface-umptoken) |
|
|
61
|
+
| [CounterpartyPermissionRequest](#interface-counterpartypermissionrequest) | [Profile](#interface-profile) | [UMPTokenInteractor](#interface-umptokeninteractor) |
|
|
62
|
+
| [CounterpartyPermissions](#interface-counterpartypermissions) | [ProvenOrRawTx](#interface-provenorrawtx) | [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs) |
|
|
63
|
+
| [CreateActionResultX](#interface-createactionresultx) | [ProvenTransactionStatus](#interface-proventransactionstatus) | [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult) |
|
|
64
|
+
| [DeactivedHeader](#interface-deactivedheader) | [ProvenTxFromTxidResult](#interface-proventxfromtxidresult) | [ValidateGenerateChangeSdkParamsResult](#interface-validategeneratechangesdkparamsresult) |
|
|
65
|
+
| [EntitySyncMap](#interface-entitysyncmap) | [ProvenTxReqHistory](#interface-proventxreqhistory) | [VerifyAndRepairBeefResult](#interface-verifyandrepairbeefresult) |
|
|
66
|
+
| [EntityTimeStamp](#interface-entitytimestamp) | [ProvenTxReqHistorySummaryApi](#interface-proventxreqhistorysummaryapi) | [WalletArgs](#interface-walletargs) |
|
|
67
|
+
| [ExchangeRatesIoApi](#interface-exchangeratesioapi) | [ProvenTxReqNotify](#interface-proventxreqnotify) | [WalletBalance](#interface-walletbalance) |
|
|
68
|
+
| [ExtendedVerifiableCertificate](#interface-extendedverifiablecertificate) | [ProviderCallHistory](#interface-providercallhistory) | [WalletLoggerArgs](#interface-walletloggerargs) |
|
|
69
|
+
| [FiatExchangeRates](#interface-fiatexchangerates) | [PurgeParams](#interface-purgeparams) | [WalletPermissionsManagerCallbacks](#interface-walletpermissionsmanagercallbacks) |
|
|
70
|
+
| [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs) | [PurgeResults](#interface-purgeresults) | [WalletServices](#interface-walletservices) |
|
|
71
|
+
| [FindCertificatesArgs](#interface-findcertificatesargs) | [ReorgResult](#interface-reorgresult) | [WalletServicesOptions](#interface-walletservicesoptions) |
|
|
72
|
+
| [FindCommissionsArgs](#interface-findcommissionsargs) | [ReproveHeaderResult](#interface-reproveheaderresult) | [WalletSettings](#interface-walletsettings) |
|
|
73
|
+
| [FindForUserSincePagedArgs](#interface-findforusersincepagedargs) | [ReproveProvenResult](#interface-reproveprovenresult) | [WalletSettingsManagerConfig](#interface-walletsettingsmanagerconfig) |
|
|
74
|
+
| [FindMonitorEventsArgs](#interface-findmonitoreventsargs) | [ReqHistoryNote](#interface-reqhistorynote) | [WalletSigner](#interface-walletsigner) |
|
|
72
75
|
| [FindOutputBasketsArgs](#interface-findoutputbasketsargs) | [RequestSyncChunkArgs](#interface-requestsyncchunkargs) | [WalletStorage](#interface-walletstorage) |
|
|
73
76
|
| [FindOutputTagMapsArgs](#interface-findoutputtagmapsargs) | [ReviewActionResult](#interface-reviewactionresult) | [WalletStorageInfo](#interface-walletstorageinfo) |
|
|
74
77
|
| [FindOutputTagsArgs](#interface-findoutputtagsargs) | [ReviewHeightRangeResult](#interface-reviewheightrangeresult) | [WalletStorageProvider](#interface-walletstorageprovider) |
|
|
75
|
-
| [FindOutputsArgs](#interface-findoutputsargs) | [
|
|
76
|
-
| [FindPartialSincePagedArgs](#interface-findpartialsincepagedargs) | [
|
|
77
|
-
| [FindProvenTxReqsArgs](#interface-findproventxreqsargs) | [
|
|
78
|
+
| [FindOutputsArgs](#interface-findoutputsargs) | [ScriptHashHistoryResponse](#interface-scripthashhistoryresponse) | [WalletStorageReader](#interface-walletstoragereader) |
|
|
79
|
+
| [FindPartialSincePagedArgs](#interface-findpartialsincepagedargs) | [ScriptTemplateParamsBRC29](#interface-scripttemplateparamsbrc29) | [WalletStorageSync](#interface-walletstoragesync) |
|
|
80
|
+
| [FindProvenTxReqsArgs](#interface-findproventxreqsargs) | [ScriptTemplateUnlock](#interface-scripttemplateunlock) | [WalletStorageSyncReader](#interface-walletstoragesyncreader) |
|
|
78
81
|
| [FindProvenTxsArgs](#interface-findproventxsargs) | [ServiceCall](#interface-servicecall) | [WalletStorageWriter](#interface-walletstoragewriter) |
|
|
79
|
-
| [FindSincePagedArgs](#interface-findsincepagedargs) | [
|
|
80
|
-
| [FindStaleMerkleRootsArgs](#interface-findstalemerklerootsargs) | [
|
|
81
|
-
| [FindSyncStatesArgs](#interface-findsyncstatesargs) | [
|
|
82
|
-
| [FindTransactionsArgs](#interface-findtransactionsargs) | [
|
|
83
|
-
| [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs) | [
|
|
84
|
-
| [FindTxLabelsArgs](#interface-findtxlabelsargs) | [
|
|
85
|
-
| [FindUsersArgs](#interface-findusersargs) | [
|
|
86
|
-
| [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [
|
|
82
|
+
| [FindSincePagedArgs](#interface-findsincepagedargs) | [ServiceCall](#interface-servicecall) | [WalletTheme](#interface-wallettheme) |
|
|
83
|
+
| [FindStaleMerkleRootsArgs](#interface-findstalemerklerootsargs) | [ServiceCallHistory](#interface-servicecallhistory) | [WhatsOnChainServicesOptions](#interface-whatsonchainservicesoptions) |
|
|
84
|
+
| [FindSyncStatesArgs](#interface-findsyncstatesargs) | [ServiceCallHistoryCounts](#interface-servicecallhistorycounts) | [WocChainInfo](#interface-wocchaininfo) |
|
|
85
|
+
| [FindTransactionsArgs](#interface-findtransactionsargs) | [ServiceToCall](#interface-servicetocall) | [WocGetHeaderByteFileLinks](#interface-wocgetheaderbytefilelinks) |
|
|
86
|
+
| [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs) | [ServicesCallHistory](#interface-servicescallhistory) | [WocGetHeadersHeader](#interface-wocgetheadersheader) |
|
|
87
|
+
| [FindTxLabelsArgs](#interface-findtxlabelsargs) | [SetupClientWalletArgs](#interface-setupclientwalletargs) | [WocHeader](#interface-wocheader) |
|
|
88
|
+
| [FindUsersArgs](#interface-findusersargs) | [SetupClientWalletClientArgs](#interface-setupclientwalletclientargs) | [XValidCreateActionOutput](#interface-xvalidcreateactionoutput) |
|
|
89
|
+
| [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [SetupWallet](#interface-setupwallet) | |
|
|
87
90
|
|
|
88
91
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
89
92
|
|
|
@@ -98,7 +101,36 @@ export interface AdminStatsResult extends StorageAdminStats {
|
|
|
98
101
|
}
|
|
99
102
|
```
|
|
100
103
|
|
|
101
|
-
See also: [ServicesCallHistory](./client.md#
|
|
104
|
+
See also: [ServicesCallHistory](./client.md#interface-servicescallhistory), [StorageAdminStats](./storage.md#interface-storageadminstats)
|
|
105
|
+
|
|
106
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
##### Interface: AggregatePostBeefTxResult
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
export interface AggregatePostBeefTxResult {
|
|
113
|
+
txid: string;
|
|
114
|
+
txidResults: sdk.PostTxResultForTxid[];
|
|
115
|
+
status: AggregateStatus;
|
|
116
|
+
vreq: PostReqsToNetworkDetails;
|
|
117
|
+
successCount: number;
|
|
118
|
+
doubleSpendCount: number;
|
|
119
|
+
statusErrorCount: number;
|
|
120
|
+
serviceErrorCount: number;
|
|
121
|
+
competingTxs: string[];
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
See also: [PostReqsToNetworkDetails](./storage.md#interface-postreqstonetworkdetails), [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
126
|
+
|
|
127
|
+
###### Property competingTxs
|
|
128
|
+
|
|
129
|
+
Any competing double spend txids reported for this txid
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
competingTxs: string[]
|
|
133
|
+
```
|
|
102
134
|
|
|
103
135
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
104
136
|
|
|
@@ -1128,9 +1160,9 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1128
1160
|
|
|
1129
1161
|
```ts
|
|
1130
1162
|
export interface CertOpsWallet {
|
|
1131
|
-
getPublicKey(args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes)
|
|
1132
|
-
encrypt(args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes)
|
|
1133
|
-
decrypt(args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes)
|
|
1163
|
+
getPublicKey: (args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<GetPublicKeyResult>;
|
|
1164
|
+
encrypt: (args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletEncryptResult>;
|
|
1165
|
+
decrypt: (args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes) => Promise<WalletDecryptResult>;
|
|
1134
1166
|
}
|
|
1135
1167
|
```
|
|
1136
1168
|
|
|
@@ -2429,6 +2461,95 @@ export interface CompleteAuthResponse {
|
|
|
2429
2461
|
|
|
2430
2462
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2431
2463
|
|
|
2464
|
+
---
|
|
2465
|
+
##### Interface: ContactRecord
|
|
2466
|
+
|
|
2467
|
+
```ts
|
|
2468
|
+
export interface ContactRecord {
|
|
2469
|
+
identityKey: PubKeyHex;
|
|
2470
|
+
type?: string;
|
|
2471
|
+
decryptedFields?: Record<string, string>;
|
|
2472
|
+
certifierInfo?: {
|
|
2473
|
+
name?: string;
|
|
2474
|
+
iconUrl?: string;
|
|
2475
|
+
description?: string;
|
|
2476
|
+
trust?: number;
|
|
2477
|
+
};
|
|
2478
|
+
}
|
|
2479
|
+
```
|
|
2480
|
+
|
|
2481
|
+
###### Property certifierInfo
|
|
2482
|
+
|
|
2483
|
+
Optional certifier metadata; missing trust defaults to `Infinity` (contacts override overlay trust).
|
|
2484
|
+
|
|
2485
|
+
```ts
|
|
2486
|
+
certifierInfo?: {
|
|
2487
|
+
name?: string;
|
|
2488
|
+
iconUrl?: string;
|
|
2489
|
+
description?: string;
|
|
2490
|
+
trust?: number;
|
|
2491
|
+
}
|
|
2492
|
+
```
|
|
2493
|
+
|
|
2494
|
+
###### Property decryptedFields
|
|
2495
|
+
|
|
2496
|
+
Optional decrypted fields. Whatever the app stored when saving the contact.
|
|
2497
|
+
|
|
2498
|
+
```ts
|
|
2499
|
+
decryptedFields?: Record<string, string>
|
|
2500
|
+
```
|
|
2501
|
+
|
|
2502
|
+
###### Property type
|
|
2503
|
+
|
|
2504
|
+
Optional certificate type (e.g. xCert / discordCert) so callers can render a badge.
|
|
2505
|
+
|
|
2506
|
+
```ts
|
|
2507
|
+
type?: string
|
|
2508
|
+
```
|
|
2509
|
+
|
|
2510
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2511
|
+
|
|
2512
|
+
---
|
|
2513
|
+
##### Interface: ContactSource
|
|
2514
|
+
|
|
2515
|
+
The preferred means of constructing a `Wallet` is with a `WalletArgs` instance.
|
|
2516
|
+
|
|
2517
|
+
Minimal interface the wallet uses to short-circuit identity discovery against the user's local
|
|
2518
|
+
contacts before hitting the overlay. The result shape matches what `discoverByIdentityKey` /
|
|
2519
|
+
`discoverByAttributes` return so callers don't have to special-case contact-sourced records.
|
|
2520
|
+
|
|
2521
|
+
Implementations typically wrap `@bsv/sdk` `ContactsManager` or another on-device source. Reads
|
|
2522
|
+
are expected to be very fast (single-digit ms against local SQLite is typical).
|
|
2523
|
+
|
|
2524
|
+
```ts
|
|
2525
|
+
export interface ContactSource {
|
|
2526
|
+
findByIdentityKey: (identityKey: PubKeyHex) => Promise<ContactRecord | null | undefined>;
|
|
2527
|
+
findByAttributes?: (attributes: Record<string, string> | string[]) => Promise<ContactRecord[]>;
|
|
2528
|
+
}
|
|
2529
|
+
```
|
|
2530
|
+
|
|
2531
|
+
See also: [ContactRecord](./client.md#interface-contactrecord)
|
|
2532
|
+
|
|
2533
|
+
###### Property findByAttributes
|
|
2534
|
+
|
|
2535
|
+
Look up contacts matching a set of attributes. May be a no-op if attribute search is unsupported.
|
|
2536
|
+
|
|
2537
|
+
```ts
|
|
2538
|
+
findByAttributes?: (attributes: Record<string, string> | string[]) => Promise<ContactRecord[]>
|
|
2539
|
+
```
|
|
2540
|
+
See also: [ContactRecord](./client.md#interface-contactrecord)
|
|
2541
|
+
|
|
2542
|
+
###### Property findByIdentityKey
|
|
2543
|
+
|
|
2544
|
+
Look up a contact by identity key. Return `null` (or undefined) if unknown.
|
|
2545
|
+
|
|
2546
|
+
```ts
|
|
2547
|
+
findByIdentityKey: (identityKey: PubKeyHex) => Promise<ContactRecord | null | undefined>
|
|
2548
|
+
```
|
|
2549
|
+
See also: [ContactRecord](./client.md#interface-contactrecord)
|
|
2550
|
+
|
|
2551
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2552
|
+
|
|
2432
2553
|
---
|
|
2433
2554
|
##### Interface: CounterpartyPermissionRequest
|
|
2434
2555
|
|
|
@@ -3099,7 +3220,7 @@ export interface GetMerklePathResult {
|
|
|
3099
3220
|
}
|
|
3100
3221
|
```
|
|
3101
3222
|
|
|
3102
|
-
See also: [BlockHeader](./client.md#interface-blockheader), [ReqHistoryNote](./client.md#
|
|
3223
|
+
See also: [BlockHeader](./client.md#interface-blockheader), [ReqHistoryNote](./client.md#interface-reqhistorynote), [WalletError](./client.md#class-walleterror)
|
|
3103
3224
|
|
|
3104
3225
|
###### Property error
|
|
3105
3226
|
|
|
@@ -3591,7 +3712,7 @@ export interface ListActionsSpecOp {
|
|
|
3591
3712
|
name: string;
|
|
3592
3713
|
labelsToIntercept?: string[];
|
|
3593
3714
|
setStatusFilter?: () => TransactionStatus[];
|
|
3594
|
-
postProcess?: (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListActionsArgs, specOpLabels: string[], txs: Partial<TableTransaction
|
|
3715
|
+
postProcess?: (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListActionsArgs, specOpLabels: string[], txs: Array<Partial<TableTransaction>>) => Promise<void>;
|
|
3595
3716
|
}
|
|
3596
3717
|
```
|
|
3597
3718
|
|
|
@@ -3861,6 +3982,26 @@ userAgent: string
|
|
|
3861
3982
|
|
|
3862
3983
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3863
3984
|
|
|
3985
|
+
---
|
|
3986
|
+
##### Interface: MerklePathNote
|
|
3987
|
+
|
|
3988
|
+
```ts
|
|
3989
|
+
export interface MerklePathNote {
|
|
3990
|
+
what: MerklePathNoteWhat;
|
|
3991
|
+
name: string;
|
|
3992
|
+
status?: number;
|
|
3993
|
+
statusText?: string;
|
|
3994
|
+
target?: string;
|
|
3995
|
+
code?: string;
|
|
3996
|
+
description?: string;
|
|
3997
|
+
[key: string]: boolean | string | number | undefined;
|
|
3998
|
+
}
|
|
3999
|
+
```
|
|
4000
|
+
|
|
4001
|
+
See also: [MerklePathNoteWhat](./services.md#type-merklepathnotewhat)
|
|
4002
|
+
|
|
4003
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4004
|
+
|
|
3864
4005
|
---
|
|
3865
4006
|
##### Interface: MockChainBlockHeaderRow
|
|
3866
4007
|
|
|
@@ -3932,6 +4073,7 @@ export interface MonitorOptions {
|
|
|
3932
4073
|
abandonedMsecs: number;
|
|
3933
4074
|
unprovenAttemptsLimitTest: number;
|
|
3934
4075
|
unprovenAttemptsLimitMain: number;
|
|
4076
|
+
maxRebroadcastAttempts: number;
|
|
3935
4077
|
callbackToken?: string;
|
|
3936
4078
|
loadLastSSEEventId?: () => Promise<string | undefined>;
|
|
3937
4079
|
saveLastSSEEventId?: (lastEventId: string) => Promise<void>;
|
|
@@ -3971,6 +4113,19 @@ Load persisted SSE lastEventId (e.g. from SQLite) for catchup on startup
|
|
|
3971
4113
|
loadLastSSEEventId?: () => Promise<string | undefined>
|
|
3972
4114
|
```
|
|
3973
4115
|
|
|
4116
|
+
###### Property maxRebroadcastAttempts
|
|
4117
|
+
|
|
4118
|
+
Maximum number of times a broadcast transaction may be reset to 'unsent' for
|
|
4119
|
+
rebroadcast after proof check timeout (circuit breaker).
|
|
4120
|
+
|
|
4121
|
+
Default 0 means unlimited — the tx is rebroadcast indefinitely until a proof
|
|
4122
|
+
is found. Set to a positive integer to cap rebroadcast cycles; once the limit
|
|
4123
|
+
is reached the req is marked 'invalid'.
|
|
4124
|
+
|
|
4125
|
+
```ts
|
|
4126
|
+
maxRebroadcastAttempts: number
|
|
4127
|
+
```
|
|
4128
|
+
|
|
3974
4129
|
###### Property msecsWaitPerMerkleProofServiceReq
|
|
3975
4130
|
|
|
3976
4131
|
How many msecs to wait after each getMerkleProof service request.
|
|
@@ -4040,6 +4195,20 @@ export interface Paged {
|
|
|
4040
4195
|
|
|
4041
4196
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4042
4197
|
|
|
4198
|
+
---
|
|
4199
|
+
##### Interface: ParsedBrc114ActionTimeLabels
|
|
4200
|
+
|
|
4201
|
+
```ts
|
|
4202
|
+
export interface ParsedBrc114ActionTimeLabels {
|
|
4203
|
+
from?: number;
|
|
4204
|
+
to?: number;
|
|
4205
|
+
timeFilterRequested: boolean;
|
|
4206
|
+
remainingLabels: string[];
|
|
4207
|
+
}
|
|
4208
|
+
```
|
|
4209
|
+
|
|
4210
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4211
|
+
|
|
4043
4212
|
---
|
|
4044
4213
|
##### Interface: ParsedOutpoint
|
|
4045
4214
|
|
|
@@ -4122,7 +4291,7 @@ export interface PermissionRequest {
|
|
|
4122
4291
|
spending?: {
|
|
4123
4292
|
satoshis: number;
|
|
4124
4293
|
lineItems?: Array<{
|
|
4125
|
-
type:
|
|
4294
|
+
type: LineItemType;
|
|
4126
4295
|
description: string;
|
|
4127
4296
|
satoshis: number;
|
|
4128
4297
|
}>;
|
|
@@ -4133,7 +4302,7 @@ export interface PermissionRequest {
|
|
|
4133
4302
|
}
|
|
4134
4303
|
```
|
|
4135
4304
|
|
|
4136
|
-
See also: [PermissionToken](./client.md#interface-permissiontoken)
|
|
4305
|
+
See also: [LineItemType](./client.md#type-lineitemtype), [PermissionToken](./client.md#interface-permissiontoken)
|
|
4137
4306
|
|
|
4138
4307
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4139
4308
|
|
|
@@ -4162,7 +4331,7 @@ export interface PermissionToken {
|
|
|
4162
4331
|
expiry: number;
|
|
4163
4332
|
privileged?: boolean;
|
|
4164
4333
|
protocol?: string;
|
|
4165
|
-
securityLevel?:
|
|
4334
|
+
securityLevel?: SecurityLevel;
|
|
4166
4335
|
counterparty?: string;
|
|
4167
4336
|
basketName?: string;
|
|
4168
4337
|
certType?: string;
|
|
@@ -4172,6 +4341,8 @@ export interface PermissionToken {
|
|
|
4172
4341
|
}
|
|
4173
4342
|
```
|
|
4174
4343
|
|
|
4344
|
+
See also: [SecurityLevel](./client.md#type-securitylevel)
|
|
4345
|
+
|
|
4175
4346
|
###### Property authorizedAmount
|
|
4176
4347
|
|
|
4177
4348
|
For DSAP, the maximum authorized spending for the month.
|
|
@@ -4283,8 +4454,9 @@ satoshis: number
|
|
|
4283
4454
|
The security level (0,1,2) for DPACP.
|
|
4284
4455
|
|
|
4285
4456
|
```ts
|
|
4286
|
-
securityLevel?:
|
|
4457
|
+
securityLevel?: SecurityLevel
|
|
4287
4458
|
```
|
|
4459
|
+
See also: [SecurityLevel](./client.md#type-securitylevel)
|
|
4288
4460
|
|
|
4289
4461
|
###### Property tx
|
|
4290
4462
|
|
|
@@ -4564,66 +4736,46 @@ Modules are registered in the config mapped by their scheme ID.
|
|
|
4564
4736
|
|
|
4565
4737
|
```ts
|
|
4566
4738
|
export interface PermissionsModule {
|
|
4567
|
-
onRequest(req: {
|
|
4739
|
+
onRequest: (req: {
|
|
4568
4740
|
method: string;
|
|
4569
4741
|
args: object;
|
|
4570
4742
|
originator: string;
|
|
4571
|
-
})
|
|
4743
|
+
}) => Promise<{
|
|
4572
4744
|
args: object;
|
|
4573
4745
|
}>;
|
|
4574
|
-
onResponse(res: any, context: {
|
|
4746
|
+
onResponse: (res: any, context: {
|
|
4575
4747
|
method: string;
|
|
4576
4748
|
originator: string;
|
|
4577
|
-
})
|
|
4749
|
+
}) => Promise<any>;
|
|
4578
4750
|
}
|
|
4579
4751
|
```
|
|
4580
4752
|
|
|
4581
|
-
######
|
|
4753
|
+
###### Property onRequest
|
|
4582
4754
|
|
|
4583
4755
|
Transforms the request before it's passed to the underlying wallet.
|
|
4584
4756
|
Can check and enforce permissions, throw errors, or modify any arguments as needed prior to invocation.
|
|
4585
4757
|
|
|
4586
4758
|
```ts
|
|
4587
|
-
onRequest(req: {
|
|
4759
|
+
onRequest: (req: {
|
|
4588
4760
|
method: string;
|
|
4589
4761
|
args: object;
|
|
4590
4762
|
originator: string;
|
|
4591
|
-
})
|
|
4763
|
+
}) => Promise<{
|
|
4592
4764
|
args: object;
|
|
4593
4765
|
}>
|
|
4594
4766
|
```
|
|
4595
4767
|
|
|
4596
|
-
|
|
4597
|
-
|
|
4598
|
-
Transformed arguments that will be passed to the underlying wallet
|
|
4599
|
-
|
|
4600
|
-
Argument Details
|
|
4601
|
-
|
|
4602
|
-
+ **req**
|
|
4603
|
-
+ The incoming request with method, args, and originator
|
|
4604
|
-
|
|
4605
|
-
###### Method onResponse
|
|
4768
|
+
###### Property onResponse
|
|
4606
4769
|
|
|
4607
4770
|
Transforms the response from the underlying wallet before returning to caller.
|
|
4608
4771
|
|
|
4609
4772
|
```ts
|
|
4610
|
-
onResponse(res: any, context: {
|
|
4773
|
+
onResponse: (res: any, context: {
|
|
4611
4774
|
method: string;
|
|
4612
4775
|
originator: string;
|
|
4613
|
-
})
|
|
4776
|
+
}) => Promise<any>
|
|
4614
4777
|
```
|
|
4615
4778
|
|
|
4616
|
-
Returns
|
|
4617
|
-
|
|
4618
|
-
Transformed response to return to the caller
|
|
4619
|
-
|
|
4620
|
-
Argument Details
|
|
4621
|
-
|
|
4622
|
-
+ **res**
|
|
4623
|
-
+ The response from the underlying wallet
|
|
4624
|
-
+ **context**
|
|
4625
|
-
+ Metadata about the original request (method, originator)
|
|
4626
|
-
|
|
4627
4779
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4628
4780
|
|
|
4629
4781
|
---
|
|
@@ -4733,7 +4885,7 @@ export interface PostTxResultForTxid {
|
|
|
4733
4885
|
}
|
|
4734
4886
|
```
|
|
4735
4887
|
|
|
4736
|
-
See also: [PostTxResultForTxidError](./client.md#interface-posttxresultfortxiderror), [ReqHistoryNote](./client.md#
|
|
4888
|
+
See also: [PostTxResultForTxidError](./client.md#interface-posttxresultfortxiderror), [ReqHistoryNote](./client.md#interface-reqhistorynote), [blockHash](./services.md#function-blockhash)
|
|
4737
4889
|
|
|
4738
4890
|
###### Property alreadyKnown
|
|
4739
4891
|
|
|
@@ -4801,7 +4953,7 @@ export interface PostTxsResult {
|
|
|
4801
4953
|
}
|
|
4802
4954
|
```
|
|
4803
4955
|
|
|
4804
|
-
See also: [PostTxResultForTxid](./client.md#interface-posttxresultfortxid), [ReqHistoryNote](./client.md#
|
|
4956
|
+
See also: [PostTxResultForTxid](./client.md#interface-posttxresultfortxid), [ReqHistoryNote](./client.md#interface-reqhistorynote), [WalletError](./client.md#class-walleterror)
|
|
4805
4957
|
|
|
4806
4958
|
###### Property data
|
|
4807
4959
|
|
|
@@ -4962,7 +5114,7 @@ export interface ProvenTxReqHistory {
|
|
|
4962
5114
|
}
|
|
4963
5115
|
```
|
|
4964
5116
|
|
|
4965
|
-
See also: [ReqHistoryNote](./client.md#
|
|
5117
|
+
See also: [ReqHistoryNote](./client.md#interface-reqhistorynote)
|
|
4966
5118
|
|
|
4967
5119
|
###### Property notes
|
|
4968
5120
|
|
|
@@ -4972,7 +5124,7 @@ Values are a description of what happened.
|
|
|
4972
5124
|
```ts
|
|
4973
5125
|
notes?: ReqHistoryNote[]
|
|
4974
5126
|
```
|
|
4975
|
-
See also: [ReqHistoryNote](./client.md#
|
|
5127
|
+
See also: [ReqHistoryNote](./client.md#interface-reqhistorynote)
|
|
4976
5128
|
|
|
4977
5129
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4978
5130
|
|
|
@@ -5130,11 +5282,11 @@ Returned results from WalletStorageManager reproveHeader method.
|
|
|
5130
5282
|
```ts
|
|
5131
5283
|
export interface ReproveHeaderResult {
|
|
5132
5284
|
log: string;
|
|
5133
|
-
updated: {
|
|
5285
|
+
updated: Array<{
|
|
5134
5286
|
was: TableProvenTx;
|
|
5135
5287
|
update: Partial<TableProvenTx>;
|
|
5136
5288
|
logUpdate: string;
|
|
5137
|
-
}
|
|
5289
|
+
}>;
|
|
5138
5290
|
unchanged: TableProvenTx[];
|
|
5139
5291
|
unavailable: TableProvenTx[];
|
|
5140
5292
|
}
|
|
@@ -5173,11 +5325,11 @@ See also: [TableProvenTx](./storage.md#interface-tableproventx)
|
|
|
5173
5325
|
List of proven_txs records that were updated with new proof data.
|
|
5174
5326
|
|
|
5175
5327
|
```ts
|
|
5176
|
-
updated: {
|
|
5328
|
+
updated: Array<{
|
|
5177
5329
|
was: TableProvenTx;
|
|
5178
5330
|
update: Partial<TableProvenTx>;
|
|
5179
5331
|
logUpdate: string;
|
|
5180
|
-
}
|
|
5332
|
+
}>
|
|
5181
5333
|
```
|
|
5182
5334
|
See also: [TableProvenTx](./storage.md#interface-tableproventx)
|
|
5183
5335
|
|
|
@@ -5240,6 +5392,19 @@ See also: [TableProvenTx](./storage.md#interface-tableproventx)
|
|
|
5240
5392
|
|
|
5241
5393
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5242
5394
|
|
|
5395
|
+
---
|
|
5396
|
+
##### Interface: ReqHistoryNote
|
|
5397
|
+
|
|
5398
|
+
```ts
|
|
5399
|
+
export interface ReqHistoryNote {
|
|
5400
|
+
when?: string;
|
|
5401
|
+
what: string;
|
|
5402
|
+
[key: string]: boolean | string | number | undefined;
|
|
5403
|
+
}
|
|
5404
|
+
```
|
|
5405
|
+
|
|
5406
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5407
|
+
|
|
5243
5408
|
---
|
|
5244
5409
|
##### Interface: RequestSyncChunkArgs
|
|
5245
5410
|
|
|
@@ -5251,10 +5416,10 @@ export interface RequestSyncChunkArgs {
|
|
|
5251
5416
|
since?: Date;
|
|
5252
5417
|
maxRoughSize: number;
|
|
5253
5418
|
maxItems: number;
|
|
5254
|
-
offsets: {
|
|
5419
|
+
offsets: Array<{
|
|
5255
5420
|
name: string;
|
|
5256
5421
|
offset: number;
|
|
5257
|
-
}
|
|
5422
|
+
}>;
|
|
5258
5423
|
}
|
|
5259
5424
|
```
|
|
5260
5425
|
|
|
@@ -5311,10 +5476,10 @@ The entity order is:
|
|
|
5311
5476
|
11 CertificateFields
|
|
5312
5477
|
|
|
5313
5478
|
```ts
|
|
5314
|
-
offsets: {
|
|
5479
|
+
offsets: Array<{
|
|
5315
5480
|
name: string;
|
|
5316
5481
|
offset: number;
|
|
5317
|
-
}
|
|
5482
|
+
}>
|
|
5318
5483
|
```
|
|
5319
5484
|
|
|
5320
5485
|
###### Property since
|
|
@@ -5385,6 +5550,26 @@ export interface ReviewHeightRangeResult {
|
|
|
5385
5550
|
|
|
5386
5551
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5387
5552
|
|
|
5553
|
+
---
|
|
5554
|
+
##### Interface: ScriptHashHistoryResponse
|
|
5555
|
+
|
|
5556
|
+
```ts
|
|
5557
|
+
export interface ScriptHashHistoryResponse {
|
|
5558
|
+
ok: boolean;
|
|
5559
|
+
status: number;
|
|
5560
|
+
statusText: string;
|
|
5561
|
+
data?: {
|
|
5562
|
+
result: Array<{
|
|
5563
|
+
tx_hash: string;
|
|
5564
|
+
height?: number;
|
|
5565
|
+
}>;
|
|
5566
|
+
error?: string;
|
|
5567
|
+
};
|
|
5568
|
+
}
|
|
5569
|
+
```
|
|
5570
|
+
|
|
5571
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5572
|
+
|
|
5388
5573
|
---
|
|
5389
5574
|
##### Interface: ScriptTemplateParamsBRC29
|
|
5390
5575
|
|
|
@@ -5611,6 +5796,28 @@ See also: [ServiceCall](./services.md#interface-servicecall)
|
|
|
5611
5796
|
|
|
5612
5797
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5613
5798
|
|
|
5799
|
+
---
|
|
5800
|
+
##### Interface: ServicesCallHistory
|
|
5801
|
+
|
|
5802
|
+
Type for the service call history returned by Services.getServicesCallHistory.
|
|
5803
|
+
|
|
5804
|
+
```ts
|
|
5805
|
+
export interface ServicesCallHistory {
|
|
5806
|
+
version: number;
|
|
5807
|
+
getMerklePath: ServiceCallHistory;
|
|
5808
|
+
getRawTx: ServiceCallHistory;
|
|
5809
|
+
postBeef: ServiceCallHistory;
|
|
5810
|
+
getUtxoStatus: ServiceCallHistory;
|
|
5811
|
+
getStatusForTxids: ServiceCallHistory;
|
|
5812
|
+
getScriptHashHistory: ServiceCallHistory;
|
|
5813
|
+
updateFiatExchangeRates: ServiceCallHistory;
|
|
5814
|
+
}
|
|
5815
|
+
```
|
|
5816
|
+
|
|
5817
|
+
See also: [ServiceCallHistory](./client.md#interface-servicecallhistory)
|
|
5818
|
+
|
|
5819
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5820
|
+
|
|
5614
5821
|
---
|
|
5615
5822
|
##### Interface: SetupClientWalletArgs
|
|
5616
5823
|
|
|
@@ -5919,6 +6126,17 @@ status: "mined" | "known" | "unknown"
|
|
|
5919
6126
|
|
|
5920
6127
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
5921
6128
|
|
|
6129
|
+
---
|
|
6130
|
+
##### Interface: StopListenerToken
|
|
6131
|
+
|
|
6132
|
+
```ts
|
|
6133
|
+
export interface StopListenerToken {
|
|
6134
|
+
stop: (() => void) | undefined;
|
|
6135
|
+
}
|
|
6136
|
+
```
|
|
6137
|
+
|
|
6138
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6139
|
+
|
|
5922
6140
|
---
|
|
5923
6141
|
##### Interface: StorageAdminStats
|
|
5924
6142
|
|
|
@@ -6874,6 +7092,8 @@ export interface TableProvenTxReq extends TableProvenTxReqDynamics {
|
|
|
6874
7092
|
notify: string;
|
|
6875
7093
|
rawTx: number[];
|
|
6876
7094
|
inputBEEF?: number[];
|
|
7095
|
+
wasBroadcast?: boolean;
|
|
7096
|
+
rebroadcastAttempts?: number;
|
|
6877
7097
|
}
|
|
6878
7098
|
```
|
|
6879
7099
|
|
|
@@ -6921,6 +7141,27 @@ Parses to `ProvenTxReqNotifyApi`.
|
|
|
6921
7141
|
notify: string
|
|
6922
7142
|
```
|
|
6923
7143
|
|
|
7144
|
+
###### Property rebroadcastAttempts
|
|
7145
|
+
|
|
7146
|
+
Count of how many times this req has been reset to 'unsent' for rebroadcast
|
|
7147
|
+
after proof check timeout. Used by the circuit-breaker (maxRebroadcastAttempts).
|
|
7148
|
+
Defaults to 0 (added by migration 2026-04-30-001).
|
|
7149
|
+
|
|
7150
|
+
```ts
|
|
7151
|
+
rebroadcastAttempts?: number
|
|
7152
|
+
```
|
|
7153
|
+
|
|
7154
|
+
###### Property wasBroadcast
|
|
7155
|
+
|
|
7156
|
+
Set to true the first time this req transitions to 'unmined' or 'callback' status,
|
|
7157
|
+
indicating the transaction was successfully broadcast to the network.
|
|
7158
|
+
Used to distinguish rebroadcast candidates from transactions that were never sent.
|
|
7159
|
+
Defaults to false (added by migration 2026-04-30-001).
|
|
7160
|
+
|
|
7161
|
+
```ts
|
|
7162
|
+
wasBroadcast?: boolean
|
|
7163
|
+
```
|
|
7164
|
+
|
|
6924
7165
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6925
7166
|
|
|
6926
7167
|
---
|
|
@@ -6938,6 +7179,8 @@ export interface TableProvenTxReqDynamics extends sdk.EntityTimeStamp {
|
|
|
6938
7179
|
batch?: string;
|
|
6939
7180
|
history: string;
|
|
6940
7181
|
notify: string;
|
|
7182
|
+
wasBroadcast?: boolean;
|
|
7183
|
+
rebroadcastAttempts?: number;
|
|
6941
7184
|
}
|
|
6942
7185
|
```
|
|
6943
7186
|
|
|
@@ -6985,6 +7228,24 @@ Parses to `ProvenTxReqNotifyApi`.
|
|
|
6985
7228
|
notify: string
|
|
6986
7229
|
```
|
|
6987
7230
|
|
|
7231
|
+
###### Property rebroadcastAttempts
|
|
7232
|
+
|
|
7233
|
+
Count of rebroadcast cycles for this req. Used by the circuit-breaker.
|
|
7234
|
+
Defaults to 0 (added by migration 2026-04-30-001).
|
|
7235
|
+
|
|
7236
|
+
```ts
|
|
7237
|
+
rebroadcastAttempts?: number
|
|
7238
|
+
```
|
|
7239
|
+
|
|
7240
|
+
###### Property wasBroadcast
|
|
7241
|
+
|
|
7242
|
+
Set to true the first time this req transitions to 'unmined' or 'callback' status.
|
|
7243
|
+
Defaults to false (added by migration 2026-04-30-001).
|
|
7244
|
+
|
|
7245
|
+
```ts
|
|
7246
|
+
wasBroadcast?: boolean
|
|
7247
|
+
```
|
|
7248
|
+
|
|
6988
7249
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
6989
7250
|
|
|
6990
7251
|
---
|
|
@@ -7260,16 +7521,16 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7260
7521
|
|
|
7261
7522
|
```ts
|
|
7262
7523
|
export interface TxScriptOffsets {
|
|
7263
|
-
inputs: {
|
|
7524
|
+
inputs: Array<{
|
|
7264
7525
|
vin: number;
|
|
7265
7526
|
offset: number;
|
|
7266
7527
|
length: number;
|
|
7267
|
-
}
|
|
7268
|
-
outputs: {
|
|
7528
|
+
}>;
|
|
7529
|
+
outputs: Array<{
|
|
7269
7530
|
vout: number;
|
|
7270
7531
|
offset: number;
|
|
7271
7532
|
length: number;
|
|
7272
|
-
}
|
|
7533
|
+
}>;
|
|
7273
7534
|
}
|
|
7274
7535
|
```
|
|
7275
7536
|
|
|
@@ -7553,8 +7814,6 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7553
7814
|
---
|
|
7554
7815
|
##### Interface: WalletArgs
|
|
7555
7816
|
|
|
7556
|
-
The preferred means of constructing a `Wallet` is with a `WalletArgs` instance.
|
|
7557
|
-
|
|
7558
7817
|
```ts
|
|
7559
7818
|
export interface WalletArgs {
|
|
7560
7819
|
chain: Chain;
|
|
@@ -7565,11 +7824,24 @@ export interface WalletArgs {
|
|
|
7565
7824
|
privilegedKeyManager?: PrivilegedKeyManager;
|
|
7566
7825
|
settingsManager?: WalletSettingsManager;
|
|
7567
7826
|
lookupResolver?: LookupResolver;
|
|
7827
|
+
contactSource?: ContactSource;
|
|
7568
7828
|
makeLogger?: MakeWalletLogger;
|
|
7569
7829
|
}
|
|
7570
7830
|
```
|
|
7571
7831
|
|
|
7572
|
-
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)
|
|
7832
|
+
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)
|
|
7833
|
+
|
|
7834
|
+
###### Property contactSource
|
|
7835
|
+
|
|
7836
|
+
Optional contact source consulted before the overlay in `discoverByIdentityKey` /
|
|
7837
|
+
`discoverByAttributes`. When a contact matches, the overlay call is skipped entirely.
|
|
7838
|
+
Pass `forceRefresh: true` on the discover args to bypass both contacts and the overlay
|
|
7839
|
+
cache.
|
|
7840
|
+
|
|
7841
|
+
```ts
|
|
7842
|
+
contactSource?: ContactSource
|
|
7843
|
+
```
|
|
7844
|
+
See also: [ContactSource](./client.md#interface-contactsource)
|
|
7573
7845
|
|
|
7574
7846
|
###### Property makeLogger
|
|
7575
7847
|
|
|
@@ -7593,10 +7865,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
7593
7865
|
```ts
|
|
7594
7866
|
export interface WalletBalance {
|
|
7595
7867
|
total: number;
|
|
7596
|
-
utxos: {
|
|
7868
|
+
utxos: Array<{
|
|
7597
7869
|
satoshis: number;
|
|
7598
7870
|
outpoint: string;
|
|
7599
|
-
}
|
|
7871
|
+
}>;
|
|
7600
7872
|
}
|
|
7601
7873
|
```
|
|
7602
7874
|
|
|
@@ -7694,27 +7966,27 @@ Defines standard interfaces to access functionality implemented by external tran
|
|
|
7694
7966
|
```ts
|
|
7695
7967
|
export interface WalletServices {
|
|
7696
7968
|
chain: Chain;
|
|
7697
|
-
getChainTracker()
|
|
7698
|
-
getHeaderForHeight(height: number)
|
|
7699
|
-
getHeight()
|
|
7700
|
-
getBsvExchangeRate()
|
|
7701
|
-
getFiatExchangeRate(currency: FiatCurrencyCode, base?: FiatCurrencyCode)
|
|
7702
|
-
getRawTx(txid: string, useNext?: boolean)
|
|
7703
|
-
getMerklePath(txid: string, useNext?: boolean)
|
|
7704
|
-
postBeef(beef: Beef, txids: string[], logger?: WalletLoggerInterface)
|
|
7705
|
-
hashOutputScript(script: string)
|
|
7706
|
-
getStatusForTxids(txids: string[], useNext?: boolean)
|
|
7707
|
-
isUtxo(output: TableOutput)
|
|
7708
|
-
getUtxoStatus(output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string, useNext?: boolean)
|
|
7709
|
-
getScriptHashHistory(hash: string, useNext?: boolean, logger?: WalletLoggerInterface)
|
|
7710
|
-
hashToHeader(hash: string)
|
|
7711
|
-
nLockTimeIsFinal(txOrLockTime: string | number[] | BsvTransaction | number)
|
|
7712
|
-
getBeefForTxid(txid: string)
|
|
7713
|
-
getServicesCallHistory(reset?: boolean)
|
|
7714
|
-
}
|
|
7715
|
-
```
|
|
7716
|
-
|
|
7717
|
-
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [FiatCurrencyCode](./client.md#type-fiatcurrencycode), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [PostBeefResult](./client.md#interface-postbeefresult), [ServicesCallHistory](./client.md#
|
|
7969
|
+
getChainTracker: () => Promise<ChainTracker>;
|
|
7970
|
+
getHeaderForHeight: (height: number) => Promise<number[]>;
|
|
7971
|
+
getHeight: () => Promise<number>;
|
|
7972
|
+
getBsvExchangeRate: () => Promise<number>;
|
|
7973
|
+
getFiatExchangeRate: (currency: FiatCurrencyCode, base?: FiatCurrencyCode) => Promise<number>;
|
|
7974
|
+
getRawTx: (txid: string, useNext?: boolean) => Promise<GetRawTxResult>;
|
|
7975
|
+
getMerklePath: (txid: string, useNext?: boolean) => Promise<GetMerklePathResult>;
|
|
7976
|
+
postBeef: (beef: Beef, txids: string[], logger?: WalletLoggerInterface) => Promise<PostBeefResult[]>;
|
|
7977
|
+
hashOutputScript: (script: string) => string;
|
|
7978
|
+
getStatusForTxids: (txids: string[], useNext?: boolean) => Promise<GetStatusForTxidsResult>;
|
|
7979
|
+
isUtxo: (output: TableOutput) => Promise<boolean>;
|
|
7980
|
+
getUtxoStatus: (output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string, useNext?: boolean) => Promise<GetUtxoStatusResult>;
|
|
7981
|
+
getScriptHashHistory: (hash: string, useNext?: boolean, logger?: WalletLoggerInterface) => Promise<GetScriptHashHistoryResult>;
|
|
7982
|
+
hashToHeader: (hash: string) => Promise<BlockHeader>;
|
|
7983
|
+
nLockTimeIsFinal: (txOrLockTime: string | number[] | BsvTransaction | number) => Promise<boolean>;
|
|
7984
|
+
getBeefForTxid: (txid: string) => Promise<Beef>;
|
|
7985
|
+
getServicesCallHistory: (reset?: boolean) => ServicesCallHistory;
|
|
7986
|
+
}
|
|
7987
|
+
```
|
|
7988
|
+
|
|
7989
|
+
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [FiatCurrencyCode](./client.md#type-fiatcurrencycode), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [PostBeefResult](./client.md#interface-postbeefresult), [ServicesCallHistory](./client.md#interface-servicescallhistory), [TableOutput](./storage.md#interface-tableoutput), [getBeefForTxid](./services.md#function-getbeeffortxid), [logger](./client.md#variable-logger)
|
|
7718
7990
|
|
|
7719
7991
|
###### Property chain
|
|
7720
7992
|
|
|
@@ -7725,7 +7997,7 @@ chain: Chain
|
|
|
7725
7997
|
```
|
|
7726
7998
|
See also: [Chain](./client.md#type-chain)
|
|
7727
7999
|
|
|
7728
|
-
######
|
|
8000
|
+
###### Property getBeefForTxid
|
|
7729
8001
|
|
|
7730
8002
|
Constructs a `Beef` for the given `txid` using only external data retrieval services.
|
|
7731
8003
|
|
|
@@ -7733,64 +8005,29 @@ In most cases, the `getBeefForTransaction` method of the `StorageProvider` class
|
|
|
7733
8005
|
used instead to avoid redundantly retrieving data.
|
|
7734
8006
|
|
|
7735
8007
|
```ts
|
|
7736
|
-
getBeefForTxid(txid: string)
|
|
8008
|
+
getBeefForTxid: (txid: string) => Promise<Beef>
|
|
7737
8009
|
```
|
|
7738
8010
|
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
errors if txid does not correspond to a valid transaction as determined by the
|
|
7742
|
-
configured services.
|
|
7743
|
-
|
|
7744
|
-
###### Method getBsvExchangeRate
|
|
8011
|
+
###### Property getBsvExchangeRate
|
|
7745
8012
|
|
|
7746
8013
|
Approximate exchange rate US Dollar / BSV, USD / BSV
|
|
7747
8014
|
|
|
7748
8015
|
This is the US Dollar price of one BSV
|
|
7749
8016
|
|
|
7750
8017
|
```ts
|
|
7751
|
-
getBsvExchangeRate()
|
|
7752
|
-
```
|
|
7753
|
-
|
|
7754
|
-
###### Method getChainTracker
|
|
7755
|
-
|
|
7756
|
-
```ts
|
|
7757
|
-
getChainTracker(): Promise<ChainTracker>
|
|
8018
|
+
getBsvExchangeRate: () => Promise<number>
|
|
7758
8019
|
```
|
|
7759
8020
|
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
standard `ChainTracker` service which requires `options.chaintracks` be valid.
|
|
7763
|
-
|
|
7764
|
-
###### Method getFiatExchangeRate
|
|
8021
|
+
###### Property getFiatExchangeRate
|
|
7765
8022
|
|
|
7766
8023
|
Approximate exchange rate currency per base.
|
|
7767
8024
|
|
|
7768
8025
|
```ts
|
|
7769
|
-
getFiatExchangeRate(currency: FiatCurrencyCode, base?: FiatCurrencyCode)
|
|
8026
|
+
getFiatExchangeRate: (currency: FiatCurrencyCode, base?: FiatCurrencyCode) => Promise<number>
|
|
7770
8027
|
```
|
|
7771
8028
|
See also: [FiatCurrencyCode](./client.md#type-fiatcurrencycode)
|
|
7772
8029
|
|
|
7773
|
-
######
|
|
7774
|
-
|
|
7775
|
-
```ts
|
|
7776
|
-
getHeaderForHeight(height: number): Promise<number[]>
|
|
7777
|
-
```
|
|
7778
|
-
|
|
7779
|
-
Returns
|
|
7780
|
-
|
|
7781
|
-
serialized block header for height on active chain
|
|
7782
|
-
|
|
7783
|
-
###### Method getHeight
|
|
7784
|
-
|
|
7785
|
-
```ts
|
|
7786
|
-
getHeight(): Promise<number>
|
|
7787
|
-
```
|
|
7788
|
-
|
|
7789
|
-
Returns
|
|
7790
|
-
|
|
7791
|
-
the height of the active chain
|
|
7792
|
-
|
|
7793
|
-
###### Method getMerklePath
|
|
8030
|
+
###### Property getMerklePath
|
|
7794
8031
|
|
|
7795
8032
|
Attempts to obtain the merkle proof associated with a 32 byte transaction hash (txid).
|
|
7796
8033
|
|
|
@@ -7809,18 +8046,11 @@ Result error will be the first error thrown (service name and CwiError), or null
|
|
|
7809
8046
|
Increments to next configured service and tries again until all services have been tried.
|
|
7810
8047
|
|
|
7811
8048
|
```ts
|
|
7812
|
-
getMerklePath(txid: string, useNext?: boolean)
|
|
8049
|
+
getMerklePath: (txid: string, useNext?: boolean) => Promise<GetMerklePathResult>
|
|
7813
8050
|
```
|
|
7814
8051
|
See also: [GetMerklePathResult](./client.md#interface-getmerklepathresult)
|
|
7815
8052
|
|
|
7816
|
-
|
|
7817
|
-
|
|
7818
|
-
+ **txid**
|
|
7819
|
-
+ transaction hash for which proof is requested
|
|
7820
|
-
+ **useNext**
|
|
7821
|
-
+ optional, forces skip to next service before starting service requests cycle.
|
|
7822
|
-
|
|
7823
|
-
###### Method getRawTx
|
|
8053
|
+
###### Property getRawTx
|
|
7824
8054
|
|
|
7825
8055
|
Attempts to obtain the raw transaction bytes associated with a 32 byte transaction hash (txid).
|
|
7826
8056
|
|
|
@@ -7839,34 +8069,11 @@ Result error will be the first error thrown (service name and CwiError), or null
|
|
|
7839
8069
|
Increments to next configured service and tries again until all services have been tried.
|
|
7840
8070
|
|
|
7841
8071
|
```ts
|
|
7842
|
-
getRawTx(txid: string, useNext?: boolean)
|
|
8072
|
+
getRawTx: (txid: string, useNext?: boolean) => Promise<GetRawTxResult>
|
|
7843
8073
|
```
|
|
7844
8074
|
See also: [GetRawTxResult](./client.md#interface-getrawtxresult)
|
|
7845
8075
|
|
|
7846
|
-
|
|
7847
|
-
|
|
7848
|
-
+ **txid**
|
|
7849
|
-
+ transaction hash for which raw transaction bytes are requested
|
|
7850
|
-
+ **useNext**
|
|
7851
|
-
+ optional, forces skip to next service before starting service requests cycle.
|
|
7852
|
-
|
|
7853
|
-
###### Method getServicesCallHistory
|
|
7854
|
-
|
|
7855
|
-
```ts
|
|
7856
|
-
getServicesCallHistory(reset?: boolean): ServicesCallHistory
|
|
7857
|
-
```
|
|
7858
|
-
See also: [ServicesCallHistory](./client.md#type-servicescallhistory)
|
|
7859
|
-
|
|
7860
|
-
Returns
|
|
7861
|
-
|
|
7862
|
-
a history of service calls made to the configured services.
|
|
7863
|
-
|
|
7864
|
-
Argument Details
|
|
7865
|
-
|
|
7866
|
-
+ **reset**
|
|
7867
|
-
+ if true, ends current interval and starts a new one.
|
|
7868
|
-
|
|
7869
|
-
###### Method getStatusForTxids
|
|
8076
|
+
###### Property getStatusForTxids
|
|
7870
8077
|
|
|
7871
8078
|
For an array of one or more txids, returns for each wether it is a 'known', 'mined', or 'unknown' transaction.
|
|
7872
8079
|
|
|
@@ -7875,98 +8082,31 @@ Primarily useful for determining if a recently broadcast transaction is known to
|
|
|
7875
8082
|
Also returns the current depth from chain tip if 'mined'.
|
|
7876
8083
|
|
|
7877
8084
|
```ts
|
|
7878
|
-
getStatusForTxids(txids: string[], useNext?: boolean)
|
|
8085
|
+
getStatusForTxids: (txids: string[], useNext?: boolean) => Promise<GetStatusForTxidsResult>
|
|
7879
8086
|
```
|
|
7880
8087
|
See also: [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult)
|
|
7881
8088
|
|
|
7882
|
-
######
|
|
8089
|
+
###### Property getUtxoStatus
|
|
7883
8090
|
|
|
7884
8091
|
Attempts to determine the UTXO status of a transaction output.
|
|
7885
8092
|
|
|
7886
8093
|
Cycles through configured transaction processing services attempting to get a valid response.
|
|
7887
8094
|
|
|
7888
8095
|
```ts
|
|
7889
|
-
getUtxoStatus(output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string, useNext?: boolean)
|
|
8096
|
+
getUtxoStatus: (output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string, useNext?: boolean) => Promise<GetUtxoStatusResult>
|
|
7890
8097
|
```
|
|
7891
8098
|
See also: [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult)
|
|
7892
8099
|
|
|
7893
|
-
|
|
7894
|
-
|
|
7895
|
-
+ **output**
|
|
7896
|
-
+ transaction output identifier in format determined by `outputFormat`.
|
|
7897
|
-
+ **chain**
|
|
7898
|
-
+ which chain to post to, all of rawTx's inputs must be unspent on this chain.
|
|
7899
|
-
+ **outputFormat**
|
|
7900
|
-
+ optional, supported values:
|
|
7901
|
-
'hashLE' little-endian sha256 hash of output script
|
|
7902
|
-
'hashBE' big-endian sha256 hash of output script
|
|
7903
|
-
'script' entire transaction output script
|
|
7904
|
-
undefined if length of `output` is 32 hex bytes then 'hashBE`, otherwise 'script'.
|
|
7905
|
-
+ **outpoint**
|
|
7906
|
-
+ if valid, result isUtxo is true only if this txid and vout match an unspent occurance of output script. `${txid}.${vout}` format.
|
|
7907
|
-
+ **useNext**
|
|
7908
|
-
+ optional, forces skip to next service before starting service requests cycle.
|
|
8100
|
+
###### Property isUtxo
|
|
7909
8101
|
|
|
7910
|
-
|
|
8102
|
+
Calls getUtxoStatus with the hash of the output's lockingScript,
|
|
8103
|
+
and ensures that the output's outpoint matches an unspent use of that script.
|
|
7911
8104
|
|
|
7912
8105
|
```ts
|
|
7913
|
-
|
|
7914
|
-
```
|
|
7915
|
-
|
|
7916
|
-
Returns
|
|
7917
|
-
|
|
7918
|
-
script hash in 'hashLE' format, which is the default.
|
|
7919
|
-
|
|
7920
|
-
Argument Details
|
|
7921
|
-
|
|
7922
|
-
+ **script**
|
|
7923
|
-
+ Output script to be hashed for `getUtxoStatus` default `outputFormat`
|
|
7924
|
-
|
|
7925
|
-
###### Method hashToHeader
|
|
7926
|
-
|
|
7927
|
-
```ts
|
|
7928
|
-
hashToHeader(hash: string): Promise<BlockHeader>
|
|
7929
|
-
```
|
|
7930
|
-
See also: [BlockHeader](./client.md#interface-blockheader)
|
|
7931
|
-
|
|
7932
|
-
Returns
|
|
7933
|
-
|
|
7934
|
-
a block header
|
|
7935
|
-
|
|
7936
|
-
Argument Details
|
|
7937
|
-
|
|
7938
|
-
+ **hash**
|
|
7939
|
-
+ block hash
|
|
7940
|
-
|
|
7941
|
-
###### Method isUtxo
|
|
7942
|
-
|
|
7943
|
-
Calls getUtxoStatus with the hash of the output's lockingScript,
|
|
7944
|
-
and ensures that the output's outpoint matches an unspent use of that script.
|
|
7945
|
-
|
|
7946
|
-
```ts
|
|
7947
|
-
isUtxo(output: TableOutput): Promise<boolean>
|
|
8106
|
+
isUtxo: (output: TableOutput) => Promise<boolean>
|
|
7948
8107
|
```
|
|
7949
8108
|
See also: [TableOutput](./storage.md#interface-tableoutput)
|
|
7950
8109
|
|
|
7951
|
-
Returns
|
|
7952
|
-
|
|
7953
|
-
true if the output appears to currently be spendable.
|
|
7954
|
-
|
|
7955
|
-
###### Method nLockTimeIsFinal
|
|
7956
|
-
|
|
7957
|
-
```ts
|
|
7958
|
-
nLockTimeIsFinal(txOrLockTime: string | number[] | BsvTransaction | number): Promise<boolean>
|
|
7959
|
-
```
|
|
7960
|
-
|
|
7961
|
-
Returns
|
|
7962
|
-
|
|
7963
|
-
whether the locktime value allows the transaction to be mined at the current chain height
|
|
7964
|
-
|
|
7965
|
-
Argument Details
|
|
7966
|
-
|
|
7967
|
-
+ **txOrLockTime**
|
|
7968
|
-
+ either a bitcoin locktime value or hex, binary, un-encoded Transaction
|
|
7969
|
-
|
|
7970
8110
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
7971
8111
|
|
|
7972
8112
|
---
|
|
@@ -8224,49 +8364,39 @@ and it is left to the providers: physical access or remote channel authenticatio
|
|
|
8224
8364
|
|
|
8225
8365
|
```ts
|
|
8226
8366
|
export interface WalletStorage {
|
|
8227
|
-
isStorageProvider()
|
|
8228
|
-
isAvailable()
|
|
8229
|
-
makeAvailable()
|
|
8230
|
-
migrate(storageName: string, storageIdentityKey: string)
|
|
8231
|
-
destroy()
|
|
8232
|
-
setServices(v: WalletServices)
|
|
8233
|
-
getServices()
|
|
8234
|
-
getSettings()
|
|
8235
|
-
getAuth()
|
|
8236
|
-
findOrInsertUser(identityKey: string)
|
|
8367
|
+
isStorageProvider: () => boolean;
|
|
8368
|
+
isAvailable: () => boolean;
|
|
8369
|
+
makeAvailable: () => Promise<TableSettings>;
|
|
8370
|
+
migrate: (storageName: string, storageIdentityKey: string) => Promise<string>;
|
|
8371
|
+
destroy: () => Promise<void>;
|
|
8372
|
+
setServices: (v: WalletServices) => void;
|
|
8373
|
+
getServices: () => WalletServices;
|
|
8374
|
+
getSettings: () => TableSettings;
|
|
8375
|
+
getAuth: () => Promise<AuthId>;
|
|
8376
|
+
findOrInsertUser: (identityKey: string) => Promise<{
|
|
8237
8377
|
user: TableUser;
|
|
8238
8378
|
isNew: boolean;
|
|
8239
8379
|
}>;
|
|
8240
|
-
abortAction(args: AbortActionArgs)
|
|
8241
|
-
createAction(args: Validation.ValidCreateActionArgs)
|
|
8242
|
-
processAction(args: StorageProcessActionArgs)
|
|
8243
|
-
internalizeAction(args: InternalizeActionArgs)
|
|
8244
|
-
findCertificates(args: FindCertificatesArgs)
|
|
8245
|
-
findOutputBaskets(args: FindOutputBasketsArgs)
|
|
8246
|
-
findOutputs(args: FindOutputsArgs)
|
|
8247
|
-
findProvenTxReqs(args: FindProvenTxReqsArgs)
|
|
8248
|
-
listActions(args:
|
|
8249
|
-
listCertificates(args: Validation.ValidListCertificatesArgs)
|
|
8250
|
-
listOutputs(args:
|
|
8251
|
-
insertCertificate(certificate: TableCertificateX)
|
|
8252
|
-
relinquishCertificate(args: RelinquishCertificateArgs)
|
|
8253
|
-
relinquishOutput(args: RelinquishOutputArgs)
|
|
8254
|
-
getStores()
|
|
8380
|
+
abortAction: (args: AbortActionArgs) => Promise<AbortActionResult>;
|
|
8381
|
+
createAction: (args: Validation.ValidCreateActionArgs) => Promise<StorageCreateActionResult>;
|
|
8382
|
+
processAction: (args: StorageProcessActionArgs) => Promise<StorageProcessActionResults>;
|
|
8383
|
+
internalizeAction: (args: InternalizeActionArgs) => Promise<InternalizeActionResult>;
|
|
8384
|
+
findCertificates: (args: FindCertificatesArgs) => Promise<TableCertificateX[]>;
|
|
8385
|
+
findOutputBaskets: (args: FindOutputBasketsArgs) => Promise<TableOutputBasket[]>;
|
|
8386
|
+
findOutputs: (args: FindOutputsArgs) => Promise<TableOutput[]>;
|
|
8387
|
+
findProvenTxReqs: (args: FindProvenTxReqsArgs) => Promise<TableProvenTxReq[]>;
|
|
8388
|
+
listActions: (args: Validation.ValidListActionsArgs) => Promise<ListActionsResult>;
|
|
8389
|
+
listCertificates: (args: Validation.ValidListCertificatesArgs) => Promise<ListCertificatesResult>;
|
|
8390
|
+
listOutputs: (args: Validation.ValidListOutputsArgs) => Promise<ListOutputsResult>;
|
|
8391
|
+
insertCertificate: (certificate: TableCertificateX) => Promise<number>;
|
|
8392
|
+
relinquishCertificate: (args: RelinquishCertificateArgs) => Promise<number>;
|
|
8393
|
+
relinquishOutput: (args: RelinquishOutputArgs) => Promise<number>;
|
|
8394
|
+
getStores: () => WalletStorageInfo[];
|
|
8255
8395
|
}
|
|
8256
8396
|
```
|
|
8257
8397
|
|
|
8258
8398
|
See also: [AuthId](./client.md#interface-authid), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableUser](./storage.md#interface-tableuser), [WalletServices](./client.md#interface-walletservices), [WalletStorageInfo](./client.md#interface-walletstorageinfo), [createAction](./storage.md#function-createaction), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [processAction](./storage.md#function-processaction)
|
|
8259
8399
|
|
|
8260
|
-
###### Method isStorageProvider
|
|
8261
|
-
|
|
8262
|
-
```ts
|
|
8263
|
-
isStorageProvider(): boolean
|
|
8264
|
-
```
|
|
8265
|
-
|
|
8266
|
-
Returns
|
|
8267
|
-
|
|
8268
|
-
false
|
|
8269
|
-
|
|
8270
8400
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8271
8401
|
|
|
8272
8402
|
---
|
|
@@ -8298,23 +8428,13 @@ is the actual minimal interface implemented by storage and remoted storage provi
|
|
|
8298
8428
|
|
|
8299
8429
|
```ts
|
|
8300
8430
|
export interface WalletStorageProvider extends WalletStorageSync {
|
|
8301
|
-
isStorageProvider()
|
|
8302
|
-
setServices(v: WalletServices)
|
|
8431
|
+
isStorageProvider: () => boolean;
|
|
8432
|
+
setServices: (v: WalletServices) => void;
|
|
8303
8433
|
}
|
|
8304
8434
|
```
|
|
8305
8435
|
|
|
8306
8436
|
See also: [WalletServices](./client.md#interface-walletservices), [WalletStorageSync](./client.md#interface-walletstoragesync)
|
|
8307
8437
|
|
|
8308
|
-
###### Method isStorageProvider
|
|
8309
|
-
|
|
8310
|
-
```ts
|
|
8311
|
-
isStorageProvider(): boolean
|
|
8312
|
-
```
|
|
8313
|
-
|
|
8314
|
-
Returns
|
|
8315
|
-
|
|
8316
|
-
true if this object's interface can be extended to the full `StorageProvider` interface
|
|
8317
|
-
|
|
8318
8438
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8319
8439
|
|
|
8320
8440
|
---
|
|
@@ -8322,16 +8442,16 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8322
8442
|
|
|
8323
8443
|
```ts
|
|
8324
8444
|
export interface WalletStorageReader {
|
|
8325
|
-
isAvailable()
|
|
8326
|
-
getServices()
|
|
8327
|
-
getSettings()
|
|
8328
|
-
findCertificatesAuth(auth: AuthId, args: FindCertificatesArgs)
|
|
8329
|
-
findOutputBasketsAuth(auth: AuthId, args: FindOutputBasketsArgs)
|
|
8330
|
-
findOutputsAuth(auth: AuthId, args: FindOutputsArgs)
|
|
8331
|
-
findProvenTxReqs(args: FindProvenTxReqsArgs)
|
|
8332
|
-
listActions(auth: AuthId, vargs: Validation.ValidListActionsArgs)
|
|
8333
|
-
listCertificates(auth: AuthId, vargs: Validation.ValidListCertificatesArgs)
|
|
8334
|
-
listOutputs(auth: AuthId, vargs: Validation.ValidListOutputsArgs)
|
|
8445
|
+
isAvailable: () => boolean;
|
|
8446
|
+
getServices: () => WalletServices;
|
|
8447
|
+
getSettings: () => TableSettings;
|
|
8448
|
+
findCertificatesAuth: (auth: AuthId, args: FindCertificatesArgs) => Promise<TableCertificateX[]>;
|
|
8449
|
+
findOutputBasketsAuth: (auth: AuthId, args: FindOutputBasketsArgs) => Promise<TableOutputBasket[]>;
|
|
8450
|
+
findOutputsAuth: (auth: AuthId, args: FindOutputsArgs) => Promise<TableOutput[]>;
|
|
8451
|
+
findProvenTxReqs: (args: FindProvenTxReqsArgs) => Promise<TableProvenTxReq[]>;
|
|
8452
|
+
listActions: (auth: AuthId, vargs: Validation.ValidListActionsArgs) => Promise<ListActionsResult>;
|
|
8453
|
+
listCertificates: (auth: AuthId, vargs: Validation.ValidListCertificatesArgs) => Promise<ListCertificatesResult>;
|
|
8454
|
+
listOutputs: (auth: AuthId, vargs: Validation.ValidListOutputsArgs) => Promise<ListOutputsResult>;
|
|
8335
8455
|
}
|
|
8336
8456
|
```
|
|
8337
8457
|
|
|
@@ -8344,24 +8464,24 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8344
8464
|
|
|
8345
8465
|
```ts
|
|
8346
8466
|
export interface WalletStorageSync extends WalletStorageWriter {
|
|
8347
|
-
findOrInsertSyncStateAuth(auth: AuthId, storageIdentityKey: string, storageName: string)
|
|
8467
|
+
findOrInsertSyncStateAuth: (auth: AuthId, storageIdentityKey: string, storageName: string) => Promise<{
|
|
8348
8468
|
syncState: TableSyncState;
|
|
8349
8469
|
isNew: boolean;
|
|
8350
8470
|
}>;
|
|
8351
|
-
setActive(auth: AuthId, newActiveStorageIdentityKey: string)
|
|
8352
|
-
getSyncChunk(args: RequestSyncChunkArgs)
|
|
8353
|
-
processSyncChunk(args: RequestSyncChunkArgs, chunk: SyncChunk)
|
|
8471
|
+
setActive: (auth: AuthId, newActiveStorageIdentityKey: string) => Promise<number>;
|
|
8472
|
+
getSyncChunk: (args: RequestSyncChunkArgs) => Promise<SyncChunk>;
|
|
8473
|
+
processSyncChunk: (args: RequestSyncChunkArgs, chunk: SyncChunk) => Promise<ProcessSyncChunkResult>;
|
|
8354
8474
|
}
|
|
8355
8475
|
```
|
|
8356
8476
|
|
|
8357
8477
|
See also: [AuthId](./client.md#interface-authid), [ProcessSyncChunkResult](./client.md#interface-processsyncchunkresult), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [SyncChunk](./client.md#interface-syncchunk), [TableSyncState](./storage.md#interface-tablesyncstate), [WalletStorageWriter](./client.md#interface-walletstoragewriter), [getSyncChunk](./storage.md#function-getsyncchunk)
|
|
8358
8478
|
|
|
8359
|
-
######
|
|
8479
|
+
###### Property setActive
|
|
8360
8480
|
|
|
8361
8481
|
Updagte the `activeStorage` property of the authenticated user by their `userId`.
|
|
8362
8482
|
|
|
8363
8483
|
```ts
|
|
8364
|
-
setActive(auth: AuthId, newActiveStorageIdentityKey: string)
|
|
8484
|
+
setActive: (auth: AuthId, newActiveStorageIdentityKey: string) => Promise<number>
|
|
8365
8485
|
```
|
|
8366
8486
|
See also: [AuthId](./client.md#interface-authid)
|
|
8367
8487
|
|
|
@@ -8374,8 +8494,8 @@ This is the minimal interface required for a WalletStorageProvider to export dat
|
|
|
8374
8494
|
|
|
8375
8495
|
```ts
|
|
8376
8496
|
export interface WalletStorageSyncReader {
|
|
8377
|
-
makeAvailable()
|
|
8378
|
-
getSyncChunk(args: RequestSyncChunkArgs)
|
|
8497
|
+
makeAvailable: () => Promise<TableSettings>;
|
|
8498
|
+
getSyncChunk: (args: RequestSyncChunkArgs) => Promise<SyncChunk>;
|
|
8379
8499
|
}
|
|
8380
8500
|
```
|
|
8381
8501
|
|
|
@@ -8388,20 +8508,20 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8388
8508
|
|
|
8389
8509
|
```ts
|
|
8390
8510
|
export interface WalletStorageWriter extends WalletStorageReader {
|
|
8391
|
-
makeAvailable()
|
|
8392
|
-
migrate(storageName: string, storageIdentityKey: string)
|
|
8393
|
-
destroy()
|
|
8394
|
-
findOrInsertUser(identityKey: string)
|
|
8511
|
+
makeAvailable: () => Promise<TableSettings>;
|
|
8512
|
+
migrate: (storageName: string, storageIdentityKey: string) => Promise<string>;
|
|
8513
|
+
destroy: () => Promise<void>;
|
|
8514
|
+
findOrInsertUser: (identityKey: string) => Promise<{
|
|
8395
8515
|
user: TableUser;
|
|
8396
8516
|
isNew: boolean;
|
|
8397
8517
|
}>;
|
|
8398
|
-
abortAction(auth: AuthId, args: AbortActionArgs)
|
|
8399
|
-
createAction(auth: AuthId, args: Validation.ValidCreateActionArgs)
|
|
8400
|
-
processAction(auth: AuthId, args: StorageProcessActionArgs)
|
|
8401
|
-
internalizeAction(auth: AuthId, args: InternalizeActionArgs)
|
|
8402
|
-
insertCertificateAuth(auth: AuthId, certificate: TableCertificateX)
|
|
8403
|
-
relinquishCertificate(auth: AuthId, args: RelinquishCertificateArgs)
|
|
8404
|
-
relinquishOutput(auth: AuthId, args: RelinquishOutputArgs)
|
|
8518
|
+
abortAction: (auth: AuthId, args: AbortActionArgs) => Promise<AbortActionResult>;
|
|
8519
|
+
createAction: (auth: AuthId, args: Validation.ValidCreateActionArgs) => Promise<StorageCreateActionResult>;
|
|
8520
|
+
processAction: (auth: AuthId, args: StorageProcessActionArgs) => Promise<StorageProcessActionResults>;
|
|
8521
|
+
internalizeAction: (auth: AuthId, args: InternalizeActionArgs) => Promise<StorageInternalizeActionResult>;
|
|
8522
|
+
insertCertificateAuth: (auth: AuthId, certificate: TableCertificateX) => Promise<number>;
|
|
8523
|
+
relinquishCertificate: (auth: AuthId, args: RelinquishCertificateArgs) => Promise<number>;
|
|
8524
|
+
relinquishOutput: (auth: AuthId, args: RelinquishOutputArgs) => Promise<number>;
|
|
8405
8525
|
}
|
|
8406
8526
|
```
|
|
8407
8527
|
|
|
@@ -8595,44 +8715,44 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
8595
8715
|
|
|
8596
8716
|
| | | |
|
|
8597
8717
|
| --- | --- | --- |
|
|
8598
|
-
| [ARC](#class-arc) | [EntitySyncState](#class-entitysyncstate) | [
|
|
8599
|
-
| [ArcSSEClient](#class-arcsseclient) | [EntityTransaction](#class-entitytransaction) | [
|
|
8600
|
-
| [AuthMethodInteractor](#class-authmethodinteractor) | [EntityTxLabel](#class-entitytxlabel) | [
|
|
8601
|
-
| [BHServiceClient](#class-bhserviceclient) | [EntityTxLabelMap](#class-entitytxlabelmap) | [
|
|
8602
|
-
| [Bitails](#class-bitails) | [EntityUser](#class-entityuser) | [
|
|
8603
|
-
| [BulkFileDataManager](#class-bulkfiledatamanager) | [HeightRange](#class-heightrange) | [
|
|
8604
|
-
| [BulkFileDataReader](#class-bulkfiledatareader) | [LiveIngestorBase](#class-liveingestorbase) | [
|
|
8605
|
-
| [BulkFilesReader](#class-bulkfilesreader) | [LiveIngestorWhatsOnChainPoll](#class-liveingestorwhatsonchainpoll) | [
|
|
8606
|
-
| [BulkFilesReaderFs](#class-bulkfilesreaderfs) | [MergeEntity](#class-mergeentity) | [
|
|
8607
|
-
| [BulkFilesReaderStorage](#class-bulkfilesreaderstorage) | [MockChainMigrations](#class-mockchainmigrations) | [
|
|
8608
|
-
| [BulkHeaderFile](#class-bulkheaderfile) | [MockChainStorage](#class-mockchainstorage) | [
|
|
8609
|
-
| [BulkHeaderFileFs](#class-bulkheaderfilefs) | [MockChainTracker](#class-mockchaintracker) | [
|
|
8610
|
-
| [BulkHeaderFileStorage](#class-bulkheaderfilestorage) | [MockMiner](#class-mockminer) | [
|
|
8611
|
-
| [BulkHeaderFiles](#class-bulkheaderfiles) | [MockServices](#class-mockservices) | [
|
|
8612
|
-
| [BulkIngestorBase](#class-bulkingestorbase) | [Monitor](#class-monitor) | [
|
|
8613
|
-
| [BulkIngestorCDN](#class-bulkingestorcdn) | [OverlayUMPTokenInteractor](#class-overlayumptokeninteractor) | [
|
|
8614
|
-
| [BulkIngestorCDNBabbage](#class-bulkingestorcdnbabbage) | [PersonaIDInteractor](#class-personaidinteractor) | [
|
|
8615
|
-
| [BulkIngestorWhatsOnChainCdn](#class-bulkingestorwhatsonchaincdn) | [PrivilegedKeyManager](#class-privilegedkeymanager) | [
|
|
8616
|
-
| [BulkStorageBase](#class-bulkstoragebase) | [ScriptTemplateBRC29](#class-scripttemplatebrc29) | [
|
|
8617
|
-
| [CWIStyleWalletManager](#class-cwistylewalletmanager) | [SdkWhatsOnChain](#class-sdkwhatsonchain) | [
|
|
8618
|
-
| [Chaintracks](#class-chaintracks) | [ServiceCollection](#class-servicecollection) | [
|
|
8619
|
-
| [ChaintracksChainTracker](#class-chaintrackschaintracker) | [Services](#class-services) | [
|
|
8620
|
-
| [ChaintracksFetch](#class-chaintracksfetch) | [SetupClient](#class-setupclient) | [
|
|
8621
|
-
| [ChaintracksServiceClient](#class-chaintracksserviceclient) | [SimpleWalletManager](#class-simplewalletmanager) | [
|
|
8622
|
-
| [ChaintracksStorageBase](#class-chaintracksstoragebase) | [SingleWriterMultiReaderLock](#class-singlewritermultireaderlock) | [
|
|
8623
|
-
| [ChaintracksStorageIdb](#class-chaintracksstorageidb) | [StorageClient](#class-storageclient) | [
|
|
8624
|
-
| [ChaintracksStorageNoDb](#class-chaintracksstoragenodb) | [
|
|
8625
|
-
| [DevConsoleInteractor](#class-devconsoleinteractor) | [
|
|
8626
|
-
| [EntityBase](#class-entitybase) | [
|
|
8627
|
-
| [EntityCertificate](#class-entitycertificate) | [
|
|
8628
|
-
| [EntityCertificateField](#class-entitycertificatefield) | [
|
|
8629
|
-
| [EntityCommission](#class-entitycommission) | [
|
|
8630
|
-
| [EntityOutput](#class-entityoutput) | [
|
|
8631
|
-
| [EntityOutputBasket](#class-entityoutputbasket) | [
|
|
8632
|
-
| [EntityOutputTag](#class-entityoutputtag) | [
|
|
8633
|
-
| [EntityOutputTagMap](#class-entityoutputtagmap) | [
|
|
8634
|
-
| [EntityProvenTx](#class-entityproventx) | [
|
|
8635
|
-
| [EntityProvenTxReq](#class-entityproventxreq) | [
|
|
8718
|
+
| [ARC](#class-arc) | [EntitySyncState](#class-entitysyncstate) | [TaskMonitorCallHistory](#class-taskmonitorcallhistory) |
|
|
8719
|
+
| [ArcSSEClient](#class-arcsseclient) | [EntityTransaction](#class-entitytransaction) | [TaskNewHeader](#class-tasknewheader) |
|
|
8720
|
+
| [AuthMethodInteractor](#class-authmethodinteractor) | [EntityTxLabel](#class-entitytxlabel) | [TaskPurge](#class-taskpurge) |
|
|
8721
|
+
| [BHServiceClient](#class-bhserviceclient) | [EntityTxLabelMap](#class-entitytxlabelmap) | [TaskReorg](#class-taskreorg) |
|
|
8722
|
+
| [Bitails](#class-bitails) | [EntityUser](#class-entityuser) | [TaskReviewDoubleSpends](#class-taskreviewdoublespends) |
|
|
8723
|
+
| [BulkFileDataManager](#class-bulkfiledatamanager) | [HeightRange](#class-heightrange) | [TaskReviewProvenTxs](#class-taskreviewproventxs) |
|
|
8724
|
+
| [BulkFileDataReader](#class-bulkfiledatareader) | [LiveIngestorBase](#class-liveingestorbase) | [TaskReviewStatus](#class-taskreviewstatus) |
|
|
8725
|
+
| [BulkFilesReader](#class-bulkfilesreader) | [LiveIngestorWhatsOnChainPoll](#class-liveingestorwhatsonchainpoll) | [TaskReviewUtxos](#class-taskreviewutxos) |
|
|
8726
|
+
| [BulkFilesReaderFs](#class-bulkfilesreaderfs) | [MergeEntity](#class-mergeentity) | [TaskSendWaiting](#class-tasksendwaiting) |
|
|
8727
|
+
| [BulkFilesReaderStorage](#class-bulkfilesreaderstorage) | [MockChainMigrations](#class-mockchainmigrations) | [TaskUnFail](#class-taskunfail) |
|
|
8728
|
+
| [BulkHeaderFile](#class-bulkheaderfile) | [MockChainStorage](#class-mockchainstorage) | [TwilioPhoneInteractor](#class-twiliophoneinteractor) |
|
|
8729
|
+
| [BulkHeaderFileFs](#class-bulkheaderfilefs) | [MockChainTracker](#class-mockchaintracker) | [WABClient](#class-wabclient) |
|
|
8730
|
+
| [BulkHeaderFileStorage](#class-bulkheaderfilestorage) | [MockMiner](#class-mockminer) | [WERR_BAD_REQUEST](#class-werr_bad_request) |
|
|
8731
|
+
| [BulkHeaderFiles](#class-bulkheaderfiles) | [MockServices](#class-mockservices) | [WERR_BROADCAST_UNAVAILABLE](#class-werr_broadcast_unavailable) |
|
|
8732
|
+
| [BulkIngestorBase](#class-bulkingestorbase) | [Monitor](#class-monitor) | [WERR_INSUFFICIENT_FUNDS](#class-werr_insufficient_funds) |
|
|
8733
|
+
| [BulkIngestorCDN](#class-bulkingestorcdn) | [OverlayUMPTokenInteractor](#class-overlayumptokeninteractor) | [WERR_INTERNAL](#class-werr_internal) |
|
|
8734
|
+
| [BulkIngestorCDNBabbage](#class-bulkingestorcdnbabbage) | [PersonaIDInteractor](#class-personaidinteractor) | [WERR_INVALID_MERKLE_ROOT](#class-werr_invalid_merkle_root) |
|
|
8735
|
+
| [BulkIngestorWhatsOnChainCdn](#class-bulkingestorwhatsonchaincdn) | [PrivilegedKeyManager](#class-privilegedkeymanager) | [WERR_INVALID_OPERATION](#class-werr_invalid_operation) |
|
|
8736
|
+
| [BulkStorageBase](#class-bulkstoragebase) | [ScriptTemplateBRC29](#class-scripttemplatebrc29) | [WERR_INVALID_PARAMETER](#class-werr_invalid_parameter) |
|
|
8737
|
+
| [CWIStyleWalletManager](#class-cwistylewalletmanager) | [SdkWhatsOnChain](#class-sdkwhatsonchain) | [WERR_INVALID_PUBLIC_KEY](#class-werr_invalid_public_key) |
|
|
8738
|
+
| [Chaintracks](#class-chaintracks) | [ServiceCollection](#class-servicecollection) | [WERR_MISSING_PARAMETER](#class-werr_missing_parameter) |
|
|
8739
|
+
| [ChaintracksChainTracker](#class-chaintrackschaintracker) | [Services](#class-services) | [WERR_NETWORK_CHAIN](#class-werr_network_chain) |
|
|
8740
|
+
| [ChaintracksFetch](#class-chaintracksfetch) | [SetupClient](#class-setupclient) | [WERR_NOT_ACTIVE](#class-werr_not_active) |
|
|
8741
|
+
| [ChaintracksServiceClient](#class-chaintracksserviceclient) | [SimpleWalletManager](#class-simplewalletmanager) | [WERR_NOT_IMPLEMENTED](#class-werr_not_implemented) |
|
|
8742
|
+
| [ChaintracksStorageBase](#class-chaintracksstoragebase) | [SingleWriterMultiReaderLock](#class-singlewritermultireaderlock) | [WERR_REVIEW_ACTIONS](#class-werr_review_actions) |
|
|
8743
|
+
| [ChaintracksStorageIdb](#class-chaintracksstorageidb) | [StorageClient](#class-storageclient) | [WERR_UNAUTHORIZED](#class-werr_unauthorized) |
|
|
8744
|
+
| [ChaintracksStorageNoDb](#class-chaintracksstoragenodb) | [StorageClientBase](#class-storageclientbase) | [Wallet](#class-wallet) |
|
|
8745
|
+
| [DevConsoleInteractor](#class-devconsoleinteractor) | [StorageIdb](#class-storageidb) | [WalletAuthenticationManager](#class-walletauthenticationmanager) |
|
|
8746
|
+
| [EntityBase](#class-entitybase) | [StorageProvider](#class-storageprovider) | [WalletError](#class-walleterror) |
|
|
8747
|
+
| [EntityCertificate](#class-entitycertificate) | [StorageReader](#class-storagereader) | [WalletLogger](#class-walletlogger) |
|
|
8748
|
+
| [EntityCertificateField](#class-entitycertificatefield) | [StorageReaderWriter](#class-storagereaderwriter) | [WalletMonitorTask](#class-walletmonitortask) |
|
|
8749
|
+
| [EntityCommission](#class-entitycommission) | [StorageSyncReader](#class-storagesyncreader) | [WalletPermissionsManager](#class-walletpermissionsmanager) |
|
|
8750
|
+
| [EntityOutput](#class-entityoutput) | [TaskArcadeSSE](#class-taskarcadesse) | [WalletSettingsManager](#class-walletsettingsmanager) |
|
|
8751
|
+
| [EntityOutputBasket](#class-entityoutputbasket) | [TaskCheckForProofs](#class-taskcheckforproofs) | [WalletSigner](#class-walletsigner) |
|
|
8752
|
+
| [EntityOutputTag](#class-entityoutputtag) | [TaskCheckNoSends](#class-taskchecknosends) | [WalletStorageManager](#class-walletstoragemanager) |
|
|
8753
|
+
| [EntityOutputTagMap](#class-entityoutputtagmap) | [TaskClock](#class-taskclock) | [WhatsOnChain](#class-whatsonchain) |
|
|
8754
|
+
| [EntityProvenTx](#class-entityproventx) | [TaskFailAbandoned](#class-taskfailabandoned) | [WhatsOnChainNoServices](#class-whatsonchainnoservices) |
|
|
8755
|
+
| [EntityProvenTxReq](#class-entityproventxreq) | [TaskMineBlock](#class-taskmineblock) | [WhatsOnChainServices](#class-whatsonchainservices) |
|
|
8636
8756
|
|
|
8637
8757
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
8638
8758
|
|
|
@@ -9124,19 +9244,19 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
9124
9244
|
|
|
9125
9245
|
```ts
|
|
9126
9246
|
export abstract class BulkHeaderFile implements BulkHeaderFileInfo {
|
|
9127
|
-
chain?: Chain
|
|
9247
|
+
chain?: Chain;
|
|
9128
9248
|
count: number;
|
|
9129
|
-
data?: Uint8Array<ArrayBufferLike
|
|
9249
|
+
data?: Uint8Array<ArrayBufferLike>;
|
|
9130
9250
|
fileHash: string | null;
|
|
9131
|
-
fileId?: number
|
|
9251
|
+
fileId?: number;
|
|
9132
9252
|
fileName: string;
|
|
9133
9253
|
firstHeight: number;
|
|
9134
9254
|
lastChainWork: string;
|
|
9135
9255
|
lastHash: string | null;
|
|
9136
9256
|
prevChainWork: string;
|
|
9137
9257
|
prevHash: string;
|
|
9138
|
-
sourceUrl?: string
|
|
9139
|
-
validated?: boolean
|
|
9258
|
+
sourceUrl?: string;
|
|
9259
|
+
validated?: boolean;
|
|
9140
9260
|
constructor(info: BulkHeaderFileInfo)
|
|
9141
9261
|
abstract readDataFromFile(length: number, offset: number): Promise<Uint8Array | undefined>;
|
|
9142
9262
|
get heightRange(): HeightRange
|
|
@@ -9433,7 +9553,7 @@ export class BulkIngestorWhatsOnChainCdn extends BulkIngestorBase {
|
|
|
9433
9553
|
}
|
|
9434
9554
|
```
|
|
9435
9555
|
|
|
9436
|
-
See also: [BlockHeader](./client.md#interface-blockheader), [BulkIngestorBase](./services.md#class-bulkingestorbase), [BulkIngestorWhatsOnChainOptions](./services.md#interface-bulkingestorwhatsonchainoptions), [Chain](./client.md#type-chain), [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi), [HeightRange](./services.md#class-heightrange), [HeightRanges](./services.md#interface-heightranges), [StopListenerToken](./services.md#
|
|
9556
|
+
See also: [BlockHeader](./client.md#interface-blockheader), [BulkIngestorBase](./services.md#class-bulkingestorbase), [BulkIngestorWhatsOnChainOptions](./services.md#interface-bulkingestorwhatsonchainoptions), [Chain](./client.md#type-chain), [ChaintracksFetchApi](./services.md#interface-chaintracksfetchapi), [HeightRange](./services.md#class-heightrange), [HeightRanges](./services.md#interface-heightranges), [StopListenerToken](./services.md#interface-stoplistenertoken), [WhatsOnChainServices](./services.md#class-whatsonchainservices)
|
|
9437
9557
|
|
|
9438
9558
|
###### Method createBulkIngestorWhatsOnChainOptions
|
|
9439
9559
|
|
|
@@ -9485,6 +9605,7 @@ supporting multiple user profiles under a single account.
|
|
|
9485
9605
|
```ts
|
|
9486
9606
|
export class CWIStyleWalletManager implements WalletInterface {
|
|
9487
9607
|
authenticated: boolean;
|
|
9608
|
+
get ready(): Promise<void>
|
|
9488
9609
|
authenticationMode: "presentation-key-and-password" | "presentation-key-and-recovery-key" | "recovery-key-and-password" = "presentation-key-and-password";
|
|
9489
9610
|
authenticationFlow: "new-user" | "existing-user" = "new-user";
|
|
9490
9611
|
constructor(adminOriginator: OriginatorDomainNameStringUnder250Bytes, walletBuilder: (profilePrimaryKey: number[], profilePrivilegedKeyManager: PrivilegedKeyManager, profileId: number[]) => Promise<WalletInterface>, interactor: UMPTokenInteractor = new OverlayUMPTokenInteractor(), recoveryKeySaver: (key: number[]) => Promise<true>, passwordRetriever: (reason: string, test: (passwordCandidate: string) => boolean | Promise<boolean>) => Promise<string>, newWalletFunder?: (presentationKey: number[], wallet: WalletInterface, adminOriginator: OriginatorDomainNameStringUnder250Bytes) => Promise<void>, stateSnapshot?: number[], kdfConfig?: KdfConfig)
|
|
@@ -9794,45 +9915,17 @@ export class Chaintracks implements ChaintracksManagementApi {
|
|
|
9794
9915
|
let after = before;
|
|
9795
9916
|
let added = HeightRange.empty;
|
|
9796
9917
|
const maxSyncRounds = Math.max(1, this.bulkIngestors.length * 2);
|
|
9797
|
-
let
|
|
9798
|
-
|
|
9799
|
-
|
|
9800
|
-
|
|
9801
|
-
|
|
9802
|
-
|
|
9803
|
-
|
|
9804
|
-
const beforeBulkMax = before.bulk.maxHeight;
|
|
9805
|
-
const beforeLiveRange = HeightRange.from(newLiveHeaders);
|
|
9806
|
-
const r = await bulk.synchronize(presentHeight, before, newLiveHeaders);
|
|
9807
|
-
roundHadSuccess = true;
|
|
9808
|
-
newLiveHeaders = r.liveHeaders;
|
|
9809
|
-
after = await this.storage.getAvailableHeightRanges();
|
|
9810
|
-
added = after.bulk.above(before.bulk);
|
|
9811
|
-
const afterLiveRange = HeightRange.from(newLiveHeaders);
|
|
9812
|
-
if (after.bulk.maxHeight > beforeBulkMax || afterLiveRange.maxHeight > beforeLiveRange.maxHeight) {
|
|
9813
|
-
roundMadeProgress = true;
|
|
9814
|
-
}
|
|
9815
|
-
before = after;
|
|
9816
|
-
this.log(`Bulk Ingestor: ${added.length} added with ${newLiveHeaders.length} live headers from ${bulk.constructor.name}`);
|
|
9817
|
-
if (r.done) {
|
|
9818
|
-
done = true;
|
|
9819
|
-
break;
|
|
9820
|
-
}
|
|
9821
|
-
}
|
|
9822
|
-
catch (eu: unknown) {
|
|
9823
|
-
const e = (bulkSyncError = WalletError.fromUnknown(eu));
|
|
9824
|
-
this.log(`bulk sync error: ${e.message}`);
|
|
9825
|
-
if (!this.available)
|
|
9826
|
-
break;
|
|
9827
|
-
}
|
|
9828
|
-
}
|
|
9829
|
-
if (!this.available && bulkSyncError && !roundHadSuccess) {
|
|
9830
|
-
this.startupError = bulkSyncError;
|
|
9918
|
+
for (let round = 1; round <= maxSyncRounds; round++) {
|
|
9919
|
+
const result = await this.runBulkSyncRound(before, presentHeight, newLiveHeaders);
|
|
9920
|
+
after = result.after;
|
|
9921
|
+
newLiveHeaders = result.newLiveHeaders;
|
|
9922
|
+
added = after.bulk.above(before.bulk);
|
|
9923
|
+
before = after;
|
|
9924
|
+
if (this.startupError != null)
|
|
9831
9925
|
break;
|
|
9832
|
-
|
|
9833
|
-
if (done)
|
|
9926
|
+
if (result.done)
|
|
9834
9927
|
break;
|
|
9835
|
-
if (!
|
|
9928
|
+
if (!result.madeProgress) {
|
|
9836
9929
|
this.log(`Bulk sync stalled after round ${round}. Deferring further bulk sync attempts to continue live header processing.`);
|
|
9837
9930
|
break;
|
|
9838
9931
|
}
|
|
@@ -9840,7 +9933,7 @@ export class Chaintracks implements ChaintracksManagementApi {
|
|
|
9840
9933
|
this.log(`Bulk sync paused after ${maxSyncRounds} rounds to avoid runaway retries. Will retry in a later sync cycle.`);
|
|
9841
9934
|
}
|
|
9842
9935
|
}
|
|
9843
|
-
if (
|
|
9936
|
+
if (this.startupError == null) {
|
|
9844
9937
|
this.liveHeaders.unshift(...newLiveHeaders);
|
|
9845
9938
|
added = after.bulk.above(initialRanges.bulk);
|
|
9846
9939
|
this.log(`syncBulkStorage done
|
|
@@ -9851,151 +9944,32 @@ export class Chaintracks implements ChaintracksManagementApi {
|
|
|
9851
9944
|
`);
|
|
9852
9945
|
}
|
|
9853
9946
|
}
|
|
9854
|
-
private async
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
let
|
|
9858
|
-
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
try {
|
|
9862
|
-
const now = Date.now();
|
|
9863
|
-
lastSyncCheck = now;
|
|
9864
|
-
const presentHeight = await this.getPresentHeight();
|
|
9865
|
-
const before = await this.storage.getAvailableHeightRanges();
|
|
9866
|
-
let skipBulkSync = !before.live.isEmpty && before.live.maxHeight >= presentHeight - this.addLiveRecursionLimit / 2;
|
|
9867
|
-
if (skipBulkSync && now - lastBulkSync > cdnSyncRepeatMsecs) {
|
|
9868
|
-
skipBulkSync = false;
|
|
9869
|
-
}
|
|
9870
|
-
this.log(`Chaintracks Update Services: Bulk Header Sync Review
|
|
9947
|
+
private async runBulkSyncIfNeeded(now: number, lastBulkSync: number, cdnSyncRepeatMsecs: number): Promise<number> {
|
|
9948
|
+
const presentHeight = await this.getPresentHeight();
|
|
9949
|
+
const before = await this.storage.getAvailableHeightRanges();
|
|
9950
|
+
let skipBulkSync = !before.live.isEmpty && before.live.maxHeight >= presentHeight - this.addLiveRecursionLimit / 2;
|
|
9951
|
+
if (skipBulkSync && now - lastBulkSync > cdnSyncRepeatMsecs)
|
|
9952
|
+
skipBulkSync = false;
|
|
9953
|
+
this.log(`Chaintracks Update Services: Bulk Header Sync Review
|
|
9871
9954
|
presentHeight=${presentHeight} addLiveRecursionLimit=${this.addLiveRecursionLimit}
|
|
9872
9955
|
Before synchronize: bulk ${before.bulk}, live ${before.live}
|
|
9873
9956
|
${skipBulkSync ? "Skipping" : "Starting"} syncBulkStorage.
|
|
9874
9957
|
`);
|
|
9875
|
-
|
|
9876
|
-
|
|
9877
|
-
|
|
9878
|
-
|
|
9879
|
-
|
|
9880
|
-
|
|
9881
|
-
|
|
9882
|
-
|
|
9883
|
-
}
|
|
9884
|
-
let count = 0;
|
|
9885
|
-
let liveHeaderDupes = 0;
|
|
9886
|
-
let needSyncCheck = false;
|
|
9887
|
-
for (; !needSyncCheck && !this.stopMainThread;) {
|
|
9888
|
-
let header = this.liveHeaders.shift();
|
|
9889
|
-
if (header) {
|
|
9890
|
-
let recursions = this.addLiveRecursionLimit;
|
|
9891
|
-
for (; !needSyncCheck && !this.stopMainThread;) {
|
|
9892
|
-
const ihr = await this.addLiveHeader(header);
|
|
9893
|
-
if (this.invalidInsertHeaderResult(ihr)) {
|
|
9894
|
-
this.log(`Ignoring liveHeader ${header.height} ${header.hash} due to invalid insert result.`);
|
|
9895
|
-
needSyncCheck = true;
|
|
9896
|
-
}
|
|
9897
|
-
else if (ihr.noPrev) {
|
|
9898
|
-
if (recursions-- <= 0) {
|
|
9899
|
-
this.log(`Ignoring liveHeader ${header.height} ${header.hash} addLiveRecursionLimit=${this.addLiveRecursionLimit} exceeded.`);
|
|
9900
|
-
needSyncCheck = true;
|
|
9901
|
-
}
|
|
9902
|
-
else {
|
|
9903
|
-
const hash = header.previousHash;
|
|
9904
|
-
const prevHeader = await this.getMissingBlockHeader(hash);
|
|
9905
|
-
if (!prevHeader) {
|
|
9906
|
-
this.log(`Ignoring liveHeader ${header.height} ${header.hash} failed to find previous header by hash ${asString(hash)}`);
|
|
9907
|
-
needSyncCheck = true;
|
|
9908
|
-
}
|
|
9909
|
-
else {
|
|
9910
|
-
this.liveHeaders.unshift(header);
|
|
9911
|
-
header = prevHeader;
|
|
9912
|
-
}
|
|
9913
|
-
}
|
|
9914
|
-
}
|
|
9915
|
-
else {
|
|
9916
|
-
if (this.subscriberCallbacksEnabled)
|
|
9917
|
-
this.log(`addLiveHeader ${header.height}${ihr.added ? " added" : ""}${ihr.dupe ? " dupe" : ""}${ihr.isActiveTip ? " isActiveTip" : ""}${ihr.reorgDepth ? " reorg depth " + ihr.reorgDepth : ""}${ihr.noPrev ? " noPrev" : ""}${ihr.noActiveAncestor || ihr.noTip || ihr.badPrev ? " error" : ""}`);
|
|
9918
|
-
if (ihr.dupe) {
|
|
9919
|
-
liveHeaderDupes++;
|
|
9920
|
-
}
|
|
9921
|
-
if (ihr.added) {
|
|
9922
|
-
count++;
|
|
9923
|
-
}
|
|
9924
|
-
break;
|
|
9925
|
-
}
|
|
9926
|
-
}
|
|
9927
|
-
}
|
|
9928
|
-
else {
|
|
9929
|
-
const bheader = this.baseHeaders.shift();
|
|
9930
|
-
if (bheader) {
|
|
9931
|
-
const prev = await this.storage.findLiveHeaderForBlockHash(bheader.previousHash);
|
|
9932
|
-
if (!prev) {
|
|
9933
|
-
this.log(`Ignoring header with unknown previousHash ${bheader.previousHash} in live storage.`);
|
|
9934
|
-
}
|
|
9935
|
-
else {
|
|
9936
|
-
const header: BlockHeader = {
|
|
9937
|
-
...bheader,
|
|
9938
|
-
height: prev.height + 1,
|
|
9939
|
-
hash: blockHash(bheader)
|
|
9940
|
-
};
|
|
9941
|
-
const ihr = await this.addLiveHeader(header);
|
|
9942
|
-
if (this.invalidInsertHeaderResult(ihr)) {
|
|
9943
|
-
this.log(`Ignoring invalid baseHeader ${header.height} ${header.hash}.`);
|
|
9944
|
-
}
|
|
9945
|
-
else {
|
|
9946
|
-
if (this.subscriberCallbacksEnabled)
|
|
9947
|
-
this.log(`addBaseHeader ${header.height}${ihr.added ? " added" : ""}${ihr.dupe ? " dupe" : ""}${ihr.isActiveTip ? " isActiveTip" : ""}${ihr.reorgDepth ? " reorg depth " + ihr.reorgDepth : ""}${ihr.noPrev ? " noPrev" : ""}${ihr.noActiveAncestor || ihr.noTip || ihr.badPrev ? " error" : ""}`);
|
|
9948
|
-
if (ihr.added) {
|
|
9949
|
-
count++;
|
|
9950
|
-
}
|
|
9951
|
-
}
|
|
9952
|
-
}
|
|
9953
|
-
}
|
|
9954
|
-
else {
|
|
9955
|
-
if (count > 0) {
|
|
9956
|
-
if (liveHeaderDupes > 0) {
|
|
9957
|
-
this.log(`${liveHeaderDupes} duplicate headers ignored.`);
|
|
9958
|
-
liveHeaderDupes = 0;
|
|
9959
|
-
}
|
|
9960
|
-
const updated = await this.storage.getAvailableHeightRanges();
|
|
9961
|
-
this.log(`After adding ${count} live headers
|
|
9962
|
-
After live: bulk ${updated.bulk}, live ${updated.live}
|
|
9963
|
-
`);
|
|
9964
|
-
count = 0;
|
|
9965
|
-
}
|
|
9966
|
-
if (!this.subscriberCallbacksEnabled) {
|
|
9967
|
-
const live = await this.storage.findLiveHeightRange();
|
|
9968
|
-
if (!live.isEmpty) {
|
|
9969
|
-
this.subscriberCallbacksEnabled = true;
|
|
9970
|
-
this.log(`listening at height of ${live.maxHeight}`);
|
|
9971
|
-
}
|
|
9972
|
-
}
|
|
9973
|
-
if (!this.available) {
|
|
9974
|
-
this.available = true;
|
|
9975
|
-
}
|
|
9976
|
-
needSyncCheck = Date.now() - lastSyncCheck > syncCheckRepeatMsecs;
|
|
9977
|
-
if (!needSyncCheck)
|
|
9978
|
-
await wait(1000);
|
|
9979
|
-
}
|
|
9980
|
-
}
|
|
9981
|
-
}
|
|
9982
|
-
}
|
|
9983
|
-
catch (eu: unknown) {
|
|
9984
|
-
const e = WalletError.fromUnknown(eu);
|
|
9985
|
-
if (!this.available) {
|
|
9986
|
-
this.startupError = e;
|
|
9987
|
-
this.stopMainThread = true;
|
|
9988
|
-
}
|
|
9989
|
-
else {
|
|
9990
|
-
this.log(`Error occurred during chaintracks main thread processing: ${e.stack || e.message}`);
|
|
9991
|
-
}
|
|
9992
|
-
}
|
|
9958
|
+
if (!skipBulkSync) {
|
|
9959
|
+
if (this.available)
|
|
9960
|
+
await this.syncBulkStorage(presentHeight, before);
|
|
9961
|
+
else
|
|
9962
|
+
await this.syncBulkStorageNoLock(presentHeight, before);
|
|
9963
|
+
if (this.startupError != null)
|
|
9964
|
+
throw this.startupError;
|
|
9965
|
+
return now;
|
|
9993
9966
|
}
|
|
9967
|
+
return lastBulkSync;
|
|
9994
9968
|
}
|
|
9995
9969
|
}
|
|
9996
9970
|
```
|
|
9997
9971
|
|
|
9998
|
-
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)
|
|
9972
|
+
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)
|
|
9999
9973
|
|
|
10000
9974
|
###### Method addHeader
|
|
10001
9975
|
|
|
@@ -10077,7 +10051,6 @@ using the
|
|
|
10077
10051
|
```ts
|
|
10078
10052
|
export class ChaintracksFetch implements ChaintracksFetchApi {
|
|
10079
10053
|
httpClient: HttpClient = defaultHttpClient();
|
|
10080
|
-
constructor()
|
|
10081
10054
|
async download(url: string): Promise<Uint8Array>
|
|
10082
10055
|
async fetchJson<R>(url: string): Promise<R>
|
|
10083
10056
|
pathJoin(baseUrl: string, subpath: string): string
|
|
@@ -10098,9 +10071,9 @@ export class ChaintracksServiceClient implements ChaintracksClientApi {
|
|
|
10098
10071
|
static createChaintracksServiceClientOptions(): ChaintracksServiceClientOptions
|
|
10099
10072
|
options: ChaintracksServiceClientOptions;
|
|
10100
10073
|
constructor(public chain: Chain, public serviceUrl: string, options?: ChaintracksServiceClientOptions)
|
|
10101
|
-
subscribeHeaders(listener: HeaderListener): Promise<string>
|
|
10102
|
-
subscribeReorgs(listener: ReorgListener): Promise<string>
|
|
10103
|
-
unsubscribe(subscriptionId: string): Promise<boolean>
|
|
10074
|
+
async subscribeHeaders(listener: HeaderListener): Promise<string>
|
|
10075
|
+
async subscribeReorgs(listener: ReorgListener): Promise<string>
|
|
10076
|
+
async unsubscribe(subscriptionId: string): Promise<boolean>
|
|
10104
10077
|
async currentHeight(): Promise<number>
|
|
10105
10078
|
async isValidRootForHeight(root: string, height: number): Promise<boolean>
|
|
10106
10079
|
async getJsonOrUndefined<T>(path: string): Promise<T | undefined>
|
|
@@ -10302,14 +10275,14 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
10302
10275
|
|
|
10303
10276
|
```ts
|
|
10304
10277
|
export class ChaintracksStorageNoDb extends ChaintracksStorageBase {
|
|
10305
|
-
static mainData: ChaintracksNoDbData = {
|
|
10278
|
+
static readonly mainData: ChaintracksNoDbData = {
|
|
10306
10279
|
chain: "main",
|
|
10307
10280
|
liveHeaders: new Map<number, LiveBlockHeader>(),
|
|
10308
10281
|
maxHeaderId: 0,
|
|
10309
10282
|
tipHeaderId: 0,
|
|
10310
10283
|
hashToHeaderId: new Map<string, number>()
|
|
10311
10284
|
};
|
|
10312
|
-
static testData: ChaintracksNoDbData = {
|
|
10285
|
+
static readonly testData: ChaintracksNoDbData = {
|
|
10313
10286
|
chain: "test",
|
|
10314
10287
|
liveHeaders: new Map<number, LiveBlockHeader>(),
|
|
10315
10288
|
maxHeaderId: 0,
|
|
@@ -10813,9 +10786,9 @@ export class EntityProvenTx extends EntityBase<TableProvenTx> {
|
|
|
10813
10786
|
}>
|
|
10814
10787
|
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: TrxToken): Promise<void>
|
|
10815
10788
|
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableProvenTx, syncMap: SyncMap, trx?: TrxToken): Promise<boolean>
|
|
10816
|
-
static getProofAttemptsLimit = 8;
|
|
10817
|
-
static getProofMinutes = 60;
|
|
10818
|
-
static async fromReq(req: EntityProvenTxReq, gmpResult: GetMerklePathResult, countsAsAttempt: boolean): Promise<EntityProvenTx | undefined>
|
|
10789
|
+
static readonly getProofAttemptsLimit = 8;
|
|
10790
|
+
static readonly getProofMinutes = 60;
|
|
10791
|
+
static async fromReq(req: EntityProvenTxReq, gmpResult: GetMerklePathResult, countsAsAttempt: boolean, maxRebroadcastAttempts = 0): Promise<EntityProvenTx | undefined>
|
|
10819
10792
|
}
|
|
10820
10793
|
```
|
|
10821
10794
|
|
|
@@ -10826,7 +10799,7 @@ See also: [EntityBase](./storage.md#class-entitybase), [EntityProvenTxReq](./sto
|
|
|
10826
10799
|
How high attempts can go before status is forced to invalid
|
|
10827
10800
|
|
|
10828
10801
|
```ts
|
|
10829
|
-
static getProofAttemptsLimit = 8
|
|
10802
|
+
static readonly getProofAttemptsLimit = 8
|
|
10830
10803
|
```
|
|
10831
10804
|
|
|
10832
10805
|
###### Property getProofMinutes
|
|
@@ -10834,7 +10807,7 @@ static getProofAttemptsLimit = 8
|
|
|
10834
10807
|
How many hours we have to try for a poof
|
|
10835
10808
|
|
|
10836
10809
|
```ts
|
|
10837
|
-
static getProofMinutes = 60
|
|
10810
|
+
static readonly getProofMinutes = 60
|
|
10838
10811
|
```
|
|
10839
10812
|
|
|
10840
10813
|
###### Method fromReq
|
|
@@ -10844,7 +10817,7 @@ Try to create a new ProvenTx from a ProvenTxReq and GetMerkleProofResultApi
|
|
|
10844
10817
|
Otherwise it returns undefined and updates req.status to either 'unknown', 'invalid', or 'unconfirmed'
|
|
10845
10818
|
|
|
10846
10819
|
```ts
|
|
10847
|
-
static async fromReq(req: EntityProvenTxReq, gmpResult: GetMerklePathResult, countsAsAttempt: boolean): Promise<EntityProvenTx | undefined>
|
|
10820
|
+
static async fromReq(req: EntityProvenTxReq, gmpResult: GetMerklePathResult, countsAsAttempt: boolean, maxRebroadcastAttempts = 0): Promise<EntityProvenTx | undefined>
|
|
10848
10821
|
```
|
|
10849
10822
|
See also: [EntityProvenTx](./storage.md#class-entityproventx), [EntityProvenTxReq](./storage.md#class-entityproventxreq), [GetMerklePathResult](./client.md#interface-getmerklepathresult)
|
|
10850
10823
|
|
|
@@ -10882,6 +10855,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
10882
10855
|
|
|
10883
10856
|
```ts
|
|
10884
10857
|
export class EntityProvenTxReq extends EntityBase<TableProvenTxReq> {
|
|
10858
|
+
static readonly wasBroadcastStatuses: ProvenTxReqStatus[] = ["unmined", "callback", "unconfirmed", "completed"];
|
|
10885
10859
|
static async fromStorageTxid(storage: EntityStorage, txid: string, trx?: TrxToken): Promise<EntityProvenTxReq | undefined>
|
|
10886
10860
|
static async fromStorageId(storage: EntityStorage, id: number, trx?: TrxToken): Promise<EntityProvenTxReq>
|
|
10887
10861
|
static fromTxid(txid: string, rawTx: number[], inputBEEF?: number[]): EntityProvenTxReq
|
|
@@ -10931,6 +10905,14 @@ export class EntityProvenTxReq extends EntityBase<TableProvenTxReq> {
|
|
|
10931
10905
|
set notified(v: boolean)
|
|
10932
10906
|
get batch()
|
|
10933
10907
|
set batch(v: string | undefined)
|
|
10908
|
+
get wasBroadcast(): boolean
|
|
10909
|
+
set wasBroadcast(v: boolean)
|
|
10910
|
+
get rebroadcastAttempts(): number
|
|
10911
|
+
set rebroadcastAttempts(v: number)
|
|
10912
|
+
applyProofTimeout(maxRebroadcastAttempts = 0): {
|
|
10913
|
+
action: "invalid" | "rebroadcast";
|
|
10914
|
+
rebroadcastAttempts: number;
|
|
10915
|
+
}
|
|
10934
10916
|
override get id()
|
|
10935
10917
|
override set id(v: number)
|
|
10936
10918
|
override get entityName(): string
|
|
@@ -10950,7 +10932,7 @@ export class EntityProvenTxReq extends EntityBase<TableProvenTxReq> {
|
|
|
10950
10932
|
}
|
|
10951
10933
|
```
|
|
10952
10934
|
|
|
10953
|
-
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [ProvenTxReqHistory](./storage.md#interface-proventxreqhistory), [ProvenTxReqHistorySummaryApi](./storage.md#interface-proventxreqhistorysummaryapi), [ProvenTxReqNotify](./storage.md#interface-proventxreqnotify), [ProvenTxReqStatus](./client.md#type-proventxreqstatus), [ReqHistoryNote](./client.md#
|
|
10935
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [ProvenTxReqHistory](./storage.md#interface-proventxreqhistory), [ProvenTxReqHistorySummaryApi](./storage.md#interface-proventxreqhistorysummaryapi), [ProvenTxReqNotify](./storage.md#interface-proventxreqnotify), [ProvenTxReqStatus](./client.md#type-proventxreqstatus), [ReqHistoryNote](./client.md#interface-reqhistorynote), [StorageProvider](./storage.md#class-storageprovider), [SyncMap](./storage.md#interface-syncmap), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TrxToken](./client.md#interface-trxtoken), [WalletStorageManager](./storage.md#class-walletstoragemanager)
|
|
10954
10936
|
|
|
10955
10937
|
###### Method addHistoryNote
|
|
10956
10938
|
|
|
@@ -10960,7 +10942,7 @@ Notes with identical property values to an existing note are ignored.
|
|
|
10960
10942
|
```ts
|
|
10961
10943
|
addHistoryNote(note: ReqHistoryNote, noDupes?: boolean)
|
|
10962
10944
|
```
|
|
10963
|
-
See also: [ReqHistoryNote](./client.md#
|
|
10945
|
+
See also: [ReqHistoryNote](./client.md#interface-reqhistorynote)
|
|
10964
10946
|
|
|
10965
10947
|
Argument Details
|
|
10966
10948
|
|
|
@@ -11086,28 +11068,28 @@ export class EntitySyncState extends EntityBase<TableSyncState> {
|
|
|
11086
11068
|
to storage: ${c.toStorageIdentityKey}
|
|
11087
11069
|
for user: ${c.userIdentityKey}
|
|
11088
11070
|
`;
|
|
11089
|
-
if (c.user)
|
|
11071
|
+
if (c.user != null)
|
|
11090
11072
|
log += ` USER activeStorage ${c.user.activeStorage}\n`;
|
|
11091
|
-
if (
|
|
11092
|
-
log +=
|
|
11073
|
+
if (c.provenTxs != null) {
|
|
11074
|
+
log += " PROVEN_TXS\n";
|
|
11093
11075
|
for (const r of c.provenTxs) {
|
|
11094
11076
|
log += ` ${r.provenTxId} ${r.txid}\n`;
|
|
11095
11077
|
}
|
|
11096
11078
|
}
|
|
11097
|
-
if (
|
|
11098
|
-
log +=
|
|
11079
|
+
if (c.provenTxReqs != null) {
|
|
11080
|
+
log += " PROVEN_TX_REQS\n";
|
|
11099
11081
|
for (const r of c.provenTxReqs) {
|
|
11100
11082
|
log += ` ${r.provenTxReqId} ${r.txid} ${r.status} ${r.provenTxId || ""}\n`;
|
|
11101
11083
|
}
|
|
11102
11084
|
}
|
|
11103
|
-
if (
|
|
11104
|
-
log +=
|
|
11085
|
+
if (c.transactions != null) {
|
|
11086
|
+
log += " TRANSACTIONS\n";
|
|
11105
11087
|
for (const r of c.transactions) {
|
|
11106
11088
|
log += ` ${r.transactionId} ${r.txid} ${r.status} ${r.provenTxId || ""} sats:${r.satoshis}\n`;
|
|
11107
11089
|
}
|
|
11108
11090
|
}
|
|
11109
|
-
if (
|
|
11110
|
-
log +=
|
|
11091
|
+
if (c.outputs != null) {
|
|
11092
|
+
log += " OUTPUTS\n";
|
|
11111
11093
|
for (const r of c.outputs) {
|
|
11112
11094
|
log += ` ${r.outputId} ${r.txid}.${r.vout} ${r.transactionId} ${r.spendable ? "spendable" : ""} sats:${r.satoshis}\n`;
|
|
11113
11095
|
}
|
|
@@ -11648,7 +11630,7 @@ export class MockChainMigrations implements MigrationSource<string> {
|
|
|
11648
11630
|
migrations: Record<string, Migration> = {};
|
|
11649
11631
|
constructor()
|
|
11650
11632
|
async getMigrations(): Promise<string[]>
|
|
11651
|
-
getMigrationName(migration: string)
|
|
11633
|
+
getMigrationName(migration: string): string
|
|
11652
11634
|
async getMigration(migration: string): Promise<Migration>
|
|
11653
11635
|
setupMigrations(): Record<string, Migration>
|
|
11654
11636
|
}
|
|
@@ -11776,7 +11758,7 @@ export class MockServices implements WalletServices {
|
|
|
11776
11758
|
}
|
|
11777
11759
|
```
|
|
11778
11760
|
|
|
11779
|
-
See also: [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), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [MockChainStorage](./client.md#class-mockchainstorage), [MockChainTracker](./client.md#class-mockchaintracker), [MockMiner](./client.md#class-mockminer), [PostBeefResult](./client.md#interface-postbeefresult), [ReorgResult](./client.md#interface-reorgresult), [ServicesCallHistory](./client.md#
|
|
11761
|
+
See also: [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), [GetRawTxResult](./client.md#interface-getrawtxresult), [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult), [GetUtxoStatusOutputFormat](./client.md#type-getutxostatusoutputformat), [GetUtxoStatusResult](./client.md#interface-getutxostatusresult), [MockChainStorage](./client.md#class-mockchainstorage), [MockChainTracker](./client.md#class-mockchaintracker), [MockMiner](./client.md#class-mockminer), [PostBeefResult](./client.md#interface-postbeefresult), [ReorgResult](./client.md#interface-reorgresult), [ServicesCallHistory](./client.md#interface-servicescallhistory), [TableOutput](./storage.md#interface-tableoutput), [WalletServices](./client.md#interface-walletservices), [getBeefForTxid](./services.md#function-getbeeffortxid)
|
|
11780
11762
|
|
|
11781
11763
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
11782
11764
|
|
|
@@ -11800,6 +11782,7 @@ export class Monitor {
|
|
|
11800
11782
|
onTransactionBroadcasted?: (broadcastResult: ReviewActionResult) => Promise<void>;
|
|
11801
11783
|
onTransactionProven?: (txStatus: ProvenTransactionStatus) => Promise<void>;
|
|
11802
11784
|
onTransactionStatusChanged?: (txid: string, newStatus: string) => Promise<void>;
|
|
11785
|
+
get ready(): Promise<void>
|
|
11803
11786
|
constructor(options: MonitorOptions)
|
|
11804
11787
|
async destroy(): Promise<void>
|
|
11805
11788
|
static readonly oneSecond = 1000;
|
|
@@ -12136,7 +12119,7 @@ https://brc.dev/29
|
|
|
12136
12119
|
export class ScriptTemplateBRC29 implements ScriptTemplate {
|
|
12137
12120
|
p2pkh: P2PKH;
|
|
12138
12121
|
constructor(public params: ScriptTemplateParamsBRC29)
|
|
12139
|
-
getKeyID()
|
|
12122
|
+
getKeyID(): string
|
|
12140
12123
|
getKeyDeriver(privKey: PrivateKey | HexString): KeyDeriverApi
|
|
12141
12124
|
lock(lockerPrivKey: string, unlockerPubKey: string): LockingScript
|
|
12142
12125
|
unlock(unlockerPrivKey: string, lockerPubKey: string, sourceSatoshis?: number, lockingScript?: Script): ScriptTemplateUnlock
|
|
@@ -12196,32 +12179,32 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
12196
12179
|
|
|
12197
12180
|
```ts
|
|
12198
12181
|
export class ServiceCollection<T> {
|
|
12199
|
-
services: {
|
|
12182
|
+
services: Array<{
|
|
12200
12183
|
name: string;
|
|
12201
12184
|
service: T;
|
|
12202
|
-
}
|
|
12185
|
+
}>;
|
|
12203
12186
|
_index: number;
|
|
12204
12187
|
readonly since: Date;
|
|
12205
12188
|
_historyByProvider: Record<string, ProviderCallHistory> = {};
|
|
12206
|
-
constructor(public serviceName: string, services?: {
|
|
12189
|
+
constructor(public serviceName: string, services?: Array<{
|
|
12207
12190
|
name: string;
|
|
12208
12191
|
service: T;
|
|
12209
|
-
}
|
|
12192
|
+
}>)
|
|
12210
12193
|
add(s: {
|
|
12211
12194
|
name: string;
|
|
12212
12195
|
service: T;
|
|
12213
|
-
}):
|
|
12196
|
+
}): this
|
|
12214
12197
|
remove(name: string): void
|
|
12215
|
-
get name()
|
|
12216
|
-
get service()
|
|
12198
|
+
get name(): string
|
|
12199
|
+
get service(): T
|
|
12217
12200
|
getServiceToCall(i: number): ServiceToCall<T>
|
|
12218
12201
|
get serviceToCall(): ServiceToCall<T>
|
|
12219
|
-
get allServicesToCall(): ServiceToCall<T
|
|
12220
|
-
moveServiceToLast(stc: ServiceToCall<T>)
|
|
12221
|
-
get allServices()
|
|
12222
|
-
get count()
|
|
12223
|
-
get index()
|
|
12224
|
-
reset()
|
|
12202
|
+
get allServicesToCall(): Array<ServiceToCall<T>>
|
|
12203
|
+
moveServiceToLast(stc: ServiceToCall<T>): void
|
|
12204
|
+
get allServices(): T[]
|
|
12205
|
+
get count(): number
|
|
12206
|
+
get index(): number
|
|
12207
|
+
reset(): void
|
|
12225
12208
|
next(): number
|
|
12226
12209
|
clone(): ServiceCollection<T>
|
|
12227
12210
|
_addServiceCall(providerName: string, call: ServiceCall): ProviderCallHistory
|
|
@@ -12259,7 +12242,7 @@ A copy of current service call history
|
|
|
12259
12242
|
Used to de-prioritize a service call by moving it to the end of the list.
|
|
12260
12243
|
|
|
12261
12244
|
```ts
|
|
12262
|
-
moveServiceToLast(stc: ServiceToCall<T>)
|
|
12245
|
+
moveServiceToLast(stc: ServiceToCall<T>): void
|
|
12263
12246
|
```
|
|
12264
12247
|
See also: [ServiceToCall](./services.md#interface-servicetocall)
|
|
12265
12248
|
|
|
@@ -12291,10 +12274,10 @@ export class Services implements WalletServices {
|
|
|
12291
12274
|
async getBsvExchangeRate(): Promise<number>
|
|
12292
12275
|
async getFiatExchangeRate(currency: FiatCurrencyCode, base?: FiatCurrencyCode): Promise<number>
|
|
12293
12276
|
async getFiatExchangeRates(targetCurrencies: FiatCurrencyCode[]): Promise<FiatExchangeRates>
|
|
12294
|
-
get getProofsCount()
|
|
12295
|
-
get getRawTxsCount()
|
|
12296
|
-
get postBeefServicesCount()
|
|
12297
|
-
get getUtxoStatsCount()
|
|
12277
|
+
get getProofsCount(): number
|
|
12278
|
+
get getRawTxsCount(): number
|
|
12279
|
+
get postBeefServicesCount(): number
|
|
12280
|
+
get getUtxoStatsCount(): number
|
|
12298
12281
|
async getStatusForTxids(txids: string[], useNext?: boolean): Promise<GetStatusForTxidsResult>
|
|
12299
12282
|
hashOutputScript(script: string): string
|
|
12300
12283
|
async isUtxo(output: TableOutput): Promise<boolean>
|
|
@@ -12317,7 +12300,7 @@ export class Services implements WalletServices {
|
|
|
12317
12300
|
}
|
|
12318
12301
|
```
|
|
12319
12302
|
|
|
12320
|
-
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#
|
|
12303
|
+
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)
|
|
12321
12304
|
|
|
12322
12305
|
###### Property postBeefUntilSuccessSoftTimeoutMaxMs
|
|
12323
12306
|
|
|
@@ -12385,7 +12368,7 @@ export abstract class SetupClient {
|
|
|
12385
12368
|
const services = new Services(serviceOptions);
|
|
12386
12369
|
const monopts = Monitor.createDefaultWalletMonitorOptions(chain, storage, services, undefined, "default");
|
|
12387
12370
|
const monitor = new Monitor(monopts);
|
|
12388
|
-
const privilegedKeyManager = args.privilegedKeyGetter
|
|
12371
|
+
const privilegedKeyManager = (args.privilegedKeyGetter != null)
|
|
12389
12372
|
? new PrivilegedKeyManager(args.privilegedKeyGetter)
|
|
12390
12373
|
: undefined;
|
|
12391
12374
|
const wallet = new Wallet({
|
|
@@ -12445,13 +12428,13 @@ export abstract class SetupClient {
|
|
|
12445
12428
|
const unlock = p2pkh.unlock(priv, "all", false, satoshis, lock);
|
|
12446
12429
|
return unlock;
|
|
12447
12430
|
}
|
|
12448
|
-
static createP2PKHOutputs(outputs: {
|
|
12431
|
+
static createP2PKHOutputs(outputs: Array<{
|
|
12449
12432
|
address: string;
|
|
12450
12433
|
satoshis: number;
|
|
12451
12434
|
outputDescription?: string;
|
|
12452
12435
|
basket?: string;
|
|
12453
12436
|
tags?: string[];
|
|
12454
|
-
}
|
|
12437
|
+
}>): CreateActionOutput[] {
|
|
12455
12438
|
const os: CreateActionOutput[] = [];
|
|
12456
12439
|
const count = outputs.length;
|
|
12457
12440
|
for (let i = 0; i < count; i++) {
|
|
@@ -12466,19 +12449,19 @@ export abstract class SetupClient {
|
|
|
12466
12449
|
}
|
|
12467
12450
|
return os;
|
|
12468
12451
|
}
|
|
12469
|
-
static async createP2PKHOutputsAction(wallet: WalletInterface, outputs: {
|
|
12452
|
+
static async createP2PKHOutputsAction(wallet: WalletInterface, outputs: Array<{
|
|
12470
12453
|
address: string;
|
|
12471
12454
|
satoshis: number;
|
|
12472
12455
|
outputDescription?: string;
|
|
12473
12456
|
basket?: string;
|
|
12474
12457
|
tags?: string[];
|
|
12475
|
-
}
|
|
12458
|
+
}>, options?: CreateActionOptions): Promise<{
|
|
12476
12459
|
cr: CreateActionResult;
|
|
12477
12460
|
outpoints: string[] | undefined;
|
|
12478
12461
|
}> {
|
|
12479
12462
|
const os = SetupClient.createP2PKHOutputs(outputs);
|
|
12480
12463
|
const createArgs: CreateActionArgs = {
|
|
12481
|
-
description:
|
|
12464
|
+
description: "createP2PKHOutputs",
|
|
12482
12465
|
outputs: os,
|
|
12483
12466
|
options: {
|
|
12484
12467
|
...options,
|
|
@@ -12492,19 +12475,19 @@ export abstract class SetupClient {
|
|
|
12492
12475
|
}
|
|
12493
12476
|
return { cr, outpoints };
|
|
12494
12477
|
}
|
|
12495
|
-
static async fundWalletFromP2PKHOutpoints(wallet: WalletInterface, outpoints: string[], p2pkhKey: KeyPairAddress, inputBEEF?: BEEF): Promise<{
|
|
12478
|
+
static async fundWalletFromP2PKHOutpoints(wallet: WalletInterface, outpoints: string[], p2pkhKey: KeyPairAddress, inputBEEF?: BEEF): Promise<Array<{
|
|
12496
12479
|
outpoint: string;
|
|
12497
12480
|
txid?: string;
|
|
12498
12481
|
success: boolean;
|
|
12499
12482
|
error?: string;
|
|
12500
|
-
}
|
|
12501
|
-
return _fundWalletFromP2PKHOutpoints(wallet, outpoints, p2pkhKey, SetupClient.getUnlockP2PKH.bind(SetupClient), inputBEEF);
|
|
12483
|
+
}>> {
|
|
12484
|
+
return await _fundWalletFromP2PKHOutpoints(wallet, outpoints, p2pkhKey, SetupClient.getUnlockP2PKH.bind(SetupClient), inputBEEF);
|
|
12502
12485
|
}
|
|
12503
12486
|
static async createWalletIdb(args: SetupWalletIdbArgs): Promise<SetupWalletIdb> {
|
|
12504
12487
|
const wo = await SetupClient.createWallet(args);
|
|
12505
12488
|
const activeStorage = await SetupClient.createStorageIdb(args);
|
|
12506
12489
|
await wo.storage.addWalletStorageProvider(activeStorage);
|
|
12507
|
-
const { user
|
|
12490
|
+
const { user } = await activeStorage.findOrInsertUser(wo.identityKey);
|
|
12508
12491
|
const userId = user.userId;
|
|
12509
12492
|
const r: SetupWalletIdb = {
|
|
12510
12493
|
...wo,
|
|
@@ -12551,7 +12534,7 @@ static async createWallet(args: SetupClientWalletArgs): Promise<SetupWallet> {
|
|
|
12551
12534
|
const services = new Services(serviceOptions);
|
|
12552
12535
|
const monopts = Monitor.createDefaultWalletMonitorOptions(chain, storage, services, undefined, "default");
|
|
12553
12536
|
const monitor = new Monitor(monopts);
|
|
12554
|
-
const privilegedKeyManager = args.privilegedKeyGetter
|
|
12537
|
+
const privilegedKeyManager = (args.privilegedKeyGetter != null)
|
|
12555
12538
|
? new PrivilegedKeyManager(args.privilegedKeyGetter)
|
|
12556
12539
|
: undefined;
|
|
12557
12540
|
const wallet = new Wallet({
|
|
@@ -12611,7 +12594,7 @@ static async createWalletIdb(args: SetupWalletIdbArgs): Promise<SetupWalletIdb>
|
|
|
12611
12594
|
const wo = await SetupClient.createWallet(args);
|
|
12612
12595
|
const activeStorage = await SetupClient.createStorageIdb(args);
|
|
12613
12596
|
await wo.storage.addWalletStorageProvider(activeStorage);
|
|
12614
|
-
const { user
|
|
12597
|
+
const { user } = await activeStorage.findOrInsertUser(wo.identityKey);
|
|
12615
12598
|
const userId = user.userId;
|
|
12616
12599
|
const r: SetupWalletIdb = {
|
|
12617
12600
|
...wo,
|
|
@@ -12661,6 +12644,7 @@ re-provide the privileged key manager to complete authentication.
|
|
|
12661
12644
|
```ts
|
|
12662
12645
|
export class SimpleWalletManager implements WalletInterface {
|
|
12663
12646
|
authenticated: boolean;
|
|
12647
|
+
get ready(): Promise<void>
|
|
12664
12648
|
constructor(adminOriginator: OriginatorDomainNameStringUnder250Bytes, walletBuilder: (primaryKey: number[], privilegedKeyManager: PrivilegedKeyManager) => Promise<WalletInterface>, stateSnapshot?: number[])
|
|
12665
12649
|
async providePrimaryKey(key: number[]): Promise<void>
|
|
12666
12650
|
async providePrivilegedKeyManager(manager: PrivilegedKeyManager): Promise<void>
|
|
@@ -12886,11 +12870,49 @@ the party making requests of the remote service.
|
|
|
12886
12870
|
For details of the API implemented, follow the "See also" link for the `WalletStorageProvider` interface.
|
|
12887
12871
|
|
|
12888
12872
|
```ts
|
|
12889
|
-
export class StorageClient
|
|
12873
|
+
export class StorageClient extends StorageClientBase {
|
|
12874
|
+
constructor(wallet: WalletInterface, endpointUrl: string)
|
|
12875
|
+
protected async rpcCall<T>(method: string, params: unknown[]): Promise<T>
|
|
12876
|
+
}
|
|
12877
|
+
```
|
|
12878
|
+
|
|
12879
|
+
See also: [StorageClientBase](./storage.md#class-storageclientbase)
|
|
12880
|
+
|
|
12881
|
+
###### Method rpcCall
|
|
12882
|
+
|
|
12883
|
+
Make a JSON-RPC call to the remote server.
|
|
12884
|
+
|
|
12885
|
+
```ts
|
|
12886
|
+
protected async rpcCall<T>(method: string, params: unknown[]): Promise<T>
|
|
12887
|
+
```
|
|
12888
|
+
|
|
12889
|
+
Argument Details
|
|
12890
|
+
|
|
12891
|
+
+ **method**
|
|
12892
|
+
+ The WalletStorage method name to call.
|
|
12893
|
+
+ **params**
|
|
12894
|
+
+ The array of parameters to pass to the method in order.
|
|
12895
|
+
|
|
12896
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
12897
|
+
|
|
12898
|
+
---
|
|
12899
|
+
##### Class: StorageClientBase
|
|
12900
|
+
|
|
12901
|
+
Abstract base class shared by `StorageClient` and `StorageMobile`.
|
|
12902
|
+
|
|
12903
|
+
Contains all `WalletStorageProvider` method implementations and entity-validation
|
|
12904
|
+
helpers. Subclasses only need to provide `rpcCall`, which differs between
|
|
12905
|
+
the full (logger-aware) and mobile (lightweight) variants.
|
|
12906
|
+
|
|
12907
|
+
```ts
|
|
12908
|
+
export abstract class StorageClientBase implements WalletStorageProvider {
|
|
12890
12909
|
readonly endpointUrl: string;
|
|
12910
|
+
protected readonly authClient: AuthFetch;
|
|
12911
|
+
protected nextId = 1;
|
|
12891
12912
|
public settings?: TableSettings;
|
|
12892
12913
|
constructor(wallet: WalletInterface, endpointUrl: string)
|
|
12893
12914
|
isStorageProvider(): boolean
|
|
12915
|
+
protected abstract rpcCall<T>(method: string, params: unknown[]): Promise<T>;
|
|
12894
12916
|
isAvailable(): boolean
|
|
12895
12917
|
getSettings(): TableSettings
|
|
12896
12918
|
async makeAvailable(): Promise<TableSettings>
|
|
@@ -12930,7 +12952,7 @@ export class StorageClient implements WalletStorageProvider {
|
|
|
12930
12952
|
}
|
|
12931
12953
|
```
|
|
12932
12954
|
|
|
12933
|
-
See also: [AuthId](./client.md#interface-authid), [EntityTimeStamp](./client.md#interface-entitytimestamp), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [ProcessSyncChunkResult](./client.md#interface-processsyncchunkresult), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageInternalizeActionResult](./client.md#interface-storageinternalizeactionresult), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [SyncChunk](./client.md#interface-syncchunk), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableUser](./storage.md#interface-tableuser), [UpdateProvenTxReqWithNewProvenTxArgs](./client.md#interface-updateproventxreqwithnewproventxargs), [UpdateProvenTxReqWithNewProvenTxResult](./client.md#interface-updateproventxreqwithnewproventxresult), [WalletServices](./client.md#interface-walletservices), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [createAction](./storage.md#function-createaction), [getSyncChunk](./storage.md#function-getsyncchunk), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [processAction](./storage.md#function-processaction)
|
|
12955
|
+
See also: [AuthId](./client.md#interface-authid), [EntityTimeStamp](./client.md#interface-entitytimestamp), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [ProcessSyncChunkResult](./client.md#interface-processsyncchunkresult), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageInternalizeActionResult](./client.md#interface-storageinternalizeactionresult), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [SyncChunk](./client.md#interface-syncchunk), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableUser](./storage.md#interface-tableuser), [UpdateProvenTxReqWithNewProvenTxArgs](./client.md#interface-updateproventxreqwithnewproventxargs), [UpdateProvenTxReqWithNewProvenTxResult](./client.md#interface-updateproventxreqwithnewproventxresult), [WalletServices](./client.md#interface-walletservices), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [createAction](./storage.md#function-createaction), [getSyncChunk](./storage.md#function-getsyncchunk), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [processAction](./storage.md#function-processaction), [validateDate](./storage.md#function-validatedate), [validateEntities](./storage.md#function-validateentities), [validateEntity](./storage.md#function-validateentity)
|
|
12934
12956
|
|
|
12935
12957
|
###### Method abortAction
|
|
12936
12958
|
|
|
@@ -13420,6 +13442,22 @@ This must match the `AuthFetch` identity securing the remote conneciton.
|
|
|
13420
13442
|
+ **args**
|
|
13421
13443
|
+ original wallet `relinquishOutput` args.
|
|
13422
13444
|
|
|
13445
|
+
###### Method rpcCall
|
|
13446
|
+
|
|
13447
|
+
Make a JSON-RPC call to the remote server.
|
|
13448
|
+
Implemented differently by each subclass (with or without logger support).
|
|
13449
|
+
|
|
13450
|
+
```ts
|
|
13451
|
+
protected abstract rpcCall<T>(method: string, params: unknown[]): Promise<T>
|
|
13452
|
+
```
|
|
13453
|
+
|
|
13454
|
+
Argument Details
|
|
13455
|
+
|
|
13456
|
+
+ **method**
|
|
13457
|
+
+ The WalletStorage method name to call.
|
|
13458
|
+
+ **params**
|
|
13459
|
+
+ The array of parameters to pass to the method in order.
|
|
13460
|
+
|
|
13423
13461
|
###### Method setActive
|
|
13424
13462
|
|
|
13425
13463
|
Ensures up-to-date wallet data replication to all configured backup storage providers,
|
|
@@ -13560,7 +13598,7 @@ export class StorageIdb extends StorageProvider implements WalletStorageProvider
|
|
|
13560
13598
|
async insertTxLabelMap(labelMap: TableTxLabelMap, trx?: TrxToken): Promise<void>
|
|
13561
13599
|
async insertUser(user: TableUser, trx?: TrxToken): Promise<number>
|
|
13562
13600
|
async updateIdb<T>(id: number | number[], update: Partial<T>, keyProp: string, storeName: string, trx?: TrxToken): Promise<number>
|
|
13563
|
-
async updateIdbKey<T>(key:
|
|
13601
|
+
async updateIdbKey<T>(key: Array<number | string>, update: Partial<T>, keyProps: string[], storeName: string, trx?: TrxToken): Promise<number>
|
|
13564
13602
|
async updateCertificate(id: number, update: Partial<TableCertificate>, trx?: TrxToken): Promise<number>
|
|
13565
13603
|
async updateCertificateField(certificateId: number, fieldName: string, update: Partial<TableCertificateField>, trx?: TrxToken): Promise<number>
|
|
13566
13604
|
async updateCommission(id: number, update: Partial<TableCommission>, trx?: TrxToken): Promise<number>
|
|
@@ -13642,7 +13680,7 @@ export class StorageIdb extends StorageProvider implements WalletStorageProvider
|
|
|
13642
13680
|
}
|
|
13643
13681
|
```
|
|
13644
13682
|
|
|
13645
|
-
See also: [AuthId](./client.md#interface-authid), [DBType](./storage.md#type-dbtype), [EntityTimeStamp](./client.md#interface-entitytimestamp), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindMonitorEventsArgs](./client.md#interface-findmonitoreventsargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagMapsArgs](./client.md#interface-findoutputtagmapsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [FindProvenTxsArgs](./client.md#interface-findproventxsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelMapsArgs](./client.md#interface-findtxlabelmapsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [FindUsersArgs](./client.md#interface-findusersargs), [ProvenOrRawTx](./client.md#interface-provenorrawtx), [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageAdminStats](./storage.md#interface-storageadminstats), [StorageIdbOptions](./storage.md#interface-storageidboptions), [StorageIdbSchema](./storage.md#interface-storageidbschema), [StorageProvider](./storage.md#class-storageprovider), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [listActions](./storage.md#function-listactions), [listOutputs](./storage.md#function-listoutputs), [purgeData](./storage.md#function-purgedata), [reviewStatus](./storage.md#function-reviewstatus)
|
|
13683
|
+
See also: [AuthId](./client.md#interface-authid), [DBType](./storage.md#type-dbtype), [EntityTimeStamp](./client.md#interface-entitytimestamp), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindMonitorEventsArgs](./client.md#interface-findmonitoreventsargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagMapsArgs](./client.md#interface-findoutputtagmapsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [FindProvenTxsArgs](./client.md#interface-findproventxsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelMapsArgs](./client.md#interface-findtxlabelmapsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [FindUsersArgs](./client.md#interface-findusersargs), [ProvenOrRawTx](./client.md#interface-provenorrawtx), [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageAdminStats](./storage.md#interface-storageadminstats), [StorageIdbOptions](./storage.md#interface-storageidboptions), [StorageIdbSchema](./storage.md#interface-storageidbschema), [StorageProvider](./storage.md#class-storageprovider), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [listActions](./storage.md#function-listactions), [listOutputs](./storage.md#function-listoutputs), [purgeData](./storage.md#function-purgedata), [reviewStatus](./storage.md#function-reviewstatus), [validateEntities](./storage.md#function-validateentities), [validateEntity](./storage.md#function-validateentity)
|
|
13646
13684
|
|
|
13647
13685
|
###### Method allocateChangeInput
|
|
13648
13686
|
|
|
@@ -13769,7 +13807,11 @@ export abstract class StorageProvider extends StorageReaderWriter implements Wal
|
|
|
13769
13807
|
commissionSatoshis: number;
|
|
13770
13808
|
commissionPubKeyHex?: PubKeyHex;
|
|
13771
13809
|
maxRecursionDepth?: number;
|
|
13772
|
-
static defaultOptions()
|
|
13810
|
+
static defaultOptions(): {
|
|
13811
|
+
feeModel: StorageFeeModel;
|
|
13812
|
+
commissionSatoshis: number;
|
|
13813
|
+
commissionPubKeyHex: undefined;
|
|
13814
|
+
}
|
|
13773
13815
|
static createStorageBaseOptions(chain: Chain): StorageProviderOptions
|
|
13774
13816
|
constructor(options: StorageProviderOptions)
|
|
13775
13817
|
abstract reviewStatus(args: {
|
|
@@ -13803,7 +13845,7 @@ export abstract class StorageProvider extends StorageReaderWriter implements Wal
|
|
|
13803
13845
|
abstract adminStats(adminIdentityKey: string): Promise<AdminStatsResult>;
|
|
13804
13846
|
async recentlyActiveUsers(limit = 50, trx?: TrxToken): Promise<TableUser[]>
|
|
13805
13847
|
override isStorageProvider(): boolean
|
|
13806
|
-
setServices(v: WalletServices)
|
|
13848
|
+
setServices(v: WalletServices): void
|
|
13807
13849
|
getServices(): WalletServices
|
|
13808
13850
|
async abortAction(auth: AuthId, args: AbortActionArgs): Promise<AbortActionResult>
|
|
13809
13851
|
async internalizeAction(auth: AuthId, args: InternalizeActionArgs): Promise<StorageInternalizeActionResult>
|
|
@@ -13853,21 +13895,6 @@ Returns
|
|
|
13853
13895
|
|
|
13854
13896
|
object with invalidSpendableOutputs array. A good result is an empty array.
|
|
13855
13897
|
|
|
13856
|
-
###### Method getProvenOrReq
|
|
13857
|
-
|
|
13858
|
-
Checks if txid is a known valid ProvenTx and returns it if found.
|
|
13859
|
-
Next checks if txid is a current ProvenTxReq and returns that if found.
|
|
13860
|
-
If `newReq` is provided and an existing ProvenTxReq isn't found,
|
|
13861
|
-
use `newReq` to create a new ProvenTxReq.
|
|
13862
|
-
|
|
13863
|
-
This is safe "findOrInsert" operation using retry if unique index constraint
|
|
13864
|
-
is violated by a race condition insert.
|
|
13865
|
-
|
|
13866
|
-
```ts
|
|
13867
|
-
async getProvenOrReq(txid: string, newReq?: TableProvenTxReq, trx?: TrxToken): Promise<StorageProvenOrReq>
|
|
13868
|
-
```
|
|
13869
|
-
See also: [StorageProvenOrReq](./client.md#interface-storageprovenorreq), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TrxToken](./client.md#interface-trxtoken)
|
|
13870
|
-
|
|
13871
13898
|
###### Method getReqsAndBeefToShareWithWorld
|
|
13872
13899
|
|
|
13873
13900
|
Given an array of transaction txids with current ProvenTxReq ready-to-share status,
|
|
@@ -13987,7 +14014,7 @@ export abstract class StorageReader implements sdk.WalletStorageSyncReader {
|
|
|
13987
14014
|
}
|
|
13988
14015
|
```
|
|
13989
14016
|
|
|
13990
|
-
See also: [Chain](./client.md#type-chain), [DBType](./storage.md#type-dbtype), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindMonitorEventsArgs](./client.md#interface-findmonitoreventsargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [FindUsersArgs](./client.md#interface-findusersargs), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageReaderOptions](./storage.md#interface-storagereaderoptions), [SyncChunk](./client.md#interface-syncchunk), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken), [WalletStorageSyncReader](./client.md#interface-walletstoragesyncreader), [getSyncChunk](./storage.md#function-getsyncchunk)
|
|
14017
|
+
See also: [Chain](./client.md#type-chain), [DBType](./storage.md#type-dbtype), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindMonitorEventsArgs](./client.md#interface-findmonitoreventsargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [FindUsersArgs](./client.md#interface-findusersargs), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageReaderOptions](./storage.md#interface-storagereaderoptions), [SyncChunk](./client.md#interface-syncchunk), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken), [WalletStorageSyncReader](./client.md#interface-walletstoragesyncreader), [getSyncChunk](./storage.md#function-getsyncchunk), [validateDate](./storage.md#function-validatedate)
|
|
13991
14018
|
|
|
13992
14019
|
###### Method validateEntityDate
|
|
13993
14020
|
|
|
@@ -14015,7 +14042,6 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
14015
14042
|
|
|
14016
14043
|
```ts
|
|
14017
14044
|
export abstract class StorageReaderWriter extends StorageReader {
|
|
14018
|
-
constructor(options: StorageReaderWriterOptions)
|
|
14019
14045
|
abstract dropAllData(): Promise<void>;
|
|
14020
14046
|
abstract migrate(storageName: string, storageIdentityKey: string): Promise<string>;
|
|
14021
14047
|
abstract findOutputTagMaps(args: FindOutputTagMapsArgs): Promise<TableOutputTagMap[]>;
|
|
@@ -14099,7 +14125,7 @@ export abstract class StorageReaderWriter extends StorageReader {
|
|
|
14099
14125
|
}
|
|
14100
14126
|
```
|
|
14101
14127
|
|
|
14102
|
-
See also: [AuthId](./client.md#interface-authid), [FindOutputTagMapsArgs](./client.md#interface-findoutputtagmapsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [FindProvenTxsArgs](./client.md#interface-findproventxsargs), [FindStaleMerkleRootsArgs](./client.md#interface-findstalemerklerootsargs), [FindTxLabelMapsArgs](./client.md#interface-findtxlabelmapsargs), [ProcessSyncChunkResult](./client.md#interface-processsyncchunkresult), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageReader](./storage.md#class-storagereader), [
|
|
14128
|
+
See also: [AuthId](./client.md#interface-authid), [FindOutputTagMapsArgs](./client.md#interface-findoutputtagmapsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [FindProvenTxsArgs](./client.md#interface-findproventxsargs), [FindStaleMerkleRootsArgs](./client.md#interface-findstalemerklerootsargs), [FindTxLabelMapsArgs](./client.md#interface-findtxlabelmapsargs), [ProcessSyncChunkResult](./client.md#interface-processsyncchunkresult), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageReader](./storage.md#class-storagereader), [SyncChunk](./client.md#interface-syncchunk), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken)
|
|
14103
14129
|
|
|
14104
14130
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
14105
14131
|
|
|
@@ -14115,7 +14141,7 @@ and the `StorageBaseReader` to be protected.
|
|
|
14115
14141
|
export class StorageSyncReader implements sdk.WalletStorageSyncReader {
|
|
14116
14142
|
constructor(public auth: sdk.AuthId, public storage: StorageReader)
|
|
14117
14143
|
async makeAvailable(): Promise<TableSettings>
|
|
14118
|
-
destroy(): Promise<void>
|
|
14144
|
+
async destroy(): Promise<void>
|
|
14119
14145
|
async getSyncChunk(args: sdk.RequestSyncChunkArgs): Promise<sdk.SyncChunk>
|
|
14120
14146
|
}
|
|
14121
14147
|
```
|
|
@@ -14133,7 +14159,7 @@ when transactions are MINED.
|
|
|
14133
14159
|
|
|
14134
14160
|
```ts
|
|
14135
14161
|
export class TaskArcadeSSE extends WalletMonitorTask {
|
|
14136
|
-
static taskName = "ArcadeSSE";
|
|
14162
|
+
static readonly taskName = "ArcadeSSE";
|
|
14137
14163
|
sseClient: ArcSSEClient | null = null;
|
|
14138
14164
|
constructor(monitor: Monitor)
|
|
14139
14165
|
override async asyncSetup(): Promise<void>
|
|
@@ -14165,7 +14191,7 @@ the original ProvenTxReq status is advanced to 'notifying'.
|
|
|
14165
14191
|
|
|
14166
14192
|
```ts
|
|
14167
14193
|
export class TaskCheckForProofs extends WalletMonitorTask {
|
|
14168
|
-
static taskName = "CheckForProofs";
|
|
14194
|
+
static readonly taskName = "CheckForProofs";
|
|
14169
14195
|
static checkNow = false;
|
|
14170
14196
|
constructor(monitor: Monitor, public triggerMsecs = 0)
|
|
14171
14197
|
trigger(nowMsecsSinceEpoch: number): {
|
|
@@ -14215,7 +14241,7 @@ the original ProvenTxReq status is advanced to 'notifying'.
|
|
|
14215
14241
|
|
|
14216
14242
|
```ts
|
|
14217
14243
|
export class TaskCheckNoSends extends WalletMonitorTask {
|
|
14218
|
-
static taskName = "CheckNoSends";
|
|
14244
|
+
static readonly taskName = "CheckNoSends";
|
|
14219
14245
|
static checkNow = false;
|
|
14220
14246
|
constructor(monitor: Monitor, public triggerMsecs = Monitor.oneDay * 1)
|
|
14221
14247
|
trigger(nowMsecsSinceEpoch: number): {
|
|
@@ -14253,7 +14279,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
14253
14279
|
|
|
14254
14280
|
```ts
|
|
14255
14281
|
export class TaskClock extends WalletMonitorTask {
|
|
14256
|
-
static taskName = "Clock";
|
|
14282
|
+
static readonly taskName = "Clock";
|
|
14257
14283
|
nextMinute: number;
|
|
14258
14284
|
constructor(monitor: Monitor, public triggerMsecs = 1 * Monitor.oneSecond)
|
|
14259
14285
|
trigger(nowMsecsSinceEpoch: number): {
|
|
@@ -14280,7 +14306,7 @@ outputs are not spendable.
|
|
|
14280
14306
|
|
|
14281
14307
|
```ts
|
|
14282
14308
|
export class TaskFailAbandoned extends WalletMonitorTask {
|
|
14283
|
-
static taskName = "FailAbandoned";
|
|
14309
|
+
static readonly taskName = "FailAbandoned";
|
|
14284
14310
|
constructor(monitor: Monitor, public triggerMsecs = 1000 * 60 * 5)
|
|
14285
14311
|
trigger(nowMsecsSinceEpoch: number): {
|
|
14286
14312
|
run: boolean;
|
|
@@ -14298,7 +14324,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
14298
14324
|
|
|
14299
14325
|
```ts
|
|
14300
14326
|
export class TaskMineBlock extends WalletMonitorTask {
|
|
14301
|
-
static taskName = "MineBlock";
|
|
14327
|
+
static readonly taskName = "MineBlock";
|
|
14302
14328
|
static mineNow = false;
|
|
14303
14329
|
constructor(monitor: Monitor, public triggerMsecs = 10 * Monitor.oneMinute)
|
|
14304
14330
|
trigger(nowMsecsSinceEpoch: number): {
|
|
@@ -14317,7 +14343,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
14317
14343
|
|
|
14318
14344
|
```ts
|
|
14319
14345
|
export class TaskMonitorCallHistory extends WalletMonitorTask {
|
|
14320
|
-
static taskName = "MonitorCallHistory";
|
|
14346
|
+
static readonly taskName = "MonitorCallHistory";
|
|
14321
14347
|
constructor(monitor: Monitor, public triggerMsecs = Monitor.oneMinute * 12)
|
|
14322
14348
|
trigger(nowMsecsSinceEpoch: number): {
|
|
14323
14349
|
run: boolean;
|
|
@@ -14346,7 +14372,7 @@ with that header height as the limit for which proofs are accepted.
|
|
|
14346
14372
|
|
|
14347
14373
|
```ts
|
|
14348
14374
|
export class TaskNewHeader extends WalletMonitorTask {
|
|
14349
|
-
static taskName = "NewHeader";
|
|
14375
|
+
static readonly taskName = "NewHeader";
|
|
14350
14376
|
header?: BlockHeader;
|
|
14351
14377
|
queuedHeader?: BlockHeader;
|
|
14352
14378
|
queuedHeaderWhen?: Date;
|
|
@@ -14383,7 +14409,7 @@ See also: [BlockHeader](./client.md#interface-blockheader)
|
|
|
14383
14409
|
|
|
14384
14410
|
###### Method asyncSetup
|
|
14385
14411
|
|
|
14386
|
-
|
|
14412
|
+
This is a temporary incomplete solution for which a full chaintracker
|
|
14387
14413
|
with new header and reorg event notification is required.
|
|
14388
14414
|
|
|
14389
14415
|
New header events drive retrieving merklePaths for newly mined transactions.
|
|
@@ -14406,7 +14432,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
14406
14432
|
|
|
14407
14433
|
```ts
|
|
14408
14434
|
export class TaskPurge extends WalletMonitorTask {
|
|
14409
|
-
static taskName = "Purge";
|
|
14435
|
+
static readonly taskName = "Purge";
|
|
14410
14436
|
static checkNow = false;
|
|
14411
14437
|
constructor(monitor: Monitor, public params: TaskPurgeParams, public triggerMsecs = 0)
|
|
14412
14438
|
trigger(nowMsecsSinceEpoch: number): {
|
|
@@ -14456,7 +14482,7 @@ createAction fails to verify a generated beef against the chaintracker.
|
|
|
14456
14482
|
|
|
14457
14483
|
```ts
|
|
14458
14484
|
export class TaskReorg extends WalletMonitorTask {
|
|
14459
|
-
static taskName = "Reorg";
|
|
14485
|
+
static readonly taskName = "Reorg";
|
|
14460
14486
|
process: DeactivedHeader[] = [];
|
|
14461
14487
|
constructor(monitor: Monitor, public agedMsecs = Monitor.oneMinute * 10, public maxRetries = 3)
|
|
14462
14488
|
trigger(nowMsecsSinceEpoch: number): {
|
|
@@ -14497,7 +14523,7 @@ back to 'unfail' so existing recovery handling can re-process them.
|
|
|
14497
14523
|
|
|
14498
14524
|
```ts
|
|
14499
14525
|
export class TaskReviewDoubleSpends extends WalletMonitorTask {
|
|
14500
|
-
static taskName = "ReviewDoubleSpends";
|
|
14526
|
+
static readonly taskName = "ReviewDoubleSpends";
|
|
14501
14527
|
static checkNow = false;
|
|
14502
14528
|
triggerNextMsecs: number;
|
|
14503
14529
|
constructor(monitor: Monitor, public triggerMsecs = Monitor.oneMinute * 12, public reviewLimit = 100, public minAgeMinutes = 60, public triggerQuickMsecs = Monitor.oneMinute * 1)
|
|
@@ -14527,7 +14553,7 @@ the currently canonical merkleRoot at a height no longer matches stored proven_t
|
|
|
14527
14553
|
|
|
14528
14554
|
```ts
|
|
14529
14555
|
export class TaskReviewProvenTxs extends WalletMonitorTask {
|
|
14530
|
-
static taskName = "ReviewProvenTxs";
|
|
14556
|
+
static readonly taskName = "ReviewProvenTxs";
|
|
14531
14557
|
static checkNow = false;
|
|
14532
14558
|
triggerNextMsecs: number;
|
|
14533
14559
|
constructor(monitor: Monitor, public triggerMsecs = Monitor.oneMinute * 10, public maxHeightsPerRun = 100, public minBlockAge = 100, public triggerQuickMsecs = Monitor.oneMinute * 1)
|
|
@@ -14557,7 +14583,7 @@ Looks for reqs with 'invalid' status that have corresonding transactions with st
|
|
|
14557
14583
|
|
|
14558
14584
|
```ts
|
|
14559
14585
|
export class TaskReviewStatus extends WalletMonitorTask {
|
|
14560
|
-
static taskName = "ReviewStatus";
|
|
14586
|
+
static readonly taskName = "ReviewStatus";
|
|
14561
14587
|
static checkNow = false;
|
|
14562
14588
|
constructor(monitor: Monitor, public triggerMsecs = 1000 * 60 * 15, public agedMsecs = 1000 * 60 * 5)
|
|
14563
14589
|
trigger(nowMsecsSinceEpoch: number): {
|
|
@@ -14588,7 +14614,7 @@ The task itself is disabled and will not run on a schedule; review must be trigg
|
|
|
14588
14614
|
|
|
14589
14615
|
```ts
|
|
14590
14616
|
export class TaskReviewUtxos extends WalletMonitorTask {
|
|
14591
|
-
static taskName = "ReviewUtxos";
|
|
14617
|
+
static readonly taskName = "ReviewUtxos";
|
|
14592
14618
|
static checkNow = false;
|
|
14593
14619
|
constructor(monitor: Monitor, public triggerMsecs = 0, public userLimit = 10, public userOffset = 0, public tags: string[] = ["release", "all"])
|
|
14594
14620
|
trigger(_nowMsecsSinceEpoch: number): {
|
|
@@ -14608,7 +14634,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
14608
14634
|
|
|
14609
14635
|
```ts
|
|
14610
14636
|
export class TaskSendWaiting extends WalletMonitorTask {
|
|
14611
|
-
static taskName = "SendWaiting";
|
|
14637
|
+
static readonly taskName = "SendWaiting";
|
|
14612
14638
|
lastSendingRunMsecsSinceEpoch: number | undefined;
|
|
14613
14639
|
includeSending: boolean = true;
|
|
14614
14640
|
triggerNextMsecs: number;
|
|
@@ -14682,7 +14708,7 @@ If it fails (to find a merklePath), returns the req status to 'invalid'.
|
|
|
14682
14708
|
|
|
14683
14709
|
```ts
|
|
14684
14710
|
export class TaskUnFail extends WalletMonitorTask {
|
|
14685
|
-
static taskName = "UnFail";
|
|
14711
|
+
static readonly taskName = "UnFail";
|
|
14686
14712
|
static checkNow = false;
|
|
14687
14713
|
constructor(monitor: Monitor, public triggerMsecs = Monitor.oneMinute * 10)
|
|
14688
14714
|
trigger(nowMsecsSinceEpoch: number): {
|
|
@@ -14741,15 +14767,15 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
14741
14767
|
|
|
14742
14768
|
```ts
|
|
14743
14769
|
export class WABClient {
|
|
14744
|
-
constructor(private serverUrl: string)
|
|
14745
|
-
public async getInfo()
|
|
14770
|
+
constructor(private readonly serverUrl: string)
|
|
14771
|
+
public async getInfo(): Promise<any>
|
|
14746
14772
|
public generateRandomPresentationKey(): string
|
|
14747
|
-
public async startAuthMethod(authMethod: AuthMethodInteractor, presentationKey: string, payload: any)
|
|
14748
|
-
public async completeAuthMethod(authMethod: AuthMethodInteractor, presentationKey: string, payload: any)
|
|
14749
|
-
public async listLinkedMethods(presentationKey: string)
|
|
14750
|
-
public async unlinkMethod(presentationKey: string, authMethodId: number)
|
|
14751
|
-
public async requestFaucet(presentationKey: string)
|
|
14752
|
-
public async deleteUser(presentationKey: string)
|
|
14773
|
+
public async startAuthMethod(authMethod: AuthMethodInteractor, presentationKey: string, payload: any): Promise<any>
|
|
14774
|
+
public async completeAuthMethod(authMethod: AuthMethodInteractor, presentationKey: string, payload: any): Promise<any>
|
|
14775
|
+
public async listLinkedMethods(presentationKey: string): Promise<any>
|
|
14776
|
+
public async unlinkMethod(presentationKey: string, authMethodId: number): Promise<any>
|
|
14777
|
+
public async requestFaucet(presentationKey: string): Promise<any>
|
|
14778
|
+
public async deleteUser(presentationKey: string): Promise<any>
|
|
14753
14779
|
public async startShareAuth(methodType: string, userIdHash: string, payload: any): Promise<{
|
|
14754
14780
|
success: boolean;
|
|
14755
14781
|
message: string;
|
|
@@ -14783,7 +14809,7 @@ See also: [AuthMethodInteractor](./client.md#class-authmethodinteractor)
|
|
|
14783
14809
|
Complete an Auth Method flow
|
|
14784
14810
|
|
|
14785
14811
|
```ts
|
|
14786
|
-
public async completeAuthMethod(authMethod: AuthMethodInteractor, presentationKey: string, payload: any)
|
|
14812
|
+
public async completeAuthMethod(authMethod: AuthMethodInteractor, presentationKey: string, payload: any): Promise<any>
|
|
14787
14813
|
```
|
|
14788
14814
|
See also: [AuthMethodInteractor](./client.md#class-authmethodinteractor)
|
|
14789
14815
|
|
|
@@ -14813,7 +14839,7 @@ Argument Details
|
|
|
14813
14839
|
Delete user
|
|
14814
14840
|
|
|
14815
14841
|
```ts
|
|
14816
|
-
public async deleteUser(presentationKey: string)
|
|
14842
|
+
public async deleteUser(presentationKey: string): Promise<any>
|
|
14817
14843
|
```
|
|
14818
14844
|
|
|
14819
14845
|
###### Method generateRandomPresentationKey
|
|
@@ -14829,7 +14855,7 @@ public generateRandomPresentationKey(): string
|
|
|
14829
14855
|
Return the WAB server info
|
|
14830
14856
|
|
|
14831
14857
|
```ts
|
|
14832
|
-
public async getInfo()
|
|
14858
|
+
public async getInfo(): Promise<any>
|
|
14833
14859
|
```
|
|
14834
14860
|
|
|
14835
14861
|
###### Method listLinkedMethods
|
|
@@ -14837,7 +14863,7 @@ public async getInfo()
|
|
|
14837
14863
|
List user-linked methods
|
|
14838
14864
|
|
|
14839
14865
|
```ts
|
|
14840
|
-
public async listLinkedMethods(presentationKey: string)
|
|
14866
|
+
public async listLinkedMethods(presentationKey: string): Promise<any>
|
|
14841
14867
|
```
|
|
14842
14868
|
|
|
14843
14869
|
###### Method requestFaucet
|
|
@@ -14845,7 +14871,7 @@ public async listLinkedMethods(presentationKey: string)
|
|
|
14845
14871
|
Request faucet
|
|
14846
14872
|
|
|
14847
14873
|
```ts
|
|
14848
|
-
public async requestFaucet(presentationKey: string)
|
|
14874
|
+
public async requestFaucet(presentationKey: string): Promise<any>
|
|
14849
14875
|
```
|
|
14850
14876
|
|
|
14851
14877
|
###### Method retrieveShare
|
|
@@ -14875,7 +14901,7 @@ Argument Details
|
|
|
14875
14901
|
Start an Auth Method flow
|
|
14876
14902
|
|
|
14877
14903
|
```ts
|
|
14878
|
-
public async startAuthMethod(authMethod: AuthMethodInteractor, presentationKey: string, payload: any)
|
|
14904
|
+
public async startAuthMethod(authMethod: AuthMethodInteractor, presentationKey: string, payload: any): Promise<any>
|
|
14879
14905
|
```
|
|
14880
14906
|
See also: [AuthMethodInteractor](./client.md#class-authmethodinteractor)
|
|
14881
14907
|
|
|
@@ -14929,7 +14955,7 @@ Argument Details
|
|
|
14929
14955
|
Unlink a given Auth Method by ID
|
|
14930
14956
|
|
|
14931
14957
|
```ts
|
|
14932
|
-
public async unlinkMethod(presentationKey: string, authMethodId: number)
|
|
14958
|
+
public async unlinkMethod(presentationKey: string, authMethodId: number): Promise<any>
|
|
14933
14959
|
```
|
|
14934
14960
|
|
|
14935
14961
|
###### Method updateShare
|
|
@@ -15236,6 +15262,7 @@ export class Wallet implements WalletInterface, ProtoWallet {
|
|
|
15236
15262
|
lookupResolver: LookupResolver;
|
|
15237
15263
|
services?: WalletServices;
|
|
15238
15264
|
monitor?: Monitor;
|
|
15265
|
+
contactSource?: ContactSource;
|
|
15239
15266
|
identityKey: string;
|
|
15240
15267
|
beef: BeefParty;
|
|
15241
15268
|
includeAllSourceTransactions: boolean = true;
|
|
@@ -15252,15 +15279,15 @@ export class Wallet implements WalletInterface, ProtoWallet {
|
|
|
15252
15279
|
async destroy(): Promise<void>
|
|
15253
15280
|
getClientChangeKeyPair(): KeyPair
|
|
15254
15281
|
async getIdentityKey(): Promise<PubKeyHex>
|
|
15255
|
-
getPublicKey(args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetPublicKeyResult>
|
|
15256
|
-
revealCounterpartyKeyLinkage(args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<RevealCounterpartyKeyLinkageResult>
|
|
15257
|
-
revealSpecificKeyLinkage(args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<RevealSpecificKeyLinkageResult>
|
|
15258
|
-
encrypt(args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<WalletEncryptResult>
|
|
15259
|
-
decrypt(args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<WalletDecryptResult>
|
|
15260
|
-
createHmac(args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<CreateHmacResult>
|
|
15261
|
-
verifyHmac(args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<VerifyHmacResult>
|
|
15262
|
-
createSignature(args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<CreateSignatureResult>
|
|
15263
|
-
verifySignature(args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<VerifySignatureResult>
|
|
15282
|
+
async getPublicKey(args: GetPublicKeyArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<GetPublicKeyResult>
|
|
15283
|
+
async revealCounterpartyKeyLinkage(args: RevealCounterpartyKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<RevealCounterpartyKeyLinkageResult>
|
|
15284
|
+
async revealSpecificKeyLinkage(args: RevealSpecificKeyLinkageArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<RevealSpecificKeyLinkageResult>
|
|
15285
|
+
async encrypt(args: WalletEncryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<WalletEncryptResult>
|
|
15286
|
+
async decrypt(args: WalletDecryptArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<WalletDecryptResult>
|
|
15287
|
+
async createHmac(args: CreateHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<CreateHmacResult>
|
|
15288
|
+
async verifyHmac(args: VerifyHmacArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<VerifyHmacResult>
|
|
15289
|
+
async createSignature(args: CreateSignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<CreateSignatureResult>
|
|
15290
|
+
async verifySignature(args: VerifySignatureArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<VerifySignatureResult>
|
|
15264
15291
|
getServices(): WalletServices
|
|
15265
15292
|
getKnownTxids(newKnownTxids?: string[]): string[]
|
|
15266
15293
|
getStorageIdentity(): StorageIdentity
|
|
@@ -15271,8 +15298,12 @@ export class Wallet implements WalletInterface, ProtoWallet {
|
|
|
15271
15298
|
async acquireCertificate(args: AcquireCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<AcquireCertificateResult>
|
|
15272
15299
|
async relinquishCertificate(args: RelinquishCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<RelinquishCertificateResult>
|
|
15273
15300
|
async proveCertificate(args: ProveCertificateArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ProveCertificateResult>
|
|
15274
|
-
async discoverByIdentityKey(args: DiscoverByIdentityKeyArgs
|
|
15275
|
-
|
|
15301
|
+
async discoverByIdentityKey(args: DiscoverByIdentityKeyArgs & {
|
|
15302
|
+
forceRefresh?: boolean;
|
|
15303
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<DiscoverCertificatesResult>
|
|
15304
|
+
async discoverByAttributes(args: DiscoverByAttributesArgs & {
|
|
15305
|
+
forceRefresh?: boolean;
|
|
15306
|
+
}, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<DiscoverCertificatesResult>
|
|
15276
15307
|
verifyReturnedTxidOnly(beef: Beef, knownTxids?: string[]): Beef
|
|
15277
15308
|
verifyReturnedTxidOnlyAtomicBEEF(beef: AtomicBEEF, knownTxids?: string[]): AtomicBEEF
|
|
15278
15309
|
verifyReturnedTxidOnlyBEEF(beef: BEEF): BEEF
|
|
@@ -15301,7 +15332,7 @@ export class Wallet implements WalletInterface, ProtoWallet {
|
|
|
15301
15332
|
}
|
|
15302
15333
|
```
|
|
15303
15334
|
|
|
15304
|
-
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)
|
|
15335
|
+
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)
|
|
15305
15336
|
|
|
15306
15337
|
###### Property autoKnownTxids
|
|
15307
15338
|
|
|
@@ -15568,7 +15599,7 @@ export class WalletError extends Error implements WalletErrorObject {
|
|
|
15568
15599
|
description: string;
|
|
15569
15600
|
}
|
|
15570
15601
|
protected toJson(): string
|
|
15571
|
-
static unknownToJson(error: unknown
|
|
15602
|
+
static unknownToJson(error: unknown): string
|
|
15572
15603
|
}
|
|
15573
15604
|
```
|
|
15574
15605
|
|
|
@@ -15618,9 +15649,8 @@ Safely serializes a WalletError derived, WERR_REVIEW_ACTIONS (special case), Err
|
|
|
15618
15649
|
Safely means avoiding deep, large, circular issues.
|
|
15619
15650
|
|
|
15620
15651
|
```ts
|
|
15621
|
-
static unknownToJson(error: unknown
|
|
15652
|
+
static unknownToJson(error: unknown): string
|
|
15622
15653
|
```
|
|
15623
|
-
See also: [WalletError](./client.md#class-walleterror)
|
|
15624
15654
|
|
|
15625
15655
|
Returns
|
|
15626
15656
|
|
|
@@ -15775,7 +15805,7 @@ export class WalletPermissionsManager implements WalletInterface {
|
|
|
15775
15805
|
originator: string;
|
|
15776
15806
|
satoshis: number;
|
|
15777
15807
|
lineItems?: Array<{
|
|
15778
|
-
type:
|
|
15808
|
+
type: LineItemType;
|
|
15779
15809
|
description: string;
|
|
15780
15810
|
satoshis: number;
|
|
15781
15811
|
}>;
|
|
@@ -15870,7 +15900,7 @@ export class WalletPermissionsManager implements WalletInterface {
|
|
|
15870
15900
|
}
|
|
15871
15901
|
```
|
|
15872
15902
|
|
|
15873
|
-
See also: [CounterpartyPermissionEventHandler](./client.md#type-counterpartypermissioneventhandler), [CounterpartyPermissions](./client.md#interface-counterpartypermissions), [GroupedPermissionEventHandler](./client.md#type-groupedpermissioneventhandler), [GroupedPermissions](./client.md#interface-groupedpermissions), [PermissionEventHandler](./client.md#type-permissioneventhandler), [PermissionToken](./client.md#interface-permissiontoken), [PermissionsManagerConfig](./client.md#interface-permissionsmanagerconfig), [WalletPermissionsManagerCallbacks](./client.md#interface-walletpermissionsmanagercallbacks), [createAction](./storage.md#function-createaction), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [proveCertificate](./client.md#function-provecertificate), [signAction](./client.md#function-signaction)
|
|
15903
|
+
See also: [CounterpartyPermissionEventHandler](./client.md#type-counterpartypermissioneventhandler), [CounterpartyPermissions](./client.md#interface-counterpartypermissions), [GroupedPermissionEventHandler](./client.md#type-groupedpermissioneventhandler), [GroupedPermissions](./client.md#interface-groupedpermissions), [LineItemType](./client.md#type-lineitemtype), [PermissionEventHandler](./client.md#type-permissioneventhandler), [PermissionToken](./client.md#interface-permissiontoken), [PermissionsManagerConfig](./client.md#interface-permissionsmanagerconfig), [WalletPermissionsManagerCallbacks](./client.md#interface-walletpermissionsmanagercallbacks), [createAction](./storage.md#function-createaction), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [proveCertificate](./client.md#function-provecertificate), [signAction](./client.md#function-signaction)
|
|
15874
15904
|
|
|
15875
15905
|
###### Constructor
|
|
15876
15906
|
|
|
@@ -15910,19 +15940,6 @@ Argument Details
|
|
|
15910
15940
|
+ **handler**
|
|
15911
15941
|
+ A function that handles the event
|
|
15912
15942
|
|
|
15913
|
-
###### Method denyGroupedPermission
|
|
15914
|
-
|
|
15915
|
-
Denies a previously requested grouped permission.
|
|
15916
|
-
|
|
15917
|
-
```ts
|
|
15918
|
-
public async denyGroupedPermission(requestID: string): Promise<void>
|
|
15919
|
-
```
|
|
15920
|
-
|
|
15921
|
-
Argument Details
|
|
15922
|
-
|
|
15923
|
-
+ **requestID**
|
|
15924
|
-
+ The ID of the request being denied.
|
|
15925
|
-
|
|
15926
15943
|
###### Method denyPermission
|
|
15927
15944
|
|
|
15928
15945
|
Denies a previously requested permission.
|
|
@@ -16012,7 +16029,7 @@ public async ensureSpendingAuthorization({ originator, satoshis, lineItems, reas
|
|
|
16012
16029
|
originator: string;
|
|
16013
16030
|
satoshis: number;
|
|
16014
16031
|
lineItems?: Array<{
|
|
16015
|
-
type:
|
|
16032
|
+
type: LineItemType;
|
|
16016
16033
|
description: string;
|
|
16017
16034
|
satoshis: number;
|
|
16018
16035
|
}>;
|
|
@@ -16020,6 +16037,7 @@ public async ensureSpendingAuthorization({ originator, satoshis, lineItems, reas
|
|
|
16020
16037
|
seekPermission?: boolean;
|
|
16021
16038
|
}): Promise<boolean>
|
|
16022
16039
|
```
|
|
16040
|
+
See also: [LineItemType](./client.md#type-lineitemtype)
|
|
16023
16041
|
|
|
16024
16042
|
###### Method grantGroupedPermission
|
|
16025
16043
|
|
|
@@ -16262,7 +16280,7 @@ Manages wallet settings
|
|
|
16262
16280
|
```ts
|
|
16263
16281
|
export class WalletSettingsManager {
|
|
16264
16282
|
kv: LocalKVStore;
|
|
16265
|
-
constructor(private wallet: WalletInterface, private config: WalletSettingsManagerConfig = {
|
|
16283
|
+
constructor(private readonly wallet: WalletInterface, private readonly config: WalletSettingsManagerConfig = {
|
|
16266
16284
|
defaultSettings: DEFAULT_SETTINGS
|
|
16267
16285
|
})
|
|
16268
16286
|
async get(): Promise<WalletSettings>
|
|
@@ -16375,7 +16393,7 @@ export class WalletStorageManager implements sdk.WalletStorage {
|
|
|
16375
16393
|
async runAsStorageProvider<R>(sync: (active: StorageProvider) => Promise<R>): Promise<R>
|
|
16376
16394
|
isActiveStorageProvider(): boolean
|
|
16377
16395
|
async addWalletStorageProvider(provider: sdk.WalletStorageProvider): Promise<void>
|
|
16378
|
-
setServices(v: sdk.WalletServices)
|
|
16396
|
+
setServices(v: sdk.WalletServices): void
|
|
16379
16397
|
getServices(): sdk.WalletServices
|
|
16380
16398
|
getSettings(): TableSettings
|
|
16381
16399
|
async migrate(storageName: string, storageIdentityKey: string): Promise<string>
|
|
@@ -16516,26 +16534,6 @@ Returns
|
|
|
16516
16534
|
|
|
16517
16535
|
true if the active `WalletStorageProvider` also implements `StorageProvider`
|
|
16518
16536
|
|
|
16519
|
-
###### Method makeAvailable
|
|
16520
|
-
|
|
16521
|
-
This async function must be called after construction and before
|
|
16522
|
-
any other async function can proceed.
|
|
16523
|
-
|
|
16524
|
-
Runs through `_stores` validating all properties and partitioning across `_active`, `_backups`, `_conflictingActives`.
|
|
16525
|
-
|
|
16526
|
-
```ts
|
|
16527
|
-
async makeAvailable(): Promise<TableSettings>
|
|
16528
|
-
```
|
|
16529
|
-
See also: [TableSettings](./storage.md#interface-tablesettings)
|
|
16530
|
-
|
|
16531
|
-
Returns
|
|
16532
|
-
|
|
16533
|
-
from the active storage.
|
|
16534
|
-
|
|
16535
|
-
Throws
|
|
16536
|
-
|
|
16537
|
-
WERR_INVALID_PARAMETER if canMakeAvailable returns false.
|
|
16538
|
-
|
|
16539
16537
|
###### Method reproveHeader
|
|
16540
16538
|
|
|
16541
16539
|
For each proven_txs record currently sourcing its transaction merkle proof from the given deactivated header,
|
|
@@ -16564,23 +16562,6 @@ async reproveHeightMerkleRoot(height: number, staleMerkleRoot: string): Promise<
|
|
|
16564
16562
|
```
|
|
16565
16563
|
See also: [ReproveHeaderResult](./client.md#interface-reproveheaderresult)
|
|
16566
16564
|
|
|
16567
|
-
###### Method reproveProven
|
|
16568
|
-
|
|
16569
|
-
Attempt to reprove the transaction against the current chain,
|
|
16570
|
-
If a new valid proof is found and noUpdate is not true,
|
|
16571
|
-
update the proven_txs record with new block and merkle proof data.
|
|
16572
|
-
If noUpdate is true, the update to be applied is available in the returned result.
|
|
16573
|
-
|
|
16574
|
-
```ts
|
|
16575
|
-
async reproveProven(ptx: TableProvenTx, noUpdate?: boolean): Promise<sdk.ReproveProvenResult>
|
|
16576
|
-
```
|
|
16577
|
-
See also: [ReproveProvenResult](./client.md#interface-reproveprovenresult), [TableProvenTx](./storage.md#interface-tableproventx)
|
|
16578
|
-
|
|
16579
|
-
Argument Details
|
|
16580
|
-
|
|
16581
|
-
+ **ptx**
|
|
16582
|
-
+ proven_txs record to reprove
|
|
16583
|
-
|
|
16584
16565
|
###### Method runAsSync
|
|
16585
16566
|
|
|
16586
16567
|
```ts
|
|
@@ -16760,9 +16741,9 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
16760
16741
|
```ts
|
|
16761
16742
|
export class WhatsOnChainServices {
|
|
16762
16743
|
static createWhatsOnChainServicesOptions(chain: Chain): WhatsOnChainServicesOptions
|
|
16763
|
-
static chainInfo:
|
|
16764
|
-
static chainInfoTime:
|
|
16765
|
-
static chainInfoMsecs: number[] = [];
|
|
16744
|
+
static readonly chainInfo: Array<WocChainInfo | undefined> = [];
|
|
16745
|
+
static readonly chainInfoTime: Array<Date | undefined> = [];
|
|
16746
|
+
static readonly chainInfoMsecs: number[] = [];
|
|
16766
16747
|
chain: Chain;
|
|
16767
16748
|
woc: WhatsOnChain;
|
|
16768
16749
|
constructor(public options: WhatsOnChainServicesOptions)
|
|
@@ -16795,57 +16776,74 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
16795
16776
|
|
|
16796
16777
|
| | | |
|
|
16797
16778
|
| --- | --- | --- |
|
|
16798
|
-
| [WalletErrorFromJson](#function-walleterrorfromjson) | [
|
|
16799
|
-
| [WocHeadersBulkListener](#function-wocheadersbulklistener) | [
|
|
16800
|
-
| [WocHeadersBulkListener_test](#function-wocheadersbulklistener_test) | [
|
|
16801
|
-
| [WocHeadersLiveListener](#function-wocheaderslivelistener) | [
|
|
16802
|
-
| [WocHeadersLiveListener_test](#function-wocheaderslivelistener_test) | [
|
|
16803
|
-
| [acquireDirectCertificate](#function-acquiredirectcertificate) | [
|
|
16804
|
-
| [addWork](#function-addwork) | [
|
|
16805
|
-
| [arcDefaultUrl](#function-arcdefaulturl) | [
|
|
16806
|
-
| [arcGorillaPoolUrl](#function-arcgorillapoolurl) | [
|
|
16807
|
-
| [arraysEqual](#function-arraysequal) | [
|
|
16808
|
-
| [asArray](#function-asarray) | [
|
|
16809
|
-
| [asBsvSdkPrivateKey](#function-asbsvsdkprivatekey) | [
|
|
16810
|
-
| [asBsvSdkPublickKey](#function-asbsvsdkpublickkey) | [
|
|
16811
|
-
| [asBsvSdkScript](#function-asbsvsdkscript) | [
|
|
16812
|
-
| [asBsvSdkTx](#function-asbsvsdktx) | [
|
|
16813
|
-
| [asString](#function-asstring) | [
|
|
16814
|
-
| [asUint8Array](#function-asuint8array) | [
|
|
16815
|
-
| [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [
|
|
16816
|
-
| [blockHash](#function-blockhash) | [
|
|
16817
|
-
| [buildBeefForOutpoints](#function-buildbeefforoutpoints) | [
|
|
16818
|
-
| [buildChaintracksOptionsWithIngestors](#function-buildchaintracksoptionswithingestors) | [
|
|
16819
|
-
| [buildSignableTransaction](#function-buildsignabletransaction) | [
|
|
16820
|
-
| [
|
|
16821
|
-
| [
|
|
16822
|
-
| [
|
|
16823
|
-
| [
|
|
16824
|
-
| [
|
|
16825
|
-
| [
|
|
16826
|
-
| [
|
|
16827
|
-
| [
|
|
16828
|
-
| [
|
|
16829
|
-
| [
|
|
16830
|
-
| [
|
|
16831
|
-
| [
|
|
16832
|
-
| [
|
|
16833
|
-
| [
|
|
16834
|
-
| [
|
|
16835
|
-
| [
|
|
16836
|
-
| [
|
|
16837
|
-
| [
|
|
16838
|
-
| [
|
|
16839
|
-
| [
|
|
16840
|
-
| [
|
|
16841
|
-
| [
|
|
16842
|
-
| [
|
|
16843
|
-
| [
|
|
16844
|
-
| [
|
|
16845
|
-
| [
|
|
16846
|
-
| [
|
|
16847
|
-
| [
|
|
16848
|
-
| [
|
|
16779
|
+
| [WalletErrorFromJson](#function-walleterrorfromjson) | [internalizeAction](#function-internalizeaction) | [sha256HashOfBinaryFile](#function-sha256hashofbinaryfile) |
|
|
16780
|
+
| [WocHeadersBulkListener](#function-wocheadersbulklistener) | [internalizeAction](#function-internalizeaction) | [shareReqsWithWorld](#function-sharereqswithworld) |
|
|
16781
|
+
| [WocHeadersBulkListener_test](#function-wocheadersbulklistener_test) | [isBaseBlockHeader](#function-isbaseblockheader) | [signAction](#function-signaction) |
|
|
16782
|
+
| [WocHeadersLiveListener](#function-wocheaderslivelistener) | [isBlockHeader](#function-isblockheader) | [signAndComplete](#function-signandcomplete) |
|
|
16783
|
+
| [WocHeadersLiveListener_test](#function-wocheaderslivelistener_test) | [isCreateActionSpecOp](#function-iscreateactionspecop) | [stampLog](#function-stamplog) |
|
|
16784
|
+
| [acquireDirectCertificate](#function-acquiredirectcertificate) | [isKnownValidBulkHeaderFile](#function-isknownvalidbulkheaderfile) | [stampLogFormat](#function-stamplogformat) |
|
|
16785
|
+
| [addWork](#function-addwork) | [isListActionsSpecOp](#function-islistactionsspecop) | [subWork](#function-subwork) |
|
|
16786
|
+
| [arcDefaultUrl](#function-arcdefaulturl) | [isListOutputsSpecOp](#function-islistoutputsspecop) | [swapByteOrder](#function-swapbyteorder) |
|
|
16787
|
+
| [arcGorillaPoolUrl](#function-arcgorillapoolurl) | [isLive](#function-islive) | [throwDummyReviewActions](#function-throwdummyreviewactions) |
|
|
16788
|
+
| [arraysEqual](#function-arraysequal) | [isLiveBlockHeader](#function-isliveblockheader) | [toBinaryBaseBlockHeader](#function-tobinarybaseblockheader) |
|
|
16789
|
+
| [asArray](#function-asarray) | [isMoreWork](#function-ismorework) | [toLookupNetworkPreset](#function-tolookupnetworkpreset) |
|
|
16790
|
+
| [asBsvSdkPrivateKey](#function-asbsvsdkprivatekey) | [keyOffsetToHashedSecret](#function-keyoffsettohashedsecret) | [toWalletNetwork](#function-towalletnetwork) |
|
|
16791
|
+
| [asBsvSdkPublickKey](#function-asbsvsdkpublickkey) | [listActionsIdb](#function-listactionsidb) | [transactionInputSize](#function-transactioninputsize) |
|
|
16792
|
+
| [asBsvSdkScript](#function-asbsvsdkscript) | [listCertificates](#function-listcertificates) | [transactionOutputSize](#function-transactionoutputsize) |
|
|
16793
|
+
| [asBsvSdkTx](#function-asbsvsdktx) | [listOutputsIdb](#function-listoutputsidb) | [transactionSize](#function-transactionsize) |
|
|
16794
|
+
| [asString](#function-asstring) | [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) | [updateChaintracksFiatExchangeRates](#function-updatechaintracksfiatexchangerates) |
|
|
16795
|
+
| [asUint8Array](#function-asuint8array) | [logCreateActionArgs](#function-logcreateactionargs) | [updateExchangeratesapi](#function-updateexchangeratesapi) |
|
|
16796
|
+
| [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [logWalletError](#function-logwalleterror) | [updateReqsFromAggregateResults](#function-updatereqsfromaggregateresults) |
|
|
16797
|
+
| [blockHash](#function-blockhash) | [makeAtomicBeef](#function-makeatomicbeef) | [upgradeAllStoresV1](#function-upgradeallstoresv1) |
|
|
16798
|
+
| [buildBeefForOutpoints](#function-buildbeefforoutpoints) | [makeBrc114ActionTimeLabel](#function-makebrc114actiontimelabel) | [upgradeCertificateFields](#function-upgradecertificatefields) |
|
|
16799
|
+
| [buildChaintracksOptionsWithIngestors](#function-buildchaintracksoptionswithingestors) | [makeChangeLock](#function-makechangelock) | [upgradeCertificates](#function-upgradecertificates) |
|
|
16800
|
+
| [buildSignableTransaction](#function-buildsignabletransaction) | [makeMerklePathNote](#function-makemerklepathnote) | [upgradeCommissions](#function-upgradecommissions) |
|
|
16801
|
+
| [classifyMerklePathResponse](#function-classifymerklepathresponse) | [markStaleInputsAsSpent](#function-markstaleinputsasspent) | [upgradeMonitorEvents](#function-upgrademonitorevents) |
|
|
16802
|
+
| [classifyReqStatus](#function-classifyreqstatus) | [matchesCertificateFieldPartial](#function-matchescertificatefieldpartial) | [upgradeOutputBaskets](#function-upgradeoutputbaskets) |
|
|
16803
|
+
| [completeSignedTransaction](#function-completesignedtransaction) | [matchesCertificatePartial](#function-matchescertificatepartial) | [upgradeOutputTags](#function-upgradeoutputtags) |
|
|
16804
|
+
| [computeMerklePath](#function-computemerklepath) | [matchesCommissionPartial](#function-matchescommissionpartial) | [upgradeOutputTagsMap](#function-upgradeoutputtagsmap) |
|
|
16805
|
+
| [computeMerkleRoot](#function-computemerkleroot) | [matchesMonitorEventPartial](#function-matchesmonitoreventpartial) | [upgradeOutputs](#function-upgradeoutputs) |
|
|
16806
|
+
| [convertBitsToTarget](#function-convertbitstotarget) | [matchesOutputBasketPartial](#function-matchesoutputbasketpartial) | [upgradeProvenTxReqs](#function-upgradeproventxreqs) |
|
|
16807
|
+
| [convertBitsToWork](#function-convertbitstowork) | [matchesOutputPartial](#function-matchesoutputpartial) | [upgradeProvenTxs](#function-upgradeproventxs) |
|
|
16808
|
+
| [convertBufferToUint32](#function-convertbuffertouint32) | [matchesOutputTagMapPartial](#function-matchesoutputtagmappartial) | [upgradeSyncStates](#function-upgradesyncstates) |
|
|
16809
|
+
| [convertProofToMerklePath](#function-convertprooftomerklepath) | [matchesOutputTagPartial](#function-matchesoutputtagpartial) | [upgradeTransactions](#function-upgradetransactions) |
|
|
16810
|
+
| [convertUint32ToBuffer](#function-convertuint32tobuffer) | [matchesProvenTxPartial](#function-matchesproventxpartial) | [upgradeTxLabels](#function-upgradetxlabels) |
|
|
16811
|
+
| [convertWocToBlockHeaderHex](#function-convertwoctoblockheaderhex) | [matchesProvenTxReqPartial](#function-matchesproventxreqpartial) | [upgradeTxLabelsMap](#function-upgradetxlabelsmap) |
|
|
16812
|
+
| [createAction](#function-createaction) | [matchesSyncStatePartial](#function-matchessyncstatepartial) | [upgradeUsers](#function-upgradeusers) |
|
|
16813
|
+
| [createAction](#function-createaction) | [matchesTransactionPartial](#function-matchestransactionpartial) | [validBulkHeaderFilesByFileHash](#function-validbulkheaderfilesbyfilehash) |
|
|
16814
|
+
| [createCoinbaseTransaction](#function-createcoinbasetransaction) | [matchesTxLabelMapPartial](#function-matchestxlabelmappartial) | [validateAgainstDirtyHashes](#function-validateagainstdirtyhashes) |
|
|
16815
|
+
| [createDefaultIdbChaintracksOptions](#function-createdefaultidbchaintracksoptions) | [matchesTxLabelPartial](#function-matchestxlabelpartial) | [validateBufferOfHeaders](#function-validatebufferofheaders) |
|
|
16816
|
+
| [createDefaultNoDbChaintracksOptions](#function-createdefaultnodbchaintracksoptions) | [maxDate](#function-maxdate) | [validateBulkFileData](#function-validatebulkfiledata) |
|
|
16817
|
+
| [createDefaultWalletServicesOptions](#function-createdefaultwalletservicesoptions) | [mergeInputBeefs](#function-mergeinputbeefs) | [validateDate](#function-validatedate) |
|
|
16818
|
+
| [createIdbChaintracks](#function-createidbchaintracks) | [mergeInputsIntoBeef](#function-mergeinputsintobeef) | [validateEntities](#function-validateentities) |
|
|
16819
|
+
| [createNoDbChaintracks](#function-createnodbchaintracks) | [notifyTransactionsOfProof](#function-notifytransactionsofproof) | [validateEntity](#function-validateentity) |
|
|
16820
|
+
| [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [offsetPrivKey](#function-offsetprivkey) | [validateGenerateChangeSdkParams](#function-validategeneratechangesdkparams) |
|
|
16821
|
+
| [createSyncMap](#function-createsyncmap) | [offsetPubKey](#function-offsetpubkey) | [validateGenerateChangeSdkResult](#function-validategeneratechangesdkresult) |
|
|
16822
|
+
| [dateMatches](#function-datematches) | [optionalArraysEqual](#function-optionalarraysequal) | [validateGenesisHeader](#function-validategenesisheader) |
|
|
16823
|
+
| [deserializeBaseBlockHeader](#function-deserializebaseblockheader) | [parseBrc114ActionTimeLabels](#function-parsebrc114actiontimelabels) | [validateHeaderDifficulty](#function-validateheaderdifficulty) |
|
|
16824
|
+
| [deserializeBaseBlockHeaders](#function-deserializebaseblockheaders) | [parseOutpoint](#function-parseoutpoint) | [validateHeaderFormat](#function-validateheaderformat) |
|
|
16825
|
+
| [deserializeBlockHeader](#function-deserializeblockheader) | [parseResults$](#function-parseresults$) | [validateScriptHash](#function-validatescripthash) |
|
|
16826
|
+
| [deserializeBlockHeaders](#function-deserializeblockheaders) | [parseTxAndAssertId](#function-parsetxandassertid) | [validateSecondsSinceEpoch](#function-validatesecondssinceepoch) |
|
|
16827
|
+
| [doubleSha256BE](#function-doublesha256be) | [parseTxScriptOffsets](#function-parsetxscriptoffsets) | [validateStorageFeeModel](#function-validatestoragefeemodel) |
|
|
16828
|
+
| [doubleSha256LE](#function-doublesha256le) | [partitionActionLabels](#function-partitionactionlabels) | [validateSyncChunkEntities](#function-validatesyncchunkentities) |
|
|
16829
|
+
| [fundWalletFromP2PKHOutpoints](#function-fundwalletfromp2pkhoutpoints) | [populateUtxoDetails](#function-populateutxodetails) | [varUintSize](#function-varuintsize) |
|
|
16830
|
+
| [generateChangeSdk](#function-generatechangesdk) | [processAction](#function-processaction) | [verifyHexString](#function-verifyhexstring) |
|
|
16831
|
+
| [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [processAction](#function-processaction) | [verifyId](#function-verifyid) |
|
|
16832
|
+
| [genesisBuffer](#function-genesisbuffer) | [proveCertificate](#function-provecertificate) | [verifyInteger](#function-verifyinteger) |
|
|
16833
|
+
| [genesisHeader](#function-genesisheader) | [purgeDataIdb](#function-purgedataidb) | [verifyNumber](#function-verifynumber) |
|
|
16834
|
+
| [getBeefForTransaction](#function-getbeeffortransaction) | [randomBytes](#function-randombytes) | [verifyOne](#function-verifyone) |
|
|
16835
|
+
| [getBeefForTxid](#function-getbeeffortxid) | [randomBytesBase64](#function-randombytesbase64) | [verifyOneOrNone](#function-verifyoneornone) |
|
|
16836
|
+
| [getExchangeRatesIo](#function-getexchangeratesio) | [randomBytesHex](#function-randombyteshex) | [verifyOptionalHexString](#function-verifyoptionalhexstring) |
|
|
16837
|
+
| [getIdentityKey](#function-getidentitykey) | [readUInt32BE](#function-readuint32be) | [verifyP2PKHOwnership](#function-verifyp2pkhownership) |
|
|
16838
|
+
| [getListOutputsSpecOp](#function-getlistoutputsspecop) | [readUInt32LE](#function-readuint32le) | [verifyTruthy](#function-verifytruthy) |
|
|
16839
|
+
| [getProofs](#function-getproofs) | [redeemServiceCharges](#function-redeemservicecharges) | [verifyUnlockScripts](#function-verifyunlockscripts) |
|
|
16840
|
+
| [getSyncChunk](#function-getsyncchunk) | [resolveAutoSigned](#function-resolveautosigned) | [wait](#function-wait) |
|
|
16841
|
+
| [getWhatsOnChainBlockHeaderByHash](#function-getwhatsonchainblockheaderbyhash) | [reviewStatusIdb](#function-reviewstatusidb) | [wocGetHeadersHeaderToBlockHeader](#function-wocgetheadersheadertoblockheader) |
|
|
16842
|
+
| [handlePostRawTxErrorResponse](#function-handlepostrawtxerrorresponse) | [selectBulkHeaderFiles](#function-selectbulkheaderfiles) | [workBNtoBuffer](#function-workbntobuffer) |
|
|
16843
|
+
| [handleScriptHashHistoryCatch](#function-handlescripthashhistorycatch) | [serializeBaseBlockHeader](#function-serializebaseblockheader) | [writeUInt32BE](#function-writeuint32be) |
|
|
16844
|
+
| [handleScriptHashHistoryResponse](#function-handlescripthashhistoryresponse) | [serializeBaseBlockHeaders](#function-serializebaseblockheaders) | [writeUInt32LE](#function-writeuint32le) |
|
|
16845
|
+
| [handleUtxoConnReset](#function-handleutxoconnreset) | [setDisableDoubleSpendCheckForTest](#function-setdisabledoublespendcheckfortest) | |
|
|
16846
|
+
| [importSingleOutpoint](#function-importsingleoutpoint) | [sha256Hash](#function-sha256hash) | |
|
|
16849
16847
|
|
|
16850
16848
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
16851
16849
|
|
|
@@ -16879,7 +16877,7 @@ High speed WebSocket based based old block header listener
|
|
|
16879
16877
|
export async function WocHeadersBulkListener(fromHeight: number, toHeight: number, enqueue: (header: BlockHeader) => void, error: (code: number, message: string) => boolean, stop: StopListenerToken, chain: Chain, logger: (...args: any[]) => void = () => { }, idleWait = 5000): Promise<boolean>
|
|
16880
16878
|
```
|
|
16881
16879
|
|
|
16882
|
-
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [StopListenerToken](./services.md#
|
|
16880
|
+
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [StopListenerToken](./services.md#interface-stoplistenertoken), [logger](./client.md#variable-logger)
|
|
16883
16881
|
|
|
16884
16882
|
Returns
|
|
16885
16883
|
|
|
@@ -16934,7 +16932,7 @@ High speed WebSocket based based new block header listener
|
|
|
16934
16932
|
export async function WocHeadersLiveListener(enqueue: (header: BlockHeader) => void, error: (code: number, message: string) => boolean, stop: StopListenerToken, chain: Chain, logger: (...args: any[]) => void, idleWait = 100000): Promise<boolean>
|
|
16935
16933
|
```
|
|
16936
16934
|
|
|
16937
|
-
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [StopListenerToken](./services.md#
|
|
16935
|
+
See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [StopListenerToken](./services.md#interface-stoplistenertoken), [logger](./client.md#variable-logger)
|
|
16938
16936
|
|
|
16939
16937
|
Returns
|
|
16940
16938
|
|
|
@@ -17018,7 +17016,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
17018
17016
|
Compares lengths and direct equality of values.
|
|
17019
17017
|
|
|
17020
17018
|
```ts
|
|
17021
|
-
export function arraysEqual(arr1: Number[], arr2: Number[])
|
|
17019
|
+
export function arraysEqual(arr1: Number[], arr2: Number[]): boolean
|
|
17022
17020
|
```
|
|
17023
17021
|
|
|
17024
17022
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -17029,17 +17027,19 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
17029
17027
|
Convert a value to number[] if currently an encoded string or number[] or Uint8Array.
|
|
17030
17028
|
|
|
17031
17029
|
```ts
|
|
17032
|
-
export function asArray(val:
|
|
17030
|
+
export function asArray(val: ByteInput, enc?: ByteEncoding): number[] {
|
|
17033
17031
|
if (Array.isArray(val))
|
|
17034
17032
|
return val;
|
|
17035
17033
|
if (typeof val !== "string")
|
|
17036
17034
|
return Array.from(val);
|
|
17037
17035
|
enc ||= "hex";
|
|
17038
|
-
|
|
17036
|
+
const a: number[] = Utils.toArray(val, enc);
|
|
17039
17037
|
return a;
|
|
17040
17038
|
}
|
|
17041
17039
|
```
|
|
17042
17040
|
|
|
17041
|
+
See also: [ByteEncoding](./client.md#type-byteencoding), [ByteInput](./client.md#type-byteinput)
|
|
17042
|
+
|
|
17043
17043
|
Returns
|
|
17044
17044
|
|
|
17045
17045
|
number[] array of byte values representation of val.
|
|
@@ -17127,7 +17127,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
17127
17127
|
Convert a value to an encoded string if currently an encoded string or number[] or Uint8Array.
|
|
17128
17128
|
|
|
17129
17129
|
```ts
|
|
17130
|
-
export function asString(val:
|
|
17130
|
+
export function asString(val: ByteInput, enc?: ByteEncoding, returnEnc?: ByteEncoding): string {
|
|
17131
17131
|
enc ||= "hex";
|
|
17132
17132
|
returnEnc ||= enc;
|
|
17133
17133
|
if (typeof val === "string") {
|
|
@@ -17135,7 +17135,7 @@ export function asString(val: string | number[] | Uint8Array, enc?: "hex" | "utf
|
|
|
17135
17135
|
return val;
|
|
17136
17136
|
val = asUint8Array(val, enc);
|
|
17137
17137
|
}
|
|
17138
|
-
|
|
17138
|
+
const v = Array.isArray(val) ? val : Array.from(val);
|
|
17139
17139
|
switch (returnEnc) {
|
|
17140
17140
|
case "utf8":
|
|
17141
17141
|
return Utils.toUTF8(v);
|
|
@@ -17146,7 +17146,7 @@ export function asString(val: string | number[] | Uint8Array, enc?: "hex" | "utf
|
|
|
17146
17146
|
}
|
|
17147
17147
|
```
|
|
17148
17148
|
|
|
17149
|
-
See also: [asUint8Array](./client.md#function-asuint8array)
|
|
17149
|
+
See also: [ByteEncoding](./client.md#type-byteencoding), [ByteInput](./client.md#type-byteinput), [asUint8Array](./client.md#function-asuint8array)
|
|
17150
17150
|
|
|
17151
17151
|
Returns
|
|
17152
17152
|
|
|
@@ -17169,17 +17169,19 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
17169
17169
|
Convert a value to Uint8Array if currently an encoded string or number[] or Uint8Array.
|
|
17170
17170
|
|
|
17171
17171
|
```ts
|
|
17172
|
-
export function asUint8Array(val:
|
|
17172
|
+
export function asUint8Array(val: ByteInput, enc?: ByteEncoding): Uint8Array {
|
|
17173
17173
|
if (Array.isArray(val))
|
|
17174
17174
|
return Uint8Array.from(val);
|
|
17175
17175
|
if (typeof val !== "string")
|
|
17176
17176
|
return val;
|
|
17177
17177
|
enc ||= "hex";
|
|
17178
|
-
|
|
17178
|
+
const a: number[] = Utils.toArray(val, enc);
|
|
17179
17179
|
return Uint8Array.from(a);
|
|
17180
17180
|
}
|
|
17181
17181
|
```
|
|
17182
17182
|
|
|
17183
|
+
See also: [ByteEncoding](./client.md#type-byteencoding), [ByteInput](./client.md#type-byteinput)
|
|
17184
|
+
|
|
17183
17185
|
Returns
|
|
17184
17186
|
|
|
17185
17187
|
Uint8Array representation of val.
|
|
@@ -17282,6 +17284,34 @@ See also: [PendingStorageInput](./client.md#interface-pendingstorageinput), [Sto
|
|
|
17282
17284
|
|
|
17283
17285
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
17284
17286
|
|
|
17287
|
+
---
|
|
17288
|
+
##### Function: classifyMerklePathResponse
|
|
17289
|
+
|
|
17290
|
+
Classify a non-OK status response for getMerklePath.
|
|
17291
|
+
|
|
17292
|
+
Returns `'retry'` when the request was rate-limited and the caller should retry,
|
|
17293
|
+
`'notFound'` for 404, `'badStatus'` for other non-200 codes.
|
|
17294
|
+
|
|
17295
|
+
```ts
|
|
17296
|
+
export function classifyMerklePathResponse(status: number, statusText: string, retry: number): "retry" | "notFound" | "badStatus" | "ok"
|
|
17297
|
+
```
|
|
17298
|
+
|
|
17299
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
17300
|
+
|
|
17301
|
+
---
|
|
17302
|
+
##### Function: classifyReqStatus
|
|
17303
|
+
|
|
17304
|
+
Classify a ProvenTxReq status into beef-sharing lifecycle status.
|
|
17305
|
+
Mutates `d` in place.
|
|
17306
|
+
|
|
17307
|
+
```ts
|
|
17308
|
+
export function classifyReqStatus(d: GetReqsAndBeefDetail, req: TableProvenTxReq): void
|
|
17309
|
+
```
|
|
17310
|
+
|
|
17311
|
+
See also: [GetReqsAndBeefDetail](./storage.md#interface-getreqsandbeefdetail), [TableProvenTxReq](./storage.md#interface-tableproventxreq)
|
|
17312
|
+
|
|
17313
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
17314
|
+
|
|
17285
17315
|
---
|
|
17286
17316
|
##### Function: completeSignedTransaction
|
|
17287
17317
|
|
|
@@ -17558,6 +17588,15 @@ See also: [SyncMap](./storage.md#interface-syncmap)
|
|
|
17558
17588
|
|
|
17559
17589
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
17560
17590
|
|
|
17591
|
+
---
|
|
17592
|
+
##### Function: dateMatches
|
|
17593
|
+
|
|
17594
|
+
```ts
|
|
17595
|
+
export function dateMatches(a: Date | undefined, b: Date | undefined): boolean
|
|
17596
|
+
```
|
|
17597
|
+
|
|
17598
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
17599
|
+
|
|
17561
17600
|
---
|
|
17562
17601
|
##### Function: deserializeBaseBlockHeader
|
|
17563
17602
|
|
|
@@ -17597,7 +17636,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
17597
17636
|
##### Function: deserializeBlockHeader
|
|
17598
17637
|
|
|
17599
17638
|
```ts
|
|
17600
|
-
export function deserializeBlockHeader(buffer: number[] | Uint8Array, offset = 0
|
|
17639
|
+
export function deserializeBlockHeader(buffer: number[] | Uint8Array, height: number, offset = 0): BlockHeader
|
|
17601
17640
|
```
|
|
17602
17641
|
|
|
17603
17642
|
See also: [BlockHeader](./client.md#interface-blockheader)
|
|
@@ -17677,12 +17716,12 @@ Accepts outpoints + a P2PKH key pair, optionally with a pre-built BEEF.
|
|
|
17677
17716
|
If no BEEF is provided, one is built via buildBeefForOutpoints.
|
|
17678
17717
|
|
|
17679
17718
|
```ts
|
|
17680
|
-
export async function fundWalletFromP2PKHOutpoints(wallet: WalletInterface, outpoints: string[], p2pkhKey: KeyPairAddress, getUnlockP2PKH: (priv: KeyPairAddress["privateKey"], satoshis: number) => ScriptTemplateUnlock, inputBEEF?: BEEF): Promise<{
|
|
17719
|
+
export async function fundWalletFromP2PKHOutpoints(wallet: WalletInterface, outpoints: string[], p2pkhKey: KeyPairAddress, getUnlockP2PKH: (priv: KeyPairAddress["privateKey"], satoshis: number) => ScriptTemplateUnlock, inputBEEF?: BEEF): Promise<Array<{
|
|
17681
17720
|
outpoint: string;
|
|
17682
17721
|
txid?: string;
|
|
17683
17722
|
success: boolean;
|
|
17684
17723
|
error?: string;
|
|
17685
|
-
}
|
|
17724
|
+
}>>
|
|
17686
17725
|
```
|
|
17687
17726
|
|
|
17688
17727
|
See also: [KeyPairAddress](./setup.md#interface-keypairaddress), [ScriptTemplateUnlock](./client.md#interface-scripttemplateunlock)
|
|
@@ -17768,7 +17807,7 @@ export function genesisHeader(chain: Chain): BlockHeader {
|
|
|
17768
17807
|
hash: "000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"
|
|
17769
17808
|
};
|
|
17770
17809
|
case "mock":
|
|
17771
|
-
throw new Error(
|
|
17810
|
+
throw new Error("genesisHeader does not support 'mock' chain. Mock chain generates its own genesis block.");
|
|
17772
17811
|
}
|
|
17773
17812
|
}
|
|
17774
17813
|
```
|
|
@@ -17873,7 +17912,7 @@ depending on chaintracks succeeding on proof verification.
|
|
|
17873
17912
|
Increments attempts if proofs where requested.
|
|
17874
17913
|
|
|
17875
17914
|
```ts
|
|
17876
|
-
export async function getProofs(task: WalletMonitorTask, reqs: TableProvenTxReq[], indent = 0, countsAsAttempt = false, ignoreStatus = false
|
|
17915
|
+
export async function getProofs(task: WalletMonitorTask, reqs: TableProvenTxReq[], maxAcceptableHeight: number, indent = 0, countsAsAttempt = false, ignoreStatus = false): Promise<{
|
|
17877
17916
|
proven: TableProvenTxReq[];
|
|
17878
17917
|
invalid: TableProvenTxReq[];
|
|
17879
17918
|
log: string;
|
|
@@ -17912,6 +17951,70 @@ See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#
|
|
|
17912
17951
|
|
|
17913
17952
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
17914
17953
|
|
|
17954
|
+
---
|
|
17955
|
+
##### Function: handlePostRawTxErrorResponse
|
|
17956
|
+
|
|
17957
|
+
Classify an error-status WoC response and mutate `r` accordingly.
|
|
17958
|
+
|
|
17959
|
+
```ts
|
|
17960
|
+
export function handlePostRawTxErrorResponse(r: PostTxResultForTxid, nne: () => Record<string, unknown>, response: {
|
|
17961
|
+
data?: unknown;
|
|
17962
|
+
statusText?: unknown;
|
|
17963
|
+
status?: unknown;
|
|
17964
|
+
ok?: boolean;
|
|
17965
|
+
}): void
|
|
17966
|
+
```
|
|
17967
|
+
|
|
17968
|
+
See also: [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
17969
|
+
|
|
17970
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
17971
|
+
|
|
17972
|
+
---
|
|
17973
|
+
##### Function: handleScriptHashHistoryCatch
|
|
17974
|
+
|
|
17975
|
+
Decide whether a caught error is retryable for script-hash history calls.
|
|
17976
|
+
If not retryable, sets `r.error` and returns false.
|
|
17977
|
+
|
|
17978
|
+
```ts
|
|
17979
|
+
export function handleScriptHashHistoryCatch(r: GetScriptHashHistoryResult, error_: unknown, url: string, methodName: string, retry: number, maxRetry: number): boolean
|
|
17980
|
+
```
|
|
17981
|
+
|
|
17982
|
+
See also: [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult)
|
|
17983
|
+
|
|
17984
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
17985
|
+
|
|
17986
|
+
---
|
|
17987
|
+
##### Function: handleScriptHashHistoryResponse
|
|
17988
|
+
|
|
17989
|
+
Inspect a WoC script-hash history response and update `r` in-place.
|
|
17990
|
+
|
|
17991
|
+
Returns:
|
|
17992
|
+
- `'continue'` — rate-limited, caller should retry
|
|
17993
|
+
- `'return'` — done, caller should return `r`
|
|
17994
|
+
- `'ok'` — response was successful, continue parsing
|
|
17995
|
+
|
|
17996
|
+
```ts
|
|
17997
|
+
export function handleScriptHashHistoryResponse(r: GetScriptHashHistoryResult, response: ScriptHashHistoryResponse, methodName: string, retry: number): "continue" | "return" | "ok"
|
|
17998
|
+
```
|
|
17999
|
+
|
|
18000
|
+
See also: [GetScriptHashHistoryResult](./client.md#interface-getscripthashhistoryresult), [ScriptHashHistoryResponse](./services.md#interface-scripthashhistoryresponse)
|
|
18001
|
+
|
|
18002
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18003
|
+
|
|
18004
|
+
---
|
|
18005
|
+
##### Function: handleUtxoConnReset
|
|
18006
|
+
|
|
18007
|
+
Decide whether the ECONNRESET error is retryable and, if not, set `r.error`.
|
|
18008
|
+
Returns true when the caller should retry, false when it should return.
|
|
18009
|
+
|
|
18010
|
+
```ts
|
|
18011
|
+
export function handleUtxoConnReset(r: GetUtxoStatusResult, error_: unknown, url: string, retry: number, maxRetry: number): boolean
|
|
18012
|
+
```
|
|
18013
|
+
|
|
18014
|
+
See also: [GetUtxoStatusResult](./client.md#interface-getutxostatusresult)
|
|
18015
|
+
|
|
18016
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18017
|
+
|
|
17915
18018
|
---
|
|
17916
18019
|
##### Function: importSingleOutpoint
|
|
17917
18020
|
|
|
@@ -18001,12 +18104,12 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
18001
18104
|
Type guard function.
|
|
18002
18105
|
|
|
18003
18106
|
```ts
|
|
18004
|
-
export function isBaseBlockHeader(header:
|
|
18107
|
+
export function isBaseBlockHeader(header: AnyBlockHeader): header is BaseBlockHeader {
|
|
18005
18108
|
return typeof header.previousHash === "string";
|
|
18006
18109
|
}
|
|
18007
18110
|
```
|
|
18008
18111
|
|
|
18009
|
-
See also: [
|
|
18112
|
+
See also: [AnyBlockHeader](./services.md#type-anyblockheader), [BaseBlockHeader](./client.md#interface-baseblockheader)
|
|
18010
18113
|
|
|
18011
18114
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18012
18115
|
|
|
@@ -18016,12 +18119,12 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
18016
18119
|
Type guard function.
|
|
18017
18120
|
|
|
18018
18121
|
```ts
|
|
18019
|
-
export function isBlockHeader(header:
|
|
18122
|
+
export function isBlockHeader(header: AnyBlockHeader): header is LiveBlockHeader {
|
|
18020
18123
|
return "height" in header && typeof header.previousHash === "string";
|
|
18021
18124
|
}
|
|
18022
18125
|
```
|
|
18023
18126
|
|
|
18024
|
-
See also: [
|
|
18127
|
+
See also: [AnyBlockHeader](./services.md#type-anyblockheader), [LiveBlockHeader](./services.md#interface-liveblockheader)
|
|
18025
18128
|
|
|
18026
18129
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18027
18130
|
|
|
@@ -18066,17 +18169,16 @@ The following properties must match:
|
|
|
18066
18169
|
|
|
18067
18170
|
```ts
|
|
18068
18171
|
export function isKnownValidBulkHeaderFile(vbf: BulkHeaderFileInfo): boolean {
|
|
18069
|
-
if (!vbf
|
|
18172
|
+
if (!vbf?.fileHash)
|
|
18070
18173
|
return false;
|
|
18071
18174
|
const bf = validBulkHeaderFilesByFileHash()[vbf.fileHash];
|
|
18072
|
-
if (
|
|
18073
|
-
bf
|
|
18074
|
-
bf
|
|
18075
|
-
bf
|
|
18076
|
-
bf
|
|
18077
|
-
bf
|
|
18078
|
-
bf
|
|
18079
|
-
bf.chain !== vbf.chain) {
|
|
18175
|
+
if (bf?.firstHeight !== vbf.firstHeight ||
|
|
18176
|
+
bf?.count !== vbf.count ||
|
|
18177
|
+
bf?.prevChainWork !== vbf.prevChainWork ||
|
|
18178
|
+
bf?.prevHash !== vbf.prevHash ||
|
|
18179
|
+
bf?.lastChainWork !== vbf.lastChainWork ||
|
|
18180
|
+
bf?.lastHash !== vbf.lastHash ||
|
|
18181
|
+
bf?.chain !== vbf.chain) {
|
|
18080
18182
|
return false;
|
|
18081
18183
|
}
|
|
18082
18184
|
return true;
|
|
@@ -18148,12 +18250,12 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
18148
18250
|
Type guard function.
|
|
18149
18251
|
|
|
18150
18252
|
```ts
|
|
18151
|
-
export function isLiveBlockHeader(header:
|
|
18253
|
+
export function isLiveBlockHeader(header: AnyBlockHeader): header is LiveBlockHeader {
|
|
18152
18254
|
return "chainwork" in header && typeof header.previousHash === "string";
|
|
18153
18255
|
}
|
|
18154
18256
|
```
|
|
18155
18257
|
|
|
18156
|
-
See also: [
|
|
18258
|
+
See also: [AnyBlockHeader](./services.md#type-anyblockheader), [LiveBlockHeader](./services.md#interface-liveblockheader)
|
|
18157
18259
|
|
|
18158
18260
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18159
18261
|
|
|
@@ -18277,25 +18379,294 @@ See also: [KeyPair](./client.md#interface-keypair), [StorageCreateActionResult](
|
|
|
18277
18379
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18278
18380
|
|
|
18279
18381
|
---
|
|
18280
|
-
##### Function:
|
|
18382
|
+
##### Function: makeMerklePathNote
|
|
18281
18383
|
|
|
18282
18384
|
```ts
|
|
18283
|
-
export function
|
|
18385
|
+
export function makeMerklePathNote(what: MerklePathNoteWhat, name: string, extra: Partial<MerklePathNote> = {}): MerklePathNote
|
|
18284
18386
|
```
|
|
18285
18387
|
|
|
18388
|
+
See also: [MerklePathNote](./services.md#interface-merklepathnote), [MerklePathNoteWhat](./services.md#type-merklepathnotewhat)
|
|
18389
|
+
|
|
18286
18390
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18287
18391
|
|
|
18288
18392
|
---
|
|
18289
|
-
##### Function:
|
|
18393
|
+
##### Function: markStaleInputsAsSpent
|
|
18290
18394
|
|
|
18291
|
-
|
|
18292
|
-
|
|
18293
|
-
|
|
18294
|
-
|
|
18295
|
-
|
|
18296
|
-
```
|
|
18395
|
+
After any failed broadcast (doubleSpend, invalidTx, etc.), query each
|
|
18396
|
+
consumed-input outpoint of the failed transaction against on-chain
|
|
18397
|
+
UTXO state. For inputs the chain authoritatively confirms are spent
|
|
18398
|
+
(i.e. NOT a UTXO), update the corresponding wallet basket entry to
|
|
18399
|
+
spendable=false.
|
|
18297
18400
|
|
|
18298
|
-
|
|
18401
|
+
Background: `updateTransactionStatus(failed)` optimistically restores
|
|
18402
|
+
all consumed-input outputs to spendable=true so the user can retry
|
|
18403
|
+
with the same inputs. For some failures (genuine doubleSpend, or any
|
|
18404
|
+
'missing-inputs' outcome where the input has been spent on chain by
|
|
18405
|
+
a different transaction), restoration is incorrect — the input is
|
|
18406
|
+
gone and restoring it produces an infinite missing-inputs loop on
|
|
18407
|
+
the next createAction → broadcast cycle. Apps cannot evict from the
|
|
18408
|
+
default basket on app-isolated wallets (admin-only policy), so this
|
|
18409
|
+
self-heal must run inside the wallet.
|
|
18410
|
+
|
|
18411
|
+
Different broadcasters classify the same on-chain reality differently
|
|
18412
|
+
(ARC → doubleSpend, WhatsOnChain/Bitails → invalidTx via
|
|
18413
|
+
'missing-inputs'); this helper is broadcaster-agnostic because its
|
|
18414
|
+
decision is based on services.isUtxo, not the aggregate failure
|
|
18415
|
+
classification.
|
|
18416
|
+
|
|
18417
|
+
Pre-broadcast races where concurrent createActions reach the same
|
|
18418
|
+
UTXO across separate app processes are out of scope; see PR
|
|
18419
|
+
description.
|
|
18420
|
+
|
|
18421
|
+
Conservatively scoped:
|
|
18422
|
+
- Only inputs found in the failing user's basket are touched.
|
|
18423
|
+
- Inputs whose on-chain UTXO status cannot be determined (service
|
|
18424
|
+
error / inconclusive) are left spendable=true. Eviction is opt-in
|
|
18425
|
+
based on positive evidence of stale state.
|
|
18426
|
+
- Inputs the chain confirms are still UTXOs (e.g. a competing tx
|
|
18427
|
+
itself failed, or a malformed/fee failure where inputs are intact)
|
|
18428
|
+
are left spendable=true — preserving the existing transient-retry
|
|
18429
|
+
semantics callers depend on.
|
|
18430
|
+
|
|
18431
|
+
Returns counts for instrumentation and the set of stale outpoints
|
|
18432
|
+
that were actually evicted (added to history note for diagnostics).
|
|
18433
|
+
|
|
18434
|
+
```ts
|
|
18435
|
+
export async function markStaleInputsAsSpent(ar: AggregatePostBeefTxResult, storage: StorageProvider, services: sdk.WalletServices, trx?: sdk.TrxToken, logger?: WalletLoggerInterface): Promise<{
|
|
18436
|
+
checked: number;
|
|
18437
|
+
staleConfirmed: number;
|
|
18438
|
+
staleOutpoints: string[];
|
|
18439
|
+
}>
|
|
18440
|
+
```
|
|
18441
|
+
|
|
18442
|
+
See also: [AggregatePostBeefTxResult](./storage.md#interface-aggregatepostbeeftxresult), [StorageProvider](./storage.md#class-storageprovider), [TrxToken](./client.md#interface-trxtoken), [WalletServices](./client.md#interface-walletservices), [logger](./client.md#variable-logger)
|
|
18443
|
+
|
|
18444
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18445
|
+
|
|
18446
|
+
---
|
|
18447
|
+
##### Function: matchesCertificateFieldPartial
|
|
18448
|
+
|
|
18449
|
+
```ts
|
|
18450
|
+
export function matchesCertificateFieldPartial(r: TableCertificateField, partial: Partial<TableCertificateField>): boolean
|
|
18451
|
+
```
|
|
18452
|
+
|
|
18453
|
+
See also: [TableCertificateField](./storage.md#interface-tablecertificatefield)
|
|
18454
|
+
|
|
18455
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18456
|
+
|
|
18457
|
+
---
|
|
18458
|
+
##### Function: matchesCertificatePartial
|
|
18459
|
+
|
|
18460
|
+
```ts
|
|
18461
|
+
export function matchesCertificatePartial(r: TableCertificate, partial: Partial<TableCertificate>): boolean
|
|
18462
|
+
```
|
|
18463
|
+
|
|
18464
|
+
See also: [TableCertificate](./storage.md#interface-tablecertificate)
|
|
18465
|
+
|
|
18466
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18467
|
+
|
|
18468
|
+
---
|
|
18469
|
+
##### Function: matchesCommissionPartial
|
|
18470
|
+
|
|
18471
|
+
```ts
|
|
18472
|
+
export function matchesCommissionPartial(r: TableCommission, partial: Partial<TableCommission>): boolean
|
|
18473
|
+
```
|
|
18474
|
+
|
|
18475
|
+
See also: [TableCommission](./storage.md#interface-tablecommission)
|
|
18476
|
+
|
|
18477
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18478
|
+
|
|
18479
|
+
---
|
|
18480
|
+
##### Function: matchesMonitorEventPartial
|
|
18481
|
+
|
|
18482
|
+
```ts
|
|
18483
|
+
export function matchesMonitorEventPartial(r: TableMonitorEvent, partial: Partial<TableMonitorEvent>): boolean
|
|
18484
|
+
```
|
|
18485
|
+
|
|
18486
|
+
See also: [TableMonitorEvent](./storage.md#interface-tablemonitorevent)
|
|
18487
|
+
|
|
18488
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18489
|
+
|
|
18490
|
+
---
|
|
18491
|
+
##### Function: matchesOutputBasketPartial
|
|
18492
|
+
|
|
18493
|
+
```ts
|
|
18494
|
+
export function matchesOutputBasketPartial(r: TableOutputBasket, partial: Partial<TableOutputBasket>): boolean
|
|
18495
|
+
```
|
|
18496
|
+
|
|
18497
|
+
See also: [TableOutputBasket](./storage.md#interface-tableoutputbasket)
|
|
18498
|
+
|
|
18499
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18500
|
+
|
|
18501
|
+
---
|
|
18502
|
+
##### Function: matchesOutputPartial
|
|
18503
|
+
|
|
18504
|
+
```ts
|
|
18505
|
+
export function matchesOutputPartial(r: TableOutput, partial: Partial<TableOutput>): boolean
|
|
18506
|
+
```
|
|
18507
|
+
|
|
18508
|
+
See also: [TableOutput](./storage.md#interface-tableoutput)
|
|
18509
|
+
|
|
18510
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18511
|
+
|
|
18512
|
+
---
|
|
18513
|
+
##### Function: matchesOutputTagMapPartial
|
|
18514
|
+
|
|
18515
|
+
```ts
|
|
18516
|
+
export function matchesOutputTagMapPartial(r: TableOutputTagMap, partial: Partial<TableOutputTagMap>): boolean
|
|
18517
|
+
```
|
|
18518
|
+
|
|
18519
|
+
See also: [TableOutputTagMap](./storage.md#interface-tableoutputtagmap)
|
|
18520
|
+
|
|
18521
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18522
|
+
|
|
18523
|
+
---
|
|
18524
|
+
##### Function: matchesOutputTagPartial
|
|
18525
|
+
|
|
18526
|
+
```ts
|
|
18527
|
+
export function matchesOutputTagPartial(r: TableOutputTag, partial: Partial<TableOutputTag>): boolean
|
|
18528
|
+
```
|
|
18529
|
+
|
|
18530
|
+
See also: [TableOutputTag](./storage.md#interface-tableoutputtag)
|
|
18531
|
+
|
|
18532
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18533
|
+
|
|
18534
|
+
---
|
|
18535
|
+
##### Function: matchesProvenTxPartial
|
|
18536
|
+
|
|
18537
|
+
```ts
|
|
18538
|
+
export function matchesProvenTxPartial(r: TableProvenTx, partial: Partial<TableProvenTx>): boolean
|
|
18539
|
+
```
|
|
18540
|
+
|
|
18541
|
+
See also: [TableProvenTx](./storage.md#interface-tableproventx)
|
|
18542
|
+
|
|
18543
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18544
|
+
|
|
18545
|
+
---
|
|
18546
|
+
##### Function: matchesProvenTxReqPartial
|
|
18547
|
+
|
|
18548
|
+
```ts
|
|
18549
|
+
export function matchesProvenTxReqPartial(r: TableProvenTxReq, partial: Partial<TableProvenTxReq>): boolean
|
|
18550
|
+
```
|
|
18551
|
+
|
|
18552
|
+
See also: [TableProvenTxReq](./storage.md#interface-tableproventxreq)
|
|
18553
|
+
|
|
18554
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18555
|
+
|
|
18556
|
+
---
|
|
18557
|
+
##### Function: matchesSyncStatePartial
|
|
18558
|
+
|
|
18559
|
+
```ts
|
|
18560
|
+
export function matchesSyncStatePartial(r: TableSyncState, partial: Partial<TableSyncState>): boolean
|
|
18561
|
+
```
|
|
18562
|
+
|
|
18563
|
+
See also: [TableSyncState](./storage.md#interface-tablesyncstate)
|
|
18564
|
+
|
|
18565
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18566
|
+
|
|
18567
|
+
---
|
|
18568
|
+
##### Function: matchesTransactionPartial
|
|
18569
|
+
|
|
18570
|
+
```ts
|
|
18571
|
+
export function matchesTransactionPartial(r: TableTransaction, partial: Partial<TableTransaction>): boolean
|
|
18572
|
+
```
|
|
18573
|
+
|
|
18574
|
+
See also: [TableTransaction](./storage.md#interface-tabletransaction)
|
|
18575
|
+
|
|
18576
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18577
|
+
|
|
18578
|
+
---
|
|
18579
|
+
##### Function: matchesTxLabelMapPartial
|
|
18580
|
+
|
|
18581
|
+
```ts
|
|
18582
|
+
export function matchesTxLabelMapPartial(r: TableTxLabelMap, partial: Partial<TableTxLabelMap>): boolean
|
|
18583
|
+
```
|
|
18584
|
+
|
|
18585
|
+
See also: [TableTxLabelMap](./storage.md#interface-tabletxlabelmap)
|
|
18586
|
+
|
|
18587
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18588
|
+
|
|
18589
|
+
---
|
|
18590
|
+
##### Function: matchesTxLabelPartial
|
|
18591
|
+
|
|
18592
|
+
```ts
|
|
18593
|
+
export function matchesTxLabelPartial(r: TableTxLabel, partial: Partial<TableTxLabel>): boolean
|
|
18594
|
+
```
|
|
18595
|
+
|
|
18596
|
+
See also: [TableTxLabel](./storage.md#interface-tabletxlabel)
|
|
18597
|
+
|
|
18598
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18599
|
+
|
|
18600
|
+
---
|
|
18601
|
+
##### Function: maxDate
|
|
18602
|
+
|
|
18603
|
+
```ts
|
|
18604
|
+
export function maxDate(d1?: Date, d2?: Date): Date | undefined
|
|
18605
|
+
```
|
|
18606
|
+
|
|
18607
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18608
|
+
|
|
18609
|
+
---
|
|
18610
|
+
##### Function: mergeInputBeefs
|
|
18611
|
+
|
|
18612
|
+
For each input of `rawTx`, ensure the source txid is represented in `beef`.
|
|
18613
|
+
|
|
18614
|
+
When `requiredLevels` is undefined/0 and `knownTxids` contains the source txid,
|
|
18615
|
+
a txid-only stub is merged rather than recursing into storage.
|
|
18616
|
+
|
|
18617
|
+
```ts
|
|
18618
|
+
export async function mergeInputBeefs(rawTx: number[], beef: Beef, trustSelf: "known" | undefined, knownTxids: string[] | undefined, trx: TrxToken | undefined, requiredLevels: number | undefined, getValidBeef: (txid: string, beef: Beef, trustSelf: "known" | undefined, knownTxids: string[] | undefined, trx: TrxToken | undefined, requiredLevels: number | undefined) => Promise<unknown>): Promise<void>
|
|
18619
|
+
```
|
|
18620
|
+
|
|
18621
|
+
See also: [TrxToken](./client.md#interface-trxtoken)
|
|
18622
|
+
|
|
18623
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18624
|
+
|
|
18625
|
+
---
|
|
18626
|
+
##### Function: mergeInputsIntoBeef
|
|
18627
|
+
|
|
18628
|
+
Convenience wrapper for the external-sharing path where `trustSelf` and
|
|
18629
|
+
`requiredLevels` are always absent.
|
|
18630
|
+
|
|
18631
|
+
```ts
|
|
18632
|
+
export async function mergeInputsIntoBeef(rawTx: number[], beef: Beef, knownTxids: string[], trx: TrxToken | undefined, getValidBeef: (txid: string, beef: Beef, trustSelf: undefined, knownTxids: string[], trx: TrxToken | undefined) => Promise<unknown>): Promise<void>
|
|
18633
|
+
```
|
|
18634
|
+
|
|
18635
|
+
See also: [TrxToken](./client.md#interface-trxtoken)
|
|
18636
|
+
|
|
18637
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18638
|
+
|
|
18639
|
+
---
|
|
18640
|
+
##### Function: notifyTransactionsOfProof
|
|
18641
|
+
|
|
18642
|
+
Notify each transaction that a proof has been found.
|
|
18643
|
+
Mutates `req` history notes in place.
|
|
18644
|
+
|
|
18645
|
+
The `addNote` and `flushNotes` callbacks avoid coupling this helper to a
|
|
18646
|
+
specific entity type.
|
|
18647
|
+
|
|
18648
|
+
```ts
|
|
18649
|
+
export async function notifyTransactionsOfProof(ids: number[], provenTxId: number, addNote: (note: ReqHistoryNote) => void, flushNotes: () => Promise<void>, updateTransaction: (id: number, update: {
|
|
18650
|
+
provenTxId: number;
|
|
18651
|
+
status: "completed";
|
|
18652
|
+
}) => Promise<unknown>): Promise<void>
|
|
18653
|
+
```
|
|
18654
|
+
|
|
18655
|
+
See also: [ReqHistoryNote](./client.md#interface-reqhistorynote)
|
|
18656
|
+
|
|
18657
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18658
|
+
|
|
18659
|
+
---
|
|
18660
|
+
##### Function: offsetPrivKey
|
|
18661
|
+
|
|
18662
|
+
```ts
|
|
18663
|
+
export function offsetPrivKey(privKey: string, keyOffset?: string): {
|
|
18664
|
+
offsetPrivKey: string;
|
|
18665
|
+
keyOffset: string;
|
|
18666
|
+
}
|
|
18667
|
+
```
|
|
18668
|
+
|
|
18669
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18299
18670
|
|
|
18300
18671
|
---
|
|
18301
18672
|
##### Function: offsetPubKey
|
|
@@ -18313,7 +18684,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
18313
18684
|
##### Function: optionalArraysEqual
|
|
18314
18685
|
|
|
18315
18686
|
```ts
|
|
18316
|
-
export function optionalArraysEqual(arr1?: Number[], arr2?: Number[])
|
|
18687
|
+
export function optionalArraysEqual(arr1?: Number[], arr2?: Number[]): boolean
|
|
18317
18688
|
```
|
|
18318
18689
|
|
|
18319
18690
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -18325,7 +18696,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
18325
18696
|
export function parseBrc114ActionTimeLabels(labels: string[] | undefined): ParsedBrc114ActionTimeLabels
|
|
18326
18697
|
```
|
|
18327
18698
|
|
|
18328
|
-
See also: [ParsedBrc114ActionTimeLabels](./client.md#
|
|
18699
|
+
See also: [ParsedBrc114ActionTimeLabels](./client.md#interface-parsedbrc114actiontimelabels)
|
|
18329
18700
|
|
|
18330
18701
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18331
18702
|
|
|
@@ -18342,6 +18713,17 @@ See also: [ParsedOutpoint](./client.md#interface-parsedoutpoint)
|
|
|
18342
18713
|
|
|
18343
18714
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18344
18715
|
|
|
18716
|
+
---
|
|
18717
|
+
##### Function: parseResults$
|
|
18718
|
+
|
|
18719
|
+
```ts
|
|
18720
|
+
export async function* parseResults$(lookupResult: LookupAnswer): AsyncIterable<VerifiableCertificate>
|
|
18721
|
+
```
|
|
18722
|
+
|
|
18723
|
+
See also: [parseResults](./client.md#variable-parseresults)
|
|
18724
|
+
|
|
18725
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18726
|
+
|
|
18345
18727
|
---
|
|
18346
18728
|
##### Function: parseTxAndAssertId
|
|
18347
18729
|
|
|
@@ -18364,6 +18746,39 @@ See also: [TxScriptOffsets](./client.md#interface-txscriptoffsets)
|
|
|
18364
18746
|
|
|
18365
18747
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18366
18748
|
|
|
18749
|
+
---
|
|
18750
|
+
##### Function: partitionActionLabels
|
|
18751
|
+
|
|
18752
|
+
```ts
|
|
18753
|
+
export function partitionActionLabels(ordinaryLabels: string[]): {
|
|
18754
|
+
specOp: ListActionsSpecOp | undefined;
|
|
18755
|
+
specOpLabels: string[];
|
|
18756
|
+
labels: string[];
|
|
18757
|
+
}
|
|
18758
|
+
```
|
|
18759
|
+
|
|
18760
|
+
See also: [ListActionsSpecOp](./storage.md#interface-listactionsspecop)
|
|
18761
|
+
|
|
18762
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18763
|
+
|
|
18764
|
+
---
|
|
18765
|
+
##### Function: populateUtxoDetails
|
|
18766
|
+
|
|
18767
|
+
Populate UTXO details from a WoC result array
|
|
18768
|
+
|
|
18769
|
+
```ts
|
|
18770
|
+
export function populateUtxoDetails(r: GetUtxoStatusResult, result: Array<{
|
|
18771
|
+
tx_hash: string;
|
|
18772
|
+
value: number;
|
|
18773
|
+
height: number;
|
|
18774
|
+
tx_pos: number;
|
|
18775
|
+
}>, outpoint?: string): void
|
|
18776
|
+
```
|
|
18777
|
+
|
|
18778
|
+
See also: [GetUtxoStatusResult](./client.md#interface-getutxostatusresult)
|
|
18779
|
+
|
|
18780
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18781
|
+
|
|
18367
18782
|
---
|
|
18368
18783
|
##### Function: processAction
|
|
18369
18784
|
|
|
@@ -18469,7 +18884,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
18469
18884
|
##### Function: redeemServiceCharges
|
|
18470
18885
|
|
|
18471
18886
|
```ts
|
|
18472
|
-
export function redeemServiceCharges(privateKeyWif: string, charges: TableCommission[]): {}
|
|
18887
|
+
export function redeemServiceCharges(privateKeyWif: string, charges: TableCommission[]): Array<{}>
|
|
18473
18888
|
```
|
|
18474
18889
|
|
|
18475
18890
|
See also: [TableCommission](./storage.md#interface-tablecommission)
|
|
@@ -18536,7 +18951,7 @@ export function serializeBaseBlockHeader(header: BaseBlockHeader, buffer?: numbe
|
|
|
18536
18951
|
writer.writeUInt32LE(header.bits);
|
|
18537
18952
|
writer.writeUInt32LE(header.nonce);
|
|
18538
18953
|
const data = writer.toArray();
|
|
18539
|
-
if (buffer) {
|
|
18954
|
+
if (buffer != null) {
|
|
18540
18955
|
offset ||= 0;
|
|
18541
18956
|
for (let i = 0; i < data.length; i++) {
|
|
18542
18957
|
if (offset + i >= buffer.length) {
|
|
@@ -18630,10 +19045,6 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
18630
19045
|
---
|
|
18631
19046
|
##### Function: shareReqsWithWorld
|
|
18632
19047
|
|
|
18633
|
-
Verifies that all the txids are known reqs with ready-to-share status.
|
|
18634
|
-
Assigns a batch identifier and updates all the provenTxReqs.
|
|
18635
|
-
If not isDelayed, triggers an initial attempt to broadcast the batch and returns the results.
|
|
18636
|
-
|
|
18637
19048
|
```ts
|
|
18638
19049
|
export async function shareReqsWithWorld(storage: StorageProvider, userId: number, txids: string[], isDelayed: boolean, r?: GetReqsAndBeefResult, logger?: WalletLoggerInterface): Promise<{
|
|
18639
19050
|
swr: SendWithResult[];
|
|
@@ -18643,11 +19054,6 @@ export async function shareReqsWithWorld(storage: StorageProvider, userId: numbe
|
|
|
18643
19054
|
|
|
18644
19055
|
See also: [GetReqsAndBeefResult](./storage.md#interface-getreqsandbeefresult), [ReviewActionResult](./client.md#interface-reviewactionresult), [StorageProvider](./storage.md#class-storageprovider), [logger](./client.md#variable-logger)
|
|
18645
19056
|
|
|
18646
|
-
Argument Details
|
|
18647
|
-
|
|
18648
|
-
+ **r**
|
|
18649
|
-
+ Optional. Ignores txids and allows ProvenTxReqs and merged beef to be passed in.
|
|
18650
|
-
|
|
18651
19057
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18652
19058
|
|
|
18653
19059
|
---
|
|
@@ -18898,6 +19304,214 @@ See also: [FiatExchangeRates](./client.md#interface-fiatexchangerates), [WalletS
|
|
|
18898
19304
|
|
|
18899
19305
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18900
19306
|
|
|
19307
|
+
---
|
|
19308
|
+
##### Function: updateReqsFromAggregateResults
|
|
19309
|
+
|
|
19310
|
+
For each txid in submitted `txids`:
|
|
19311
|
+
|
|
19312
|
+
Based on its aggregate status, and whether broadcast happening in background (isDelayed) or immediately (!isDelayed),
|
|
19313
|
+
and iff current req.status is not 'unproven' or 'completed':
|
|
19314
|
+
|
|
19315
|
+
'success':
|
|
19316
|
+
req.status => 'unmined', tx.status => 'unproven'
|
|
19317
|
+
'doubleSpend':
|
|
19318
|
+
req.status => 'doubleSpend', tx.status => 'failed'
|
|
19319
|
+
'invalidTx':
|
|
19320
|
+
req.status => 'invalid', tx.status => 'failed'
|
|
19321
|
+
'serviceError':
|
|
19322
|
+
increment req.attempts
|
|
19323
|
+
|
|
19324
|
+
```ts
|
|
19325
|
+
export async function updateReqsFromAggregateResults(txids: string[], r: PostReqsToNetworkResult, apbrs: Record<string, AggregatePostBeefTxResult>, storage: StorageProvider, services?: sdk.WalletServices, trx?: sdk.TrxToken, logger?: WalletLoggerInterface): Promise<void>
|
|
19326
|
+
```
|
|
19327
|
+
|
|
19328
|
+
See also: [AggregatePostBeefTxResult](./storage.md#interface-aggregatepostbeeftxresult), [PostReqsToNetworkResult](./storage.md#interface-postreqstonetworkresult), [StorageProvider](./storage.md#class-storageprovider), [TrxToken](./client.md#interface-trxtoken), [WalletServices](./client.md#interface-walletservices), [logger](./client.md#variable-logger)
|
|
19329
|
+
|
|
19330
|
+
Argument Details
|
|
19331
|
+
|
|
19332
|
+
+ **services**
|
|
19333
|
+
+ if valid, doubleSpend results will be verified (but only if not within a trx. e.g. trx must be undefined)
|
|
19334
|
+
|
|
19335
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19336
|
+
|
|
19337
|
+
---
|
|
19338
|
+
##### Function: upgradeAllStoresV1
|
|
19339
|
+
|
|
19340
|
+
Upgrade handler for every store that existed at schema version 1.
|
|
19341
|
+
|
|
19342
|
+
```ts
|
|
19343
|
+
export function upgradeAllStoresV1(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19344
|
+
```
|
|
19345
|
+
|
|
19346
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19347
|
+
|
|
19348
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19349
|
+
|
|
19350
|
+
---
|
|
19351
|
+
##### Function: upgradeCertificateFields
|
|
19352
|
+
|
|
19353
|
+
```ts
|
|
19354
|
+
export function upgradeCertificateFields(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19355
|
+
```
|
|
19356
|
+
|
|
19357
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19358
|
+
|
|
19359
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19360
|
+
|
|
19361
|
+
---
|
|
19362
|
+
##### Function: upgradeCertificates
|
|
19363
|
+
|
|
19364
|
+
```ts
|
|
19365
|
+
export function upgradeCertificates(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19366
|
+
```
|
|
19367
|
+
|
|
19368
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19369
|
+
|
|
19370
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19371
|
+
|
|
19372
|
+
---
|
|
19373
|
+
##### Function: upgradeCommissions
|
|
19374
|
+
|
|
19375
|
+
```ts
|
|
19376
|
+
export function upgradeCommissions(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19377
|
+
```
|
|
19378
|
+
|
|
19379
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19380
|
+
|
|
19381
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19382
|
+
|
|
19383
|
+
---
|
|
19384
|
+
##### Function: upgradeMonitorEvents
|
|
19385
|
+
|
|
19386
|
+
```ts
|
|
19387
|
+
export function upgradeMonitorEvents(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19388
|
+
```
|
|
19389
|
+
|
|
19390
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19391
|
+
|
|
19392
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19393
|
+
|
|
19394
|
+
---
|
|
19395
|
+
##### Function: upgradeOutputBaskets
|
|
19396
|
+
|
|
19397
|
+
```ts
|
|
19398
|
+
export function upgradeOutputBaskets(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19399
|
+
```
|
|
19400
|
+
|
|
19401
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19402
|
+
|
|
19403
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19404
|
+
|
|
19405
|
+
---
|
|
19406
|
+
##### Function: upgradeOutputTags
|
|
19407
|
+
|
|
19408
|
+
```ts
|
|
19409
|
+
export function upgradeOutputTags(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19410
|
+
```
|
|
19411
|
+
|
|
19412
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19413
|
+
|
|
19414
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19415
|
+
|
|
19416
|
+
---
|
|
19417
|
+
##### Function: upgradeOutputTagsMap
|
|
19418
|
+
|
|
19419
|
+
```ts
|
|
19420
|
+
export function upgradeOutputTagsMap(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19421
|
+
```
|
|
19422
|
+
|
|
19423
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19424
|
+
|
|
19425
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19426
|
+
|
|
19427
|
+
---
|
|
19428
|
+
##### Function: upgradeOutputs
|
|
19429
|
+
|
|
19430
|
+
```ts
|
|
19431
|
+
export function upgradeOutputs(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19432
|
+
```
|
|
19433
|
+
|
|
19434
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19435
|
+
|
|
19436
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19437
|
+
|
|
19438
|
+
---
|
|
19439
|
+
##### Function: upgradeProvenTxReqs
|
|
19440
|
+
|
|
19441
|
+
```ts
|
|
19442
|
+
export function upgradeProvenTxReqs(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19443
|
+
```
|
|
19444
|
+
|
|
19445
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19446
|
+
|
|
19447
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19448
|
+
|
|
19449
|
+
---
|
|
19450
|
+
##### Function: upgradeProvenTxs
|
|
19451
|
+
|
|
19452
|
+
```ts
|
|
19453
|
+
export function upgradeProvenTxs(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19454
|
+
```
|
|
19455
|
+
|
|
19456
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19457
|
+
|
|
19458
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19459
|
+
|
|
19460
|
+
---
|
|
19461
|
+
##### Function: upgradeSyncStates
|
|
19462
|
+
|
|
19463
|
+
```ts
|
|
19464
|
+
export function upgradeSyncStates(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19465
|
+
```
|
|
19466
|
+
|
|
19467
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19468
|
+
|
|
19469
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19470
|
+
|
|
19471
|
+
---
|
|
19472
|
+
##### Function: upgradeTransactions
|
|
19473
|
+
|
|
19474
|
+
```ts
|
|
19475
|
+
export function upgradeTransactions(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19476
|
+
```
|
|
19477
|
+
|
|
19478
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19479
|
+
|
|
19480
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19481
|
+
|
|
19482
|
+
---
|
|
19483
|
+
##### Function: upgradeTxLabels
|
|
19484
|
+
|
|
19485
|
+
```ts
|
|
19486
|
+
export function upgradeTxLabels(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19487
|
+
```
|
|
19488
|
+
|
|
19489
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19490
|
+
|
|
19491
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19492
|
+
|
|
19493
|
+
---
|
|
19494
|
+
##### Function: upgradeTxLabelsMap
|
|
19495
|
+
|
|
19496
|
+
```ts
|
|
19497
|
+
export function upgradeTxLabelsMap(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19498
|
+
```
|
|
19499
|
+
|
|
19500
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19501
|
+
|
|
19502
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19503
|
+
|
|
19504
|
+
---
|
|
19505
|
+
##### Function: upgradeUsers
|
|
19506
|
+
|
|
19507
|
+
```ts
|
|
19508
|
+
export function upgradeUsers(db: IDBPDatabase<StorageIdbSchema>): void
|
|
19509
|
+
```
|
|
19510
|
+
|
|
19511
|
+
See also: [StorageIdbSchema](./storage.md#interface-storageidbschema)
|
|
19512
|
+
|
|
19513
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19514
|
+
|
|
18901
19515
|
---
|
|
18902
19516
|
##### Function: validBulkHeaderFilesByFileHash
|
|
18903
19517
|
|
|
@@ -18986,6 +19600,55 @@ Argument Details
|
|
|
18986
19600
|
|
|
18987
19601
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
18988
19602
|
|
|
19603
|
+
---
|
|
19604
|
+
##### Function: validateDate
|
|
19605
|
+
|
|
19606
|
+
Shared entity-validation helpers used by both client-side storage remoting
|
|
19607
|
+
(StorageClientBase / StorageMobile) and the server-side StorageServer.
|
|
19608
|
+
|
|
19609
|
+
These helpers normalise records returned from remote calls or database queries:
|
|
19610
|
+
- Coerce date strings / timestamps to `Date` objects.
|
|
19611
|
+
- Replace `null` values with `undefined`.
|
|
19612
|
+
- Replace `Uint8Array` / `Buffer` values with plain `number[]` arrays.
|
|
19613
|
+
|
|
19614
|
+
```ts
|
|
19615
|
+
export function validateDate(date: Date | string | number): Date
|
|
19616
|
+
```
|
|
19617
|
+
|
|
19618
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19619
|
+
|
|
19620
|
+
---
|
|
19621
|
+
##### Function: validateEntities
|
|
19622
|
+
|
|
19623
|
+
Force uniform behaviour across database engines.
|
|
19624
|
+
Use to process all arrays of records with timestamps retrieved from database.
|
|
19625
|
+
|
|
19626
|
+
```ts
|
|
19627
|
+
export function validateEntities<T extends EntityTimeStamp>(entities: T[], dateFields?: string[]): T[]
|
|
19628
|
+
```
|
|
19629
|
+
|
|
19630
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
19631
|
+
|
|
19632
|
+
Returns
|
|
19633
|
+
|
|
19634
|
+
input `entities` array with contained values validated.
|
|
19635
|
+
|
|
19636
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19637
|
+
|
|
19638
|
+
---
|
|
19639
|
+
##### Function: validateEntity
|
|
19640
|
+
|
|
19641
|
+
Force uniform behaviour across database engines.
|
|
19642
|
+
Use to process all individual records with timestamps retrieved from database.
|
|
19643
|
+
|
|
19644
|
+
```ts
|
|
19645
|
+
export function validateEntity<T extends EntityTimeStamp>(entity: T, dateFields?: string[]): T
|
|
19646
|
+
```
|
|
19647
|
+
|
|
19648
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
19649
|
+
|
|
19650
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19651
|
+
|
|
18989
19652
|
---
|
|
18990
19653
|
##### Function: validateGenerateChangeSdkParams
|
|
18991
19654
|
|
|
@@ -19101,6 +19764,20 @@ See also: [StorageFeeModel](./client.md#interface-storagefeemodel)
|
|
|
19101
19764
|
|
|
19102
19765
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19103
19766
|
|
|
19767
|
+
---
|
|
19768
|
+
##### Function: validateSyncChunkEntities
|
|
19769
|
+
|
|
19770
|
+
Validate all entity arrays within a `SyncChunk` received from a remote storage call.
|
|
19771
|
+
Normalises timestamps, nulls, and binary fields in-place.
|
|
19772
|
+
|
|
19773
|
+
```ts
|
|
19774
|
+
export function validateSyncChunkEntities(r: SyncChunk): SyncChunk
|
|
19775
|
+
```
|
|
19776
|
+
|
|
19777
|
+
See also: [SyncChunk](./client.md#interface-syncchunk)
|
|
19778
|
+
|
|
19779
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19780
|
+
|
|
19104
19781
|
---
|
|
19105
19782
|
##### Function: varUintSize
|
|
19106
19783
|
|
|
@@ -19110,7 +19787,13 @@ Returns the byte size required to encode number as Bitcoin VarUint
|
|
|
19110
19787
|
export function varUintSize(val: number): 1 | 3 | 5 | 9 {
|
|
19111
19788
|
if (val < 0)
|
|
19112
19789
|
throw new WERR_INVALID_PARAMETER("varUint", "non-negative");
|
|
19113
|
-
|
|
19790
|
+
if (val <= 252)
|
|
19791
|
+
return 1;
|
|
19792
|
+
if (val <= 65535)
|
|
19793
|
+
return 3;
|
|
19794
|
+
if (val <= 4294967295)
|
|
19795
|
+
return 5;
|
|
19796
|
+
return 9;
|
|
19114
19797
|
}
|
|
19115
19798
|
```
|
|
19116
19799
|
|
|
@@ -19271,13 +19954,13 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
19271
19954
|
Returns an await'able Promise that resolves in the given number of msecs.
|
|
19272
19955
|
|
|
19273
19956
|
```ts
|
|
19274
|
-
export function wait(msecs: number): Promise<void> {
|
|
19957
|
+
export async function wait(msecs: number): Promise<void> {
|
|
19275
19958
|
const MIN_WAIT = 0;
|
|
19276
19959
|
const MAX_WAIT = 2 * 60 * 1000;
|
|
19277
|
-
if (typeof msecs !== "number" || !Number.isFinite(msecs) || isNaN(msecs) || msecs < MIN_WAIT || msecs > MAX_WAIT) {
|
|
19960
|
+
if (typeof msecs !== "number" || !Number.isFinite(msecs) || Number.isNaN(msecs) || msecs < MIN_WAIT || msecs > MAX_WAIT) {
|
|
19278
19961
|
throw new WERR_INVALID_PARAMETER("msecs", `a number between ${MIN_WAIT} and ${MAX_WAIT} msecs, not ${msecs}.`);
|
|
19279
19962
|
}
|
|
19280
|
-
return new Promise(resolve => setTimeout(resolve, msecs));
|
|
19963
|
+
return await new Promise(resolve => setTimeout(resolve, msecs));
|
|
19281
19964
|
}
|
|
19282
19965
|
```
|
|
19283
19966
|
|
|
@@ -19343,23 +20026,59 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
19343
20026
|
|
|
19344
20027
|
| | | |
|
|
19345
20028
|
| --- | --- | --- |
|
|
19346
|
-
| [
|
|
19347
|
-
| [
|
|
19348
|
-
| [
|
|
19349
|
-
| [
|
|
19350
|
-
| [
|
|
19351
|
-
| [
|
|
19352
|
-
| [
|
|
19353
|
-
| [
|
|
19354
|
-
| [
|
|
19355
|
-
| [
|
|
19356
|
-
| [
|
|
19357
|
-
| [
|
|
20029
|
+
| [AnyBlockHeader](#type-anyblockheader) | [GetStatusForTxidsService](#type-getstatusfortxidsservice) | [PostTxsService](#type-posttxsservice) |
|
|
20030
|
+
| [ByteEncoding](#type-byteencoding) | [GetUtxoStatusOutputFormat](#type-getutxostatusoutputformat) | [ProvenTxReqStatus](#type-proventxreqstatus) |
|
|
20031
|
+
| [ByteInput](#type-byteinput) | [GetUtxoStatusService](#type-getutxostatusservice) | [ReorgListener](#type-reorglistener) |
|
|
20032
|
+
| [Chain](#type-chain) | [GroupedPermissionEventHandler](#type-groupedpermissioneventhandler) | [ReviewActionResultStatus](#type-reviewactionresultstatus) |
|
|
20033
|
+
| [CounterpartyPermissionEventHandler](#type-counterpartypermissioneventhandler) | [HeaderListener](#type-headerlistener) | [ScriptHashFormat](#type-scripthashformat) |
|
|
20034
|
+
| [DBType](#type-dbtype) | [InsertHeaderResult](#type-insertheaderresult) | [SecurityLevel](#type-securitylevel) |
|
|
20035
|
+
| [EnqueueHandler](#type-enqueuehandler) | [LineItemType](#type-lineitemtype) | [StorageProvidedBy](#type-storageprovidedby) |
|
|
20036
|
+
| [EntityStorage](#type-entitystorage) | [MerklePathNoteWhat](#type-merklepathnotewhat) | [SyncProtocolVersion](#type-syncprotocolversion) |
|
|
20037
|
+
| [ErrorHandler](#type-errorhandler) | [MonitorStartupTaskMode](#type-monitorstartuptaskmode) | [SyncStatus](#type-syncstatus) |
|
|
20038
|
+
| [FiatCurrencyCode](#type-fiatcurrencycode) | [MonitorStorage](#type-monitorstorage) | [TransactionStatus](#type-transactionstatus) |
|
|
20039
|
+
| [GetMerklePathService](#type-getmerklepathservice) | [PermissionEventHandler](#type-permissioneventhandler) | [UpdateFiatExchangeRateService](#type-updatefiatexchangerateservice) |
|
|
20040
|
+
| [GetRawTxService](#type-getrawtxservice) | [PostBeefService](#type-postbeefservice) | [WalletLoggerLevel](#type-walletloggerlevel) |
|
|
20041
|
+
| [GetScriptHashHistoryService](#type-getscripthashhistoryservice) | [PostReqsToNetworkDetailsStatus](#type-postreqstonetworkdetailsstatus) | |
|
|
19358
20042
|
|
|
19359
20043
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19360
20044
|
|
|
19361
20045
|
---
|
|
19362
20046
|
|
|
20047
|
+
##### Type: AnyBlockHeader
|
|
20048
|
+
|
|
20049
|
+
Union of all block header variants
|
|
20050
|
+
|
|
20051
|
+
```ts
|
|
20052
|
+
export type AnyBlockHeader = BaseBlockHeader | BlockHeader | LiveBlockHeader
|
|
20053
|
+
```
|
|
20054
|
+
|
|
20055
|
+
See also: [BaseBlockHeader](./client.md#interface-baseblockheader), [BlockHeader](./client.md#interface-blockheader), [LiveBlockHeader](./services.md#interface-liveblockheader)
|
|
20056
|
+
|
|
20057
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
20058
|
+
|
|
20059
|
+
---
|
|
20060
|
+
##### Type: ByteEncoding
|
|
20061
|
+
|
|
20062
|
+
Encoding identifier for buffer-coercion helpers
|
|
20063
|
+
|
|
20064
|
+
```ts
|
|
20065
|
+
export type ByteEncoding = "hex" | "utf8" | "base64"
|
|
20066
|
+
```
|
|
20067
|
+
|
|
20068
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
20069
|
+
|
|
20070
|
+
---
|
|
20071
|
+
##### Type: ByteInput
|
|
20072
|
+
|
|
20073
|
+
Byte array, string, or Uint8Array accepted by buffer-coercion helpers
|
|
20074
|
+
|
|
20075
|
+
```ts
|
|
20076
|
+
export type ByteInput = string | number[] | Uint8Array
|
|
20077
|
+
```
|
|
20078
|
+
|
|
20079
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
20080
|
+
|
|
20081
|
+
---
|
|
19363
20082
|
##### Type: Chain
|
|
19364
20083
|
|
|
19365
20084
|
```ts
|
|
@@ -19541,37 +20260,43 @@ See also: [LiveBlockHeader](./services.md#interface-liveblockheader)
|
|
|
19541
20260
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19542
20261
|
|
|
19543
20262
|
---
|
|
19544
|
-
##### Type:
|
|
20263
|
+
##### Type: LineItemType
|
|
20264
|
+
|
|
20265
|
+
Line item type for spending authorization requests.
|
|
19545
20266
|
|
|
19546
20267
|
```ts
|
|
19547
|
-
export type
|
|
20268
|
+
export type LineItemType = "input" | "output" | "fee"
|
|
19548
20269
|
```
|
|
19549
20270
|
|
|
19550
20271
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19551
20272
|
|
|
19552
20273
|
---
|
|
19553
|
-
##### Type:
|
|
20274
|
+
##### Type: MerklePathNoteWhat
|
|
19554
20275
|
|
|
19555
20276
|
```ts
|
|
19556
|
-
export type
|
|
20277
|
+
export type MerklePathNoteWhat = "getMerklePathRetry" | "getMerklePathNotFound" | "getMerklePathBadStatus" | "getMerklePathNoData" | "getMerklePathSuccess" | "getMerklePathNoHeader" | "getMerklePathError" | "getMerklePathInternal"
|
|
19557
20278
|
```
|
|
19558
20279
|
|
|
19559
|
-
|
|
20280
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
20281
|
+
|
|
20282
|
+
---
|
|
20283
|
+
##### Type: MonitorStartupTaskMode
|
|
20284
|
+
|
|
20285
|
+
```ts
|
|
20286
|
+
export type MonitorStartupTaskMode = "none" | "default" | "multiuser" | "alltoother"
|
|
20287
|
+
```
|
|
19560
20288
|
|
|
19561
20289
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19562
20290
|
|
|
19563
20291
|
---
|
|
19564
|
-
##### Type:
|
|
20292
|
+
##### Type: MonitorStorage
|
|
19565
20293
|
|
|
19566
20294
|
```ts
|
|
19567
|
-
export type
|
|
19568
|
-
from?: number;
|
|
19569
|
-
to?: number;
|
|
19570
|
-
timeFilterRequested: boolean;
|
|
19571
|
-
remainingLabels: string[];
|
|
19572
|
-
}
|
|
20295
|
+
export type MonitorStorage = WalletStorageManager
|
|
19573
20296
|
```
|
|
19574
20297
|
|
|
20298
|
+
See also: [WalletStorageManager](./storage.md#class-walletstoragemanager)
|
|
20299
|
+
|
|
19575
20300
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19576
20301
|
|
|
19577
20302
|
---
|
|
@@ -19685,19 +20410,6 @@ See also: [BlockHeader](./client.md#interface-blockheader)
|
|
|
19685
20410
|
|
|
19686
20411
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19687
20412
|
|
|
19688
|
-
---
|
|
19689
|
-
##### Type: ReqHistoryNote
|
|
19690
|
-
|
|
19691
|
-
```ts
|
|
19692
|
-
export type ReqHistoryNote = {
|
|
19693
|
-
when?: string;
|
|
19694
|
-
what: string;
|
|
19695
|
-
[key: string]: boolean | string | number | undefined;
|
|
19696
|
-
}
|
|
19697
|
-
```
|
|
19698
|
-
|
|
19699
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19700
|
-
|
|
19701
20413
|
---
|
|
19702
20414
|
##### Type: ReviewActionResultStatus
|
|
19703
20415
|
|
|
@@ -19725,34 +20437,12 @@ export type ScriptHashFormat = "hashLE" | "hashBE" | "script"
|
|
|
19725
20437
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19726
20438
|
|
|
19727
20439
|
---
|
|
19728
|
-
##### Type:
|
|
20440
|
+
##### Type: SecurityLevel
|
|
19729
20441
|
|
|
19730
|
-
|
|
20442
|
+
Security level for DPACP protocol permissions.
|
|
19731
20443
|
|
|
19732
20444
|
```ts
|
|
19733
|
-
export type
|
|
19734
|
-
version: number;
|
|
19735
|
-
getMerklePath: ServiceCallHistory;
|
|
19736
|
-
getRawTx: ServiceCallHistory;
|
|
19737
|
-
postBeef: ServiceCallHistory;
|
|
19738
|
-
getUtxoStatus: ServiceCallHistory;
|
|
19739
|
-
getStatusForTxids: ServiceCallHistory;
|
|
19740
|
-
getScriptHashHistory: ServiceCallHistory;
|
|
19741
|
-
updateFiatExchangeRates: ServiceCallHistory;
|
|
19742
|
-
}
|
|
19743
|
-
```
|
|
19744
|
-
|
|
19745
|
-
See also: [ServiceCallHistory](./client.md#interface-servicecallhistory)
|
|
19746
|
-
|
|
19747
|
-
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
19748
|
-
|
|
19749
|
-
---
|
|
19750
|
-
##### Type: StopListenerToken
|
|
19751
|
-
|
|
19752
|
-
```ts
|
|
19753
|
-
export type StopListenerToken = {
|
|
19754
|
-
stop: (() => void) | undefined;
|
|
19755
|
-
}
|
|
20445
|
+
export type SecurityLevel = 0 | 1 | 2
|
|
19756
20446
|
```
|
|
19757
20447
|
|
|
19758
20448
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -20000,7 +20690,7 @@ aggregateActionResults = async (storage: StorageProvider, sendWithResultReqs: Se
|
|
|
20000
20690
|
for (const ar of sendWithResultReqs) {
|
|
20001
20691
|
const txid = ar.txid;
|
|
20002
20692
|
const d = postToNetworkResult.details.find(d => d.txid === txid);
|
|
20003
|
-
if (
|
|
20693
|
+
if (d == null)
|
|
20004
20694
|
throw new WERR_INTERNAL(`missing details for ${txid}`);
|
|
20005
20695
|
const arNdr: ReviewActionResult = { txid: d.txid, status: "success", competingTxs: d.competingTxs };
|
|
20006
20696
|
switch (d.status) {
|
|
@@ -20010,7 +20700,7 @@ aggregateActionResults = async (storage: StorageProvider, sendWithResultReqs: Se
|
|
|
20010
20700
|
case "doubleSpend":
|
|
20011
20701
|
ar.status = "failed";
|
|
20012
20702
|
arNdr.status = "doubleSpend";
|
|
20013
|
-
if (d.competingTxs)
|
|
20703
|
+
if (d.competingTxs != null)
|
|
20014
20704
|
arNdr.competingBeef = await createMergedBeefOfTxids(d.competingTxs, storage);
|
|
20015
20705
|
break;
|
|
20016
20706
|
case "serviceError":
|
|
@@ -20068,8 +20758,8 @@ getLabelToSpecOp: () => Record<string, ListActionsSpecOp> = () => {
|
|
|
20068
20758
|
name: "noSendActions",
|
|
20069
20759
|
labelsToIntercept: ["abort"],
|
|
20070
20760
|
setStatusFilter: () => ["nosend"],
|
|
20071
|
-
postProcess: async (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListActionsArgs, specOpLabels: string[], txs: Partial<TableTransaction
|
|
20072
|
-
if (specOpLabels.
|
|
20761
|
+
postProcess: async (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListActionsArgs, specOpLabels: string[], txs: Array<Partial<TableTransaction>>): Promise<void> => {
|
|
20762
|
+
if (specOpLabels.includes("abort")) {
|
|
20073
20763
|
for (const tx of txs) {
|
|
20074
20764
|
if (tx.status === "nosend") {
|
|
20075
20765
|
await s.abortAction(auth, { reference: tx.reference! });
|
|
@@ -20083,8 +20773,8 @@ getLabelToSpecOp: () => Record<string, ListActionsSpecOp> = () => {
|
|
|
20083
20773
|
name: "failedActions",
|
|
20084
20774
|
labelsToIntercept: ["unfail"],
|
|
20085
20775
|
setStatusFilter: () => ["failed"],
|
|
20086
|
-
postProcess: async (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListActionsArgs, specOpLabels: string[], txs: Partial<TableTransaction
|
|
20087
|
-
if (specOpLabels.
|
|
20776
|
+
postProcess: async (s: StorageProvider, auth: AuthId, vargs: Validation.ValidListActionsArgs, specOpLabels: string[], txs: Array<Partial<TableTransaction>>): Promise<void> => {
|
|
20777
|
+
if (specOpLabels.includes("unfail")) {
|
|
20088
20778
|
for (const tx of txs) {
|
|
20089
20779
|
if (tx.status === "failed") {
|
|
20090
20780
|
await s.updateTransaction(tx.transactionId!, { status: "unfail" });
|
|
@@ -20172,26 +20862,18 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
20172
20862
|
|
|
20173
20863
|
```ts
|
|
20174
20864
|
parseResults = async (lookupResult: LookupAnswer): Promise<VerifiableCertificate[]> => {
|
|
20175
|
-
if (lookupResult.type
|
|
20176
|
-
|
|
20177
|
-
|
|
20178
|
-
|
|
20179
|
-
|
|
20180
|
-
|
|
20181
|
-
|
|
20182
|
-
|
|
20183
|
-
|
|
20184
|
-
|
|
20185
|
-
verifiableCert.decryptedFields = decryptedFields;
|
|
20186
|
-
parsedResults.push(verifiableCert);
|
|
20187
|
-
}
|
|
20188
|
-
catch (error) {
|
|
20189
|
-
console.error(error);
|
|
20190
|
-
}
|
|
20191
|
-
}
|
|
20192
|
-
return parsedResults;
|
|
20865
|
+
if (lookupResult.type !== "output-list")
|
|
20866
|
+
return [];
|
|
20867
|
+
const parsedResults: VerifiableCertificate[] = [];
|
|
20868
|
+
const shouldYield = isUiRuntime();
|
|
20869
|
+
for (const output of lookupResult.outputs) {
|
|
20870
|
+
if (shouldYield)
|
|
20871
|
+
await yieldToUi();
|
|
20872
|
+
const cert = await parseOne(output);
|
|
20873
|
+
if (cert != null)
|
|
20874
|
+
parsedResults.push(cert);
|
|
20193
20875
|
}
|
|
20194
|
-
return
|
|
20876
|
+
return parsedResults;
|
|
20195
20877
|
}
|
|
20196
20878
|
```
|
|
20197
20879
|
|
|
@@ -20205,7 +20887,7 @@ queryOverlay = async (query: unknown, resolver: LookupResolver): Promise<Verifia
|
|
|
20205
20887
|
const results = await resolver.query({
|
|
20206
20888
|
service: "ls_identity",
|
|
20207
20889
|
query
|
|
20208
|
-
});
|
|
20890
|
+
}, undefined, { graceMs: 300 });
|
|
20209
20891
|
return await parseResults(results);
|
|
20210
20892
|
}
|
|
20211
20893
|
```
|
|
@@ -20300,28 +20982,28 @@ transformVerifiableCertificatesWithTrust = (trustSettings: TrustSettings, certif
|
|
|
20300
20982
|
const certifierCache: Record<string, Certifier> = {};
|
|
20301
20983
|
certificates.forEach(cert => {
|
|
20302
20984
|
const { subject, certifier } = cert;
|
|
20303
|
-
if (
|
|
20985
|
+
if (subject === "" || certifier === "")
|
|
20304
20986
|
return;
|
|
20305
|
-
if (
|
|
20987
|
+
if (certifierCache[certifier] == null) {
|
|
20306
20988
|
const found = trustSettings.trustedCertifiers.find(x => x.identityKey === certifier);
|
|
20307
|
-
if (
|
|
20989
|
+
if (found == null)
|
|
20308
20990
|
return;
|
|
20309
20991
|
certifierCache[certifier] = found;
|
|
20310
20992
|
}
|
|
20311
20993
|
const certifierInfo: IdentityCertifier = {
|
|
20312
20994
|
name: certifierCache[certifier].name,
|
|
20313
|
-
iconUrl: certifierCache[certifier].iconUrl
|
|
20995
|
+
iconUrl: certifierCache[certifier].iconUrl ?? "",
|
|
20314
20996
|
description: certifierCache[certifier].description,
|
|
20315
20997
|
trust: certifierCache[certifier].trust
|
|
20316
20998
|
};
|
|
20317
20999
|
const extendedCert: IdentityCertificate = {
|
|
20318
21000
|
...cert,
|
|
20319
|
-
signature: cert.signature
|
|
21001
|
+
signature: cert.signature as string,
|
|
20320
21002
|
decryptedFields: cert.decryptedFields as Record<string, string>,
|
|
20321
21003
|
publiclyRevealedKeyring: cert.keyring,
|
|
20322
21004
|
certifierInfo
|
|
20323
21005
|
};
|
|
20324
|
-
if (
|
|
21006
|
+
if (identityGroups[subject] == null) {
|
|
20325
21007
|
identityGroups[subject] = { totalTrust: 0, members: [] };
|
|
20326
21008
|
}
|
|
20327
21009
|
identityGroups[subject].totalTrust += certifierInfo.trust;
|