@bsv/wallet-toolbox 1.2.33 → 1.2.36

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.
Files changed (113) hide show
  1. package/docs/client.md +458 -1816
  2. package/docs/monitor.md +7 -7
  3. package/docs/services.md +236 -2
  4. package/docs/wallet.md +458 -1816
  5. package/out/src/Setup.d.ts +1 -2
  6. package/out/src/Setup.d.ts.map +1 -1
  7. package/out/src/Setup.js +17 -18
  8. package/out/src/Setup.js.map +1 -1
  9. package/out/src/Wallet.d.ts +4 -1
  10. package/out/src/Wallet.d.ts.map +1 -1
  11. package/out/src/Wallet.js +111 -51
  12. package/out/src/Wallet.js.map +1 -1
  13. package/out/src/index.client.d.ts +5 -6
  14. package/out/src/index.client.d.ts.map +1 -1
  15. package/out/src/index.client.js +5 -6
  16. package/out/src/index.client.js.map +1 -1
  17. package/out/src/monitor/Monitor.d.ts +4 -2
  18. package/out/src/monitor/Monitor.d.ts.map +1 -1
  19. package/out/src/monitor/Monitor.js +45 -13
  20. package/out/src/monitor/Monitor.js.map +1 -1
  21. package/out/src/monitor/MonitorDaemon.d.ts.map +1 -1
  22. package/out/src/monitor/MonitorDaemon.js +3 -0
  23. package/out/src/monitor/MonitorDaemon.js.map +1 -1
  24. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts +1 -1
  25. package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -1
  26. package/out/src/monitor/tasks/TaskCheckForProofs.js +6 -4
  27. package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -1
  28. package/out/src/monitor/tasks/TaskCheckNoSends.d.ts.map +1 -1
  29. package/out/src/monitor/tasks/TaskCheckNoSends.js.map +1 -1
  30. package/out/src/monitor/tasks/TaskNewHeader.d.ts +3 -3
  31. package/out/src/monitor/tasks/TaskNewHeader.d.ts.map +1 -1
  32. package/out/src/monitor/tasks/TaskNewHeader.js.map +1 -1
  33. package/out/src/monitor/tasks/TaskPurge.d.ts +2 -2
  34. package/out/src/monitor/tasks/TaskPurge.d.ts.map +1 -1
  35. package/out/src/monitor/tasks/TaskReviewStatus.d.ts.map +1 -1
  36. package/out/src/monitor/tasks/TaskReviewStatus.js.map +1 -1
  37. package/out/src/monitor/tasks/TaskUnFail.d.ts +2 -1
  38. package/out/src/monitor/tasks/TaskUnFail.d.ts.map +1 -1
  39. package/out/src/monitor/tasks/TaskUnFail.js +2 -2
  40. package/out/src/monitor/tasks/TaskUnFail.js.map +1 -1
  41. package/out/src/sdk/WalletServices.interfaces.d.ts +19 -18
  42. package/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -1
  43. package/out/src/sdk/WalletSigner.interfaces.d.ts +2 -2
  44. package/out/src/sdk/WalletSigner.interfaces.d.ts.map +1 -1
  45. package/out/src/sdk/WalletStorage.interfaces.d.ts +57 -53
  46. package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
  47. package/out/src/sdk/types.d.ts +12 -0
  48. package/out/src/sdk/types.d.ts.map +1 -1
  49. package/out/src/sdk/types.js +16 -1
  50. package/out/src/sdk/types.js.map +1 -1
  51. package/out/src/storage/StorageKnex.d.ts.map +1 -1
  52. package/out/src/storage/WalletStorageManager.d.ts +3 -1
  53. package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
  54. package/out/src/storage/WalletStorageManager.js +58 -23
  55. package/out/src/storage/WalletStorageManager.js.map +1 -1
  56. package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +1 -1
  57. package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
  58. package/out/src/storage/methods/attemptToPostReqsToNetwork.js +40 -6
  59. package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -1
  60. package/out/test/Wallet/local/localWallet.man.test.js +1 -1
  61. package/out/test/Wallet/local/localWallet.man.test.js.map +1 -1
  62. package/out/test/Wallet/local/localWallet2.man.test.js +74 -5
  63. package/out/test/Wallet/local/localWallet2.man.test.js.map +1 -1
  64. package/out/test/Wallet/specOps/specOps.man.test.js +37 -5
  65. package/out/test/Wallet/specOps/specOps.man.test.js.map +1 -1
  66. package/out/test/Wallet/support/opers1.man.test.d.ts +2 -0
  67. package/out/test/Wallet/support/opers1.man.test.d.ts.map +1 -0
  68. package/out/test/Wallet/support/opers1.man.test.js +200 -0
  69. package/out/test/Wallet/support/opers1.man.test.js.map +1 -0
  70. package/out/test/WalletClient/LocalKVStore.man.test.d.ts +2 -0
  71. package/out/test/WalletClient/LocalKVStore.man.test.d.ts.map +1 -0
  72. package/out/test/WalletClient/LocalKVStore.man.test.js +99 -0
  73. package/out/test/WalletClient/LocalKVStore.man.test.js.map +1 -0
  74. package/out/test/WalletClient/WERR.man.test.d.ts +2 -0
  75. package/out/test/WalletClient/WERR.man.test.d.ts.map +1 -0
  76. package/out/test/WalletClient/WERR.man.test.js +21 -0
  77. package/out/test/WalletClient/WERR.man.test.js.map +1 -0
  78. package/out/test/services/Services.test.js +3 -1
  79. package/out/test/services/Services.test.js.map +1 -1
  80. package/out/test/{Wallet/local → utils}/localWalletMethods.d.ts +2 -2
  81. package/out/test/utils/localWalletMethods.d.ts.map +1 -0
  82. package/out/test/{Wallet/local → utils}/localWalletMethods.js +4 -4
  83. package/out/test/utils/localWalletMethods.js.map +1 -0
  84. package/out/tsconfig.all.tsbuildinfo +1 -1
  85. package/package.json +3 -3
  86. package/src/Setup.ts +2 -2
  87. package/src/Wallet.ts +41 -9
  88. package/src/index.client.ts +5 -6
  89. package/src/monitor/Monitor.ts +10 -9
  90. package/src/monitor/MonitorDaemon.ts +4 -0
  91. package/src/monitor/tasks/TaskCheckForProofs.ts +6 -2
  92. package/src/monitor/tasks/TaskCheckNoSends.ts +0 -1
  93. package/src/monitor/tasks/TaskNewHeader.ts +3 -4
  94. package/src/monitor/tasks/TaskPurge.ts +2 -2
  95. package/src/monitor/tasks/TaskReviewStatus.ts +0 -1
  96. package/src/monitor/tasks/TaskUnFail.ts +2 -1
  97. package/src/sdk/WalletServices.interfaces.ts +19 -18
  98. package/src/sdk/WalletSigner.interfaces.ts +3 -30
  99. package/src/sdk/WalletStorage.interfaces.ts +74 -66
  100. package/src/sdk/types.ts +16 -0
  101. package/src/storage/StorageKnex.ts +1 -1
  102. package/src/storage/WalletStorageManager.ts +6 -10
  103. package/src/storage/methods/attemptToPostReqsToNetwork.ts +2 -1
  104. package/test/Wallet/local/localWallet.man.test.ts +1 -3
  105. package/test/Wallet/local/localWallet2.man.test.ts +71 -4
  106. package/test/Wallet/specOps/specOps.man.test.ts +41 -1
  107. package/test/Wallet/support/opers1.man.test.ts +183 -0
  108. package/test/WalletClient/LocalKVStore.man.test.ts +114 -0
  109. package/test/WalletClient/WERR.man.test.ts +20 -0
  110. package/test/services/Services.test.ts +3 -1
  111. package/test/{Wallet/local → utils}/localWalletMethods.ts +4 -5
  112. package/out/test/Wallet/local/localWalletMethods.d.ts.map +0 -1
  113. package/out/test/Wallet/local/localWalletMethods.js.map +0 -1
package/docs/client.md CHANGED
@@ -14,68 +14,64 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
14
14
 
15
15
  | | | |
16
16
  | --- | --- | --- |
17
- | [ArcConfig](#interface-arcconfig) | [PermissionToken](#interface-permissiontoken) | [TableProvenTxReq](#interface-tableproventxreq) |
18
- | [ArcMinerGetTxData](#interface-arcminergettxdata) | [PermissionsManagerConfig](#interface-permissionsmanagerconfig) | [TableProvenTxReqDynamics](#interface-tableproventxreqdynamics) |
19
- | [AuthId](#interface-authid) | [PostBeefResult](#interface-postbeefresult) | [TableSettings](#interface-tablesettings) |
20
- | [AuthPayload](#interface-authpayload) | [PostBeefResultForTxidApi](#interface-postbeefresultfortxidapi) | [TableSyncState](#interface-tablesyncstate) |
21
- | [BaseBlockHeader](#interface-baseblockheader) | [PostReqsToNetworkDetails](#interface-postreqstonetworkdetails) | [TableTransaction](#interface-tabletransaction) |
22
- | [BitailsConfig](#interface-bitailsconfig) | [PostReqsToNetworkResult](#interface-postreqstonetworkresult) | [TableTxLabel](#interface-tabletxlabel) |
23
- | [BitailsMerkleProof](#interface-bitailsmerkleproof) | [PostTxResultForTxid](#interface-posttxresultfortxid) | [TableTxLabelMap](#interface-tabletxlabelmap) |
24
- | [BlockHeader](#interface-blockheader) | [PostTxResultForTxidError](#interface-posttxresultfortxiderror) | [TableUser](#interface-tableuser) |
25
- | [BsvExchangeRate](#interface-bsvexchangerate) | [PostTxsResult](#interface-posttxsresult) | [TaskPurgeParams](#interface-taskpurgeparams) |
26
- | [CertOpsWallet](#interface-certopswallet) | [ProcessSyncChunkResult](#interface-processsyncchunkresult) | [TrustSettings](#interface-trustsettings) |
27
- | [Certifier](#interface-certifier) | [ProvenOrRawTx](#interface-provenorrawtx) | [TrxToken](#interface-trxtoken) |
28
- | [CommitNewTxResults](#interface-commitnewtxresults) | [ProvenTxFromTxidResult](#interface-proventxfromtxidresult) | [TscMerkleProofApi](#interface-tscmerkleproofapi) |
29
- | [CompleteAuthResponse](#interface-completeauthresponse) | [ProvenTxReqHistory](#interface-proventxreqhistory) | [TxScriptOffsets](#interface-txscriptoffsets) |
30
- | [CreateActionResultX](#interface-createactionresultx) | [ProvenTxReqHistorySummaryApi](#interface-proventxreqhistorysummaryapi) | [UMPToken](#interface-umptoken) |
31
- | [EntitySyncMap](#interface-entitysyncmap) | [ProvenTxReqNotify](#interface-proventxreqnotify) | [UMPTokenInteractor](#interface-umptokeninteractor) |
32
- | [EntityTimeStamp](#interface-entitytimestamp) | [PurgeParams](#interface-purgeparams) | [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs) |
33
- | [ExchangeRatesIoApi](#interface-exchangeratesioapi) | [PurgeResults](#interface-purgeresults) | [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult) |
34
- | [ExtendedVerifiableCertificate](#interface-extendedverifiablecertificate) | [RequestSyncChunkArgs](#interface-requestsyncchunkargs) | [ValidAbortActionArgs](#interface-validabortactionargs) |
35
- | [FiatExchangeRates](#interface-fiatexchangerates) | [ReviewActionResult](#interface-reviewactionresult) | [ValidAcquireCertificateArgs](#interface-validacquirecertificateargs) |
36
- | [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs) | [ScriptTemplateParamsBRC29](#interface-scripttemplateparamsbrc29) | [ValidAcquireDirectCertificateArgs](#interface-validacquiredirectcertificateargs) |
37
- | [FindCertificatesArgs](#interface-findcertificatesargs) | [ScriptTemplateUnlock](#interface-scripttemplateunlock) | [ValidAcquireIssuanceCertificateArgs](#interface-validacquireissuancecertificateargs) |
38
- | [FindCommissionsArgs](#interface-findcommissionsargs) | [SetupEnv](#interface-setupenv) | [ValidBasketInsertion](#interface-validbasketinsertion) |
39
- | [FindForUserSincePagedArgs](#interface-findforusersincepagedargs) | [SetupWallet](#interface-setupwallet) | [ValidCreateActionArgs](#interface-validcreateactionargs) |
40
- | [FindMonitorEventsArgs](#interface-findmonitoreventsargs) | [SetupWalletArgs](#interface-setupwalletargs) | [ValidCreateActionInput](#interface-validcreateactioninput) |
41
- | [FindOutputBasketsArgs](#interface-findoutputbasketsargs) | [SetupWalletClient](#interface-setupwalletclient) | [ValidCreateActionOptions](#interface-validcreateactionoptions) |
42
- | [FindOutputTagMapsArgs](#interface-findoutputtagmapsargs) | [SetupWalletClientArgs](#interface-setupwalletclientargs) | [ValidCreateActionOutput](#interface-validcreateactionoutput) |
43
- | [FindOutputTagsArgs](#interface-findoutputtagsargs) | [SetupWalletKnex](#interface-setupwalletknex) | [ValidDiscoverByAttributesArgs](#interface-validdiscoverbyattributesargs) |
44
- | [FindOutputsArgs](#interface-findoutputsargs) | [SetupWalletKnexArgs](#interface-setupwalletknexargs) | [ValidDiscoverByIdentityKeyArgs](#interface-validdiscoverbyidentitykeyargs) |
45
- | [FindPartialSincePagedArgs](#interface-findpartialsincepagedargs) | [SetupWalletMySQLArgs](#interface-setupwalletmysqlargs) | [ValidInternalizeActionArgs](#interface-validinternalizeactionargs) |
46
- | [FindProvenTxReqsArgs](#interface-findproventxreqsargs) | [SetupWalletSQLiteArgs](#interface-setupwalletsqliteargs) | [ValidInternalizeOutput](#interface-validinternalizeoutput) |
47
- | [FindProvenTxsArgs](#interface-findproventxsargs) | [SignActionResultX](#interface-signactionresultx) | [ValidListActionsArgs](#interface-validlistactionsargs) |
48
- | [FindSincePagedArgs](#interface-findsincepagedargs) | [StartAuthResponse](#interface-startauthresponse) | [ValidListCertificatesArgs](#interface-validlistcertificatesargs) |
49
- | [FindSyncStatesArgs](#interface-findsyncstatesargs) | [StatusForTxidResult](#interface-statusfortxidresult) | [ValidListOutputsArgs](#interface-validlistoutputsargs) |
50
- | [FindTransactionsArgs](#interface-findtransactionsargs) | [StorageCreateActionResult](#interface-storagecreateactionresult) | [ValidProcessActionArgs](#interface-validprocessactionargs) |
51
- | [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs) | [StorageCreateTransactionSdkInput](#interface-storagecreatetransactionsdkinput) | [ValidProcessActionOptions](#interface-validprocessactionoptions) |
52
- | [FindTxLabelsArgs](#interface-findtxlabelsargs) | [StorageCreateTransactionSdkOutput](#interface-storagecreatetransactionsdkoutput) | [ValidProveCertificateArgs](#interface-validprovecertificateargs) |
53
- | [FindUsersArgs](#interface-findusersargs) | [StorageFeeModel](#interface-storagefeemodel) | [ValidRelinquishCertificateArgs](#interface-validrelinquishcertificateargs) |
54
- | [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [StorageGetBeefOptions](#interface-storagegetbeefoptions) | [ValidRelinquishOutputArgs](#interface-validrelinquishoutputargs) |
55
- | [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [StorageIdentity](#interface-storageidentity) | [ValidSignActionArgs](#interface-validsignactionargs) |
56
- | [GenerateChangeSdkInput](#interface-generatechangesdkinput) | [StorageInternalizeActionResult](#interface-storageinternalizeactionresult) | [ValidSignActionOptions](#interface-validsignactionoptions) |
57
- | [GenerateChangeSdkOutput](#interface-generatechangesdkoutput) | [StorageKnexOptions](#interface-storageknexoptions) | [ValidWalletPayment](#interface-validwalletpayment) |
58
- | [GenerateChangeSdkParams](#interface-generatechangesdkparams) | [StorageProcessActionArgs](#interface-storageprocessactionargs) | [ValidWalletSignerArgs](#interface-validwalletsignerargs) |
59
- | [GenerateChangeSdkResult](#interface-generatechangesdkresult) | [StorageProcessActionResults](#interface-storageprocessactionresults) | [ValidateGenerateChangeSdkParamsResult](#interface-validategeneratechangesdkparamsresult) |
60
- | [GenerateChangeSdkStorageChange](#interface-generatechangesdkstoragechange) | [StorageProvenOrReq](#interface-storageprovenorreq) | [WalletArgs](#interface-walletargs) |
61
- | [GetMerklePathResult](#interface-getmerklepathresult) | [StorageProviderOptions](#interface-storageprovideroptions) | [WalletBalance](#interface-walletbalance) |
62
- | [GetRawTxResult](#interface-getrawtxresult) | [StorageReaderOptions](#interface-storagereaderoptions) | [WalletPermissionsManagerCallbacks](#interface-walletpermissionsmanagercallbacks) |
63
- | [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail) | [StorageReaderWriterOptions](#interface-storagereaderwriteroptions) | [WalletServices](#interface-walletservices) |
64
- | [GetReqsAndBeefResult](#interface-getreqsandbeefresult) | [StorageSyncReaderOptions](#interface-storagesyncreaderoptions) | [WalletServicesOptions](#interface-walletservicesoptions) |
65
- | [GetScriptHashHistory](#interface-getscripthashhistory) | [SyncChunk](#interface-syncchunk) | [WalletSettings](#interface-walletsettings) |
66
- | [GetScriptHashHistoryResult](#interface-getscripthashhistoryresult) | [SyncError](#interface-syncerror) | [WalletSettingsManagerConfig](#interface-walletsettingsmanagerconfig) |
67
- | [GetStatusForTxidsResult](#interface-getstatusfortxidsresult) | [SyncMap](#interface-syncmap) | [WalletSigner](#interface-walletsigner) |
68
- | [GetUtxoStatusDetails](#interface-getutxostatusdetails) | [TableCertificate](#interface-tablecertificate) | [WalletStorage](#interface-walletstorage) |
69
- | [GetUtxoStatusResult](#interface-getutxostatusresult) | [TableCertificateField](#interface-tablecertificatefield) | [WalletStorageProvider](#interface-walletstorageprovider) |
70
- | [KeyPair](#interface-keypair) | [TableCertificateX](#interface-tablecertificatex) | [WalletStorageReader](#interface-walletstoragereader) |
71
- | [KeyPairAddress](#interface-keypairaddress) | [TableCommission](#interface-tablecommission) | [WalletStorageServerOptions](#interface-walletstorageserveroptions) |
72
- | [MonitorDaemonSetup](#interface-monitordaemonsetup) | [TableMonitorEvent](#interface-tablemonitorevent) | [WalletStorageSync](#interface-walletstoragesync) |
73
- | [MonitorOptions](#interface-monitoroptions) | [TableOutput](#interface-tableoutput) | [WalletStorageSyncReader](#interface-walletstoragesyncreader) |
74
- | [OutPoint](#interface-outpoint) | [TableOutputBasket](#interface-tableoutputbasket) | [WalletStorageWriter](#interface-walletstoragewriter) |
75
- | [Paged](#interface-paged) | [TableOutputTag](#interface-tableoutputtag) | [WalletTheme](#interface-wallettheme) |
76
- | [PendingSignAction](#interface-pendingsignaction) | [TableOutputTagMap](#interface-tableoutputtagmap) | [XValidCreateActionOutput](#interface-xvalidcreateactionoutput) |
77
- | [PendingStorageInput](#interface-pendingstorageinput) | [TableOutputX](#interface-tableoutputx) | |
78
- | [PermissionRequest](#interface-permissionrequest) | [TableProvenTx](#interface-tableproventx) | |
17
+ | [ArcConfig](#interface-arcconfig) | [OutPoint](#interface-outpoint) | [TableProvenTxReqDynamics](#interface-tableproventxreqdynamics) |
18
+ | [ArcMinerGetTxData](#interface-arcminergettxdata) | [Paged](#interface-paged) | [TableSettings](#interface-tablesettings) |
19
+ | [AuthId](#interface-authid) | [PendingSignAction](#interface-pendingsignaction) | [TableSyncState](#interface-tablesyncstate) |
20
+ | [AuthPayload](#interface-authpayload) | [PendingStorageInput](#interface-pendingstorageinput) | [TableTransaction](#interface-tabletransaction) |
21
+ | [BaseBlockHeader](#interface-baseblockheader) | [PermissionRequest](#interface-permissionrequest) | [TableTxLabel](#interface-tabletxlabel) |
22
+ | [BaseBlockHeader](#interface-baseblockheader) | [PermissionToken](#interface-permissiontoken) | [TableTxLabelMap](#interface-tabletxlabelmap) |
23
+ | [BitailsConfig](#interface-bitailsconfig) | [PermissionsManagerConfig](#interface-permissionsmanagerconfig) | [TableUser](#interface-tableuser) |
24
+ | [BitailsMerkleProof](#interface-bitailsmerkleproof) | [PostBeefResult](#interface-postbeefresult) | [TaskPurgeParams](#interface-taskpurgeparams) |
25
+ | [BlockHeader](#interface-blockheader) | [PostBeefResultForTxidApi](#interface-postbeefresultfortxidapi) | [TrustSettings](#interface-trustsettings) |
26
+ | [BlockHeader](#interface-blockheader) | [PostReqsToNetworkDetails](#interface-postreqstonetworkdetails) | [TrxToken](#interface-trxtoken) |
27
+ | [BsvExchangeRate](#interface-bsvexchangerate) | [PostReqsToNetworkResult](#interface-postreqstonetworkresult) | [TscMerkleProofApi](#interface-tscmerkleproofapi) |
28
+ | [CertOpsWallet](#interface-certopswallet) | [PostTxResultForTxid](#interface-posttxresultfortxid) | [TxScriptOffsets](#interface-txscriptoffsets) |
29
+ | [Certifier](#interface-certifier) | [PostTxResultForTxidError](#interface-posttxresultfortxiderror) | [UMPToken](#interface-umptoken) |
30
+ | [CommitNewTxResults](#interface-commitnewtxresults) | [PostTxsResult](#interface-posttxsresult) | [UMPTokenInteractor](#interface-umptokeninteractor) |
31
+ | [CompleteAuthResponse](#interface-completeauthresponse) | [ProcessSyncChunkResult](#interface-processsyncchunkresult) | [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs) |
32
+ | [CreateActionResultX](#interface-createactionresultx) | [ProvenOrRawTx](#interface-provenorrawtx) | [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult) |
33
+ | [EntitySyncMap](#interface-entitysyncmap) | [ProvenTxFromTxidResult](#interface-proventxfromtxidresult) | [ValidAbortActionArgs](#interface-validabortactionargs) |
34
+ | [EntityTimeStamp](#interface-entitytimestamp) | [ProvenTxReqHistory](#interface-proventxreqhistory) | [ValidAcquireCertificateArgs](#interface-validacquirecertificateargs) |
35
+ | [ExchangeRatesIoApi](#interface-exchangeratesioapi) | [ProvenTxReqHistorySummaryApi](#interface-proventxreqhistorysummaryapi) | [ValidAcquireDirectCertificateArgs](#interface-validacquiredirectcertificateargs) |
36
+ | [ExtendedVerifiableCertificate](#interface-extendedverifiablecertificate) | [ProvenTxReqNotify](#interface-proventxreqnotify) | [ValidAcquireIssuanceCertificateArgs](#interface-validacquireissuancecertificateargs) |
37
+ | [FiatExchangeRates](#interface-fiatexchangerates) | [PurgeParams](#interface-purgeparams) | [ValidBasketInsertion](#interface-validbasketinsertion) |
38
+ | [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs) | [PurgeResults](#interface-purgeresults) | [ValidCreateActionArgs](#interface-validcreateactionargs) |
39
+ | [FindCertificatesArgs](#interface-findcertificatesargs) | [RequestSyncChunkArgs](#interface-requestsyncchunkargs) | [ValidCreateActionInput](#interface-validcreateactioninput) |
40
+ | [FindCommissionsArgs](#interface-findcommissionsargs) | [ReviewActionResult](#interface-reviewactionresult) | [ValidCreateActionOptions](#interface-validcreateactionoptions) |
41
+ | [FindForUserSincePagedArgs](#interface-findforusersincepagedargs) | [ScriptTemplateParamsBRC29](#interface-scripttemplateparamsbrc29) | [ValidCreateActionOutput](#interface-validcreateactionoutput) |
42
+ | [FindMonitorEventsArgs](#interface-findmonitoreventsargs) | [ScriptTemplateUnlock](#interface-scripttemplateunlock) | [ValidDiscoverByAttributesArgs](#interface-validdiscoverbyattributesargs) |
43
+ | [FindOutputBasketsArgs](#interface-findoutputbasketsargs) | [SignActionResultX](#interface-signactionresultx) | [ValidDiscoverByIdentityKeyArgs](#interface-validdiscoverbyidentitykeyargs) |
44
+ | [FindOutputTagMapsArgs](#interface-findoutputtagmapsargs) | [StartAuthResponse](#interface-startauthresponse) | [ValidInternalizeActionArgs](#interface-validinternalizeactionargs) |
45
+ | [FindOutputTagsArgs](#interface-findoutputtagsargs) | [StatusForTxidResult](#interface-statusfortxidresult) | [ValidInternalizeOutput](#interface-validinternalizeoutput) |
46
+ | [FindOutputsArgs](#interface-findoutputsargs) | [StorageCreateActionResult](#interface-storagecreateactionresult) | [ValidListActionsArgs](#interface-validlistactionsargs) |
47
+ | [FindPartialSincePagedArgs](#interface-findpartialsincepagedargs) | [StorageCreateTransactionSdkInput](#interface-storagecreatetransactionsdkinput) | [ValidListCertificatesArgs](#interface-validlistcertificatesargs) |
48
+ | [FindProvenTxReqsArgs](#interface-findproventxreqsargs) | [StorageCreateTransactionSdkOutput](#interface-storagecreatetransactionsdkoutput) | [ValidListOutputsArgs](#interface-validlistoutputsargs) |
49
+ | [FindProvenTxsArgs](#interface-findproventxsargs) | [StorageFeeModel](#interface-storagefeemodel) | [ValidProcessActionArgs](#interface-validprocessactionargs) |
50
+ | [FindSincePagedArgs](#interface-findsincepagedargs) | [StorageGetBeefOptions](#interface-storagegetbeefoptions) | [ValidProcessActionOptions](#interface-validprocessactionoptions) |
51
+ | [FindSyncStatesArgs](#interface-findsyncstatesargs) | [StorageIdentity](#interface-storageidentity) | [ValidProveCertificateArgs](#interface-validprovecertificateargs) |
52
+ | [FindTransactionsArgs](#interface-findtransactionsargs) | [StorageInternalizeActionResult](#interface-storageinternalizeactionresult) | [ValidRelinquishCertificateArgs](#interface-validrelinquishcertificateargs) |
53
+ | [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs) | [StorageProcessActionArgs](#interface-storageprocessactionargs) | [ValidRelinquishOutputArgs](#interface-validrelinquishoutputargs) |
54
+ | [FindTxLabelsArgs](#interface-findtxlabelsargs) | [StorageProcessActionResults](#interface-storageprocessactionresults) | [ValidSignActionArgs](#interface-validsignactionargs) |
55
+ | [FindUsersArgs](#interface-findusersargs) | [StorageProvenOrReq](#interface-storageprovenorreq) | [ValidSignActionOptions](#interface-validsignactionoptions) |
56
+ | [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [StorageProviderOptions](#interface-storageprovideroptions) | [ValidWalletPayment](#interface-validwalletpayment) |
57
+ | [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [StorageReaderOptions](#interface-storagereaderoptions) | [ValidWalletSignerArgs](#interface-validwalletsignerargs) |
58
+ | [GenerateChangeSdkInput](#interface-generatechangesdkinput) | [StorageReaderWriterOptions](#interface-storagereaderwriteroptions) | [ValidateGenerateChangeSdkParamsResult](#interface-validategeneratechangesdkparamsresult) |
59
+ | [GenerateChangeSdkOutput](#interface-generatechangesdkoutput) | [StorageSyncReaderOptions](#interface-storagesyncreaderoptions) | [WalletArgs](#interface-walletargs) |
60
+ | [GenerateChangeSdkParams](#interface-generatechangesdkparams) | [SyncChunk](#interface-syncchunk) | [WalletBalance](#interface-walletbalance) |
61
+ | [GenerateChangeSdkResult](#interface-generatechangesdkresult) | [SyncError](#interface-syncerror) | [WalletPermissionsManagerCallbacks](#interface-walletpermissionsmanagercallbacks) |
62
+ | [GenerateChangeSdkStorageChange](#interface-generatechangesdkstoragechange) | [SyncMap](#interface-syncmap) | [WalletServices](#interface-walletservices) |
63
+ | [GetMerklePathResult](#interface-getmerklepathresult) | [TableCertificate](#interface-tablecertificate) | [WalletServicesOptions](#interface-walletservicesoptions) |
64
+ | [GetRawTxResult](#interface-getrawtxresult) | [TableCertificateField](#interface-tablecertificatefield) | [WalletSettings](#interface-walletsettings) |
65
+ | [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail) | [TableCertificateX](#interface-tablecertificatex) | [WalletSettingsManagerConfig](#interface-walletsettingsmanagerconfig) |
66
+ | [GetReqsAndBeefResult](#interface-getreqsandbeefresult) | [TableCommission](#interface-tablecommission) | [WalletSigner](#interface-walletsigner) |
67
+ | [GetScriptHashHistory](#interface-getscripthashhistory) | [TableMonitorEvent](#interface-tablemonitorevent) | [WalletStorage](#interface-walletstorage) |
68
+ | [GetScriptHashHistoryResult](#interface-getscripthashhistoryresult) | [TableOutput](#interface-tableoutput) | [WalletStorageProvider](#interface-walletstorageprovider) |
69
+ | [GetStatusForTxidsResult](#interface-getstatusfortxidsresult) | [TableOutputBasket](#interface-tableoutputbasket) | [WalletStorageReader](#interface-walletstoragereader) |
70
+ | [GetUtxoStatusDetails](#interface-getutxostatusdetails) | [TableOutputTag](#interface-tableoutputtag) | [WalletStorageSync](#interface-walletstoragesync) |
71
+ | [GetUtxoStatusResult](#interface-getutxostatusresult) | [TableOutputTagMap](#interface-tableoutputtagmap) | [WalletStorageSyncReader](#interface-walletstoragesyncreader) |
72
+ | [KeyPair](#interface-keypair) | [TableOutputX](#interface-tableoutputx) | [WalletStorageWriter](#interface-walletstoragewriter) |
73
+ | [LiveBlockHeader](#interface-liveblockheader) | [TableProvenTx](#interface-tableproventx) | [WalletTheme](#interface-wallettheme) |
74
+ | [MonitorOptions](#interface-monitoroptions) | [TableProvenTxReq](#interface-tableproventxreq) | [XValidCreateActionOutput](#interface-xvalidcreateactionoutput) |
79
75
 
80
76
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
81
77
 
@@ -264,6 +260,75 @@ version: number
264
260
 
265
261
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
266
262
 
263
+ ---
264
+ ##### Interface: BaseBlockHeader
265
+
266
+ These are fields of 80 byte serialized header in order whose double sha256 hash is a block's hash value
267
+ and the next block's previousHash value.
268
+
269
+ All block hash values and merkleRoot values are 32 byte hex string values with the byte order reversed from the serialized byte order.
270
+
271
+ ```ts
272
+ export interface BaseBlockHeader {
273
+ version: number;
274
+ previousHash: string;
275
+ merkleRoot: string;
276
+ time: number;
277
+ bits: number;
278
+ nonce: number;
279
+ }
280
+ ```
281
+
282
+ ###### Property bits
283
+
284
+ Block header bits value. Serialized length is 4 bytes.
285
+
286
+ ```ts
287
+ bits: number
288
+ ```
289
+
290
+ ###### Property merkleRoot
291
+
292
+ Root hash of the merkle tree of all transactions in this block. Serialized length is 32 bytes.
293
+
294
+ ```ts
295
+ merkleRoot: string
296
+ ```
297
+
298
+ ###### Property nonce
299
+
300
+ Block header nonce value. Serialized length is 4 bytes.
301
+
302
+ ```ts
303
+ nonce: number
304
+ ```
305
+
306
+ ###### Property previousHash
307
+
308
+ Hash of previous block's block header. Serialized length is 32 bytes.
309
+
310
+ ```ts
311
+ previousHash: string
312
+ ```
313
+
314
+ ###### Property time
315
+
316
+ Block header time value. Serialized length is 4 bytes.
317
+
318
+ ```ts
319
+ time: number
320
+ ```
321
+
322
+ ###### Property version
323
+
324
+ Block header version value. Serialized length is 4 bytes.
325
+
326
+ ```ts
327
+ version: number
328
+ ```
329
+
330
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
331
+
267
332
  ---
268
333
  ##### Interface: BitailsConfig
269
334
 
@@ -318,7 +383,39 @@ export interface BlockHeader extends BaseBlockHeader {
318
383
  }
319
384
  ```
320
385
 
321
- See also: [BaseBlockHeader](./client.md#interface-baseblockheader)
386
+ See also: [BaseBlockHeader](./services.md#interface-baseblockheader)
387
+
388
+ ###### Property hash
389
+
390
+ The double sha256 hash of the serialized `BaseBlockHeader` fields.
391
+
392
+ ```ts
393
+ hash: string
394
+ ```
395
+
396
+ ###### Property height
397
+
398
+ Height of the header, starting from zero.
399
+
400
+ ```ts
401
+ height: number
402
+ ```
403
+
404
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
405
+
406
+ ---
407
+ ##### Interface: BlockHeader
408
+
409
+ A `BaseBlockHeader` extended with its computed hash and height in its chain.
410
+
411
+ ```ts
412
+ export interface BlockHeader extends BaseBlockHeader {
413
+ height: number;
414
+ hash: string;
415
+ }
416
+ ```
417
+
418
+ See also: [BaseBlockHeader](./services.md#interface-baseblockheader)
322
419
 
323
420
  ###### Property hash
324
421
 
@@ -524,7 +621,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
524
621
  ##### Interface: FindCertificateFieldsArgs
525
622
 
526
623
  ```ts
527
- export interface FindCertificateFieldsArgs extends sdk.FindSincePagedArgs {
624
+ export interface FindCertificateFieldsArgs extends FindSincePagedArgs {
528
625
  partial: Partial<TableCertificateField>;
529
626
  }
530
627
  ```
@@ -553,7 +650,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
553
650
  ##### Interface: FindCommissionsArgs
554
651
 
555
652
  ```ts
556
- export interface FindCommissionsArgs extends sdk.FindSincePagedArgs {
653
+ export interface FindCommissionsArgs extends FindSincePagedArgs {
557
654
  partial: Partial<TableCommission>;
558
655
  }
559
656
  ```
@@ -579,7 +676,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
579
676
  ##### Interface: FindMonitorEventsArgs
580
677
 
581
678
  ```ts
582
- export interface FindMonitorEventsArgs extends sdk.FindSincePagedArgs {
679
+ export interface FindMonitorEventsArgs extends FindSincePagedArgs {
583
680
  partial: Partial<TableMonitorEvent>;
584
681
  }
585
682
  ```
@@ -605,7 +702,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
605
702
  ##### Interface: FindOutputTagMapsArgs
606
703
 
607
704
  ```ts
608
- export interface FindOutputTagMapsArgs extends sdk.FindSincePagedArgs {
705
+ export interface FindOutputTagMapsArgs extends FindSincePagedArgs {
609
706
  partial: Partial<TableOutputTagMap>;
610
707
  tagIds?: number[];
611
708
  }
@@ -619,7 +716,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
619
716
  ##### Interface: FindOutputTagsArgs
620
717
 
621
718
  ```ts
622
- export interface FindOutputTagsArgs extends sdk.FindSincePagedArgs {
719
+ export interface FindOutputTagsArgs extends FindSincePagedArgs {
623
720
  partial: Partial<TableOutputTag>;
624
721
  }
625
722
  ```
@@ -635,7 +732,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
635
732
  export interface FindOutputsArgs extends FindSincePagedArgs {
636
733
  partial: Partial<TableOutput>;
637
734
  noScript?: boolean;
638
- txStatus?: sdk.TransactionStatus[];
735
+ txStatus?: TransactionStatus[];
639
736
  }
640
737
  ```
641
738
 
@@ -660,9 +757,9 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
660
757
  ##### Interface: FindProvenTxReqsArgs
661
758
 
662
759
  ```ts
663
- export interface FindProvenTxReqsArgs extends sdk.FindSincePagedArgs {
760
+ export interface FindProvenTxReqsArgs extends FindSincePagedArgs {
664
761
  partial: Partial<TableProvenTxReq>;
665
- status?: sdk.ProvenTxReqStatus[];
762
+ status?: ProvenTxReqStatus[];
666
763
  txids?: string[];
667
764
  }
668
765
  ```
@@ -675,7 +772,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
675
772
  ##### Interface: FindProvenTxsArgs
676
773
 
677
774
  ```ts
678
- export interface FindProvenTxsArgs extends sdk.FindSincePagedArgs {
775
+ export interface FindProvenTxsArgs extends FindSincePagedArgs {
679
776
  partial: Partial<TableProvenTx>;
680
777
  }
681
778
  ```
@@ -690,8 +787,8 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
690
787
  ```ts
691
788
  export interface FindSincePagedArgs {
692
789
  since?: Date;
693
- paged?: sdk.Paged;
694
- trx?: sdk.TrxToken;
790
+ paged?: Paged;
791
+ trx?: TrxToken;
695
792
  }
696
793
  ```
697
794
 
@@ -703,7 +800,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
703
800
  ##### Interface: FindSyncStatesArgs
704
801
 
705
802
  ```ts
706
- export interface FindSyncStatesArgs extends sdk.FindSincePagedArgs {
803
+ export interface FindSyncStatesArgs extends FindSincePagedArgs {
707
804
  partial: Partial<TableSyncState>;
708
805
  }
709
806
  ```
@@ -716,9 +813,9 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
716
813
  ##### Interface: FindTransactionsArgs
717
814
 
718
815
  ```ts
719
- export interface FindTransactionsArgs extends sdk.FindSincePagedArgs {
816
+ export interface FindTransactionsArgs extends FindSincePagedArgs {
720
817
  partial: Partial<TableTransaction>;
721
- status?: sdk.TransactionStatus[];
818
+ status?: TransactionStatus[];
722
819
  noRawTx?: boolean;
723
820
  }
724
821
  ```
@@ -731,7 +828,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
731
828
  ##### Interface: FindTxLabelMapsArgs
732
829
 
733
830
  ```ts
734
- export interface FindTxLabelMapsArgs extends sdk.FindSincePagedArgs {
831
+ export interface FindTxLabelMapsArgs extends FindSincePagedArgs {
735
832
  partial: Partial<TableTxLabelMap>;
736
833
  labelIds?: number[];
737
834
  }
@@ -745,7 +842,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
745
842
  ##### Interface: FindTxLabelsArgs
746
843
 
747
844
  ```ts
748
- export interface FindTxLabelsArgs extends sdk.FindSincePagedArgs {
845
+ export interface FindTxLabelsArgs extends FindSincePagedArgs {
749
846
  partial: Partial<TableTxLabel>;
750
847
  }
751
848
  ```
@@ -758,7 +855,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
758
855
  ##### Interface: FindUsersArgs
759
856
 
760
857
  ```ts
761
- export interface FindUsersArgs extends sdk.FindSincePagedArgs {
858
+ export interface FindUsersArgs extends FindSincePagedArgs {
762
859
  partial: Partial<TableUser>;
763
860
  }
764
861
  ```
@@ -929,19 +1026,19 @@ export interface GetMerklePathResult {
929
1026
  name?: string;
930
1027
  merklePath?: MerklePath;
931
1028
  header?: BlockHeader;
932
- error?: sdk.WalletError;
933
- notes?: sdk.ReqHistoryNote[];
1029
+ error?: WalletError;
1030
+ notes?: ReqHistoryNote[];
934
1031
  }
935
1032
  ```
936
1033
 
937
- See also: [BlockHeader](./client.md#interface-blockheader), [ReqHistoryNote](./client.md#type-reqhistorynote), [WalletError](./client.md#class-walleterror)
1034
+ See also: [BlockHeader](./services.md#interface-blockheader), [ReqHistoryNote](./client.md#type-reqhistorynote), [WalletError](./client.md#class-walleterror)
938
1035
 
939
1036
  ###### Property error
940
1037
 
941
1038
  The first exception error that occurred during processing, if any.
942
1039
 
943
1040
  ```ts
944
- error?: sdk.WalletError
1041
+ error?: WalletError
945
1042
  ```
946
1043
  See also: [WalletError](./client.md#class-walleterror)
947
1044
 
@@ -974,7 +1071,7 @@ export interface GetRawTxResult {
974
1071
  txid: string;
975
1072
  name?: string;
976
1073
  rawTx?: number[];
977
- error?: sdk.WalletError;
1074
+ error?: WalletError;
978
1075
  }
979
1076
  ```
980
1077
 
@@ -985,7 +1082,7 @@ See also: [WalletError](./client.md#class-walleterror)
985
1082
  The first exception error that occurred during processing, if any.
986
1083
 
987
1084
  ```ts
988
- error?: sdk.WalletError
1085
+ error?: WalletError
989
1086
  ```
990
1087
  See also: [WalletError](./client.md#class-walleterror)
991
1088
 
@@ -1066,7 +1163,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
1066
1163
  export interface GetScriptHashHistoryResult {
1067
1164
  name: string;
1068
1165
  status: "success" | "error";
1069
- error?: sdk.WalletError;
1166
+ error?: WalletError;
1070
1167
  history: GetScriptHashHistory[];
1071
1168
  }
1072
1169
  ```
@@ -1078,7 +1175,7 @@ See also: [GetScriptHashHistory](./client.md#interface-getscripthashhistory), [W
1078
1175
  When status is 'error', provides code and description
1079
1176
 
1080
1177
  ```ts
1081
- error?: sdk.WalletError
1178
+ error?: WalletError
1082
1179
  ```
1083
1180
  See also: [WalletError](./client.md#class-walleterror)
1084
1181
 
@@ -1117,8 +1214,8 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
1117
1214
  export interface GetStatusForTxidsResult {
1118
1215
  name: string;
1119
1216
  status: "success" | "error";
1120
- error?: sdk.WalletError;
1121
- results: sdk.StatusForTxidResult[];
1217
+ error?: WalletError;
1218
+ results: StatusForTxidResult[];
1122
1219
  }
1123
1220
  ```
1124
1221
 
@@ -1129,7 +1226,7 @@ See also: [StatusForTxidResult](./client.md#interface-statusfortxidresult), [Wal
1129
1226
  The first exception error that occurred during processing, if any.
1130
1227
 
1131
1228
  ```ts
1132
- error?: sdk.WalletError
1229
+ error?: WalletError
1133
1230
  ```
1134
1231
  See also: [WalletError](./client.md#class-walleterror)
1135
1232
 
@@ -1204,7 +1301,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
1204
1301
  export interface GetUtxoStatusResult {
1205
1302
  name: string;
1206
1303
  status: "success" | "error";
1207
- error?: sdk.WalletError;
1304
+ error?: WalletError;
1208
1305
  isUtxo?: boolean;
1209
1306
  details: GetUtxoStatusDetails[];
1210
1307
  }
@@ -1229,7 +1326,7 @@ See also: [GetUtxoStatusDetails](./client.md#interface-getutxostatusdetails)
1229
1326
  When status is 'error', provides code and description
1230
1327
 
1231
1328
  ```ts
1232
- error?: sdk.WalletError
1329
+ error?: WalletError
1233
1330
  ```
1234
1331
  See also: [WalletError](./client.md#class-walleterror)
1235
1332
 
@@ -1273,40 +1370,68 @@ export interface KeyPair {
1273
1370
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
1274
1371
 
1275
1372
  ---
1276
- ##### Interface: KeyPairAddress
1373
+ ##### Interface: LiveBlockHeader
1277
1374
 
1278
- A private key and associated public key and address.
1375
+ The "live" portion of the block chain is recent history that can conceivably be subject to reorganizations.
1376
+ The additional fields support tracking orphan blocks, chain forks, and chain reorgs.
1279
1377
 
1280
1378
  ```ts
1281
- export interface KeyPairAddress {
1282
- privateKey: PrivateKey;
1283
- publicKey: PublicKey;
1284
- address: string;
1379
+ export interface LiveBlockHeader extends BlockHeader {
1380
+ chainWork: string;
1381
+ isChainTip: boolean;
1382
+ isActive: boolean;
1383
+ headerId: number;
1384
+ previousHeaderId: number | null;
1285
1385
  }
1286
1386
  ```
1287
1387
 
1288
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
1388
+ See also: [BlockHeader](./services.md#interface-blockheader)
1289
1389
 
1290
- ---
1291
- ##### Interface: MonitorDaemonSetup
1390
+ ###### Property chainWork
1391
+
1392
+ The cummulative chainwork achieved by the addition of this block to the chain.
1393
+ Chainwork only matters in selecting the active chain.
1292
1394
 
1293
1395
  ```ts
1294
- export interface MonitorDaemonSetup {
1295
- chain?: sdk.Chain;
1296
- sqliteFilename?: string;
1297
- mySQLConnection?: string;
1298
- knexConfig?: Knex.Config;
1299
- knex?: Knex<any, any[]>;
1300
- storageKnexOptions?: StorageKnexOptions;
1301
- storageProvider?: StorageProvider;
1302
- storageManager?: WalletStorageManager;
1303
- servicesOptions?: sdk.WalletServicesOptions;
1304
- services?: Services;
1305
- monitor?: Monitor;
1306
- }
1396
+ chainWork: string
1307
1397
  ```
1308
1398
 
1309
- See also: [Chain](./client.md#type-chain), [Monitor](./monitor.md#class-monitor), [Services](./services.md#class-services), [StorageKnexOptions](./storage.md#interface-storageknexoptions), [StorageProvider](./storage.md#class-storageprovider), [WalletServicesOptions](./client.md#interface-walletservicesoptions), [WalletStorageManager](./storage.md#class-walletstoragemanager)
1399
+ ###### Property headerId
1400
+
1401
+ As there may be more than one header with identical height values due to orphan tracking,
1402
+ headers are assigned a unique headerId while part of the "live" portion of the block chain.
1403
+
1404
+ ```ts
1405
+ headerId: number
1406
+ ```
1407
+
1408
+ ###### Property isActive
1409
+
1410
+ True only if this header is currently on the active chain.
1411
+
1412
+ ```ts
1413
+ isActive: boolean
1414
+ ```
1415
+
1416
+ ###### Property isChainTip
1417
+
1418
+ True only if this header is currently a chain tip. e.g. There is no header that follows it by previousHash or previousHeaderId.
1419
+
1420
+ ```ts
1421
+ isChainTip: boolean
1422
+ ```
1423
+
1424
+ ###### Property previousHeaderId
1425
+
1426
+ Every header in the "live" portion of the block chain is linked to an ancestor header through
1427
+ both its previousHash and previousHeaderId properties.
1428
+
1429
+ Due to forks, there may be multiple headers with identical `previousHash` and `previousHeaderId` values.
1430
+ Of these, only one (the header on the active chain) will have `isActive` === true.
1431
+
1432
+ ```ts
1433
+ previousHeaderId: number | null
1434
+ ```
1310
1435
 
1311
1436
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
1312
1437
 
@@ -1917,7 +2042,7 @@ export interface PostTxResultForTxid {
1917
2042
  merklePath?: MerklePath;
1918
2043
  competingTxs?: string[];
1919
2044
  data?: object | string | PostTxResultForTxidError;
1920
- notes?: sdk.ReqHistoryNote[];
2045
+ notes?: ReqHistoryNote[];
1921
2046
  serviceError?: boolean;
1922
2047
  }
1923
2048
  ```
@@ -1983,10 +2108,10 @@ Properties on array items of result returned from `WalletServices` function `pos
1983
2108
  export interface PostTxsResult {
1984
2109
  name: string;
1985
2110
  status: "success" | "error";
1986
- error?: sdk.WalletError;
2111
+ error?: WalletError;
1987
2112
  txidResults: PostTxResultForTxid[];
1988
2113
  data?: object;
1989
- notes?: sdk.ReqHistoryNote[];
2114
+ notes?: ReqHistoryNote[];
1990
2115
  }
1991
2116
  ```
1992
2117
 
@@ -2028,7 +2153,7 @@ export interface ProcessSyncChunkResult {
2028
2153
  maxUpdated_at: Date | undefined;
2029
2154
  updates: number;
2030
2155
  inserts: number;
2031
- error?: sdk.WalletError;
2156
+ error?: WalletError;
2032
2157
  }
2033
2158
  ```
2034
2159
 
@@ -2305,396 +2430,24 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
2305
2430
 
2306
2431
  ```ts
2307
2432
  export interface ScriptTemplateParamsBRC29 {
2308
- derivationPrefix?: string;
2309
- derivationSuffix?: string;
2310
- keyDeriver: KeyDeriverApi;
2311
- }
2312
- ```
2313
-
2314
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2315
-
2316
- ---
2317
- ##### Interface: ScriptTemplateUnlock
2318
-
2319
- ```ts
2320
- export interface ScriptTemplateUnlock {
2321
- sign: (tx: Transaction, inputIndex: number) => Promise<UnlockingScript>;
2322
- estimateLength: (tx: Transaction, inputIndex: number) => Promise<number>;
2323
- }
2324
- ```
2325
-
2326
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2327
-
2328
- ---
2329
- ##### Interface: SetupEnv
2330
-
2331
- `SetupEnv` provides a starting point for managing secrets that
2332
- must not appear in source code.
2333
-
2334
- The `makeEnv` and `getEnv` functions of the `Setup` and `SetupClient` classes
2335
- provide an easy way to create and import these secrets and related properties.
2336
-
2337
- ```ts
2338
- export interface SetupEnv {
2339
- chain: sdk.Chain;
2340
- identityKey: string;
2341
- identityKey2: string;
2342
- filePath: string | undefined;
2343
- taalApiKey: string;
2344
- devKeys: Record<string, string>;
2345
- mySQLConnection: string;
2346
- }
2347
- ```
2348
-
2349
- See also: [Chain](./client.md#type-chain)
2350
-
2351
- ###### Property chain
2352
-
2353
- The chan being accessed: 'main' for mainnet, 'test' for 'testnet'.
2354
-
2355
- ```ts
2356
- chain: sdk.Chain
2357
- ```
2358
- See also: [Chain](./client.md#type-chain)
2359
-
2360
- ###### Property devKeys
2361
-
2362
- A map of public keys (identity keys, hex strings) to private keys (hex strings).
2363
-
2364
- ```ts
2365
- devKeys: Record<string, string>
2366
- ```
2367
-
2368
- ###### Property filePath
2369
-
2370
- Filepath to sqlite file to be used for identityKey wallet.
2371
-
2372
- ```ts
2373
- filePath: string | undefined
2374
- ```
2375
-
2376
- ###### Property identityKey
2377
-
2378
- The user's primary identity key (public key).
2379
-
2380
- ```ts
2381
- identityKey: string
2382
- ```
2383
-
2384
- ###### Property identityKey2
2385
-
2386
- A secondary identity key (public key), used to test exchanges with other users.
2387
-
2388
- ```ts
2389
- identityKey2: string
2390
- ```
2391
-
2392
- ###### Property mySQLConnection
2393
-
2394
- A MySQL connection string including user and password properties.
2395
- Must be valid to make use of MySQL `Setup` class support.
2396
-
2397
- ```ts
2398
- mySQLConnection: string
2399
- ```
2400
-
2401
- ###### Property taalApiKey
2402
-
2403
- A vaild TAAL API key for use by `Services`
2404
-
2405
- ```ts
2406
- taalApiKey: string
2407
- ```
2408
-
2409
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2410
-
2411
- ---
2412
- ##### Interface: SetupWallet
2413
-
2414
- When creating a BRC-100 compatible `Wallet`, many components come into play.
2415
-
2416
- All of the `createWallet` functions in the `Setup` and `SetupClient` classes return
2417
- an object with direct access to each component to facilitate experimentation, testing
2418
- and customization.
2419
-
2420
- ```ts
2421
- export interface SetupWallet {
2422
- rootKey: PrivateKey;
2423
- identityKey: string;
2424
- keyDeriver: KeyDeriver;
2425
- chain: sdk.Chain;
2426
- storage: WalletStorageManager;
2427
- services: Services;
2428
- monitor: Monitor;
2429
- wallet: Wallet;
2430
- }
2431
- ```
2432
-
2433
- See also: [Chain](./client.md#type-chain), [Monitor](./monitor.md#class-monitor), [Services](./services.md#class-services), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager)
2434
-
2435
- ###### Property chain
2436
-
2437
- The chain ('main' or 'test') which the wallet accesses.
2438
-
2439
- ```ts
2440
- chain: sdk.Chain
2441
- ```
2442
- See also: [Chain](./client.md#type-chain)
2443
-
2444
- ###### Property identityKey
2445
-
2446
- The pubilc key associated with the `rootKey` which also serves as the wallet's identity.
2447
-
2448
- ```ts
2449
- identityKey: string
2450
- ```
2451
-
2452
- ###### Property keyDeriver
2453
-
2454
- The `KeyDeriver` component used by the wallet for key derivation and cryptographic functions.
2455
-
2456
- ```ts
2457
- keyDeriver: KeyDeriver
2458
- ```
2459
-
2460
- ###### Property monitor
2461
-
2462
- The background task `Monitor` component available to the wallet to offload tasks
2463
- that speed up wallet operations and maintain data integrity.
2464
-
2465
- ```ts
2466
- monitor: Monitor
2467
- ```
2468
- See also: [Monitor](./monitor.md#class-monitor)
2469
-
2470
- ###### Property rootKey
2471
-
2472
- The rootKey of the `KeyDeriver`. The private key from which other keys are derived.
2473
-
2474
- ```ts
2475
- rootKey: PrivateKey
2476
- ```
2477
-
2478
- ###### Property services
2479
-
2480
- The network `Services` component which provides the wallet with access to external services hosted
2481
- on the public network.
2482
-
2483
- ```ts
2484
- services: Services
2485
- ```
2486
- See also: [Services](./services.md#class-services)
2487
-
2488
- ###### Property storage
2489
-
2490
- The `WalletStorageManager` that manages all the configured storage providers (active and backups)
2491
- accessed by the wallet.
2492
-
2493
- ```ts
2494
- storage: WalletStorageManager
2495
- ```
2496
- See also: [WalletStorageManager](./storage.md#class-walletstoragemanager)
2497
-
2498
- ###### Property wallet
2499
-
2500
- The actual BRC-100 `Wallet` to which all the other properties and components contribute.
2501
-
2502
- Note that internally, the wallet is itself linked to all these properties and components.
2503
- They are included in this interface to facilitate access after wallet construction for
2504
- experimentation, testing and customization. Any changes made to the configuration of these
2505
- components after construction may disrupt the normal operation of the wallet.
2506
-
2507
- ```ts
2508
- wallet: Wallet
2509
- ```
2510
- See also: [Wallet](./client.md#class-wallet)
2511
-
2512
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2513
-
2514
- ---
2515
- ##### Interface: SetupWalletArgs
2516
-
2517
- Arguments used by `createWallet` to construct a `SetupWallet`.
2518
-
2519
- Extension `SetupWalletClientArgs` used by `createWalletClient` to construct a `SetupWalletClient`.
2520
-
2521
- Extension `SetupWalletKnexArgs` used by `createWalletKnex` to construct a `SetupWalletKnex`.
2522
-
2523
- Extension `SetupWalletMySQLArgs` used by `createWalletMySQL` to construct a `SetupWalletKnex`.
2524
-
2525
- Extension `SetupWalletSQLiteArgs` used by `createWalletSQLite` to construct a `SetupWalletKnex`.
2526
-
2527
- ```ts
2528
- export interface SetupWalletArgs {
2529
- env: SetupEnv;
2530
- rootKeyHex?: string;
2531
- privilegedKeyGetter?: () => Promise<PrivateKey>;
2532
- active?: sdk.WalletStorageProvider;
2533
- backups?: sdk.WalletStorageProvider[];
2534
- }
2535
- ```
2536
-
2537
- See also: [SetupEnv](./setup.md#interface-setupenv), [WalletStorageProvider](./client.md#interface-walletstorageprovider)
2538
-
2539
- ###### Property active
2540
-
2541
- Optional. Active wallet storage. Can be added later.
2542
-
2543
- ```ts
2544
- active?: sdk.WalletStorageProvider
2545
- ```
2546
- See also: [WalletStorageProvider](./client.md#interface-walletstorageprovider)
2547
-
2548
- ###### Property backups
2549
-
2550
- Optional. One or more storage providers managed as backup destinations. Can be added later.
2551
-
2552
- ```ts
2553
- backups?: sdk.WalletStorageProvider[]
2554
- ```
2555
- See also: [WalletStorageProvider](./client.md#interface-walletstorageprovider)
2556
-
2557
- ###### Property env
2558
-
2559
- Configuration "secrets" typically obtained by `Setup.makeEnv` and `Setup.getEnv` functions.
2560
-
2561
- ```ts
2562
- env: SetupEnv
2563
- ```
2564
- See also: [SetupEnv](./setup.md#interface-setupenv)
2565
-
2566
- ###### Property privilegedKeyGetter
2567
-
2568
- Optional. The privileged private key getter used to initialize the `PrivilegedKeyManager`.
2569
- Defaults to undefined.
2570
-
2571
- ```ts
2572
- privilegedKeyGetter?: () => Promise<PrivateKey>
2573
- ```
2574
-
2575
- ###### Property rootKeyHex
2576
-
2577
- Optional. The non-privileged private key used to initialize the `KeyDeriver` and determine the `identityKey`.
2578
- Defaults to `env.devKeys[env.identityKey]
2579
-
2580
- ```ts
2581
- rootKeyHex?: string
2582
- ```
2583
-
2584
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2585
-
2586
- ---
2587
- ##### Interface: SetupWalletClient
2588
-
2589
- Extension `SetupWalletClient` of `SetupWallet` is returned by `createWalletClient`
2590
-
2591
- ```ts
2592
- export interface SetupWalletClient extends SetupWallet {
2593
- endpointUrl: string;
2594
- }
2595
- ```
2596
-
2597
- See also: [SetupWallet](./setup.md#interface-setupwallet)
2598
-
2599
- ###### Property endpointUrl
2600
-
2601
- The endpoint URL of the service hosting the `StorageServer` JSON-RPC service to
2602
- which a `StorageClient` instance is connected to function as
2603
- the active storage provider of the wallet.
2604
-
2605
- ```ts
2606
- endpointUrl: string
2607
- ```
2608
-
2609
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2610
-
2611
- ---
2612
- ##### Interface: SetupWalletClientArgs
2613
-
2614
- Extension `SetupWalletClientArgs` of `SetupWalletArgs` is used by `createWalletClient`
2615
- to construct a `SetupWalletClient`.
2616
-
2617
- ```ts
2618
- export interface SetupWalletClientArgs extends SetupWalletArgs {
2619
- endpointUrl?: string;
2620
- }
2621
- ```
2622
-
2623
- See also: [SetupWalletArgs](./setup.md#interface-setupwalletargs)
2624
-
2625
- ###### Property endpointUrl
2626
-
2627
- The endpoint URL of a service hosting the `StorageServer` JSON-RPC service to
2628
- which a `StorageClient` instance should connect to function as
2629
- the active storage provider of the newly created wallet.
2630
-
2631
- ```ts
2632
- endpointUrl?: string
2633
- ```
2634
-
2635
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2636
-
2637
- ---
2638
- ##### Interface: SetupWalletKnex
2639
-
2640
- ```ts
2641
- export interface SetupWalletKnex extends SetupWallet {
2642
- activeStorage: StorageKnex;
2643
- userId: number;
2644
- rootKey: PrivateKey;
2645
- identityKey: string;
2646
- keyDeriver: KeyDeriver;
2647
- chain: sdk.Chain;
2648
- storage: WalletStorageManager;
2649
- services: Services;
2650
- monitor: Monitor;
2651
- wallet: Wallet;
2652
- }
2653
- ```
2654
-
2655
- See also: [Chain](./client.md#type-chain), [Monitor](./monitor.md#class-monitor), [Services](./services.md#class-services), [SetupWallet](./setup.md#interface-setupwallet), [StorageKnex](./storage.md#class-storageknex), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager)
2656
-
2657
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2658
-
2659
- ---
2660
- ##### Interface: SetupWalletKnexArgs
2661
-
2662
- ```ts
2663
- export interface SetupWalletKnexArgs extends SetupWalletArgs {
2664
- knex: Knex<any, any[]>;
2665
- databaseName: string;
2666
- }
2667
- ```
2668
-
2669
- See also: [SetupWalletArgs](./setup.md#interface-setupwalletargs)
2670
-
2671
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2672
-
2673
- ---
2674
- ##### Interface: SetupWalletMySQLArgs
2675
-
2676
- ```ts
2677
- export interface SetupWalletMySQLArgs extends SetupWalletArgs {
2678
- databaseName: string;
2433
+ derivationPrefix?: string;
2434
+ derivationSuffix?: string;
2435
+ keyDeriver: KeyDeriverApi;
2679
2436
  }
2680
2437
  ```
2681
2438
 
2682
- See also: [SetupWalletArgs](./setup.md#interface-setupwalletargs)
2683
-
2684
2439
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2685
2440
 
2686
2441
  ---
2687
- ##### Interface: SetupWalletSQLiteArgs
2442
+ ##### Interface: ScriptTemplateUnlock
2688
2443
 
2689
2444
  ```ts
2690
- export interface SetupWalletSQLiteArgs extends SetupWalletArgs {
2691
- filePath: string;
2692
- databaseName: string;
2445
+ export interface ScriptTemplateUnlock {
2446
+ sign: (tx: Transaction, inputIndex: number) => Promise<UnlockingScript>;
2447
+ estimateLength: (tx: Transaction, inputIndex: number) => Promise<number>;
2693
2448
  }
2694
2449
  ```
2695
2450
 
2696
- See also: [SetupWalletArgs](./setup.md#interface-setupwalletargs)
2697
-
2698
2451
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2699
2452
 
2700
2453
  ---
@@ -2806,7 +2559,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
2806
2559
  ##### Interface: StorageCreateTransactionSdkOutput
2807
2560
 
2808
2561
  ```ts
2809
- export interface StorageCreateTransactionSdkOutput extends sdk.ValidCreateActionOutput {
2562
+ export interface StorageCreateTransactionSdkOutput extends ValidCreateActionOutput {
2810
2563
  vout: number;
2811
2564
  providedBy: StorageProvidedBy;
2812
2565
  purpose?: string;
@@ -2989,27 +2742,6 @@ txid: string
2989
2742
 
2990
2743
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
2991
2744
 
2992
- ---
2993
- ##### Interface: StorageKnexOptions
2994
-
2995
- ```ts
2996
- export interface StorageKnexOptions extends StorageProviderOptions {
2997
- knex: Knex;
2998
- }
2999
- ```
3000
-
3001
- See also: [StorageProviderOptions](./storage.md#interface-storageprovideroptions)
3002
-
3003
- ###### Property knex
3004
-
3005
- Knex database interface initialized with valid connection configuration.
3006
-
3007
- ```ts
3008
- knex: Knex
3009
- ```
3010
-
3011
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
3012
-
3013
2745
  ---
3014
2746
  ##### Interface: StorageProcessActionArgs
3015
2747
 
@@ -3123,7 +2855,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
3123
2855
 
3124
2856
  ```ts
3125
2857
  export interface StorageSyncReaderOptions {
3126
- chain: sdk.Chain;
2858
+ chain: Chain;
3127
2859
  }
3128
2860
  ```
3129
2861
 
@@ -3776,7 +3508,7 @@ The following purge actions are available to support sustained operation:
3776
3508
  + proven_tx_reqs table delete records
3777
3509
 
3778
3510
  ```ts
3779
- export interface TaskPurgeParams extends sdk.PurgeParams {
3511
+ export interface TaskPurgeParams extends PurgeParams {
3780
3512
  }
3781
3513
  ```
3782
3514
 
@@ -4017,7 +3749,7 @@ export interface UpdateProvenTxReqWithNewProvenTxArgs {
4017
3749
  provenTxReqId: number;
4018
3750
  txid: string;
4019
3751
  attempts: number;
4020
- status: sdk.ProvenTxReqStatus;
3752
+ status: ProvenTxReqStatus;
4021
3753
  history: string;
4022
3754
  height: number;
4023
3755
  index: number;
@@ -4036,7 +3768,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
4036
3768
 
4037
3769
  ```ts
4038
3770
  export interface UpdateProvenTxReqWithNewProvenTxResult {
4039
- status: sdk.ProvenTxReqStatus;
3771
+ status: ProvenTxReqStatus;
4040
3772
  history: string;
4041
3773
  provenTxId: number;
4042
3774
  log?: string;
@@ -4589,7 +4321,7 @@ Defines standard interfaces to access functionality implemented by external tran
4589
4321
 
4590
4322
  ```ts
4591
4323
  export interface WalletServices {
4592
- chain: sdk.Chain;
4324
+ chain: Chain;
4593
4325
  getChainTracker(): Promise<ChainTracker>;
4594
4326
  getHeaderForHeight(height: number): Promise<number[]>;
4595
4327
  getHeight(): Promise<number>;
@@ -4599,22 +4331,22 @@ export interface WalletServices {
4599
4331
  getMerklePath(txid: string, useNext?: boolean): Promise<GetMerklePathResult>;
4600
4332
  postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult[]>;
4601
4333
  hashOutputScript(script: string): string;
4602
- getStatusForTxids(txids: string[], useNext?: boolean): Promise<sdk.GetStatusForTxidsResult>;
4334
+ getStatusForTxids(txids: string[], useNext?: boolean): Promise<GetStatusForTxidsResult>;
4603
4335
  getUtxoStatus(output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string, useNext?: boolean): Promise<GetUtxoStatusResult>;
4604
- getScriptHashHistory(hash: string, useNext?: boolean): Promise<sdk.GetScriptHashHistoryResult>;
4605
- hashToHeader(hash: string): Promise<sdk.BlockHeader>;
4336
+ getScriptHashHistory(hash: string, useNext?: boolean): Promise<GetScriptHashHistoryResult>;
4337
+ hashToHeader(hash: string): Promise<BlockHeader>;
4606
4338
  nLockTimeIsFinal(txOrLockTime: string | number[] | BsvTransaction | number): Promise<boolean>;
4607
4339
  }
4608
4340
  ```
4609
4341
 
4610
- See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [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)
4342
+ See also: [BlockHeader](./services.md#interface-blockheader), [Chain](./client.md#type-chain), [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)
4611
4343
 
4612
4344
  ###### Property chain
4613
4345
 
4614
4346
  The chain being serviced.
4615
4347
 
4616
4348
  ```ts
4617
- chain: sdk.Chain
4349
+ chain: Chain
4618
4350
  ```
4619
4351
  See also: [Chain](./client.md#type-chain)
4620
4352
 
@@ -4735,7 +4467,7 @@ Primarily useful for determining if a recently broadcast transaction is known to
4735
4467
  Also returns the current depth from chain tip if 'mined'.
4736
4468
 
4737
4469
  ```ts
4738
- getStatusForTxids(txids: string[], useNext?: boolean): Promise<sdk.GetStatusForTxidsResult>
4470
+ getStatusForTxids(txids: string[], useNext?: boolean): Promise<GetStatusForTxidsResult>
4739
4471
  ```
4740
4472
  See also: [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult)
4741
4473
 
@@ -4785,9 +4517,9 @@ Argument Details
4785
4517
  ###### Method hashToHeader
4786
4518
 
4787
4519
  ```ts
4788
- hashToHeader(hash: string): Promise<sdk.BlockHeader>
4520
+ hashToHeader(hash: string): Promise<BlockHeader>
4789
4521
  ```
4790
- See also: [BlockHeader](./client.md#interface-blockheader)
4522
+ See also: [BlockHeader](./services.md#interface-blockheader)
4791
4523
 
4792
4524
  Returns
4793
4525
 
@@ -4820,7 +4552,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
4820
4552
 
4821
4553
  ```ts
4822
4554
  export interface WalletServicesOptions {
4823
- chain: sdk.Chain;
4555
+ chain: Chain;
4824
4556
  taalApiKey?: string;
4825
4557
  bitailsApiKey?: string;
4826
4558
  whatsOnChainApiKey?: string;
@@ -4875,7 +4607,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
4875
4607
  ```ts
4876
4608
  export interface WalletSigner {
4877
4609
  isWalletSigner: true;
4878
- chain: sdk.Chain;
4610
+ chain: Chain;
4879
4611
  keyDeriver: KeyDeriverApi;
4880
4612
  }
4881
4613
  ```
@@ -4900,24 +4632,24 @@ export interface WalletStorage {
4900
4632
  makeAvailable(): Promise<TableSettings>;
4901
4633
  migrate(storageName: string, storageIdentityKey: string): Promise<string>;
4902
4634
  destroy(): Promise<void>;
4903
- setServices(v: sdk.WalletServices): void;
4904
- getServices(): sdk.WalletServices;
4635
+ setServices(v: WalletServices): void;
4636
+ getServices(): WalletServices;
4905
4637
  getSettings(): TableSettings;
4906
- getAuth(): Promise<sdk.AuthId>;
4638
+ getAuth(): Promise<AuthId>;
4907
4639
  findOrInsertUser(identityKey: string): Promise<{
4908
4640
  user: TableUser;
4909
4641
  isNew: boolean;
4910
4642
  }>;
4911
4643
  abortAction(args: AbortActionArgs): Promise<AbortActionResult>;
4912
- createAction(args: sdk.ValidCreateActionArgs): Promise<sdk.StorageCreateActionResult>;
4913
- processAction(args: sdk.StorageProcessActionArgs): Promise<sdk.StorageProcessActionResults>;
4644
+ createAction(args: ValidCreateActionArgs): Promise<StorageCreateActionResult>;
4645
+ processAction(args: StorageProcessActionArgs): Promise<StorageProcessActionResults>;
4914
4646
  internalizeAction(args: InternalizeActionArgs): Promise<InternalizeActionResult>;
4915
- findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>;
4916
- findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>;
4917
- findOutputs(args: sdk.FindOutputsArgs): Promise<TableOutput[]>;
4918
- findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>;
4647
+ findCertificates(args: FindCertificatesArgs): Promise<TableCertificateX[]>;
4648
+ findOutputBaskets(args: FindOutputBasketsArgs): Promise<TableOutputBasket[]>;
4649
+ findOutputs(args: FindOutputsArgs): Promise<TableOutput[]>;
4650
+ findProvenTxReqs(args: FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>;
4919
4651
  listActions(args: ListActionsArgs): Promise<ListActionsResult>;
4920
- listCertificates(args: sdk.ValidListCertificatesArgs): Promise<ListCertificatesResult>;
4652
+ listCertificates(args: ValidListCertificatesArgs): Promise<ListCertificatesResult>;
4921
4653
  listOutputs(args: ListOutputsArgs): Promise<ListOutputsResult>;
4922
4654
  insertCertificate(certificate: TableCertificateX): Promise<number>;
4923
4655
  relinquishCertificate(args: RelinquishCertificateArgs): Promise<number>;
@@ -4948,7 +4680,7 @@ is the actual minimal interface implemented by storage and remoted storage provi
4948
4680
  ```ts
4949
4681
  export interface WalletStorageProvider extends WalletStorageSync {
4950
4682
  isStorageProvider(): boolean;
4951
- setServices(v: sdk.WalletServices): void;
4683
+ setServices(v: WalletServices): void;
4952
4684
  }
4953
4685
  ```
4954
4686
 
@@ -4972,15 +4704,15 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
4972
4704
  ```ts
4973
4705
  export interface WalletStorageReader {
4974
4706
  isAvailable(): boolean;
4975
- getServices(): sdk.WalletServices;
4707
+ getServices(): WalletServices;
4976
4708
  getSettings(): TableSettings;
4977
- findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>;
4978
- findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>;
4979
- findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<TableOutput[]>;
4980
- findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>;
4981
- listActions(auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>;
4982
- listCertificates(auth: sdk.AuthId, vargs: sdk.ValidListCertificatesArgs): Promise<ListCertificatesResult>;
4983
- listOutputs(auth: sdk.AuthId, vargs: sdk.ValidListOutputsArgs): Promise<ListOutputsResult>;
4709
+ findCertificatesAuth(auth: AuthId, args: FindCertificatesArgs): Promise<TableCertificateX[]>;
4710
+ findOutputBasketsAuth(auth: AuthId, args: FindOutputBasketsArgs): Promise<TableOutputBasket[]>;
4711
+ findOutputsAuth(auth: AuthId, args: FindOutputsArgs): Promise<TableOutput[]>;
4712
+ findProvenTxReqs(args: FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>;
4713
+ listActions(auth: AuthId, vargs: ValidListActionsArgs): Promise<ListActionsResult>;
4714
+ listCertificates(auth: AuthId, vargs: ValidListCertificatesArgs): Promise<ListCertificatesResult>;
4715
+ listOutputs(auth: AuthId, vargs: ValidListOutputsArgs): Promise<ListOutputsResult>;
4984
4716
  }
4985
4717
  ```
4986
4718
 
@@ -4988,34 +4720,18 @@ See also: [AuthId](./client.md#interface-authid), [FindCertificatesArgs](./clien
4988
4720
 
4989
4721
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
4990
4722
 
4991
- ---
4992
- ##### Interface: WalletStorageServerOptions
4993
-
4994
- ```ts
4995
- export interface WalletStorageServerOptions {
4996
- port: number;
4997
- wallet: Wallet;
4998
- monetize: boolean;
4999
- calculateRequestPrice?: (req: Request) => number | Promise<number>;
5000
- }
5001
- ```
5002
-
5003
- See also: [Wallet](./client.md#class-wallet)
5004
-
5005
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5006
-
5007
4723
  ---
5008
4724
  ##### Interface: WalletStorageSync
5009
4725
 
5010
4726
  ```ts
5011
4727
  export interface WalletStorageSync extends WalletStorageWriter {
5012
- findOrInsertSyncStateAuth(auth: sdk.AuthId, storageIdentityKey: string, storageName: string): Promise<{
4728
+ findOrInsertSyncStateAuth(auth: AuthId, storageIdentityKey: string, storageName: string): Promise<{
5013
4729
  syncState: TableSyncState;
5014
4730
  isNew: boolean;
5015
4731
  }>;
5016
- setActive(auth: sdk.AuthId, newActiveStorageIdentityKey: string): Promise<number>;
5017
- getSyncChunk(args: sdk.RequestSyncChunkArgs): Promise<sdk.SyncChunk>;
5018
- processSyncChunk(args: sdk.RequestSyncChunkArgs, chunk: sdk.SyncChunk): Promise<sdk.ProcessSyncChunkResult>;
4732
+ setActive(auth: AuthId, newActiveStorageIdentityKey: string): Promise<number>;
4733
+ getSyncChunk(args: RequestSyncChunkArgs): Promise<SyncChunk>;
4734
+ processSyncChunk(args: RequestSyncChunkArgs, chunk: SyncChunk): Promise<ProcessSyncChunkResult>;
5019
4735
  }
5020
4736
  ```
5021
4737
 
@@ -5026,7 +4742,7 @@ See also: [AuthId](./client.md#interface-authid), [ProcessSyncChunkResult](./cli
5026
4742
  Updagte the `activeStorage` property of the authenticated user by their `userId`.
5027
4743
 
5028
4744
  ```ts
5029
- setActive(auth: sdk.AuthId, newActiveStorageIdentityKey: string): Promise<number>
4745
+ setActive(auth: AuthId, newActiveStorageIdentityKey: string): Promise<number>
5030
4746
  ```
5031
4747
  See also: [AuthId](./client.md#interface-authid)
5032
4748
 
@@ -5060,13 +4776,13 @@ export interface WalletStorageWriter extends WalletStorageReader {
5060
4776
  user: TableUser;
5061
4777
  isNew: boolean;
5062
4778
  }>;
5063
- abortAction(auth: sdk.AuthId, args: AbortActionArgs): Promise<AbortActionResult>;
5064
- createAction(auth: sdk.AuthId, args: sdk.ValidCreateActionArgs): Promise<sdk.StorageCreateActionResult>;
5065
- processAction(auth: sdk.AuthId, args: sdk.StorageProcessActionArgs): Promise<sdk.StorageProcessActionResults>;
5066
- internalizeAction(auth: sdk.AuthId, args: InternalizeActionArgs): Promise<InternalizeActionResult>;
5067
- insertCertificateAuth(auth: sdk.AuthId, certificate: TableCertificateX): Promise<number>;
5068
- relinquishCertificate(auth: sdk.AuthId, args: RelinquishCertificateArgs): Promise<number>;
5069
- relinquishOutput(auth: sdk.AuthId, args: RelinquishOutputArgs): Promise<number>;
4779
+ abortAction(auth: AuthId, args: AbortActionArgs): Promise<AbortActionResult>;
4780
+ createAction(auth: AuthId, args: ValidCreateActionArgs): Promise<StorageCreateActionResult>;
4781
+ processAction(auth: AuthId, args: StorageProcessActionArgs): Promise<StorageProcessActionResults>;
4782
+ internalizeAction(auth: AuthId, args: InternalizeActionArgs): Promise<InternalizeActionResult>;
4783
+ insertCertificateAuth(auth: AuthId, certificate: TableCertificateX): Promise<number>;
4784
+ relinquishCertificate(auth: AuthId, args: RelinquishCertificateArgs): Promise<number>;
4785
+ relinquishOutput(auth: AuthId, args: RelinquishOutputArgs): Promise<number>;
5070
4786
  }
5071
4787
  ```
5072
4788
 
@@ -5107,31 +4823,29 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
5107
4823
 
5108
4824
  | | | |
5109
4825
  | --- | --- | --- |
5110
- | [ARC](#class-arc) | [PrivilegedKeyManager](#class-privilegedkeymanager) | [WABClient](#class-wabclient) |
5111
- | [AuthMethodInteractor](#class-authmethodinteractor) | [ScriptTemplateBRC29](#class-scripttemplatebrc29) | [WERR_BAD_REQUEST](#class-werr_bad_request) |
5112
- | [Bitails](#class-bitails) | [SdkWhatsOnChain](#class-sdkwhatsonchain) | [WERR_BROADCAST_UNAVAILABLE](#class-werr_broadcast_unavailable) |
5113
- | [CWIStyleWalletManager](#class-cwistylewalletmanager) | [ServiceCollection](#class-servicecollection) | [WERR_INSUFFICIENT_FUNDS](#class-werr_insufficient_funds) |
5114
- | [EntityBase](#class-entitybase) | [Services](#class-services) | [WERR_INTERNAL](#class-werr_internal) |
5115
- | [EntityCertificate](#class-entitycertificate) | [Setup](#class-setup) | [WERR_INVALID_OPERATION](#class-werr_invalid_operation) |
5116
- | [EntityCertificateField](#class-entitycertificatefield) | [SimpleWalletManager](#class-simplewalletmanager) | [WERR_INVALID_PARAMETER](#class-werr_invalid_parameter) |
5117
- | [EntityCommission](#class-entitycommission) | [StorageClient](#class-storageclient) | [WERR_INVALID_PUBLIC_KEY](#class-werr_invalid_public_key) |
5118
- | [EntityOutput](#class-entityoutput) | [StorageKnex](#class-storageknex) | [WERR_MISSING_PARAMETER](#class-werr_missing_parameter) |
5119
- | [EntityOutputBasket](#class-entityoutputbasket) | [StorageProvider](#class-storageprovider) | [WERR_NETWORK_CHAIN](#class-werr_network_chain) |
5120
- | [EntityOutputTag](#class-entityoutputtag) | [StorageReader](#class-storagereader) | [WERR_NOT_ACTIVE](#class-werr_not_active) |
5121
- | [EntityOutputTagMap](#class-entityoutputtagmap) | [StorageReaderWriter](#class-storagereaderwriter) | [WERR_NOT_IMPLEMENTED](#class-werr_not_implemented) |
5122
- | [EntityProvenTx](#class-entityproventx) | [StorageServer](#class-storageserver) | [WERR_REVIEW_ACTIONS](#class-werr_review_actions) |
5123
- | [EntityProvenTxReq](#class-entityproventxreq) | [StorageSyncReader](#class-storagesyncreader) | [WERR_UNAUTHORIZED](#class-werr_unauthorized) |
5124
- | [EntitySyncState](#class-entitysyncstate) | [TaskCheckForProofs](#class-taskcheckforproofs) | [Wallet](#class-wallet) |
5125
- | [EntityTransaction](#class-entitytransaction) | [TaskCheckNoSends](#class-taskchecknosends) | [WalletAuthenticationManager](#class-walletauthenticationmanager) |
5126
- | [EntityTxLabel](#class-entitytxlabel) | [TaskClock](#class-taskclock) | [WalletError](#class-walleterror) |
5127
- | [EntityTxLabelMap](#class-entitytxlabelmap) | [TaskFailAbandoned](#class-taskfailabandoned) | [WalletMonitorTask](#class-walletmonitortask) |
5128
- | [EntityUser](#class-entityuser) | [TaskNewHeader](#class-tasknewheader) | [WalletPermissionsManager](#class-walletpermissionsmanager) |
5129
- | [KnexMigrations](#class-knexmigrations) | [TaskPurge](#class-taskpurge) | [WalletSettingsManager](#class-walletsettingsmanager) |
5130
- | [MergeEntity](#class-mergeentity) | [TaskReviewStatus](#class-taskreviewstatus) | [WalletSigner](#class-walletsigner) |
5131
- | [Monitor](#class-monitor) | [TaskSendWaiting](#class-tasksendwaiting) | [WalletStorageManager](#class-walletstoragemanager) |
5132
- | [MonitorDaemon](#class-monitordaemon) | [TaskSyncWhenIdle](#class-tasksyncwhenidle) | [WhatsOnChain](#class-whatsonchain) |
5133
- | [OverlayUMPTokenInteractor](#class-overlayumptokeninteractor) | [TaskUnFail](#class-taskunfail) | [localKVStore](#class-localkvstore) |
5134
- | [PersonaIDInteractor](#class-personaidinteractor) | [TwilioPhoneInteractor](#class-twiliophoneinteractor) | |
4826
+ | [ARC](#class-arc) | [PrivilegedKeyManager](#class-privilegedkeymanager) | [WERR_BROADCAST_UNAVAILABLE](#class-werr_broadcast_unavailable) |
4827
+ | [AuthMethodInteractor](#class-authmethodinteractor) | [ScriptTemplateBRC29](#class-scripttemplatebrc29) | [WERR_INSUFFICIENT_FUNDS](#class-werr_insufficient_funds) |
4828
+ | [Bitails](#class-bitails) | [SdkWhatsOnChain](#class-sdkwhatsonchain) | [WERR_INTERNAL](#class-werr_internal) |
4829
+ | [CWIStyleWalletManager](#class-cwistylewalletmanager) | [ServiceCollection](#class-servicecollection) | [WERR_INVALID_OPERATION](#class-werr_invalid_operation) |
4830
+ | [EntityBase](#class-entitybase) | [Services](#class-services) | [WERR_INVALID_PARAMETER](#class-werr_invalid_parameter) |
4831
+ | [EntityCertificate](#class-entitycertificate) | [SimpleWalletManager](#class-simplewalletmanager) | [WERR_INVALID_PUBLIC_KEY](#class-werr_invalid_public_key) |
4832
+ | [EntityCertificateField](#class-entitycertificatefield) | [StorageClient](#class-storageclient) | [WERR_MISSING_PARAMETER](#class-werr_missing_parameter) |
4833
+ | [EntityCommission](#class-entitycommission) | [StorageProvider](#class-storageprovider) | [WERR_NETWORK_CHAIN](#class-werr_network_chain) |
4834
+ | [EntityOutput](#class-entityoutput) | [StorageReader](#class-storagereader) | [WERR_NOT_ACTIVE](#class-werr_not_active) |
4835
+ | [EntityOutputBasket](#class-entityoutputbasket) | [StorageReaderWriter](#class-storagereaderwriter) | [WERR_NOT_IMPLEMENTED](#class-werr_not_implemented) |
4836
+ | [EntityOutputTag](#class-entityoutputtag) | [StorageSyncReader](#class-storagesyncreader) | [WERR_REVIEW_ACTIONS](#class-werr_review_actions) |
4837
+ | [EntityOutputTagMap](#class-entityoutputtagmap) | [TaskCheckForProofs](#class-taskcheckforproofs) | [WERR_UNAUTHORIZED](#class-werr_unauthorized) |
4838
+ | [EntityProvenTx](#class-entityproventx) | [TaskCheckNoSends](#class-taskchecknosends) | [Wallet](#class-wallet) |
4839
+ | [EntityProvenTxReq](#class-entityproventxreq) | [TaskClock](#class-taskclock) | [WalletAuthenticationManager](#class-walletauthenticationmanager) |
4840
+ | [EntitySyncState](#class-entitysyncstate) | [TaskFailAbandoned](#class-taskfailabandoned) | [WalletError](#class-walleterror) |
4841
+ | [EntityTransaction](#class-entitytransaction) | [TaskNewHeader](#class-tasknewheader) | [WalletMonitorTask](#class-walletmonitortask) |
4842
+ | [EntityTxLabel](#class-entitytxlabel) | [TaskPurge](#class-taskpurge) | [WalletPermissionsManager](#class-walletpermissionsmanager) |
4843
+ | [EntityTxLabelMap](#class-entitytxlabelmap) | [TaskReviewStatus](#class-taskreviewstatus) | [WalletSettingsManager](#class-walletsettingsmanager) |
4844
+ | [EntityUser](#class-entityuser) | [TaskSendWaiting](#class-tasksendwaiting) | [WalletSigner](#class-walletsigner) |
4845
+ | [MergeEntity](#class-mergeentity) | [TaskSyncWhenIdle](#class-tasksyncwhenidle) | [WalletStorageManager](#class-walletstoragemanager) |
4846
+ | [Monitor](#class-monitor) | [TwilioPhoneInteractor](#class-twiliophoneinteractor) | [WhatsOnChain](#class-whatsonchain) |
4847
+ | [OverlayUMPTokenInteractor](#class-overlayumptokeninteractor) | [WABClient](#class-wabclient) | |
4848
+ | [PersonaIDInteractor](#class-personaidinteractor) | [WERR_BAD_REQUEST](#class-werr_bad_request) | |
5135
4849
 
5136
4850
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
5137
4851
 
@@ -6569,76 +6283,6 @@ See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage
6569
6283
 
6570
6284
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
6571
6285
 
6572
- ---
6573
- ##### Class: KnexMigrations
6574
-
6575
- ```ts
6576
- export class KnexMigrations implements MigrationSource<string> {
6577
- migrations: Record<string, Migration> = {};
6578
- constructor(public chain: sdk.Chain, public storageName: string, public storageIdentityKey: string, public maxOutputScriptLength: number)
6579
- async getMigrations(): Promise<string[]>
6580
- getMigrationName(migration: string)
6581
- async getMigration(migration: string): Promise<Migration>
6582
- async getLatestMigration(): Promise<string>
6583
- static async latestMigration(): Promise<string>
6584
- setupMigrations(chain: string, storageName: string, storageIdentityKey: string, maxOutputScriptLength: number): Record<string, Migration>
6585
- static async dbtype(knex: Knex<any, any[]>): Promise<DBType> {
6586
- try {
6587
- const q = `SELECT
6588
- CASE
6589
- WHEN (SELECT VERSION() LIKE '%MariaDB%') = 1 THEN 'Unknown'
6590
- WHEN (SELECT VERSION()) IS NOT NULL THEN 'MySQL'
6591
- ELSE 'Unknown'
6592
- END AS database_type;`;
6593
- let r = await knex.raw(q);
6594
- if (!r[0]["database_type"])
6595
- r = r[0];
6596
- if (r["rows"])
6597
- r = r.rows;
6598
- const dbtype: "SQLite" | "MySQL" | "Unknown" = r[0].database_type;
6599
- if (dbtype === "Unknown")
6600
- throw new sdk.WERR_NOT_IMPLEMENTED(`Attempting to create database on unsuported engine.`);
6601
- return dbtype;
6602
- }
6603
- catch (eu: unknown) {
6604
- const e = sdk.WalletError.fromUnknown(eu);
6605
- if (e.code === "SQLITE_ERROR")
6606
- return "SQLite";
6607
- throw new sdk.WERR_NOT_IMPLEMENTED(`Attempting to create database on unsuported engine.`);
6608
- }
6609
- }
6610
- }
6611
- ```
6612
-
6613
- See also: [Chain](./client.md#type-chain), [DBType](./storage.md#type-dbtype), [WERR_NOT_IMPLEMENTED](./client.md#class-werr_not_implemented), [WalletError](./client.md#class-walleterror)
6614
-
6615
- ###### Constructor
6616
-
6617
- ```ts
6618
- constructor(public chain: sdk.Chain, public storageName: string, public storageIdentityKey: string, public maxOutputScriptLength: number)
6619
- ```
6620
- See also: [Chain](./client.md#type-chain)
6621
-
6622
- Argument Details
6623
-
6624
- + **storageName**
6625
- + human readable name for this storage instance
6626
- + **maxOutputScriptLength**
6627
- + limit for scripts kept in outputs table, longer scripts will be pulled from rawTx
6628
-
6629
- ###### Method dbtype
6630
-
6631
- ```ts
6632
- static async dbtype(knex: Knex<any, any[]>): Promise<DBType>
6633
- ```
6634
- See also: [DBType](./storage.md#type-dbtype)
6635
-
6636
- Returns
6637
-
6638
- connected database engine variant
6639
-
6640
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
6641
-
6642
6286
  ---
6643
6287
  ##### Class: MergeEntity
6644
6288
 
@@ -6727,7 +6371,7 @@ export class Monitor {
6727
6371
  }
6728
6372
  ```
6729
6373
 
6730
- See also: [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [MonitorOptions](./monitor.md#interface-monitoroptions), [MonitorStorage](./monitor.md#type-monitorstorage), [Services](./services.md#class-services), [TaskPurgeParams](./monitor.md#interface-taskpurgeparams), [WalletMonitorTask](./monitor.md#class-walletmonitortask)
6374
+ See also: [BlockHeader](./services.md#interface-blockheader), [Chain](./client.md#type-chain), [MonitorOptions](./monitor.md#interface-monitoroptions), [MonitorStorage](./monitor.md#type-monitorstorage), [Services](./services.md#class-services), [TaskPurgeParams](./monitor.md#interface-taskpurgeparams), [WalletMonitorTask](./monitor.md#class-walletmonitortask)
6731
6375
 
6732
6376
  ###### Property _otherTasks
6733
6377
 
@@ -6774,7 +6418,7 @@ Kicks processing 'unconfirmed' and 'unmined' request processing.
6774
6418
  ```ts
6775
6419
  processNewBlockHeader(header: BlockHeader): void
6776
6420
  ```
6777
- See also: [BlockHeader](./client.md#interface-blockheader)
6421
+ See also: [BlockHeader](./services.md#interface-blockheader)
6778
6422
 
6779
6423
  ###### Method processReorg
6780
6424
 
@@ -6790,29 +6434,7 @@ Coinbase transactions always become invalid.
6790
6434
  ```ts
6791
6435
  processReorg(depth: number, oldTip: BlockHeader, newTip: BlockHeader): void
6792
6436
  ```
6793
- See also: [BlockHeader](./client.md#interface-blockheader)
6794
-
6795
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
6796
-
6797
- ---
6798
- ##### Class: MonitorDaemon
6799
-
6800
- ```ts
6801
- export class MonitorDaemon {
6802
- setup?: MonitorDaemonSetup;
6803
- doneListening?: Promise<void>;
6804
- doneTasks?: Promise<void>;
6805
- stopDaemon: boolean = false;
6806
- constructor(public args: MonitorDaemonSetup, public noRunTasks?: boolean)
6807
- async createSetup(): Promise<void>
6808
- async start(): Promise<void>
6809
- async stop(): Promise<void>
6810
- async destroy(): Promise<void>
6811
- async runDaemon(): Promise<void>
6812
- }
6813
- ```
6814
-
6815
- See also: [MonitorDaemonSetup](./monitor.md#interface-monitordaemonsetup)
6437
+ See also: [BlockHeader](./services.md#interface-blockheader)
6816
6438
 
6817
6439
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
6818
6440
 
@@ -7125,7 +6747,7 @@ export class Services implements sdk.WalletServices {
7125
6747
  }
7126
6748
  ```
7127
6749
 
7128
- See also: [ARC](./services.md#class-arc), [Bitails](./services.md#class-bitails), [BlockHeader](./client.md#interface-blockheader), [Chain](./client.md#type-chain), [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), [UpdateFiatExchangeRateService](./client.md#type-updatefiatexchangerateservice), [WalletServices](./client.md#interface-walletservices), [WalletServicesOptions](./client.md#interface-walletservicesoptions), [WhatsOnChain](./services.md#class-whatsonchain)
6750
+ See also: [ARC](./services.md#class-arc), [Bitails](./services.md#class-bitails), [BlockHeader](./services.md#interface-blockheader), [Chain](./client.md#type-chain), [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), [UpdateFiatExchangeRateService](./client.md#type-updatefiatexchangerateservice), [WalletServices](./client.md#interface-walletservices), [WalletServicesOptions](./client.md#interface-walletservicesoptions), [WhatsOnChain](./services.md#class-whatsonchain)
7129
6751
 
7130
6752
  ###### Method hashOutputScript
7131
6753
 
@@ -7144,453 +6766,6 @@ Argument Details
7144
6766
 
7145
6767
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
7146
6768
 
7147
- ---
7148
- ##### Class: Setup
7149
-
7150
- The 'Setup` class provides static setup functions to construct BRC-100 compatible
7151
- wallets in a variety of configurations.
7152
-
7153
- It serves as a starting point for experimentation and customization.
7154
-
7155
- ```ts
7156
- export abstract class Setup {
7157
- static noEnv(chain: sdk.Chain): boolean
7158
- static makeEnv(): string {
7159
- const testPrivKey1 = PrivateKey.fromRandom();
7160
- const testIdentityKey1 = testPrivKey1.toPublicKey().toString();
7161
- const testPrivKey2 = PrivateKey.fromRandom();
7162
- const testIdentityKey2 = testPrivKey2.toPublicKey().toString();
7163
- const mainPrivKey1 = PrivateKey.fromRandom();
7164
- const mainIdentityKey1 = mainPrivKey1.toPublicKey().toString();
7165
- const mainPrivKey2 = PrivateKey.fromRandom();
7166
- const mainIdentityKey2 = mainPrivKey2.toPublicKey().toString();
7167
- const log = `
7168
- # .env file template for working with wallet-toolbox Setup functions.
7169
- MY_TEST_IDENTITY = '${testIdentityKey1}'
7170
- MY_TEST_IDENTITY2 = '${testIdentityKey2}'
7171
- MY_MAIN_IDENTITY = '${mainIdentityKey1}'
7172
- MY_MAIN_IDENTITY2 = '${mainIdentityKey2}'
7173
- MAIN_TAAL_API_KEY='mainnet_9596de07e92300c6287e4393594ae39c'
7174
- TEST_TAAL_API_KEY='testnet_0e6cf72133b43ea2d7861da2a38684e3'
7175
- MYSQL_CONNECTION='{"port":3306,"host":"127.0.0.1","user":"root","password":"your_password","database":"your_database", "timezone": "Z"}'
7176
- DEV_KEYS = '{
7177
- "${testIdentityKey1}": "${testPrivKey1.toString()}",
7178
- "${testIdentityKey2}": "${testPrivKey2.toString()}",
7179
- "${mainIdentityKey1}": "${mainPrivKey1.toString()}",
7180
- "${mainIdentityKey2}": "${mainPrivKey2.toString()}"
7181
- }'
7182
- `;
7183
- console.log(log);
7184
- return log;
7185
- }
7186
- static getEnv(chain: sdk.Chain): SetupEnv {
7187
- const identityKey = chain === "main" ? process.env.MY_MAIN_IDENTITY : process.env.MY_TEST_IDENTITY;
7188
- const identityKey2 = chain === "main" ? process.env.MY_MAIN_IDENTITY2 : process.env.MY_TEST_IDENTITY2;
7189
- const filePath = chain === "main" ? process.env.MY_MAIN_FILEPATH : process.env.MY_TEST_FILEPATH;
7190
- const DEV_KEYS = process.env.DEV_KEYS || "{}";
7191
- const mySQLConnection = process.env.MYSQL_CONNECTION || "{}";
7192
- const taalApiKey = verifyTruthy(chain === "main" ? process.env.MAIN_TAAL_API_KEY : process.env.TEST_TAAL_API_KEY, `.env value for '${chain.toUpperCase()}_TAAL_API_KEY' is required.`);
7193
- if (!identityKey || !identityKey2)
7194
- throw new sdk.WERR_INVALID_OPERATION(".env is not a valid SetupEnv configuration.");
7195
- return {
7196
- chain,
7197
- identityKey,
7198
- identityKey2,
7199
- filePath,
7200
- taalApiKey,
7201
- devKeys: JSON.parse(DEV_KEYS) as Record<string, string>,
7202
- mySQLConnection
7203
- };
7204
- }
7205
- static async createWallet(args: SetupWalletArgs): Promise<SetupWallet> {
7206
- const chain = args.env.chain;
7207
- args.rootKeyHex ||= args.env.devKeys[args.env.identityKey];
7208
- const rootKey = PrivateKey.fromHex(args.rootKeyHex);
7209
- const identityKey = rootKey.toPublicKey().toString();
7210
- const keyDeriver = new KeyDeriver(rootKey);
7211
- const storage = new WalletStorageManager(identityKey, args.active, args.backups);
7212
- if (storage.canMakeAvailable())
7213
- await storage.makeAvailable();
7214
- const serviceOptions = Services.createDefaultOptions(chain);
7215
- serviceOptions.taalApiKey = args.env.taalApiKey;
7216
- const services = new Services(serviceOptions);
7217
- const monopts = Monitor.createDefaultWalletMonitorOptions(chain, storage, services);
7218
- const monitor = new Monitor(monopts);
7219
- monitor.addDefaultTasks();
7220
- const privilegedKeyManager = args.privilegedKeyGetter
7221
- ? new sdk.PrivilegedKeyManager(args.privilegedKeyGetter)
7222
- : undefined;
7223
- const wallet = new Wallet({
7224
- chain,
7225
- keyDeriver,
7226
- storage,
7227
- services,
7228
- monitor,
7229
- privilegedKeyManager
7230
- });
7231
- const r: SetupWallet = {
7232
- rootKey,
7233
- identityKey,
7234
- keyDeriver,
7235
- chain,
7236
- storage,
7237
- services,
7238
- monitor,
7239
- wallet
7240
- };
7241
- return r;
7242
- }
7243
- static async createWalletClientNoEnv(args: {
7244
- chain: sdk.Chain;
7245
- rootKeyHex: string;
7246
- storageUrl?: string;
7247
- privilegedKeyGetter?: () => Promise<PrivateKey>;
7248
- }): Promise<Wallet>
7249
- static async createWalletClient(args: SetupWalletClientArgs): Promise<SetupWalletClient> {
7250
- const wo = await Setup.createWallet(args);
7251
- const endpointUrl = args.endpointUrl || `https://${args.env.chain !== "main" ? "staging-" : ""}storage.babbage.systems`;
7252
- const client = new StorageClient(wo.wallet, endpointUrl);
7253
- await wo.storage.addWalletStorageProvider(client);
7254
- await wo.storage.makeAvailable();
7255
- return {
7256
- ...wo,
7257
- endpointUrl
7258
- };
7259
- }
7260
- static getKeyPair(priv?: string | PrivateKey): KeyPairAddress {
7261
- if (priv === undefined)
7262
- priv = PrivateKey.fromRandom();
7263
- else if (typeof priv === "string")
7264
- priv = new PrivateKey(priv, "hex");
7265
- const pub = PublicKey.fromPrivateKey(priv);
7266
- const address = pub.toAddress();
7267
- return { privateKey: priv, publicKey: pub, address };
7268
- }
7269
- static getLockP2PKH(address: string): LockingScript {
7270
- const p2pkh = new P2PKH();
7271
- const lock = p2pkh.lock(address);
7272
- return lock;
7273
- }
7274
- static getUnlockP2PKH(priv: PrivateKey, satoshis: number): sdk.ScriptTemplateUnlock {
7275
- const p2pkh = new P2PKH();
7276
- const lock = Setup.getLockP2PKH(Setup.getKeyPair(priv).address);
7277
- const unlock = p2pkh.unlock(priv, "all", false, satoshis, lock);
7278
- return unlock;
7279
- }
7280
- static createP2PKHOutputs(outputs: {
7281
- address: string;
7282
- satoshis: number;
7283
- outputDescription?: string;
7284
- basket?: string;
7285
- tags?: string[];
7286
- }[]): CreateActionOutput[] {
7287
- const os: CreateActionOutput[] = [];
7288
- const count = outputs.length;
7289
- for (let i = 0; i < count; i++) {
7290
- const o = outputs[i];
7291
- os.push({
7292
- basket: o.basket,
7293
- tags: o.tags,
7294
- satoshis: o.satoshis,
7295
- lockingScript: Setup.getLockP2PKH(o.address).toHex(),
7296
- outputDescription: o.outputDescription || `p2pkh ${i}`
7297
- });
7298
- }
7299
- return os;
7300
- }
7301
- static async createP2PKHOutputsAction(wallet: WalletInterface, outputs: {
7302
- address: string;
7303
- satoshis: number;
7304
- outputDescription?: string;
7305
- basket?: string;
7306
- tags?: string[];
7307
- }[], options?: CreateActionOptions): Promise<{
7308
- cr: CreateActionResult;
7309
- outpoints: string[] | undefined;
7310
- }> {
7311
- const os = Setup.createP2PKHOutputs(outputs);
7312
- const createArgs: CreateActionArgs = {
7313
- description: `createP2PKHOutputs`,
7314
- outputs: os,
7315
- options: {
7316
- ...options,
7317
- randomizeOutputs: false
7318
- }
7319
- };
7320
- const cr = await wallet.createAction(createArgs);
7321
- let outpoints: string[] | undefined;
7322
- if (cr.txid) {
7323
- outpoints = os.map((o, i) => `${cr.txid}.${i}`);
7324
- }
7325
- return { cr, outpoints };
7326
- }
7327
- static async fundWalletFromP2PKHOutpoints(wallet: WalletInterface, outpoints: string[], p2pkhKey: KeyPairAddress, inputBEEF?: BEEF) {
7328
- }
7329
- static async createWalletKnex(args: SetupWalletKnexArgs): Promise<SetupWalletKnex> {
7330
- const wo = await Setup.createWallet(args);
7331
- const activeStorage = await Setup.createStorageKnex(args);
7332
- await wo.storage.addWalletStorageProvider(activeStorage);
7333
- const { user, isNew } = await activeStorage.findOrInsertUser(wo.identityKey);
7334
- const userId = user.userId;
7335
- const r: SetupWalletKnex = {
7336
- ...wo,
7337
- activeStorage,
7338
- userId
7339
- };
7340
- return r;
7341
- }
7342
- static async createStorageKnex(args: SetupWalletKnexArgs): Promise<StorageKnex>
7343
- static createSQLiteKnex(filename: string): Knex {
7344
- const config: Knex.Config = {
7345
- client: "sqlite3",
7346
- connection: { filename },
7347
- useNullAsDefault: true
7348
- };
7349
- const knex = makeKnex(config);
7350
- return knex;
7351
- }
7352
- static createMySQLKnex(connection: string, database?: string): Knex {
7353
- const c: Knex.MySql2ConnectionConfig = JSON.parse(connection);
7354
- if (database) {
7355
- c.database = database;
7356
- }
7357
- const config: Knex.Config = {
7358
- client: "mysql2",
7359
- connection: c,
7360
- useNullAsDefault: true,
7361
- pool: { min: 0, max: 7, idleTimeoutMillis: 15000 }
7362
- };
7363
- const knex = makeKnex(config);
7364
- return knex;
7365
- }
7366
- static async createWalletMySQL(args: SetupWalletMySQLArgs): Promise<SetupWalletKnex> {
7367
- return await this.createWalletKnex({
7368
- ...args,
7369
- knex: Setup.createMySQLKnex(args.env.mySQLConnection, args.databaseName)
7370
- });
7371
- }
7372
- static async createWalletSQLite(args: SetupWalletSQLiteArgs): Promise<SetupWalletKnex> {
7373
- return await this.createWalletKnex({
7374
- ...args,
7375
- knex: Setup.createSQLiteKnex(args.filePath)
7376
- });
7377
- }
7378
- }
7379
- ```
7380
-
7381
- See also: [Chain](./client.md#type-chain), [KeyPairAddress](./setup.md#interface-keypairaddress), [Monitor](./monitor.md#class-monitor), [PrivilegedKeyManager](./client.md#class-privilegedkeymanager), [ScriptTemplateUnlock](./client.md#interface-scripttemplateunlock), [Services](./services.md#class-services), [SetupEnv](./setup.md#interface-setupenv), [SetupWallet](./setup.md#interface-setupwallet), [SetupWalletArgs](./setup.md#interface-setupwalletargs), [SetupWalletClient](./setup.md#interface-setupwalletclient), [SetupWalletClientArgs](./setup.md#interface-setupwalletclientargs), [SetupWalletKnex](./setup.md#interface-setupwalletknex), [SetupWalletKnexArgs](./setup.md#interface-setupwalletknexargs), [SetupWalletMySQLArgs](./setup.md#interface-setupwalletmysqlargs), [SetupWalletSQLiteArgs](./setup.md#interface-setupwalletsqliteargs), [StorageClient](./storage.md#class-storageclient), [StorageKnex](./storage.md#class-storageknex), [WERR_INVALID_OPERATION](./client.md#class-werr_invalid_operation), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager), [createAction](./storage.md#function-createaction), [verifyTruthy](./client.md#function-verifytruthy)
7382
-
7383
- ###### Method createStorageKnex
7384
-
7385
- ```ts
7386
- static async createStorageKnex(args: SetupWalletKnexArgs): Promise<StorageKnex>
7387
- ```
7388
- See also: [SetupWalletKnexArgs](./setup.md#interface-setupwalletknexargs), [StorageKnex](./storage.md#class-storageknex)
7389
-
7390
- Returns
7391
-
7392
- - `Knex` based storage provider for a wallet. May be used for either active storage or backup storage.
7393
-
7394
- ###### Method createWallet
7395
-
7396
- Create a `Wallet`. Storage can optionally be provided or configured later.
7397
-
7398
- The following components are configured: KeyDeriver, WalletStorageManager, WalletService, WalletStorage.
7399
- Optionally, PrivilegedKeyManager is also configured.
7400
-
7401
- ```ts
7402
- static async createWallet(args: SetupWalletArgs): Promise<SetupWallet> {
7403
- const chain = args.env.chain;
7404
- args.rootKeyHex ||= args.env.devKeys[args.env.identityKey];
7405
- const rootKey = PrivateKey.fromHex(args.rootKeyHex);
7406
- const identityKey = rootKey.toPublicKey().toString();
7407
- const keyDeriver = new KeyDeriver(rootKey);
7408
- const storage = new WalletStorageManager(identityKey, args.active, args.backups);
7409
- if (storage.canMakeAvailable())
7410
- await storage.makeAvailable();
7411
- const serviceOptions = Services.createDefaultOptions(chain);
7412
- serviceOptions.taalApiKey = args.env.taalApiKey;
7413
- const services = new Services(serviceOptions);
7414
- const monopts = Monitor.createDefaultWalletMonitorOptions(chain, storage, services);
7415
- const monitor = new Monitor(monopts);
7416
- monitor.addDefaultTasks();
7417
- const privilegedKeyManager = args.privilegedKeyGetter
7418
- ? new sdk.PrivilegedKeyManager(args.privilegedKeyGetter)
7419
- : undefined;
7420
- const wallet = new Wallet({
7421
- chain,
7422
- keyDeriver,
7423
- storage,
7424
- services,
7425
- monitor,
7426
- privilegedKeyManager
7427
- });
7428
- const r: SetupWallet = {
7429
- rootKey,
7430
- identityKey,
7431
- keyDeriver,
7432
- chain,
7433
- storage,
7434
- services,
7435
- monitor,
7436
- wallet
7437
- };
7438
- return r;
7439
- }
7440
- ```
7441
- See also: [Monitor](./monitor.md#class-monitor), [PrivilegedKeyManager](./client.md#class-privilegedkeymanager), [Services](./services.md#class-services), [SetupWallet](./setup.md#interface-setupwallet), [SetupWalletArgs](./setup.md#interface-setupwalletargs), [Wallet](./client.md#class-wallet), [WalletStorageManager](./storage.md#class-walletstoragemanager)
7442
-
7443
- ###### Method createWalletClientNoEnv
7444
-
7445
- Setup a new `Wallet` without requiring a .env file.
7446
-
7447
- ```ts
7448
- static async createWalletClientNoEnv(args: {
7449
- chain: sdk.Chain;
7450
- rootKeyHex: string;
7451
- storageUrl?: string;
7452
- privilegedKeyGetter?: () => Promise<PrivateKey>;
7453
- }): Promise<Wallet>
7454
- ```
7455
- See also: [Chain](./client.md#type-chain), [Wallet](./client.md#class-wallet)
7456
-
7457
- Argument Details
7458
-
7459
- + **args.chain**
7460
- + 'main' or 'test'
7461
- + **args.rootKeyHex**
7462
- + Root private key for wallet's key deriver.
7463
- + **args.storageUrl**
7464
- + Optional. `StorageClient` and `chain` compatible endpoint URL.
7465
- + **args.privilegedKeyGetter**
7466
- + Optional. Method that will return the privileged `PrivateKey`, on demand.
7467
-
7468
- ###### Method createWalletKnex
7469
-
7470
- Adds `Knex` based storage to a `Wallet` configured by `Setup.createWalletOnly`
7471
-
7472
- ```ts
7473
- static async createWalletKnex(args: SetupWalletKnexArgs): Promise<SetupWalletKnex> {
7474
- const wo = await Setup.createWallet(args);
7475
- const activeStorage = await Setup.createStorageKnex(args);
7476
- await wo.storage.addWalletStorageProvider(activeStorage);
7477
- const { user, isNew } = await activeStorage.findOrInsertUser(wo.identityKey);
7478
- const userId = user.userId;
7479
- const r: SetupWalletKnex = {
7480
- ...wo,
7481
- activeStorage,
7482
- userId
7483
- };
7484
- return r;
7485
- }
7486
- ```
7487
- See also: [Setup](./setup.md#class-setup), [SetupWalletKnex](./setup.md#interface-setupwalletknex), [SetupWalletKnexArgs](./setup.md#interface-setupwalletknexargs)
7488
-
7489
- Argument Details
7490
-
7491
- + **args.knex**
7492
- + `Knex` object configured for either MySQL or SQLite database access.
7493
- Schema will be created and migrated as needed.
7494
- For MySQL, a schema corresponding to databaseName must exist with full access permissions.
7495
- + **args.databaseName**
7496
- + Name for this storage. For MySQL, the schema name within the MySQL instance.
7497
- + **args.chain**
7498
- + Which chain this wallet is on: 'main' or 'test'. Defaults to 'test'.
7499
-
7500
- ###### Method getEnv
7501
-
7502
- Reads a .env file of the format created by `makeEnv`.
7503
-
7504
- Returns values for designated `chain`.
7505
-
7506
- Access private keys through the `devKeys` object: `devKeys[identityKey]`
7507
-
7508
- ```ts
7509
- static getEnv(chain: sdk.Chain): SetupEnv {
7510
- const identityKey = chain === "main" ? process.env.MY_MAIN_IDENTITY : process.env.MY_TEST_IDENTITY;
7511
- const identityKey2 = chain === "main" ? process.env.MY_MAIN_IDENTITY2 : process.env.MY_TEST_IDENTITY2;
7512
- const filePath = chain === "main" ? process.env.MY_MAIN_FILEPATH : process.env.MY_TEST_FILEPATH;
7513
- const DEV_KEYS = process.env.DEV_KEYS || "{}";
7514
- const mySQLConnection = process.env.MYSQL_CONNECTION || "{}";
7515
- const taalApiKey = verifyTruthy(chain === "main" ? process.env.MAIN_TAAL_API_KEY : process.env.TEST_TAAL_API_KEY, `.env value for '${chain.toUpperCase()}_TAAL_API_KEY' is required.`);
7516
- if (!identityKey || !identityKey2)
7517
- throw new sdk.WERR_INVALID_OPERATION(".env is not a valid SetupEnv configuration.");
7518
- return {
7519
- chain,
7520
- identityKey,
7521
- identityKey2,
7522
- filePath,
7523
- taalApiKey,
7524
- devKeys: JSON.parse(DEV_KEYS) as Record<string, string>,
7525
- mySQLConnection
7526
- };
7527
- }
7528
- ```
7529
- See also: [Chain](./client.md#type-chain), [SetupEnv](./setup.md#interface-setupenv), [WERR_INVALID_OPERATION](./client.md#class-werr_invalid_operation), [verifyTruthy](./client.md#function-verifytruthy)
7530
-
7531
- Returns
7532
-
7533
- with configuration environment secrets used by `Setup` functions.
7534
-
7535
- Argument Details
7536
-
7537
- + **chain**
7538
- + Which chain to use: 'test' or 'main'
7539
-
7540
- ###### Method makeEnv
7541
-
7542
- Creates content for .env file with some private keys, identity keys, sample API keys, and sample MySQL connection string.
7543
-
7544
- Two new, random private keys are generated each time, with their associated public identity keys.
7545
-
7546
- Loading secrets from a .env file is intended only for experimentation and getting started.
7547
- Private keys should never be included directly in your source code.
7548
-
7549
- ```ts
7550
- static makeEnv(): string {
7551
- const testPrivKey1 = PrivateKey.fromRandom();
7552
- const testIdentityKey1 = testPrivKey1.toPublicKey().toString();
7553
- const testPrivKey2 = PrivateKey.fromRandom();
7554
- const testIdentityKey2 = testPrivKey2.toPublicKey().toString();
7555
- const mainPrivKey1 = PrivateKey.fromRandom();
7556
- const mainIdentityKey1 = mainPrivKey1.toPublicKey().toString();
7557
- const mainPrivKey2 = PrivateKey.fromRandom();
7558
- const mainIdentityKey2 = mainPrivKey2.toPublicKey().toString();
7559
- const log = `
7560
- # .env file template for working with wallet-toolbox Setup functions.
7561
- MY_TEST_IDENTITY = '${testIdentityKey1}'
7562
- MY_TEST_IDENTITY2 = '${testIdentityKey2}'
7563
- MY_MAIN_IDENTITY = '${mainIdentityKey1}'
7564
- MY_MAIN_IDENTITY2 = '${mainIdentityKey2}'
7565
- MAIN_TAAL_API_KEY='mainnet_9596de07e92300c6287e4393594ae39c'
7566
- TEST_TAAL_API_KEY='testnet_0e6cf72133b43ea2d7861da2a38684e3'
7567
- MYSQL_CONNECTION='{"port":3306,"host":"127.0.0.1","user":"root","password":"your_password","database":"your_database", "timezone": "Z"}'
7568
- DEV_KEYS = '{
7569
- "${testIdentityKey1}": "${testPrivKey1.toString()}",
7570
- "${testIdentityKey2}": "${testPrivKey2.toString()}",
7571
- "${mainIdentityKey1}": "${mainPrivKey1.toString()}",
7572
- "${mainIdentityKey2}": "${mainPrivKey2.toString()}"
7573
- }'
7574
- `;
7575
- console.log(log);
7576
- return log;
7577
- }
7578
- ```
7579
- See also: [Setup](./setup.md#class-setup)
7580
-
7581
- ###### Method noEnv
7582
-
7583
- ```ts
7584
- static noEnv(chain: sdk.Chain): boolean
7585
- ```
7586
- See also: [Chain](./client.md#type-chain)
7587
-
7588
- Returns
7589
-
7590
- true if .env is not valid for chain
7591
-
7592
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
7593
-
7594
6769
  ---
7595
6770
  ##### Class: SimpleWalletManager
7596
6771
 
@@ -8413,330 +7588,29 @@ Argument Details
8413
7588
  + **args**
8414
7589
  + proof request and new transaction proof data
8415
7590
 
8416
- ###### Method validateEntities
8417
-
8418
- Helper to force uniform behavior across database engines.
8419
- Use to process all arrays of records with time stamps retreived from database.
8420
-
8421
- ```ts
8422
- validateEntities<T extends sdk.EntityTimeStamp>(entities: T[], dateFields?: string[]): T[]
8423
- ```
8424
- See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
8425
-
8426
- Returns
8427
-
8428
- input `entities` array with contained values validated.
8429
-
8430
- ###### Method validateEntity
8431
-
8432
- Helper to force uniform behavior across database engines.
8433
- Use to process all individual records with time stamps retreived from database.
8434
-
8435
- ```ts
8436
- validateEntity<T extends sdk.EntityTimeStamp>(entity: T, dateFields?: string[]): T
8437
- ```
8438
- See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
8439
-
8440
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
8441
-
8442
- ---
8443
- ##### Class: StorageKnex
8444
-
8445
- ```ts
8446
- export class StorageKnex extends StorageProvider implements sdk.WalletStorageProvider {
8447
- knex: Knex;
8448
- constructor(options: StorageKnexOptions)
8449
- async readSettings(): Promise<TableSettings>
8450
- override async getProvenOrRawTx(txid: string, trx?: sdk.TrxToken): Promise<sdk.ProvenOrRawTx>
8451
- dbTypeSubstring(source: string, fromOffset: number, forLength?: number)
8452
- override async getRawTxOfKnownValidTransaction(txid?: string, offset?: number, length?: number, trx?: sdk.TrxToken): Promise<number[] | undefined>
8453
- getProvenTxsForUserQuery(args: sdk.FindForUserSincePagedArgs): Knex.QueryBuilder
8454
- override async getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTx[]>
8455
- getProvenTxReqsForUserQuery(args: sdk.FindForUserSincePagedArgs): Knex.QueryBuilder
8456
- override async getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTxReq[]>
8457
- getTxLabelMapsForUserQuery(args: sdk.FindForUserSincePagedArgs): Knex.QueryBuilder
8458
- override async getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableTxLabelMap[]>
8459
- getOutputTagMapsForUserQuery(args: sdk.FindForUserSincePagedArgs): Knex.QueryBuilder
8460
- override async getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableOutputTagMap[]>
8461
- override async listActions(auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
8462
- override async listOutputs(auth: sdk.AuthId, vargs: sdk.ValidListOutputsArgs): Promise<ListOutputsResult>
8463
- override async insertProvenTx(tx: TableProvenTx, trx?: sdk.TrxToken): Promise<number>
8464
- override async insertProvenTxReq(tx: TableProvenTxReq, trx?: sdk.TrxToken): Promise<number>
8465
- override async insertUser(user: TableUser, trx?: sdk.TrxToken): Promise<number>
8466
- override async insertCertificateAuth(auth: sdk.AuthId, certificate: TableCertificateX): Promise<number>
8467
- override async insertCertificate(certificate: TableCertificateX, trx?: sdk.TrxToken): Promise<number>
8468
- override async insertCertificateField(certificateField: TableCertificateField, trx?: sdk.TrxToken): Promise<void>
8469
- override async insertOutputBasket(basket: TableOutputBasket, trx?: sdk.TrxToken): Promise<number>
8470
- override async insertTransaction(tx: TableTransaction, trx?: sdk.TrxToken): Promise<number>
8471
- override async insertCommission(commission: TableCommission, trx?: sdk.TrxToken): Promise<number>
8472
- override async insertOutput(output: TableOutput, trx?: sdk.TrxToken): Promise<number>
8473
- override async insertOutputTag(tag: TableOutputTag, trx?: sdk.TrxToken): Promise<number>
8474
- override async insertOutputTagMap(tagMap: TableOutputTagMap, trx?: sdk.TrxToken): Promise<void>
8475
- override async insertTxLabel(label: TableTxLabel, trx?: sdk.TrxToken): Promise<number>
8476
- override async insertTxLabelMap(labelMap: TableTxLabelMap, trx?: sdk.TrxToken): Promise<void>
8477
- override async insertMonitorEvent(event: TableMonitorEvent, trx?: sdk.TrxToken): Promise<number>
8478
- override async insertSyncState(syncState: TableSyncState, trx?: sdk.TrxToken): Promise<number>
8479
- override async updateCertificateField(certificateId: number, fieldName: string, update: Partial<TableCertificateField>, trx?: sdk.TrxToken): Promise<number>
8480
- override async updateCertificate(id: number, update: Partial<TableCertificate>, trx?: sdk.TrxToken): Promise<number>
8481
- override async updateCommission(id: number, update: Partial<TableCommission>, trx?: sdk.TrxToken): Promise<number>
8482
- override async updateOutputBasket(id: number, update: Partial<TableOutputBasket>, trx?: sdk.TrxToken): Promise<number>
8483
- override async updateOutput(id: number, update: Partial<TableOutput>, trx?: sdk.TrxToken): Promise<number>
8484
- override async updateOutputTagMap(outputId: number, tagId: number, update: Partial<TableOutputTagMap>, trx?: sdk.TrxToken): Promise<number>
8485
- override async updateOutputTag(id: number, update: Partial<TableOutputTag>, trx?: sdk.TrxToken): Promise<number>
8486
- override async updateProvenTxReq(id: number | number[], update: Partial<TableProvenTxReq>, trx?: sdk.TrxToken): Promise<number>
8487
- override async updateProvenTx(id: number, update: Partial<TableProvenTx>, trx?: sdk.TrxToken): Promise<number>
8488
- override async updateSyncState(id: number, update: Partial<TableSyncState>, trx?: sdk.TrxToken): Promise<number>
8489
- override async updateTransaction(id: number | number[], update: Partial<TableTransaction>, trx?: sdk.TrxToken): Promise<number>
8490
- override async updateTxLabelMap(transactionId: number, txLabelId: number, update: Partial<TableTxLabelMap>, trx?: sdk.TrxToken): Promise<number>
8491
- override async updateTxLabel(id: number, update: Partial<TableTxLabel>, trx?: sdk.TrxToken): Promise<number>
8492
- override async updateUser(id: number, update: Partial<TableUser>, trx?: sdk.TrxToken): Promise<number>
8493
- override async updateMonitorEvent(id: number, update: Partial<TableMonitorEvent>, trx?: sdk.TrxToken): Promise<number>
8494
- setupQuery<T extends object>(table: string, args: sdk.FindPartialSincePagedArgs<T>): Knex.QueryBuilder
8495
- findCertificateFieldsQuery(args: sdk.FindCertificateFieldsArgs): Knex.QueryBuilder
8496
- findCertificatesQuery(args: sdk.FindCertificatesArgs): Knex.QueryBuilder
8497
- findCommissionsQuery(args: sdk.FindCommissionsArgs): Knex.QueryBuilder
8498
- findOutputBasketsQuery(args: sdk.FindOutputBasketsArgs): Knex.QueryBuilder
8499
- findOutputsQuery(args: sdk.FindOutputsArgs, count?: boolean): Knex.QueryBuilder
8500
- findOutputTagMapsQuery(args: sdk.FindOutputTagMapsArgs): Knex.QueryBuilder
8501
- findOutputTagsQuery(args: sdk.FindOutputTagsArgs): Knex.QueryBuilder
8502
- findProvenTxReqsQuery(args: sdk.FindProvenTxReqsArgs): Knex.QueryBuilder
8503
- findProvenTxsQuery(args: sdk.FindProvenTxsArgs): Knex.QueryBuilder
8504
- findSyncStatesQuery(args: sdk.FindSyncStatesArgs): Knex.QueryBuilder
8505
- findTransactionsQuery(args: sdk.FindTransactionsArgs, count?: boolean): Knex.QueryBuilder
8506
- findTxLabelMapsQuery(args: sdk.FindTxLabelMapsArgs): Knex.QueryBuilder
8507
- findTxLabelsQuery(args: sdk.FindTxLabelsArgs): Knex.QueryBuilder
8508
- findUsersQuery(args: sdk.FindUsersArgs): Knex.QueryBuilder
8509
- findMonitorEventsQuery(args: sdk.FindMonitorEventsArgs): Knex.QueryBuilder
8510
- override async findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>
8511
- override async findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
8512
- override async findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<TableOutput[]>
8513
- override async findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<TableCertificateField[]>
8514
- override async findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>
8515
- override async findCommissions(args: sdk.FindCommissionsArgs): Promise<TableCommission[]>
8516
- override async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
8517
- override async findOutputs(args: sdk.FindOutputsArgs): Promise<TableOutput[]>
8518
- override async findOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<TableOutputTagMap[]>
8519
- override async findOutputTags(args: sdk.FindOutputTagsArgs): Promise<TableOutputTag[]>
8520
- override async findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>
8521
- override async findProvenTxs(args: sdk.FindProvenTxsArgs): Promise<TableProvenTx[]>
8522
- override async findSyncStates(args: sdk.FindSyncStatesArgs): Promise<TableSyncState[]>
8523
- override async findTransactions(args: sdk.FindTransactionsArgs): Promise<TableTransaction[]>
8524
- override async findTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<TableTxLabelMap[]>
8525
- override async findTxLabels(args: sdk.FindTxLabelsArgs): Promise<TableTxLabel[]>
8526
- override async findUsers(args: sdk.FindUsersArgs): Promise<TableUser[]>
8527
- override async findMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<TableMonitorEvent[]>
8528
- async getCount<T extends object>(q: Knex.QueryBuilder<T, T[]>): Promise<number>
8529
- override async countCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<number>
8530
- override async countCertificates(args: sdk.FindCertificatesArgs): Promise<number>
8531
- override async countCommissions(args: sdk.FindCommissionsArgs): Promise<number>
8532
- override async countOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<number>
8533
- override async countOutputs(args: sdk.FindOutputsArgs): Promise<number>
8534
- override async countOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<number>
8535
- override async countOutputTags(args: sdk.FindOutputTagsArgs): Promise<number>
8536
- override async countProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<number>
8537
- override async countProvenTxs(args: sdk.FindProvenTxsArgs): Promise<number>
8538
- override async countSyncStates(args: sdk.FindSyncStatesArgs): Promise<number>
8539
- override async countTransactions(args: sdk.FindTransactionsArgs): Promise<number>
8540
- override async countTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<number>
8541
- override async countTxLabels(args: sdk.FindTxLabelsArgs): Promise<number>
8542
- override async countUsers(args: sdk.FindUsersArgs): Promise<number>
8543
- override async countMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<number>
8544
- override async destroy(): Promise<void>
8545
- override async migrate(storageName: string, storageIdentityKey: string): Promise<string>
8546
- override async dropAllData(): Promise<void>
8547
- override async transaction<T>(scope: (trx: sdk.TrxToken) => Promise<T>, trx?: sdk.TrxToken): Promise<T>
8548
- toDb(trx?: sdk.TrxToken)
8549
- async validateRawTransaction(t: TableTransaction, trx?: sdk.TrxToken): Promise<void>
8550
- async validateOutputScript(o: TableOutput, trx?: sdk.TrxToken): Promise<void>
8551
- _verifiedReadyForDatabaseAccess: boolean = false;
8552
- async verifyReadyForDatabaseAccess(trx?: sdk.TrxToken): Promise<DBType>
8553
- validatePartialForUpdate<T extends sdk.EntityTimeStamp>(update: Partial<T>, dateFields?: string[], booleanFields?: string[]): Partial<T>
8554
- async validateEntityForInsert<T extends sdk.EntityTimeStamp>(entity: T, trx?: sdk.TrxToken, dateFields?: string[], booleanFields?: string[]): Promise<any>
8555
- override async getLabelsForTransactionId(transactionId?: number, trx?: sdk.TrxToken): Promise<TableTxLabel[]>
8556
- async extendOutput(o: TableOutput, includeBasket = false, includeTags = false, trx?: sdk.TrxToken): Promise<TableOutputX>
8557
- override async getTagsForOutputId(outputId: number, trx?: sdk.TrxToken): Promise<TableOutputTag[]>
8558
- override async purgeData(params: sdk.PurgeParams, trx?: sdk.TrxToken): Promise<sdk.PurgeResults>
8559
- override async reviewStatus(args: {
8560
- agedLimit: Date;
8561
- trx?: sdk.TrxToken;
8562
- }): Promise<{
8563
- log: string;
8564
- }>
8565
- async countChangeInputs(userId: number, basketId: number, excludeSending: boolean): Promise<number>
8566
- async allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<TableOutput | undefined> {
8567
- const status: sdk.TransactionStatus[] = ["completed", "unproven"];
8568
- if (!excludeSending)
8569
- status.push("sending");
8570
- const statusText = status.map(s => `'${s}'`).join(",");
8571
- const r: TableOutput | undefined = await this.knex.transaction(async (trx) => {
8572
- const txStatusCondition = `AND (SELECT status FROM transactions WHERE outputs.transactionId = transactions.transactionId) in (${statusText})`;
8573
- let outputId: number | undefined;
8574
- const setOutputId = async (rawQuery: string): Promise<void> => {
8575
- let oidr = await trx.raw(rawQuery);
8576
- outputId = undefined;
8577
- if (!oidr["outputId"] && oidr.length > 0)
8578
- oidr = oidr[0];
8579
- if (!oidr["outputId"] && oidr.length > 0)
8580
- oidr = oidr[0];
8581
- if (oidr["outputId"])
8582
- outputId = Number(oidr["outputId"]);
8583
- };
8584
- if (exactSatoshis !== undefined) {
8585
- await setOutputId(`
8586
- SELECT outputId
8587
- FROM outputs
8588
- WHERE userId = ${userId}
8589
- AND spendable = 1
8590
- AND basketId = ${basketId}
8591
- ${txStatusCondition}
8592
- AND satoshis = ${exactSatoshis}
8593
- LIMIT 1;
8594
- `);
8595
- }
8596
- if (outputId === undefined) {
8597
- await setOutputId(`
8598
- SELECT outputId
8599
- FROM outputs
8600
- WHERE userId = ${userId}
8601
- AND spendable = 1
8602
- AND basketId = ${basketId}
8603
- ${txStatusCondition}
8604
- AND satoshis - ${targetSatoshis} = (
8605
- SELECT MIN(satoshis - ${targetSatoshis})
8606
- FROM outputs
8607
- WHERE userId = ${userId}
8608
- AND spendable = 1
8609
- AND basketId = ${basketId}
8610
- ${txStatusCondition}
8611
- AND satoshis - ${targetSatoshis} >= 0
8612
- )
8613
- LIMIT 1;
8614
- `);
8615
- }
8616
- if (outputId === undefined) {
8617
- await setOutputId(`
8618
- SELECT outputId
8619
- FROM outputs
8620
- WHERE userId = ${userId}
8621
- AND spendable = 1
8622
- AND basketId = ${basketId}
8623
- ${txStatusCondition}
8624
- AND satoshis - ${targetSatoshis} = (
8625
- SELECT MAX(satoshis - ${targetSatoshis})
8626
- FROM outputs
8627
- WHERE userId = ${userId}
8628
- AND spendable = 1
8629
- AND basketId = ${basketId}
8630
- ${txStatusCondition}
8631
- AND satoshis - ${targetSatoshis} < 0
8632
- )
8633
- LIMIT 1;
8634
- `);
8635
- }
8636
- if (outputId === undefined)
8637
- return undefined;
8638
- await this.updateOutput(outputId, {
8639
- spendable: false,
8640
- spentBy: transactionId
8641
- }, trx);
8642
- const r = verifyTruthy(await this.findOutputById(outputId, trx));
8643
- return r;
8644
- });
8645
- return r;
8646
- }
8647
- validateEntity<T extends sdk.EntityTimeStamp>(entity: T, dateFields?: string[], booleanFields?: string[]): T
8648
- validateEntities<T extends sdk.EntityTimeStamp>(entities: T[], dateFields?: string[], booleanFields?: string[]): T[]
8649
- }
8650
- ```
8651
-
8652
- 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), [FindPartialSincePagedArgs](./client.md#interface-findpartialsincepagedargs), [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), [StorageKnexOptions](./storage.md#interface-storageknexoptions), [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), [TableOutputX](./storage.md#interface-tableoutputx), [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), [TransactionStatus](./client.md#type-transactionstatus), [TrxToken](./client.md#interface-trxtoken), [ValidListActionsArgs](./client.md#interface-validlistactionsargs), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs), [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), [verifyTruthy](./client.md#function-verifytruthy)
8653
-
8654
- ###### Method allocateChangeInput
8655
-
8656
- Finds closest matching available change output to use as input for new transaction.
8657
-
8658
- Transactionally allocate the output such that
8659
-
8660
- ```ts
8661
- async allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<TableOutput | undefined>
8662
- ```
8663
- See also: [TableOutput](./storage.md#interface-tableoutput)
8664
-
8665
- ###### Method countChangeInputs
8666
-
8667
- Finds closest matching available change output to use as input for new transaction.
8668
-
8669
- Transactionally allocate the output such that
8670
-
8671
- ```ts
8672
- async countChangeInputs(userId: number, basketId: number, excludeSending: boolean): Promise<number>
8673
- ```
8674
-
8675
- ###### Method toDb
8676
-
8677
- Convert the standard optional `TrxToken` parameter into either a direct knex database instance,
8678
- or a Knex.Transaction as appropriate.
8679
-
8680
- ```ts
8681
- toDb(trx?: sdk.TrxToken)
8682
- ```
8683
- See also: [TrxToken](./client.md#interface-trxtoken)
8684
-
8685
- ###### Method validateEntities
8686
-
8687
- Helper to force uniform behavior across database engines.
8688
- Use to process all arrays of records with time stamps retreived from database.
8689
-
8690
- ```ts
8691
- validateEntities<T extends sdk.EntityTimeStamp>(entities: T[], dateFields?: string[], booleanFields?: string[]): T[]
8692
- ```
8693
- See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
8694
-
8695
- Returns
8696
-
8697
- input `entities` array with contained values validated.
8698
-
8699
- ###### Method validateEntity
8700
-
8701
- Helper to force uniform behavior across database engines.
8702
- Use to process all individual records with time stamps retreived from database.
8703
-
8704
- ```ts
8705
- validateEntity<T extends sdk.EntityTimeStamp>(entity: T, dateFields?: string[], booleanFields?: string[]): T
8706
- ```
8707
- See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
8708
-
8709
- ###### Method validateEntityForInsert
8710
-
8711
- Helper to force uniform behavior across database engines.
8712
- Use to process new entities being inserted into the database.
8713
-
8714
- ```ts
8715
- async validateEntityForInsert<T extends sdk.EntityTimeStamp>(entity: T, trx?: sdk.TrxToken, dateFields?: string[], booleanFields?: string[]): Promise<any>
8716
- ```
8717
- See also: [EntityTimeStamp](./client.md#interface-entitytimestamp), [TrxToken](./client.md#interface-trxtoken)
8718
-
8719
- ###### Method validatePartialForUpdate
7591
+ ###### Method validateEntities
8720
7592
 
8721
7593
  Helper to force uniform behavior across database engines.
8722
- Use to process the update template for entities being updated.
7594
+ Use to process all arrays of records with time stamps retreived from database.
8723
7595
 
8724
7596
  ```ts
8725
- validatePartialForUpdate<T extends sdk.EntityTimeStamp>(update: Partial<T>, dateFields?: string[], booleanFields?: string[]): Partial<T>
7597
+ validateEntities<T extends sdk.EntityTimeStamp>(entities: T[], dateFields?: string[]): T[]
8726
7598
  ```
8727
7599
  See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
8728
7600
 
8729
- ###### Method verifyReadyForDatabaseAccess
7601
+ Returns
7602
+
7603
+ input `entities` array with contained values validated.
8730
7604
 
8731
- Make sure database is ready for access:
7605
+ ###### Method validateEntity
8732
7606
 
8733
- - dateScheme is known
8734
- - foreign key constraints are enabled
7607
+ Helper to force uniform behavior across database engines.
7608
+ Use to process all individual records with time stamps retreived from database.
8735
7609
 
8736
7610
  ```ts
8737
- async verifyReadyForDatabaseAccess(trx?: sdk.TrxToken): Promise<DBType>
7611
+ validateEntity<T extends sdk.EntityTimeStamp>(entity: T, dateFields?: string[]): T
8738
7612
  ```
8739
- See also: [DBType](./storage.md#type-dbtype), [TrxToken](./client.md#interface-trxtoken)
7613
+ See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
8740
7614
 
8741
7615
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
8742
7616
 
@@ -9059,47 +7933,6 @@ See also: [AuthId](./client.md#interface-authid), [FindOutputTagMapsArgs](./clie
9059
7933
 
9060
7934
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
9061
7935
 
9062
- ---
9063
- ##### Class: StorageServer
9064
-
9065
- ```ts
9066
- export class StorageServer {
9067
- constructor(storage: StorageProvider, options: WalletStorageServerOptions)
9068
- public start(): void
9069
- validateDate(date: Date | string | number): Date
9070
- validateEntity<T extends sdk.EntityTimeStamp>(entity: T, dateFields?: string[]): T
9071
- validateEntities<T extends sdk.EntityTimeStamp>(entities: T[], dateFields?: string[]): T[]
9072
- }
9073
- ```
9074
-
9075
- See also: [EntityTimeStamp](./client.md#interface-entitytimestamp), [StorageProvider](./storage.md#class-storageprovider), [WalletStorageServerOptions](./storage.md#interface-walletstorageserveroptions)
9076
-
9077
- ###### Method validateEntities
9078
-
9079
- Helper to force uniform behavior across database engines.
9080
- Use to process all arrays of records with time stamps retreived from database.
9081
-
9082
- ```ts
9083
- validateEntities<T extends sdk.EntityTimeStamp>(entities: T[], dateFields?: string[]): T[]
9084
- ```
9085
- See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
9086
-
9087
- Returns
9088
-
9089
- input `entities` array with contained values validated.
9090
-
9091
- ###### Method validateEntity
9092
-
9093
- Helper to force uniform behavior across database engines.
9094
- Use to process all individual records with time stamps retreived from database.
9095
-
9096
- ```ts
9097
- validateEntity<T extends sdk.EntityTimeStamp>(entity: T, dateFields?: string[]): T
9098
- ```
9099
- See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
9100
-
9101
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
9102
-
9103
7936
  ---
9104
7937
  ##### Class: StorageSyncReader
9105
7938
 
@@ -9271,9 +8104,9 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
9271
8104
  ```ts
9272
8105
  export class TaskNewHeader extends WalletMonitorTask {
9273
8106
  static taskName = "NewHeader";
9274
- header?: sdk.BlockHeader;
8107
+ header?: BlockHeader;
9275
8108
  constructor(monitor: Monitor, public triggerMsecs = 1 * monitor.oneMinute)
9276
- async getHeader(): Promise<sdk.BlockHeader>
8109
+ async getHeader(): Promise<BlockHeader>
9277
8110
  trigger(nowMsecsSinceEpoch: number): {
9278
8111
  run: boolean;
9279
8112
  }
@@ -9281,7 +8114,7 @@ export class TaskNewHeader extends WalletMonitorTask {
9281
8114
  }
9282
8115
  ```
9283
8116
 
9284
- See also: [BlockHeader](./client.md#interface-blockheader), [Monitor](./monitor.md#class-monitor), [WalletMonitorTask](./monitor.md#class-walletmonitortask)
8117
+ See also: [BlockHeader](./services.md#interface-blockheader), [Monitor](./monitor.md#class-monitor), [WalletMonitorTask](./monitor.md#class-walletmonitortask)
9285
8118
 
9286
8119
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
9287
8120
 
@@ -9407,57 +8240,6 @@ See also: [Monitor](./monitor.md#class-monitor), [WalletMonitorTask](./monitor.m
9407
8240
 
9408
8241
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
9409
8242
 
9410
- ---
9411
- ##### Class: TaskUnFail
9412
-
9413
- Setting provenTxReq status to 'unfail' when 'invalid' will attempt to find a merklePath, and if successful:
9414
-
9415
- 1. set the req status to 'unmined'
9416
- 2. set the referenced txs to 'unproven'
9417
- 3. determine if any inputs match user's existing outputs and if so update spentBy and spendable of those outputs.
9418
- 4. set the txs outputs to spendable
9419
-
9420
- If it fails (to find a merklePath), returns the req status to 'invalid'.
9421
-
9422
- ```ts
9423
- export class TaskUnFail extends WalletMonitorTask {
9424
- static taskName = "UnFail";
9425
- static checkNow = false;
9426
- constructor(monitor: Monitor, public triggerMsecs = monitor.oneMinute * 10)
9427
- trigger(nowMsecsSinceEpoch: number): {
9428
- run: boolean;
9429
- }
9430
- async runTask(): Promise<string>
9431
- async unfail(reqs: TableProvenTxReq[], indent = 0): Promise<{
9432
- log: string;
9433
- }>
9434
- async unfailReq(req: EntityProvenTxReq, indent: number): Promise<string>
9435
- }
9436
- ```
9437
-
9438
- See also: [EntityProvenTxReq](./storage.md#class-entityproventxreq), [Monitor](./monitor.md#class-monitor), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [WalletMonitorTask](./monitor.md#class-walletmonitortask)
9439
-
9440
- ###### Property checkNow
9441
-
9442
- Set to true to trigger running this task
9443
-
9444
- ```ts
9445
- static checkNow = false
9446
- ```
9447
-
9448
- ###### Method unfailReq
9449
-
9450
- 2. set the referenced txs to 'unproven'
9451
- 3. determine if any inputs match user's existing outputs and if so update spentBy and spendable of those outputs.
9452
- 4. set the txs outputs to spendable
9453
-
9454
- ```ts
9455
- async unfailReq(req: EntityProvenTxReq, indent: number): Promise<string>
9456
- ```
9457
- See also: [EntityProvenTxReq](./storage.md#class-entityproventxreq)
9458
-
9459
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
9460
-
9461
8243
  ---
9462
8244
  ##### Class: TwilioPhoneInteractor
9463
8245
 
@@ -11147,160 +9929,48 @@ Argument Details
11147
9929
 
11148
9930
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11149
9931
 
11150
- ---
11151
- ##### Class: localKVStore
11152
-
11153
- Implements a key-value storage system backed by transaction outputs managed by a wallet.
11154
- Each key-value pair is represented by a PushDrop token output in a specific context (basket).
11155
- Allows setting, getting, and removing key-value pairs, with optional encryption.
11156
-
11157
- ```ts
11158
- export default class localKVStore {
11159
- constructor(wallet?: WalletInterface, context?: string, encrypt?: boolean);
11160
- get(key: string, defaultValue?: string | undefined): Promise<string | undefined>;
11161
- set(key: string, value: string): Promise<OutpointString>;
11162
- remove(key: string): Promise<OutpointString | void>;
11163
- }
11164
- ```
11165
-
11166
- ###### Constructor
11167
-
11168
- Creates an instance of the localKVStore.
11169
-
11170
- ```ts
11171
- constructor(wallet?: WalletInterface, context?: string, encrypt?: boolean)
11172
- ```
11173
-
11174
- Argument Details
11175
-
11176
- + **wallet**
11177
- + The wallet interface to use. Defaults to a new WalletClient instance.
11178
- + **context**
11179
- + The context (basket) for namespacing keys. Defaults to 'kvstore-default'.
11180
- + **encrypt**
11181
- + Whether to encrypt values. Defaults to true.
11182
-
11183
- Throws
11184
-
11185
- If the context is missing or empty.
11186
-
11187
- ###### Method get
11188
-
11189
- Retrieves the value associated with a given key.
11190
-
11191
- ```ts
11192
- get(key: string, defaultValue?: string | undefined): Promise<string | undefined>
11193
- ```
11194
-
11195
- Returns
11196
-
11197
- A promise that resolves to the value as a string,
11198
- the defaultValue if the key is not found, or undefined if no defaultValue is provided.
11199
-
11200
- Argument Details
11201
-
11202
- + **key**
11203
- + The key to retrieve the value for.
11204
- + **defaultValue**
11205
- + The value to return if the key is not found.
11206
-
11207
- Throws
11208
-
11209
- If multiple outputs are found for the key (ambiguous state).
11210
-
11211
- If the found output's locking script cannot be decoded or represents an invalid token format.
11212
-
11213
- ###### Method remove
11214
-
11215
- Removes the key-value pair associated with the given key.
11216
- It finds the existing output(s) for the key and spends them without creating a new output.
11217
- If multiple outputs exist, they are all spent in the same transaction.
11218
- If the key does not exist, it does nothing.
11219
- If signing the removal transaction fails, it relinquishes the original outputs instead of spending.
11220
-
11221
- ```ts
11222
- remove(key: string): Promise<OutpointString | void>
11223
- ```
11224
-
11225
- Returns
11226
-
11227
- A promise that resolves to the txid of the removal transaction if successful.
11228
-
11229
- Argument Details
11230
-
11231
- + **key**
11232
- + The key to remove.
11233
-
11234
- ###### Method set
11235
-
11236
- Sets or updates the value associated with a given key.
11237
- If the key already exists (one or more outputs found), it spends the existing output(s)
11238
- and creates a new one with the updated value. If multiple outputs exist for the key,
11239
- they are collapsed into a single new output.
11240
- If the key does not exist, it creates a new output.
11241
- Handles encryption if enabled.
11242
- If signing the update/collapse transaction fails, it relinquishes the original outputs and starts over with a new chain.
11243
-
11244
- ```ts
11245
- set(key: string, value: string): Promise<OutpointString>
11246
- ```
11247
-
11248
- Returns
11249
-
11250
- A promise that resolves to the outpoint string (txid.vout) of the new or updated token output.
11251
-
11252
- Argument Details
11253
-
11254
- + **key**
11255
- + The key to set or update.
11256
- + **value**
11257
- + The value to associate with the key.
11258
-
11259
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11260
-
11261
9932
  ---
11262
9933
  #### Functions
11263
9934
 
11264
9935
  | | | |
11265
9936
  | --- | --- | --- |
11266
- | [acquireDirectCertificate](#function-acquiredirectcertificate) | [listOutputs](#function-listoutputs) | [validateCreateActionOutput](#function-validatecreateactionoutput) |
11267
- | [arcDefaultUrl](#function-arcdefaulturl) | [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) | [validateDiscoverByAttributesArgs](#function-validatediscoverbyattributesargs) |
11268
- | [arraysEqual](#function-arraysequal) | [makeAtomicBeef](#function-makeatomicbeef) | [validateDiscoverByIdentityKeyArgs](#function-validatediscoverbyidentitykeyargs) |
9937
+ | [acquireDirectCertificate](#function-acquiredirectcertificate) | [isLiveBlockHeader](#function-isliveblockheader) | [validateCreateActionOutput](#function-validatecreateactionoutput) |
9938
+ | [arcDefaultUrl](#function-arcdefaulturl) | [listCertificates](#function-listcertificates) | [validateDiscoverByAttributesArgs](#function-validatediscoverbyattributesargs) |
9939
+ | [arraysEqual](#function-arraysequal) | [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) | [validateDiscoverByIdentityKeyArgs](#function-validatediscoverbyidentitykeyargs) |
11269
9940
  | [asArray](#function-asarray) | [makeAtomicBeef](#function-makeatomicbeef) | [validateGenerateChangeSdkParams](#function-validategeneratechangesdkparams) |
11270
- | [asArray](#function-asarray) | [makeChangeLock](#function-makechangelock) | [validateGenerateChangeSdkResult](#function-validategeneratechangesdkresult) |
11271
- | [asBsvSdkPrivateKey](#function-asbsvsdkprivatekey) | [maxDate](#function-maxdate) | [validateInteger](#function-validateinteger) |
11272
- | [asBsvSdkPublickKey](#function-asbsvsdkpublickkey) | [offsetPubKey](#function-offsetpubkey) | [validateInternalizeActionArgs](#function-validateinternalizeactionargs) |
11273
- | [asBsvSdkScript](#function-asbsvsdkscript) | [optionalArraysEqual](#function-optionalarraysequal) | [validateInternalizeOutput](#function-validateinternalizeoutput) |
11274
- | [asBsvSdkTx](#function-asbsvsdktx) | [parseTxScriptOffsets](#function-parsetxscriptoffsets) | [validateListActionsArgs](#function-validatelistactionsargs) |
11275
- | [asBuffer](#function-asbuffer) | [parseWalletOutpoint](#function-parsewalletoutpoint) | [validateListCertificatesArgs](#function-validatelistcertificatesargs) |
11276
- | [asString](#function-asstring) | [processAction](#function-processaction) | [validateListOutputsArgs](#function-validatelistoutputsargs) |
11277
- | [asString](#function-asstring) | [processAction](#function-processaction) | [validateOptionalInteger](#function-validateoptionalinteger) |
11278
- | [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [proveCertificate](#function-provecertificate) | [validateOptionalOutpointString](#function-validateoptionaloutpointstring) |
11279
- | [buildSignableTransaction](#function-buildsignabletransaction) | [purgeData](#function-purgedata) | [validateOriginator](#function-validateoriginator) |
11280
- | [completeSignedTransaction](#function-completesignedtransaction) | [randomBytes](#function-randombytes) | [validateOutpointString](#function-validateoutpointstring) |
11281
- | [completeSignedTransaction](#function-completesignedtransaction) | [randomBytesBase64](#function-randombytesbase64) | [validatePositiveIntegerOrZero](#function-validatepositiveintegerorzero) |
11282
- | [convertProofToMerklePath](#function-convertprooftomerklepath) | [randomBytesHex](#function-randombyteshex) | [validateProveCertificateArgs](#function-validateprovecertificateargs) |
11283
- | [createAction](#function-createaction) | [reviewStatus](#function-reviewstatus) | [validateRelinquishCertificateArgs](#function-validaterelinquishcertificateargs) |
11284
- | [createAction](#function-createaction) | [setDisableDoubleSpendCheckForTest](#function-setdisabledoublespendcheckfortest) | [validateRelinquishOutputArgs](#function-validaterelinquishoutputargs) |
11285
- | [createDefaultWalletServicesOptions](#function-createdefaultwalletservicesoptions) | [sha256Hash](#function-sha256hash) | [validateSatoshis](#function-validatesatoshis) |
11286
- | [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [signAction](#function-signaction) | [validateScriptHash](#function-validatescripthash) |
11287
- | [createSyncMap](#function-createsyncmap) | [stampLog](#function-stamplog) | [validateSecondsSinceEpoch](#function-validatesecondssinceepoch) |
11288
- | [doubleSha256BE](#function-doublesha256be) | [stampLogFormat](#function-stamplogformat) | [validateSignActionArgs](#function-validatesignactionargs) |
11289
- | [doubleSha256HashLE](#function-doublesha256hashle) | [toBinaryBaseBlockHeader](#function-tobinarybaseblockheader) | [validateSignActionOptions](#function-validatesignactionoptions) |
11290
- | [generateChangeSdk](#function-generatechangesdk) | [toWalletNetwork](#function-towalletnetwork) | [validateStorageFeeModel](#function-validatestoragefeemodel) |
11291
- | [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [transactionInputSize](#function-transactioninputsize) | [validateStringLength](#function-validatestringlength) |
11292
- | [getBeefForTransaction](#function-getbeeffortransaction) | [transactionOutputSize](#function-transactionoutputsize) | [validateWalletPayment](#function-validatewalletpayment) |
11293
- | [getExchangeRatesIo](#function-getexchangeratesio) | [transactionSize](#function-transactionsize) | [varUintSize](#function-varuintsize) |
11294
- | [getIdentityKey](#function-getidentitykey) | [updateChaintracksFiatExchangeRates](#function-updatechaintracksfiatexchangerates) | [verifyHexString](#function-verifyhexstring) |
11295
- | [getProofs](#function-getproofs) | [updateExchangeratesapi](#function-updateexchangeratesapi) | [verifyId](#function-verifyid) |
11296
- | [getSyncChunk](#function-getsyncchunk) | [validateAbortActionArgs](#function-validateabortactionargs) | [verifyInteger](#function-verifyinteger) |
11297
- | [internalizeAction](#function-internalizeaction) | [validateAcquireCertificateArgs](#function-validateacquirecertificateargs) | [verifyNumber](#function-verifynumber) |
11298
- | [internalizeAction](#function-internalizeaction) | [validateAcquireDirectCertificateArgs](#function-validateacquiredirectcertificateargs) | [verifyOne](#function-verifyone) |
11299
- | [isHexString](#function-ishexstring) | [validateAcquireIssuanceCertificateArgs](#function-validateacquireissuancecertificateargs) | [verifyOneOrNone](#function-verifyoneornone) |
11300
- | [isListActionsSpecOp](#function-islistactionsspecop) | [validateBasketInsertion](#function-validatebasketinsertion) | [verifyOptionalHexString](#function-verifyoptionalhexstring) |
11301
- | [isListOutputsSpecOp](#function-islistoutputsspecop) | [validateCreateActionArgs](#function-validatecreateactionargs) | [verifyTruthy](#function-verifytruthy) |
11302
- | [listActions](#function-listactions) | [validateCreateActionInput](#function-validatecreateactioninput) | [wait](#function-wait) |
11303
- | [listCertificates](#function-listcertificates) | [validateCreateActionOptions](#function-validatecreateactionoptions) | |
9941
+ | [asBsvSdkPrivateKey](#function-asbsvsdkprivatekey) | [makeAtomicBeef](#function-makeatomicbeef) | [validateGenerateChangeSdkResult](#function-validategeneratechangesdkresult) |
9942
+ | [asBsvSdkPublickKey](#function-asbsvsdkpublickkey) | [makeChangeLock](#function-makechangelock) | [validateInteger](#function-validateinteger) |
9943
+ | [asBsvSdkScript](#function-asbsvsdkscript) | [maxDate](#function-maxdate) | [validateInternalizeActionArgs](#function-validateinternalizeactionargs) |
9944
+ | [asBsvSdkTx](#function-asbsvsdktx) | [offsetPubKey](#function-offsetpubkey) | [validateInternalizeOutput](#function-validateinternalizeoutput) |
9945
+ | [asString](#function-asstring) | [optionalArraysEqual](#function-optionalarraysequal) | [validateListActionsArgs](#function-validatelistactionsargs) |
9946
+ | [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [parseTxScriptOffsets](#function-parsetxscriptoffsets) | [validateListCertificatesArgs](#function-validatelistcertificatesargs) |
9947
+ | [buildSignableTransaction](#function-buildsignabletransaction) | [parseWalletOutpoint](#function-parsewalletoutpoint) | [validateListOutputsArgs](#function-validatelistoutputsargs) |
9948
+ | [completeSignedTransaction](#function-completesignedtransaction) | [processAction](#function-processaction) | [validateOptionalInteger](#function-validateoptionalinteger) |
9949
+ | [completeSignedTransaction](#function-completesignedtransaction) | [processAction](#function-processaction) | [validateOptionalOutpointString](#function-validateoptionaloutpointstring) |
9950
+ | [convertProofToMerklePath](#function-convertprooftomerklepath) | [proveCertificate](#function-provecertificate) | [validateOriginator](#function-validateoriginator) |
9951
+ | [createAction](#function-createaction) | [randomBytes](#function-randombytes) | [validateOutpointString](#function-validateoutpointstring) |
9952
+ | [createAction](#function-createaction) | [randomBytesBase64](#function-randombytesbase64) | [validatePositiveIntegerOrZero](#function-validatepositiveintegerorzero) |
9953
+ | [createDefaultWalletServicesOptions](#function-createdefaultwalletservicesoptions) | [randomBytesHex](#function-randombyteshex) | [validateProveCertificateArgs](#function-validateprovecertificateargs) |
9954
+ | [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [setDisableDoubleSpendCheckForTest](#function-setdisabledoublespendcheckfortest) | [validateRelinquishCertificateArgs](#function-validaterelinquishcertificateargs) |
9955
+ | [createSyncMap](#function-createsyncmap) | [sha256Hash](#function-sha256hash) | [validateRelinquishOutputArgs](#function-validaterelinquishoutputargs) |
9956
+ | [doubleSha256BE](#function-doublesha256be) | [signAction](#function-signaction) | [validateSatoshis](#function-validatesatoshis) |
9957
+ | [doubleSha256HashLE](#function-doublesha256hashle) | [stampLog](#function-stamplog) | [validateScriptHash](#function-validatescripthash) |
9958
+ | [generateChangeSdk](#function-generatechangesdk) | [stampLogFormat](#function-stamplogformat) | [validateSecondsSinceEpoch](#function-validatesecondssinceepoch) |
9959
+ | [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [toBinaryBaseBlockHeader](#function-tobinarybaseblockheader) | [validateSignActionArgs](#function-validatesignactionargs) |
9960
+ | [getBeefForTransaction](#function-getbeeffortransaction) | [toWalletNetwork](#function-towalletnetwork) | [validateSignActionOptions](#function-validatesignactionoptions) |
9961
+ | [getExchangeRatesIo](#function-getexchangeratesio) | [transactionInputSize](#function-transactioninputsize) | [validateStorageFeeModel](#function-validatestoragefeemodel) |
9962
+ | [getIdentityKey](#function-getidentitykey) | [transactionOutputSize](#function-transactionoutputsize) | [validateStringLength](#function-validatestringlength) |
9963
+ | [getProofs](#function-getproofs) | [transactionSize](#function-transactionsize) | [validateWalletPayment](#function-validatewalletpayment) |
9964
+ | [getSyncChunk](#function-getsyncchunk) | [updateChaintracksFiatExchangeRates](#function-updatechaintracksfiatexchangerates) | [varUintSize](#function-varuintsize) |
9965
+ | [internalizeAction](#function-internalizeaction) | [updateExchangeratesapi](#function-updateexchangeratesapi) | [verifyHexString](#function-verifyhexstring) |
9966
+ | [internalizeAction](#function-internalizeaction) | [validateAbortActionArgs](#function-validateabortactionargs) | [verifyId](#function-verifyid) |
9967
+ | [isBaseBlockHeader](#function-isbaseblockheader) | [validateAcquireCertificateArgs](#function-validateacquirecertificateargs) | [verifyInteger](#function-verifyinteger) |
9968
+ | [isBlockHeader](#function-isblockheader) | [validateAcquireDirectCertificateArgs](#function-validateacquiredirectcertificateargs) | [verifyNumber](#function-verifynumber) |
9969
+ | [isCreateActionSpecOp](#function-iscreateactionspecop) | [validateAcquireIssuanceCertificateArgs](#function-validateacquireissuancecertificateargs) | [verifyOne](#function-verifyone) |
9970
+ | [isHexString](#function-ishexstring) | [validateBasketInsertion](#function-validatebasketinsertion) | [verifyOneOrNone](#function-verifyoneornone) |
9971
+ | [isListActionsSpecOp](#function-islistactionsspecop) | [validateCreateActionArgs](#function-validatecreateactionargs) | [verifyOptionalHexString](#function-verifyoptionalhexstring) |
9972
+ | [isListOutputsSpecOp](#function-islistoutputsspecop) | [validateCreateActionInput](#function-validatecreateactioninput) | [verifyTruthy](#function-verifytruthy) |
9973
+ | [isLive](#function-islive) | [validateCreateActionOptions](#function-validatecreateactionoptions) | [wait](#function-wait) |
11304
9974
 
11305
9975
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11306
9976
 
@@ -11347,15 +10017,6 @@ export function asArray(val: string | number[]): number[]
11347
10017
 
11348
10018
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11349
10019
 
11350
- ---
11351
- ##### Function: asArray
11352
-
11353
- ```ts
11354
- export function asArray(val: Buffer | string | number[], encoding?: BufferEncoding): number[]
11355
- ```
11356
-
11357
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11358
-
11359
10020
  ---
11360
10021
  ##### Function: asBsvSdkPrivateKey
11361
10022
 
@@ -11424,37 +10085,6 @@ export function asBsvSdkTx(tx: HexString | number[] | Transaction): Transaction
11424
10085
 
11425
10086
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11426
10087
 
11427
- ---
11428
- ##### Function: asBuffer
11429
-
11430
- Coerce a value to Buffer if currently encoded as a string or
11431
-
11432
- ```ts
11433
- export function asBuffer(val: Buffer | string | number[], encoding?: BufferEncoding): Buffer {
11434
- let b: Buffer;
11435
- if (Buffer.isBuffer(val))
11436
- b = val;
11437
- else if (typeof val === "string")
11438
- b = Buffer.from(val, encoding ?? "hex");
11439
- else
11440
- b = Buffer.from(val);
11441
- return b;
11442
- }
11443
- ```
11444
-
11445
- Returns
11446
-
11447
- input val if it is a Buffer or new Buffer from string val
11448
-
11449
- Argument Details
11450
-
11451
- + **val**
11452
- + Buffer or string or number[]. If string, encoding param applies. If number[], Buffer.from constructor is used.
11453
- + **encoding**
11454
- + defaults to 'hex'. Only applies to val of type string
11455
-
11456
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11457
-
11458
10088
  ---
11459
10089
  ##### Function: asString
11460
10090
 
@@ -11479,32 +10109,6 @@ Argument Details
11479
10109
 
11480
10110
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11481
10111
 
11482
- ---
11483
- ##### Function: asString
11484
-
11485
- Coerce a value to an encoded string if currently a Buffer or number[]
11486
-
11487
- ```ts
11488
- export function asString(val: Buffer | string | number[], encoding?: BufferEncoding): string {
11489
- if (Array.isArray(val))
11490
- val = Buffer.from(val);
11491
- return Buffer.isBuffer(val) ? val.toString(encoding ?? "hex") : val;
11492
- }
11493
- ```
11494
-
11495
- Returns
11496
-
11497
- input val if it is a string; or if number[], first converted to Buffer then as Buffer; if Buffer encoded using `encoding`
11498
-
11499
- Argument Details
11500
-
11501
- + **val**
11502
- + Buffer or string or number[]. If string, encoding param applies. If number[], Buffer.from constructor is used.
11503
- + **encoding**
11504
- + defaults to 'hex'
11505
-
11506
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11507
-
11508
10112
  ---
11509
10113
  ##### Function: attemptToPostReqsToNetwork
11510
10114
 
@@ -11872,6 +10476,54 @@ See also: [AuthId](./client.md#interface-authid), [Wallet](./client.md#class-wal
11872
10476
 
11873
10477
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11874
10478
 
10479
+ ---
10480
+ ##### Function: isBaseBlockHeader
10481
+
10482
+ Type guard function.
10483
+
10484
+ ```ts
10485
+ export function isBaseBlockHeader(header: BaseBlockHeader | BlockHeader | LiveBlockHeader): header is BaseBlockHeader {
10486
+ return typeof header.previousHash === "string";
10487
+ }
10488
+ ```
10489
+
10490
+ See also: [BaseBlockHeader](./services.md#interface-baseblockheader), [BlockHeader](./services.md#interface-blockheader), [LiveBlockHeader](./services.md#interface-liveblockheader)
10491
+
10492
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
10493
+
10494
+ ---
10495
+ ##### Function: isBlockHeader
10496
+
10497
+ Type guard function.
10498
+
10499
+ ```ts
10500
+ export function isBlockHeader(header: BaseBlockHeader | BlockHeader | LiveBlockHeader): header is LiveBlockHeader {
10501
+ return "height" in header && typeof header.previousHash === "string";
10502
+ }
10503
+ ```
10504
+
10505
+ See also: [BaseBlockHeader](./services.md#interface-baseblockheader), [BlockHeader](./services.md#interface-blockheader), [LiveBlockHeader](./services.md#interface-liveblockheader)
10506
+
10507
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
10508
+
10509
+ ---
10510
+ ##### Function: isCreateActionSpecOp
10511
+
10512
+ ```ts
10513
+ export function isCreateActionSpecOp(label: string): boolean
10514
+ ```
10515
+
10516
+ Returns
10517
+
10518
+ true iff the `label` name is a reserved `createAction` special operation identifier.
10519
+
10520
+ Argument Details
10521
+
10522
+ + **label**
10523
+ + Action / Transaction label name value.
10524
+
10525
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
10526
+
11875
10527
  ---
11876
10528
  ##### Function: isHexString
11877
10529
 
@@ -11918,35 +10570,43 @@ Argument Details
11918
10570
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11919
10571
 
11920
10572
  ---
11921
- ##### Function: listActions
10573
+ ##### Function: isLive
10574
+
10575
+ Type guard function.
11922
10576
 
11923
10577
  ```ts
11924
- export async function listActions(storage: StorageKnex, auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
10578
+ export function isLive(header: BlockHeader | LiveBlockHeader): header is LiveBlockHeader {
10579
+ return (header as LiveBlockHeader).headerId !== undefined;
10580
+ }
11925
10581
  ```
11926
10582
 
11927
- See also: [AuthId](./client.md#interface-authid), [StorageKnex](./storage.md#class-storageknex), [ValidListActionsArgs](./client.md#interface-validlistactionsargs)
10583
+ See also: [BlockHeader](./services.md#interface-blockheader), [LiveBlockHeader](./services.md#interface-liveblockheader)
11928
10584
 
11929
10585
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11930
10586
 
11931
10587
  ---
11932
- ##### Function: listCertificates
10588
+ ##### Function: isLiveBlockHeader
10589
+
10590
+ Type guard function.
11933
10591
 
11934
10592
  ```ts
11935
- export async function listCertificates(storage: StorageProvider, auth: sdk.AuthId, vargs: sdk.ValidListCertificatesArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListCertificatesResult>
10593
+ export function isLiveBlockHeader(header: BaseBlockHeader | BlockHeader | LiveBlockHeader): header is LiveBlockHeader {
10594
+ return "chainwork" in header && typeof header.previousHash === "string";
10595
+ }
11936
10596
  ```
11937
10597
 
11938
- See also: [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md#class-storageprovider), [ValidListCertificatesArgs](./client.md#interface-validlistcertificatesargs)
10598
+ See also: [BaseBlockHeader](./services.md#interface-baseblockheader), [BlockHeader](./services.md#interface-blockheader), [LiveBlockHeader](./services.md#interface-liveblockheader)
11939
10599
 
11940
10600
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11941
10601
 
11942
10602
  ---
11943
- ##### Function: listOutputs
10603
+ ##### Function: listCertificates
11944
10604
 
11945
10605
  ```ts
11946
- export async function listOutputs(dsk: StorageKnex, auth: sdk.AuthId, vargs: sdk.ValidListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListOutputsResult>
10606
+ export async function listCertificates(storage: StorageProvider, auth: sdk.AuthId, vargs: sdk.ValidListCertificatesArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListCertificatesResult>
11947
10607
  ```
11948
10608
 
11949
- See also: [AuthId](./client.md#interface-authid), [StorageKnex](./storage.md#class-storageknex), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs)
10609
+ See also: [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md#class-storageprovider), [ValidListCertificatesArgs](./client.md#interface-validlistcertificatesargs)
11950
10610
 
11951
10611
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
11952
10612
 
@@ -12079,17 +10739,6 @@ See also: [AuthId](./client.md#interface-authid), [ValidProveCertificateArgs](./
12079
10739
 
12080
10740
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
12081
10741
 
12082
- ---
12083
- ##### Function: purgeData
12084
-
12085
- ```ts
12086
- export async function purgeData(storage: StorageKnex, params: sdk.PurgeParams, trx?: sdk.TrxToken): Promise<sdk.PurgeResults>
12087
- ```
12088
-
12089
- See also: [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageKnex](./storage.md#class-storageknex), [TrxToken](./client.md#interface-trxtoken)
12090
-
12091
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
12092
-
12093
10742
  ---
12094
10743
  ##### Function: randomBytes
12095
10744
 
@@ -12129,22 +10778,6 @@ count cryptographically secure random bytes as hex encoded string
12129
10778
 
12130
10779
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
12131
10780
 
12132
- ---
12133
- ##### Function: reviewStatus
12134
-
12135
- ```ts
12136
- export async function reviewStatus(storage: StorageKnex, args: {
12137
- agedLimit: Date;
12138
- trx?: sdk.TrxToken;
12139
- }): Promise<{
12140
- log: string;
12141
- }>
12142
- ```
12143
-
12144
- See also: [StorageKnex](./storage.md#class-storageknex), [TrxToken](./client.md#interface-trxtoken)
12145
-
12146
- Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
12147
-
12148
10781
  ---
12149
10782
  ##### Function: setDisableDoubleSpendCheckForTest
12150
10783
 
@@ -12251,7 +10884,7 @@ export function toBinaryBaseBlockHeader(header: sdk.BaseBlockHeader): number[] {
12251
10884
  }
12252
10885
  ```
12253
10886
 
12254
- See also: [BaseBlockHeader](./client.md#interface-baseblockheader), [asArray](./client.md#function-asarray)
10887
+ See also: [BaseBlockHeader](./services.md#interface-baseblockheader), [asArray](./client.md#function-asarray)
12255
10888
 
12256
10889
  Returns
12257
10890
 
@@ -13007,7 +11640,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
13007
11640
  ##### Type: GetRawTxService
13008
11641
 
13009
11642
  ```ts
13010
- export type GetRawTxService = (txid: string, chain: sdk.Chain) => Promise<GetRawTxResult>
11643
+ export type GetRawTxService = (txid: string, chain: Chain) => Promise<GetRawTxResult>
13011
11644
  ```
13012
11645
 
13013
11646
  See also: [Chain](./client.md#type-chain), [GetRawTxResult](./client.md#interface-getrawtxresult)
@@ -13029,7 +11662,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
13029
11662
  ##### Type: GetStatusForTxidsService
13030
11663
 
13031
11664
  ```ts
13032
- export type GetStatusForTxidsService = (txids: string[]) => Promise<sdk.GetStatusForTxidsResult>
11665
+ export type GetStatusForTxidsService = (txids: string[]) => Promise<GetStatusForTxidsResult>
13033
11666
  ```
13034
11667
 
13035
11668
  See also: [GetStatusForTxidsResult](./client.md#interface-getstatusfortxidsresult)
@@ -13271,10 +11904,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
13271
11904
  | [ProvenTxReqNonTerminalStatus](#variable-proventxreqnonterminalstatus) | [specOpInvalidChange](#variable-specopinvalidchange) |
13272
11905
  | [ProvenTxReqTerminalStatus](#variable-proventxreqterminalstatus) | [specOpNoSendActions](#variable-specopnosendactions) |
13273
11906
  | [TESTNET_DEFAULT_SETTINGS](#variable-testnet_default_settings) | [specOpSetWalletChangeParams](#variable-specopsetwalletchangeparams) |
13274
- | [brc29ProtocolID](#variable-brc29protocolid) | [specOpWalletBalance](#variable-specopwalletbalance) |
13275
- | [maxPossibleSatoshis](#variable-maxpossiblesatoshis) | [transactionColumnsWithoutRawTx](#variable-transactioncolumnswithoutrawtx) |
13276
- | [outputColumnsWithoutLockingScript](#variable-outputcolumnswithoutlockingscript) | [transformVerifiableCertificatesWithTrust](#variable-transformverifiablecertificateswithtrust) |
13277
- | [parseResults](#variable-parseresults) | |
11907
+ | [brc29ProtocolID](#variable-brc29protocolid) | [specOpThrowReviewActions](#variable-specopthrowreviewactions) |
11908
+ | [maxPossibleSatoshis](#variable-maxpossiblesatoshis) | [specOpWalletBalance](#variable-specopwalletbalance) |
11909
+ | [outputColumnsWithoutLockingScript](#variable-outputcolumnswithoutlockingscript) | [transactionColumnsWithoutRawTx](#variable-transactioncolumnswithoutrawtx) |
11910
+ | [parseResults](#variable-parseresults) | [transformVerifiableCertificatesWithTrust](#variable-transformverifiablecertificateswithtrust) |
13278
11911
 
13279
11912
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
13280
11913
 
@@ -13289,7 +11922,7 @@ DEFAULT_SETTINGS = {
13289
11922
  trustedCertifiers: [
13290
11923
  {
13291
11924
  name: "Metanet Trust Services",
13292
- description: "Resolves identity information for Babbage-run APIs and Bitcoin infrastructure.",
11925
+ description: "Registry for protocols, baskets, and certificates types",
13293
11926
  iconUrl: "https://bsvblockchain.org/favicon.ico",
13294
11927
  identityKey: "03daf815fe38f83da0ad83b5bedc520aa488aef5cbc93a93c67a7fe60406cbffe8",
13295
11928
  trust: 4
@@ -13507,6 +12140,15 @@ specOpSetWalletChangeParams = "a4979d28ced8581e9c1c92f1001cc7cb3aabf8ea32e10888a
13507
12140
 
13508
12141
  Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
13509
12142
 
12143
+ ---
12144
+ ##### Variable: specOpThrowReviewActions
12145
+
12146
+ ```ts
12147
+ specOpThrowReviewActions = "a496e747fc3ad5fabdd4ae8f91184e71f87539bd3d962aa2548942faaaf0047a"
12148
+ ```
12149
+
12150
+ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
12151
+
13510
12152
  ---
13511
12153
  ##### Variable: specOpWalletBalance
13512
12154