@bsv/wallet-toolbox 1.3.21 → 1.3.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/mobile/out/src/CWIStyleWalletManager.d.ts +437 -0
- package/mobile/out/src/CWIStyleWalletManager.d.ts.map +1 -0
- package/mobile/out/src/CWIStyleWalletManager.js +1255 -0
- package/mobile/out/src/CWIStyleWalletManager.js.map +1 -0
- package/mobile/out/src/SetupClient.d.ts +126 -0
- package/mobile/out/src/SetupClient.d.ts.map +1 -0
- package/mobile/out/src/SetupClient.js +220 -0
- package/mobile/out/src/SetupClient.js.map +1 -0
- package/mobile/out/src/SetupWallet.d.ts +100 -0
- package/mobile/out/src/SetupWallet.d.ts.map +1 -0
- package/mobile/out/src/SetupWallet.js +3 -0
- package/mobile/out/src/SetupWallet.js.map +1 -0
- package/mobile/out/src/SimpleWalletManager.d.ts +169 -0
- package/mobile/out/src/SimpleWalletManager.d.ts.map +1 -0
- package/mobile/out/src/SimpleWalletManager.js +315 -0
- package/mobile/out/src/SimpleWalletManager.js.map +1 -0
- package/mobile/out/src/Wallet.d.ts +177 -0
- package/mobile/out/src/Wallet.d.ts.map +1 -0
- package/mobile/out/src/Wallet.js +742 -0
- package/mobile/out/src/Wallet.js.map +1 -0
- package/mobile/out/src/WalletAuthenticationManager.d.ts +33 -0
- package/mobile/out/src/WalletAuthenticationManager.d.ts.map +1 -0
- package/mobile/out/src/WalletAuthenticationManager.js +113 -0
- package/mobile/out/src/WalletAuthenticationManager.js.map +1 -0
- package/mobile/out/src/WalletPermissionsManager.d.ts +598 -0
- package/mobile/out/src/WalletPermissionsManager.d.ts.map +1 -0
- package/mobile/out/src/WalletPermissionsManager.js +1868 -0
- package/mobile/out/src/WalletPermissionsManager.js.map +1 -0
- package/mobile/out/src/WalletSettingsManager.d.ts +52 -0
- package/mobile/out/src/WalletSettingsManager.d.ts.map +1 -0
- package/mobile/out/src/WalletSettingsManager.js +82 -0
- package/mobile/out/src/WalletSettingsManager.js.map +1 -0
- package/mobile/out/src/index.client.d.ts +19 -0
- package/mobile/out/src/index.client.d.ts.map +1 -0
- package/mobile/out/src/index.client.js +58 -0
- package/mobile/out/src/index.client.js.map +1 -0
- package/mobile/out/src/index.mobile.d.ts +19 -0
- package/mobile/out/src/index.mobile.d.ts.map +1 -0
- package/mobile/out/src/index.mobile.js +58 -0
- package/mobile/out/src/index.mobile.js.map +1 -0
- package/mobile/out/src/monitor/Monitor.d.ts +91 -0
- package/mobile/out/src/monitor/Monitor.d.ts.map +1 -0
- package/mobile/out/src/monitor/Monitor.js +298 -0
- package/mobile/out/src/monitor/Monitor.js.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskCheckForProofs.d.ts +53 -0
- package/mobile/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskCheckForProofs.js +194 -0
- package/mobile/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskCheckNoSends.d.ts +33 -0
- package/mobile/out/src/monitor/tasks/TaskCheckNoSends.d.ts.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskCheckNoSends.js +65 -0
- package/mobile/out/src/monitor/tasks/TaskCheckNoSends.js.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskClock.d.ts +14 -0
- package/mobile/out/src/monitor/tasks/TaskClock.d.ts.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskClock.js +27 -0
- package/mobile/out/src/monitor/tasks/TaskClock.js.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskFailAbandoned.d.ts +20 -0
- package/mobile/out/src/monitor/tasks/TaskFailAbandoned.d.ts.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskFailAbandoned.js +52 -0
- package/mobile/out/src/monitor/tasks/TaskFailAbandoned.js.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskNewHeader.d.ts +15 -0
- package/mobile/out/src/monitor/tasks/TaskNewHeader.d.ts.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskNewHeader.js +43 -0
- package/mobile/out/src/monitor/tasks/TaskNewHeader.js.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskPurge.d.ts +45 -0
- package/mobile/out/src/monitor/tasks/TaskPurge.d.ts.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskPurge.js +34 -0
- package/mobile/out/src/monitor/tasks/TaskPurge.js.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskReviewStatus.d.ts +26 -0
- package/mobile/out/src/monitor/tasks/TaskReviewStatus.d.ts.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskReviewStatus.js +43 -0
- package/mobile/out/src/monitor/tasks/TaskReviewStatus.js.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskSendWaiting.d.ts +35 -0
- package/mobile/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskSendWaiting.js +107 -0
- package/mobile/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskSyncWhenIdle.d.ts +12 -0
- package/mobile/out/src/monitor/tasks/TaskSyncWhenIdle.d.ts.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskSyncWhenIdle.js +22 -0
- package/mobile/out/src/monitor/tasks/TaskSyncWhenIdle.js.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskUnFail.d.ts +41 -0
- package/mobile/out/src/monitor/tasks/TaskUnFail.d.ts.map +1 -0
- package/mobile/out/src/monitor/tasks/TaskUnFail.js +144 -0
- package/mobile/out/src/monitor/tasks/TaskUnFail.js.map +1 -0
- package/mobile/out/src/monitor/tasks/WalletMonitorTask.d.ts +40 -0
- package/mobile/out/src/monitor/tasks/WalletMonitorTask.d.ts.map +1 -0
- package/mobile/out/src/monitor/tasks/WalletMonitorTask.js +37 -0
- package/mobile/out/src/monitor/tasks/WalletMonitorTask.js.map +1 -0
- package/mobile/out/src/sdk/CertOpsWallet.d.ts +7 -0
- package/mobile/out/src/sdk/CertOpsWallet.d.ts.map +1 -0
- package/mobile/out/src/sdk/CertOpsWallet.js +3 -0
- package/mobile/out/src/sdk/CertOpsWallet.js.map +1 -0
- package/mobile/out/src/sdk/PrivilegedKeyManager.d.ts +125 -0
- package/mobile/out/src/sdk/PrivilegedKeyManager.d.ts.map +1 -0
- package/mobile/out/src/sdk/PrivilegedKeyManager.js +293 -0
- package/mobile/out/src/sdk/PrivilegedKeyManager.js.map +1 -0
- package/mobile/out/src/sdk/WERR_errors.d.ts +115 -0
- package/mobile/out/src/sdk/WERR_errors.d.ts.map +1 -0
- package/mobile/out/src/sdk/WERR_errors.js +158 -0
- package/mobile/out/src/sdk/WERR_errors.js.map +1 -0
- package/mobile/out/src/sdk/WalletError.d.ts +44 -0
- package/mobile/out/src/sdk/WalletError.d.ts.map +1 -0
- package/mobile/out/src/sdk/WalletError.js +118 -0
- package/mobile/out/src/sdk/WalletError.js.map +1 -0
- package/mobile/out/src/sdk/WalletServices.interfaces.d.ts +430 -0
- package/mobile/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -0
- package/mobile/out/src/sdk/WalletServices.interfaces.js +3 -0
- package/mobile/out/src/sdk/WalletServices.interfaces.js.map +1 -0
- package/mobile/out/src/sdk/WalletSigner.interfaces.d.ts +10 -0
- package/mobile/out/src/sdk/WalletSigner.interfaces.d.ts.map +1 -0
- package/mobile/out/src/sdk/WalletSigner.interfaces.js +3 -0
- package/mobile/out/src/sdk/WalletSigner.interfaces.js.map +1 -0
- package/mobile/out/src/sdk/WalletStorage.interfaces.d.ts +452 -0
- package/mobile/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -0
- package/mobile/out/src/sdk/WalletStorage.interfaces.js +3 -0
- package/mobile/out/src/sdk/WalletStorage.interfaces.js.map +1 -0
- package/mobile/out/src/sdk/index.d.ts +10 -0
- package/mobile/out/src/sdk/index.d.ts.map +1 -0
- package/mobile/out/src/sdk/index.js +26 -0
- package/mobile/out/src/sdk/index.js.map +1 -0
- package/mobile/out/src/sdk/types.d.ts +158 -0
- package/mobile/out/src/sdk/types.d.ts.map +1 -0
- package/mobile/out/src/sdk/types.js +90 -0
- package/mobile/out/src/sdk/types.js.map +1 -0
- package/mobile/out/src/sdk/validationHelpers.d.ts +301 -0
- package/mobile/out/src/sdk/validationHelpers.d.ts.map +1 -0
- package/mobile/out/src/sdk/validationHelpers.js +629 -0
- package/mobile/out/src/sdk/validationHelpers.js.map +1 -0
- package/mobile/out/src/services/ServiceCollection.d.ts +25 -0
- package/mobile/out/src/services/ServiceCollection.d.ts.map +1 -0
- package/mobile/out/src/services/ServiceCollection.js +43 -0
- package/mobile/out/src/services/ServiceCollection.js.map +1 -0
- package/mobile/out/src/services/Services.d.ts +67 -0
- package/mobile/out/src/services/Services.d.ts.map +1 -0
- package/mobile/out/src/services/Services.js +391 -0
- package/mobile/out/src/services/Services.js.map +1 -0
- package/mobile/out/src/services/chaintracker/ChaintracksChainTracker.d.ts +15 -0
- package/mobile/out/src/services/chaintracker/ChaintracksChainTracker.d.ts.map +1 -0
- package/mobile/out/src/services/chaintracker/ChaintracksChainTracker.js +51 -0
- package/mobile/out/src/services/chaintracker/ChaintracksChainTracker.js.map +1 -0
- package/mobile/out/src/services/chaintracker/chaintracks/BlockHeaderApi.d.ts +98 -0
- package/mobile/out/src/services/chaintracker/chaintracks/BlockHeaderApi.d.ts.map +1 -0
- package/mobile/out/src/services/chaintracker/chaintracks/BlockHeaderApi.js +38 -0
- package/mobile/out/src/services/chaintracker/chaintracks/BlockHeaderApi.js.map +1 -0
- package/mobile/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts +36 -0
- package/mobile/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts.map +1 -0
- package/mobile/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js +128 -0
- package/mobile/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js.map +1 -0
- package/mobile/out/src/services/chaintracker/chaintracks/index.d.ts +3 -0
- package/mobile/out/src/services/chaintracker/chaintracks/index.d.ts.map +1 -0
- package/mobile/out/src/services/chaintracker/chaintracks/index.js +19 -0
- package/mobile/out/src/services/chaintracker/chaintracks/index.js.map +1 -0
- package/mobile/out/src/services/chaintracker/index.d.ts +3 -0
- package/mobile/out/src/services/chaintracker/index.d.ts.map +1 -0
- package/mobile/out/src/services/chaintracker/index.js +19 -0
- package/mobile/out/src/services/chaintracker/index.js.map +1 -0
- package/mobile/out/src/services/createDefaultWalletServicesOptions.d.ts +4 -0
- package/mobile/out/src/services/createDefaultWalletServicesOptions.d.ts.map +1 -0
- package/mobile/out/src/services/createDefaultWalletServicesOptions.js +46 -0
- package/mobile/out/src/services/createDefaultWalletServicesOptions.js.map +1 -0
- package/mobile/out/src/services/index.d.ts +2 -0
- package/mobile/out/src/services/index.d.ts.map +1 -0
- package/mobile/out/src/services/index.js +18 -0
- package/mobile/out/src/services/index.js.map +1 -0
- package/mobile/out/src/services/providers/ARC.d.ts +91 -0
- package/mobile/out/src/services/providers/ARC.d.ts.map +1 -0
- package/mobile/out/src/services/providers/ARC.js +267 -0
- package/mobile/out/src/services/providers/ARC.js.map +1 -0
- package/mobile/out/src/services/providers/Bitails.d.ts +49 -0
- package/mobile/out/src/services/providers/Bitails.d.ts.map +1 -0
- package/mobile/out/src/services/providers/Bitails.js +222 -0
- package/mobile/out/src/services/providers/Bitails.js.map +1 -0
- package/mobile/out/src/services/providers/SdkWhatsOnChain.d.ts +21 -0
- package/mobile/out/src/services/providers/SdkWhatsOnChain.d.ts.map +1 -0
- package/mobile/out/src/services/providers/SdkWhatsOnChain.js +67 -0
- package/mobile/out/src/services/providers/SdkWhatsOnChain.js.map +1 -0
- package/mobile/out/src/services/providers/WhatsOnChain.d.ts +71 -0
- package/mobile/out/src/services/providers/WhatsOnChain.d.ts.map +1 -0
- package/mobile/out/src/services/providers/WhatsOnChain.js +582 -0
- package/mobile/out/src/services/providers/WhatsOnChain.js.map +1 -0
- package/mobile/out/src/services/providers/echangeRates.d.ts +12 -0
- package/mobile/out/src/services/providers/echangeRates.d.ts.map +1 -0
- package/mobile/out/src/services/providers/echangeRates.js +237 -0
- package/mobile/out/src/services/providers/echangeRates.js.map +1 -0
- package/mobile/out/src/services/providers/getBeefForTxid.d.ts +4 -0
- package/mobile/out/src/services/providers/getBeefForTxid.d.ts.map +1 -0
- package/mobile/out/src/services/providers/getBeefForTxid.js +286 -0
- package/mobile/out/src/services/providers/getBeefForTxid.js.map +1 -0
- package/mobile/out/src/signer/WalletSigner.d.ts +11 -0
- package/mobile/out/src/signer/WalletSigner.d.ts.map +1 -0
- package/mobile/out/src/signer/WalletSigner.js +13 -0
- package/mobile/out/src/signer/WalletSigner.js.map +1 -0
- package/mobile/out/src/signer/methods/acquireDirectCertificate.d.ts +4 -0
- package/mobile/out/src/signer/methods/acquireDirectCertificate.d.ts.map +1 -0
- package/mobile/out/src/signer/methods/acquireDirectCertificate.js +45 -0
- package/mobile/out/src/signer/methods/acquireDirectCertificate.js.map +1 -0
- package/mobile/out/src/signer/methods/buildSignableTransaction.d.ts +10 -0
- package/mobile/out/src/signer/methods/buildSignableTransaction.d.ts.map +1 -0
- package/mobile/out/src/signer/methods/buildSignableTransaction.js +126 -0
- package/mobile/out/src/signer/methods/buildSignableTransaction.js.map +1 -0
- package/mobile/out/src/signer/methods/createAction.d.ts +20 -0
- package/mobile/out/src/signer/methods/createAction.d.ts.map +1 -0
- package/mobile/out/src/signer/methods/createAction.js +160 -0
- package/mobile/out/src/signer/methods/createAction.js.map +1 -0
- package/mobile/out/src/signer/methods/internalizeAction.d.ts +31 -0
- package/mobile/out/src/signer/methods/internalizeAction.d.ts.map +1 -0
- package/mobile/out/src/signer/methods/internalizeAction.js +95 -0
- package/mobile/out/src/signer/methods/internalizeAction.js.map +1 -0
- package/mobile/out/src/signer/methods/proveCertificate.d.ts +4 -0
- package/mobile/out/src/signer/methods/proveCertificate.d.ts.map +1 -0
- package/mobile/out/src/signer/methods/proveCertificate.js +29 -0
- package/mobile/out/src/signer/methods/proveCertificate.js.map +1 -0
- package/mobile/out/src/signer/methods/signAction.d.ts +13 -0
- package/mobile/out/src/signer/methods/signAction.d.ts.map +1 -0
- package/mobile/out/src/signer/methods/signAction.js +89 -0
- package/mobile/out/src/signer/methods/signAction.js.map +1 -0
- package/mobile/out/src/storage/StorageIdb.d.ts +208 -0
- package/mobile/out/src/storage/StorageIdb.d.ts.map +1 -0
- package/mobile/out/src/storage/StorageIdb.js +2296 -0
- package/mobile/out/src/storage/StorageIdb.js.map +1 -0
- package/mobile/out/src/storage/StorageProvider.d.ts +209 -0
- package/mobile/out/src/storage/StorageProvider.d.ts.map +1 -0
- package/mobile/out/src/storage/StorageProvider.js +550 -0
- package/mobile/out/src/storage/StorageProvider.js.map +1 -0
- package/mobile/out/src/storage/StorageReader.d.ts +76 -0
- package/mobile/out/src/storage/StorageReader.d.ts.map +1 -0
- package/mobile/out/src/storage/StorageReader.js +129 -0
- package/mobile/out/src/storage/StorageReader.js.map +1 -0
- package/mobile/out/src/storage/StorageReaderWriter.d.ts +87 -0
- package/mobile/out/src/storage/StorageReaderWriter.d.ts.map +1 -0
- package/mobile/out/src/storage/StorageReaderWriter.js +338 -0
- package/mobile/out/src/storage/StorageReaderWriter.js.map +1 -0
- package/mobile/out/src/storage/StorageSyncReader.d.ts +17 -0
- package/mobile/out/src/storage/StorageSyncReader.d.ts.map +1 -0
- package/mobile/out/src/storage/StorageSyncReader.js +38 -0
- package/mobile/out/src/storage/StorageSyncReader.js.map +1 -0
- package/mobile/out/src/storage/WalletStorageManager.d.ts +184 -0
- package/mobile/out/src/storage/WalletStorageManager.d.ts.map +1 -0
- package/mobile/out/src/storage/WalletStorageManager.js +665 -0
- package/mobile/out/src/storage/WalletStorageManager.js.map +1 -0
- package/mobile/out/src/storage/index.client.d.ts +8 -0
- package/mobile/out/src/storage/index.client.d.ts.map +1 -0
- package/mobile/out/src/storage/index.client.js +24 -0
- package/mobile/out/src/storage/index.client.js.map +1 -0
- package/mobile/out/src/storage/index.mobile.d.ts +7 -0
- package/mobile/out/src/storage/index.mobile.d.ts.map +1 -0
- package/mobile/out/src/storage/index.mobile.js +23 -0
- package/mobile/out/src/storage/index.mobile.js.map +1 -0
- package/mobile/out/src/storage/methods/ListActionsSpecOp.d.ts +16 -0
- package/mobile/out/src/storage/methods/ListActionsSpecOp.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/ListActionsSpecOp.js +40 -0
- package/mobile/out/src/storage/methods/ListActionsSpecOp.js.map +1 -0
- package/mobile/out/src/storage/methods/ListOutputsSpecOp.d.ts +26 -0
- package/mobile/out/src/storage/methods/ListOutputsSpecOp.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/ListOutputsSpecOp.js +71 -0
- package/mobile/out/src/storage/methods/ListOutputsSpecOp.js.map +1 -0
- package/mobile/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +41 -0
- package/mobile/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/attemptToPostReqsToNetwork.js +320 -0
- package/mobile/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -0
- package/mobile/out/src/storage/methods/createAction.d.ts +24 -0
- package/mobile/out/src/storage/methods/createAction.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/createAction.js +705 -0
- package/mobile/out/src/storage/methods/createAction.js.map +1 -0
- package/mobile/out/src/storage/methods/generateChange.d.ts +119 -0
- package/mobile/out/src/storage/methods/generateChange.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/generateChange.js +448 -0
- package/mobile/out/src/storage/methods/generateChange.js.map +1 -0
- package/mobile/out/src/storage/methods/getBeefForTransaction.d.ts +22 -0
- package/mobile/out/src/storage/methods/getBeefForTransaction.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/getBeefForTransaction.js +92 -0
- package/mobile/out/src/storage/methods/getBeefForTransaction.js.map +1 -0
- package/mobile/out/src/storage/methods/getSyncChunk.d.ts +10 -0
- package/mobile/out/src/storage/methods/getSyncChunk.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/getSyncChunk.js +271 -0
- package/mobile/out/src/storage/methods/getSyncChunk.js.map +1 -0
- package/mobile/out/src/storage/methods/internalizeAction.d.ts +38 -0
- package/mobile/out/src/storage/methods/internalizeAction.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/internalizeAction.js +371 -0
- package/mobile/out/src/storage/methods/internalizeAction.js.map +1 -0
- package/mobile/out/src/storage/methods/listActionsIdb.d.ts +5 -0
- package/mobile/out/src/storage/methods/listActionsIdb.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/listActionsIdb.js +155 -0
- package/mobile/out/src/storage/methods/listActionsIdb.js.map +1 -0
- package/mobile/out/src/storage/methods/listCertificates.d.ts +5 -0
- package/mobile/out/src/storage/methods/listCertificates.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/listCertificates.js +68 -0
- package/mobile/out/src/storage/methods/listCertificates.js.map +1 -0
- package/mobile/out/src/storage/methods/listOutputsIdb.d.ts +5 -0
- package/mobile/out/src/storage/methods/listOutputsIdb.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/listOutputsIdb.js +181 -0
- package/mobile/out/src/storage/methods/listOutputsIdb.js.map +1 -0
- package/mobile/out/src/storage/methods/processAction.d.ts +35 -0
- package/mobile/out/src/storage/methods/processAction.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/processAction.js +311 -0
- package/mobile/out/src/storage/methods/processAction.js.map +1 -0
- package/mobile/out/src/storage/methods/purgeDataIdb.d.ts +4 -0
- package/mobile/out/src/storage/methods/purgeDataIdb.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/purgeDataIdb.js +9 -0
- package/mobile/out/src/storage/methods/purgeDataIdb.js.map +1 -0
- package/mobile/out/src/storage/methods/reviewStatusIdb.d.ts +20 -0
- package/mobile/out/src/storage/methods/reviewStatusIdb.d.ts.map +1 -0
- package/mobile/out/src/storage/methods/reviewStatusIdb.js +35 -0
- package/mobile/out/src/storage/methods/reviewStatusIdb.js.map +1 -0
- package/mobile/out/src/storage/remoting/StorageClient.d.ts +283 -0
- package/mobile/out/src/storage/remoting/StorageClient.d.ts.map +1 -0
- package/mobile/out/src/storage/remoting/StorageClient.js +477 -0
- package/mobile/out/src/storage/remoting/StorageClient.js.map +1 -0
- package/mobile/out/src/storage/schema/StorageIdbSchema.d.ts +133 -0
- package/mobile/out/src/storage/schema/StorageIdbSchema.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/StorageIdbSchema.js +3 -0
- package/mobile/out/src/storage/schema/StorageIdbSchema.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityBase.d.ts +105 -0
- package/mobile/out/src/storage/schema/entities/EntityBase.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityBase.js +100 -0
- package/mobile/out/src/storage/schema/entities/EntityBase.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityCertificate.d.ts +43 -0
- package/mobile/out/src/storage/schema/entities/EntityCertificate.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityCertificate.js +162 -0
- package/mobile/out/src/storage/schema/entities/EntityCertificate.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityCertificateField.d.ts +32 -0
- package/mobile/out/src/storage/schema/entities/EntityCertificateField.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityCertificateField.js +111 -0
- package/mobile/out/src/storage/schema/entities/EntityCertificateField.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityCommission.d.ts +37 -0
- package/mobile/out/src/storage/schema/entities/EntityCommission.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityCommission.js +127 -0
- package/mobile/out/src/storage/schema/entities/EntityCommission.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityOutput.d.ts +67 -0
- package/mobile/out/src/storage/schema/entities/EntityOutput.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityOutput.js +264 -0
- package/mobile/out/src/storage/schema/entities/EntityOutput.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityOutputBasket.d.ts +35 -0
- package/mobile/out/src/storage/schema/entities/EntityOutputBasket.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityOutputBasket.js +133 -0
- package/mobile/out/src/storage/schema/entities/EntityOutputBasket.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityOutputTag.d.ts +31 -0
- package/mobile/out/src/storage/schema/entities/EntityOutputTag.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityOutputTag.js +104 -0
- package/mobile/out/src/storage/schema/entities/EntityOutputTag.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityOutputTagMap.d.ts +28 -0
- package/mobile/out/src/storage/schema/entities/EntityOutputTagMap.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityOutputTagMap.js +97 -0
- package/mobile/out/src/storage/schema/entities/EntityOutputTagMap.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityProvenTx.d.ts +84 -0
- package/mobile/out/src/storage/schema/entities/EntityProvenTx.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityProvenTx.js +276 -0
- package/mobile/out/src/storage/schema/entities/EntityProvenTx.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityProvenTxReq.d.ts +135 -0
- package/mobile/out/src/storage/schema/entities/EntityProvenTxReq.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityProvenTxReq.js +522 -0
- package/mobile/out/src/storage/schema/entities/EntityProvenTxReq.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntitySyncState.d.ts +67 -0
- package/mobile/out/src/storage/schema/entities/EntitySyncState.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntitySyncState.js +319 -0
- package/mobile/out/src/storage/schema/entities/EntitySyncState.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityTransaction.d.ts +67 -0
- package/mobile/out/src/storage/schema/entities/EntityTransaction.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityTransaction.js +255 -0
- package/mobile/out/src/storage/schema/entities/EntityTransaction.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityTxLabel.d.ts +31 -0
- package/mobile/out/src/storage/schema/entities/EntityTxLabel.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityTxLabel.js +104 -0
- package/mobile/out/src/storage/schema/entities/EntityTxLabel.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityTxLabelMap.d.ts +28 -0
- package/mobile/out/src/storage/schema/entities/EntityTxLabelMap.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityTxLabelMap.js +97 -0
- package/mobile/out/src/storage/schema/entities/EntityTxLabelMap.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityUser.d.ts +29 -0
- package/mobile/out/src/storage/schema/entities/EntityUser.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/EntityUser.js +98 -0
- package/mobile/out/src/storage/schema/entities/EntityUser.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/MergeEntity.d.ts +33 -0
- package/mobile/out/src/storage/schema/entities/MergeEntity.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/MergeEntity.js +62 -0
- package/mobile/out/src/storage/schema/entities/MergeEntity.js.map +1 -0
- package/mobile/out/src/storage/schema/entities/index.d.ts +17 -0
- package/mobile/out/src/storage/schema/entities/index.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/entities/index.js +33 -0
- package/mobile/out/src/storage/schema/entities/index.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableCertificate.d.ts +20 -0
- package/mobile/out/src/storage/schema/tables/TableCertificate.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableCertificate.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableCertificate.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableCertificateField.d.ts +12 -0
- package/mobile/out/src/storage/schema/tables/TableCertificateField.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableCertificateField.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableCertificateField.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableCommission.d.ts +13 -0
- package/mobile/out/src/storage/schema/tables/TableCommission.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableCommission.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableCommission.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableMonitorEvent.d.ts +9 -0
- package/mobile/out/src/storage/schema/tables/TableMonitorEvent.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableMonitorEvent.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableMonitorEvent.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableOutput.d.ts +36 -0
- package/mobile/out/src/storage/schema/tables/TableOutput.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableOutput.js +31 -0
- package/mobile/out/src/storage/schema/tables/TableOutput.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableOutputBasket.d.ts +12 -0
- package/mobile/out/src/storage/schema/tables/TableOutputBasket.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableOutputBasket.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableOutputBasket.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableOutputTag.d.ts +10 -0
- package/mobile/out/src/storage/schema/tables/TableOutputTag.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableOutputTag.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableOutputTag.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableOutputTagMap.d.ts +9 -0
- package/mobile/out/src/storage/schema/tables/TableOutputTagMap.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableOutputTagMap.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableOutputTagMap.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableProvenTx.d.ts +14 -0
- package/mobile/out/src/storage/schema/tables/TableProvenTx.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableProvenTx.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableProvenTx.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableProvenTxReq.d.ts +64 -0
- package/mobile/out/src/storage/schema/tables/TableProvenTxReq.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableProvenTxReq.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableProvenTxReq.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableSettings.d.ts +17 -0
- package/mobile/out/src/storage/schema/tables/TableSettings.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableSettings.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableSettings.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableSyncState.d.ts +18 -0
- package/mobile/out/src/storage/schema/tables/TableSyncState.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableSyncState.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableSyncState.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableTransaction.d.ts +37 -0
- package/mobile/out/src/storage/schema/tables/TableTransaction.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableTransaction.js +21 -0
- package/mobile/out/src/storage/schema/tables/TableTransaction.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableTxLabel.d.ts +10 -0
- package/mobile/out/src/storage/schema/tables/TableTxLabel.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableTxLabel.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableTxLabel.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableTxLabelMap.d.ts +9 -0
- package/mobile/out/src/storage/schema/tables/TableTxLabelMap.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableTxLabelMap.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableTxLabelMap.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableUser.d.ts +16 -0
- package/mobile/out/src/storage/schema/tables/TableUser.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/TableUser.js +3 -0
- package/mobile/out/src/storage/schema/tables/TableUser.js.map +1 -0
- package/mobile/out/src/storage/schema/tables/index.d.ts +17 -0
- package/mobile/out/src/storage/schema/tables/index.d.ts.map +1 -0
- package/mobile/out/src/storage/schema/tables/index.js +33 -0
- package/mobile/out/src/storage/schema/tables/index.js.map +1 -0
- package/mobile/out/src/utility/ScriptTemplateBRC29.d.ts +25 -0
- package/mobile/out/src/utility/ScriptTemplateBRC29.d.ts.map +1 -0
- package/mobile/out/src/utility/ScriptTemplateBRC29.js +48 -0
- package/mobile/out/src/utility/ScriptTemplateBRC29.js.map +1 -0
- package/mobile/out/src/utility/identityUtils.d.ts +31 -0
- package/mobile/out/src/utility/identityUtils.d.ts.map +1 -0
- package/mobile/out/src/utility/identityUtils.js +116 -0
- package/mobile/out/src/utility/identityUtils.js.map +1 -0
- package/mobile/out/src/utility/index.client.d.ts +7 -0
- package/mobile/out/src/utility/index.client.d.ts.map +1 -0
- package/mobile/out/src/utility/index.client.js +23 -0
- package/mobile/out/src/utility/index.client.js.map +1 -0
- package/mobile/out/src/utility/parseTxScriptOffsets.d.ts +14 -0
- package/mobile/out/src/utility/parseTxScriptOffsets.d.ts.map +1 -0
- package/mobile/out/src/utility/parseTxScriptOffsets.js +26 -0
- package/mobile/out/src/utility/parseTxScriptOffsets.js.map +1 -0
- package/mobile/out/src/utility/stampLog.d.ts +18 -0
- package/mobile/out/src/utility/stampLog.d.ts.map +1 -0
- package/mobile/out/src/utility/stampLog.js +72 -0
- package/mobile/out/src/utility/stampLog.js.map +1 -0
- package/mobile/out/src/utility/tscProofToMerklePath.d.ts +8 -0
- package/mobile/out/src/utility/tscProofToMerklePath.d.ts.map +1 -0
- package/mobile/out/src/utility/tscProofToMerklePath.js +41 -0
- package/mobile/out/src/utility/tscProofToMerklePath.js.map +1 -0
- package/mobile/out/src/utility/utilityHelpers.d.ts +129 -0
- package/mobile/out/src/utility/utilityHelpers.d.ts.map +1 -0
- package/mobile/out/src/utility/utilityHelpers.js +266 -0
- package/mobile/out/src/utility/utilityHelpers.js.map +1 -0
- package/mobile/out/src/utility/utilityHelpers.noBuffer.d.ts +9 -0
- package/mobile/out/src/utility/utilityHelpers.noBuffer.d.ts.map +1 -0
- package/mobile/out/src/utility/utilityHelpers.noBuffer.js +23 -0
- package/mobile/out/src/utility/utilityHelpers.noBuffer.js.map +1 -0
- package/mobile/out/src/wab-client/WABClient.d.ts +49 -0
- package/mobile/out/src/wab-client/WABClient.d.ts.map +1 -0
- package/mobile/out/src/wab-client/WABClient.js +80 -0
- package/mobile/out/src/wab-client/WABClient.js.map +1 -0
- package/mobile/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts +34 -0
- package/mobile/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.d.ts.map +1 -0
- package/mobile/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js +16 -0
- package/mobile/out/src/wab-client/auth-method-interactors/AuthMethodInteractor.js.map +1 -0
- package/mobile/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.d.ts +7 -0
- package/mobile/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.d.ts.map +1 -0
- package/mobile/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.js +36 -0
- package/mobile/out/src/wab-client/auth-method-interactors/PersonaIDInteractor.js.map +1 -0
- package/mobile/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.d.ts +28 -0
- package/mobile/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.d.ts.map +1 -0
- package/mobile/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.js +69 -0
- package/mobile/out/src/wab-client/auth-method-interactors/TwilioPhoneInteractor.js.map +1 -0
- package/mobile/out/tsconfig.mobile.tsbuildinfo +1 -0
- package/mobile/package-lock.json +5 -12
- package/mobile/package.json +1 -1
- package/package.json +1 -1
- package/tsconfig.json +3 -0
- package/tsconfig.mobile.json +22 -0
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StorageProvider = void 0;
|
|
4
|
+
exports.validateStorageFeeModel = validateStorageFeeModel;
|
|
5
|
+
const sdk_1 = require("@bsv/sdk");
|
|
6
|
+
const index_client_1 = require("../index.client");
|
|
7
|
+
const getBeefForTransaction_1 = require("./methods/getBeefForTransaction");
|
|
8
|
+
const processAction_1 = require("./methods/processAction");
|
|
9
|
+
const attemptToPostReqsToNetwork_1 = require("./methods/attemptToPostReqsToNetwork");
|
|
10
|
+
const listCertificates_1 = require("./methods/listCertificates");
|
|
11
|
+
const createAction_1 = require("./methods/createAction");
|
|
12
|
+
const internalizeAction_1 = require("./methods/internalizeAction");
|
|
13
|
+
const StorageReaderWriter_1 = require("./StorageReaderWriter");
|
|
14
|
+
const entities_1 = require("./schema/entities");
|
|
15
|
+
class StorageProvider extends StorageReaderWriter_1.StorageReaderWriter {
|
|
16
|
+
static defaultOptions() {
|
|
17
|
+
return {
|
|
18
|
+
feeModel: { model: 'sat/kb', value: 1 },
|
|
19
|
+
commissionSatoshis: 0,
|
|
20
|
+
commissionPubKeyHex: undefined
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
static createStorageBaseOptions(chain) {
|
|
24
|
+
const options = {
|
|
25
|
+
...StorageProvider.defaultOptions(),
|
|
26
|
+
chain
|
|
27
|
+
};
|
|
28
|
+
return options;
|
|
29
|
+
}
|
|
30
|
+
constructor(options) {
|
|
31
|
+
super(options);
|
|
32
|
+
this.isDirty = false;
|
|
33
|
+
this.feeModel = options.feeModel;
|
|
34
|
+
this.commissionPubKeyHex = options.commissionPubKeyHex;
|
|
35
|
+
this.commissionSatoshis = options.commissionSatoshis;
|
|
36
|
+
}
|
|
37
|
+
isStorageProvider() {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
setServices(v) {
|
|
41
|
+
this._services = v;
|
|
42
|
+
}
|
|
43
|
+
getServices() {
|
|
44
|
+
if (!this._services)
|
|
45
|
+
throw new index_client_1.sdk.WERR_INVALID_OPERATION('Must setServices first.');
|
|
46
|
+
return this._services;
|
|
47
|
+
}
|
|
48
|
+
async abortAction(auth, args) {
|
|
49
|
+
if (!auth.userId)
|
|
50
|
+
throw new index_client_1.sdk.WERR_INVALID_PARAMETER('auth.userId', 'valid');
|
|
51
|
+
const userId = auth.userId;
|
|
52
|
+
let reference = args.reference;
|
|
53
|
+
let txid = undefined;
|
|
54
|
+
const r = await this.transaction(async (trx) => {
|
|
55
|
+
let tx = (0, index_client_1.verifyOneOrNone)(await this.findTransactions({
|
|
56
|
+
partial: { reference, userId },
|
|
57
|
+
noRawTx: true,
|
|
58
|
+
trx
|
|
59
|
+
}));
|
|
60
|
+
if (!tx && args.reference.length === 64) {
|
|
61
|
+
// reference may also be a txid
|
|
62
|
+
txid = reference;
|
|
63
|
+
reference = undefined;
|
|
64
|
+
tx = (0, index_client_1.verifyOneOrNone)(await this.findTransactions({
|
|
65
|
+
partial: { txid, userId },
|
|
66
|
+
noRawTx: true,
|
|
67
|
+
trx
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
const unAbortableStatus = ['completed', 'failed', 'sending', 'unproven'];
|
|
71
|
+
if (!tx || !tx.isOutgoing || -1 < unAbortableStatus.findIndex(s => s === tx.status))
|
|
72
|
+
throw new index_client_1.sdk.WERR_INVALID_PARAMETER('reference', 'an inprocess, outgoing action that has not been signed and shared to the network.');
|
|
73
|
+
await this.updateTransactionStatus('failed', tx.transactionId, userId, reference, trx);
|
|
74
|
+
if (tx.txid) {
|
|
75
|
+
const req = await entities_1.EntityProvenTxReq.fromStorageTxid(this, tx.txid, trx);
|
|
76
|
+
if (req) {
|
|
77
|
+
req.addHistoryNote({ what: 'abortAction', reference: args.reference });
|
|
78
|
+
req.status = 'invalid';
|
|
79
|
+
await req.updateStorageDynamicProperties(this, trx);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
const r = {
|
|
83
|
+
aborted: true
|
|
84
|
+
};
|
|
85
|
+
return r;
|
|
86
|
+
});
|
|
87
|
+
return r;
|
|
88
|
+
}
|
|
89
|
+
async internalizeAction(auth, args) {
|
|
90
|
+
return await (0, internalizeAction_1.internalizeAction)(this, auth, args);
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Given an array of transaction txids with current ProvenTxReq ready-to-share status,
|
|
94
|
+
* lookup their ProvenTxReqApi req records.
|
|
95
|
+
* For the txids with reqs and status still ready to send construct a single merged beef.
|
|
96
|
+
*
|
|
97
|
+
* @param txids
|
|
98
|
+
* @param knownTxids
|
|
99
|
+
* @param trx
|
|
100
|
+
*/
|
|
101
|
+
async getReqsAndBeefToShareWithWorld(txids, knownTxids, trx) {
|
|
102
|
+
const r = {
|
|
103
|
+
beef: new sdk_1.Beef(),
|
|
104
|
+
details: []
|
|
105
|
+
};
|
|
106
|
+
for (const txid of txids) {
|
|
107
|
+
const d = {
|
|
108
|
+
txid,
|
|
109
|
+
status: 'unknown'
|
|
110
|
+
};
|
|
111
|
+
r.details.push(d);
|
|
112
|
+
try {
|
|
113
|
+
d.proven = (0, index_client_1.verifyOneOrNone)(await this.findProvenTxs({ partial: { txid }, trx }));
|
|
114
|
+
if (d.proven)
|
|
115
|
+
d.status = 'alreadySent';
|
|
116
|
+
else {
|
|
117
|
+
const alreadySentStatus = ['unmined', 'callback', 'unconfirmed', 'completed'];
|
|
118
|
+
const readyToSendStatus = ['sending', 'unsent', 'nosend', 'unprocessed'];
|
|
119
|
+
const errorStatus = ['unknown', 'nonfinal', 'invalid', 'doubleSpend'];
|
|
120
|
+
d.req = (0, index_client_1.verifyOneOrNone)(await this.findProvenTxReqs({ partial: { txid }, trx }));
|
|
121
|
+
if (!d.req) {
|
|
122
|
+
d.status = 'error';
|
|
123
|
+
d.error = `ERR_UNKNOWN_TXID: ${txid} was not found.`;
|
|
124
|
+
}
|
|
125
|
+
else if (errorStatus.indexOf(d.req.status) > -1) {
|
|
126
|
+
d.status = 'error';
|
|
127
|
+
d.error = `ERR_INVALID_PARAMETER: ${txid} is not ready to send.`;
|
|
128
|
+
}
|
|
129
|
+
else if (alreadySentStatus.indexOf(d.req.status) > -1) {
|
|
130
|
+
d.status = 'alreadySent';
|
|
131
|
+
}
|
|
132
|
+
else if (readyToSendStatus.indexOf(d.req.status) > -1) {
|
|
133
|
+
if (!d.req.rawTx || !d.req.inputBEEF) {
|
|
134
|
+
d.status = 'error';
|
|
135
|
+
d.error = `ERR_INTERNAL: ${txid} req is missing rawTx or beef.`;
|
|
136
|
+
}
|
|
137
|
+
else
|
|
138
|
+
d.status = 'readyToSend';
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
d.status = 'error';
|
|
142
|
+
d.error = `ERR_INTERNAL: ${txid} has unexpected req status ${d.req.status}`;
|
|
143
|
+
}
|
|
144
|
+
if (d.status === 'readyToSend') {
|
|
145
|
+
await this.mergeReqToBeefToShareExternally(d.req, r.beef, knownTxids, trx);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
catch (eu) {
|
|
150
|
+
const e = index_client_1.sdk.WalletError.fromUnknown(eu);
|
|
151
|
+
d.error = `${e.name}: ${e.message}`;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return r;
|
|
155
|
+
}
|
|
156
|
+
async mergeReqToBeefToShareExternally(req, mergeToBeef, knownTxids, trx) {
|
|
157
|
+
const { rawTx, inputBEEF: beef } = req;
|
|
158
|
+
if (!rawTx || !beef)
|
|
159
|
+
throw new index_client_1.sdk.WERR_INTERNAL(`req rawTx and beef must be valid.`);
|
|
160
|
+
mergeToBeef.mergeRawTx((0, index_client_1.asArray)(rawTx));
|
|
161
|
+
mergeToBeef.mergeBeef((0, index_client_1.asArray)(beef));
|
|
162
|
+
const tx = sdk_1.Transaction.fromBinary((0, index_client_1.asArray)(rawTx));
|
|
163
|
+
for (const input of tx.inputs) {
|
|
164
|
+
if (!input.sourceTXID)
|
|
165
|
+
throw new index_client_1.sdk.WERR_INTERNAL(`req all transaction inputs must have valid sourceTXID`);
|
|
166
|
+
const txid = input.sourceTXID;
|
|
167
|
+
const btx = mergeToBeef.findTxid(txid);
|
|
168
|
+
if (!btx) {
|
|
169
|
+
if (knownTxids && knownTxids.indexOf(txid) > -1)
|
|
170
|
+
mergeToBeef.mergeTxidOnly(txid);
|
|
171
|
+
else
|
|
172
|
+
await this.getValidBeefForKnownTxid(txid, mergeToBeef, undefined, knownTxids, trx);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Checks if txid is a known valid ProvenTx and returns it if found.
|
|
178
|
+
* Next checks if txid is a current ProvenTxReq and returns that if found.
|
|
179
|
+
* If `newReq` is provided and an existing ProvenTxReq isn't found,
|
|
180
|
+
* use `newReq` to create a new ProvenTxReq.
|
|
181
|
+
*
|
|
182
|
+
* This is safe "findOrInsert" operation using retry if unique index constraint
|
|
183
|
+
* is violated by a race condition insert.
|
|
184
|
+
*
|
|
185
|
+
* @param txid
|
|
186
|
+
* @param newReq
|
|
187
|
+
* @param trx
|
|
188
|
+
* @returns
|
|
189
|
+
*/
|
|
190
|
+
async getProvenOrReq(txid, newReq, trx) {
|
|
191
|
+
if (newReq && txid !== newReq.txid)
|
|
192
|
+
throw new index_client_1.sdk.WERR_INVALID_PARAMETER('newReq', `same txid`);
|
|
193
|
+
const r = { proven: undefined, req: undefined };
|
|
194
|
+
r.proven = (0, index_client_1.verifyOneOrNone)(await this.findProvenTxs({ partial: { txid }, trx }));
|
|
195
|
+
if (r.proven)
|
|
196
|
+
return r;
|
|
197
|
+
for (let retry = 0;; retry++) {
|
|
198
|
+
try {
|
|
199
|
+
r.req = (0, index_client_1.verifyOneOrNone)(await this.findProvenTxReqs({ partial: { txid }, trx }));
|
|
200
|
+
if (!r.req && !newReq)
|
|
201
|
+
break;
|
|
202
|
+
if (!r.req && newReq) {
|
|
203
|
+
await this.insertProvenTxReq(newReq, trx);
|
|
204
|
+
}
|
|
205
|
+
if (r.req && newReq) {
|
|
206
|
+
// Merge history and notify into existing
|
|
207
|
+
const req1 = new entities_1.EntityProvenTxReq(r.req);
|
|
208
|
+
req1.mergeHistory(newReq, undefined, true);
|
|
209
|
+
req1.mergeNotifyTransactionIds(newReq);
|
|
210
|
+
await req1.updateStorageDynamicProperties(this, trx);
|
|
211
|
+
}
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
catch (eu) {
|
|
215
|
+
if (retry > 0)
|
|
216
|
+
throw eu;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return r;
|
|
220
|
+
}
|
|
221
|
+
async updateTransactionsStatus(transactionIds, status, trx) {
|
|
222
|
+
await this.transaction(async (trx) => {
|
|
223
|
+
for (const id of transactionIds) {
|
|
224
|
+
await this.updateTransactionStatus(status, id, undefined, undefined, trx);
|
|
225
|
+
}
|
|
226
|
+
}, trx);
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* For all `status` values besides 'failed', just updates the transaction records status property.
|
|
230
|
+
*
|
|
231
|
+
* For 'status' of 'failed', attempts to make outputs previously allocated as inputs to this transaction usable again.
|
|
232
|
+
*
|
|
233
|
+
* @param status
|
|
234
|
+
* @param transactionId
|
|
235
|
+
* @param userId
|
|
236
|
+
* @param reference
|
|
237
|
+
* @param trx
|
|
238
|
+
*/
|
|
239
|
+
async updateTransactionStatus(status, transactionId, userId, reference, trx) {
|
|
240
|
+
if (!transactionId && !(userId && reference))
|
|
241
|
+
throw new index_client_1.sdk.WERR_MISSING_PARAMETER('either transactionId or userId and reference');
|
|
242
|
+
await this.transaction(async (trx) => {
|
|
243
|
+
const where = {};
|
|
244
|
+
if (transactionId)
|
|
245
|
+
where.transactionId = transactionId;
|
|
246
|
+
if (userId)
|
|
247
|
+
where.userId = userId;
|
|
248
|
+
if (reference)
|
|
249
|
+
where.reference = reference;
|
|
250
|
+
const tx = (0, index_client_1.verifyOne)(await this.findTransactions({ partial: where, noRawTx: true, trx }));
|
|
251
|
+
//if (tx.status === status)
|
|
252
|
+
// no change required. Assume inputs and outputs spendable and spentBy are valid for status.
|
|
253
|
+
//return
|
|
254
|
+
// Once completed, this method cannot be used to "uncomplete" transaction.
|
|
255
|
+
if ((status !== 'completed' && tx.status === 'completed') || tx.provenTxId)
|
|
256
|
+
throw new index_client_1.sdk.WERR_INVALID_OPERATION('The status of a "completed" transaction cannot be changed.');
|
|
257
|
+
// It is not possible to un-fail a transaction. Information is lost and not recoverable.
|
|
258
|
+
if (status !== 'failed' && tx.status === 'failed')
|
|
259
|
+
throw new index_client_1.sdk.WERR_INVALID_OPERATION(`A "failed" transaction may not be un-failed by this method.`);
|
|
260
|
+
switch (status) {
|
|
261
|
+
case 'failed':
|
|
262
|
+
{
|
|
263
|
+
// Attempt to make outputs previously allocated as inputs to this transaction usable again.
|
|
264
|
+
// Only clear input's spentBy and reset spendable = true if it references this transaction
|
|
265
|
+
const t = new entities_1.EntityTransaction(tx);
|
|
266
|
+
const inputs = await t.getInputs(this, trx);
|
|
267
|
+
for (const input of inputs) {
|
|
268
|
+
// input is a prior output belonging to userId that reference this transaction either by `spentBy`
|
|
269
|
+
// or by txid and vout.
|
|
270
|
+
await this.updateOutput((0, index_client_1.verifyId)(input.outputId), { spendable: true, spentBy: undefined }, trx);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
break;
|
|
274
|
+
case 'nosend':
|
|
275
|
+
case 'unsigned':
|
|
276
|
+
case 'unprocessed':
|
|
277
|
+
case 'sending':
|
|
278
|
+
case 'unproven':
|
|
279
|
+
case 'completed':
|
|
280
|
+
break;
|
|
281
|
+
default:
|
|
282
|
+
throw new index_client_1.sdk.WERR_INVALID_PARAMETER('status', `not be ${status}`);
|
|
283
|
+
}
|
|
284
|
+
await this.updateTransaction(tx.transactionId, { status }, trx);
|
|
285
|
+
}, trx);
|
|
286
|
+
}
|
|
287
|
+
async createAction(auth, args) {
|
|
288
|
+
if (!auth.userId)
|
|
289
|
+
throw new index_client_1.sdk.WERR_UNAUTHORIZED();
|
|
290
|
+
return await (0, createAction_1.createAction)(this, auth, args);
|
|
291
|
+
}
|
|
292
|
+
async processAction(auth, args) {
|
|
293
|
+
if (!auth.userId)
|
|
294
|
+
throw new index_client_1.sdk.WERR_UNAUTHORIZED();
|
|
295
|
+
return await (0, processAction_1.processAction)(this, auth, args);
|
|
296
|
+
}
|
|
297
|
+
async attemptToPostReqsToNetwork(reqs, trx) {
|
|
298
|
+
return await (0, attemptToPostReqsToNetwork_1.attemptToPostReqsToNetwork)(this, reqs, trx);
|
|
299
|
+
}
|
|
300
|
+
async listCertificates(auth, args) {
|
|
301
|
+
return await (0, listCertificates_1.listCertificates)(this, auth, args);
|
|
302
|
+
}
|
|
303
|
+
async verifyKnownValidTransaction(txid, trx) {
|
|
304
|
+
const { proven, rawTx } = await this.getProvenOrRawTx(txid, trx);
|
|
305
|
+
return proven != undefined || rawTx != undefined;
|
|
306
|
+
}
|
|
307
|
+
async getValidBeefForKnownTxid(txid, mergeToBeef, trustSelf, knownTxids, trx) {
|
|
308
|
+
const beef = await this.getValidBeefForTxid(txid, mergeToBeef, trustSelf, knownTxids, trx);
|
|
309
|
+
if (!beef)
|
|
310
|
+
throw new index_client_1.sdk.WERR_INVALID_PARAMETER('txid', `${txid} is not known to storage.`);
|
|
311
|
+
return beef;
|
|
312
|
+
}
|
|
313
|
+
async getValidBeefForTxid(txid, mergeToBeef, trustSelf, knownTxids, trx) {
|
|
314
|
+
const beef = mergeToBeef || new sdk_1.Beef();
|
|
315
|
+
const r = await this.getProvenOrRawTx(txid, trx);
|
|
316
|
+
if (r.proven) {
|
|
317
|
+
if (trustSelf === 'known')
|
|
318
|
+
beef.mergeTxidOnly(txid);
|
|
319
|
+
else {
|
|
320
|
+
beef.mergeRawTx(r.proven.rawTx);
|
|
321
|
+
const mp = new entities_1.EntityProvenTx(r.proven).getMerklePath();
|
|
322
|
+
beef.mergeBump(mp);
|
|
323
|
+
return beef;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
if (r.rawTx && r.inputBEEF) {
|
|
327
|
+
if (trustSelf === 'known')
|
|
328
|
+
beef.mergeTxidOnly(txid);
|
|
329
|
+
else {
|
|
330
|
+
beef.mergeRawTx(r.rawTx);
|
|
331
|
+
beef.mergeBeef(r.inputBEEF);
|
|
332
|
+
const tx = sdk_1.Transaction.fromBinary(r.rawTx);
|
|
333
|
+
for (const input of tx.inputs) {
|
|
334
|
+
const btx = beef.findTxid(input.sourceTXID);
|
|
335
|
+
if (!btx) {
|
|
336
|
+
if (knownTxids && knownTxids.indexOf(input.sourceTXID) > -1)
|
|
337
|
+
beef.mergeTxidOnly(input.sourceTXID);
|
|
338
|
+
else
|
|
339
|
+
await this.getValidBeefForKnownTxid(input.sourceTXID, beef, trustSelf, knownTxids, trx);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
return beef;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return undefined;
|
|
346
|
+
}
|
|
347
|
+
async getBeefForTransaction(txid, options) {
|
|
348
|
+
return await (0, getBeefForTransaction_1.getBeefForTransaction)(this, txid, options);
|
|
349
|
+
}
|
|
350
|
+
async findMonitorEventById(id, trx) {
|
|
351
|
+
return (0, index_client_1.verifyOneOrNone)(await this.findMonitorEvents({ partial: { id }, trx }));
|
|
352
|
+
}
|
|
353
|
+
async relinquishCertificate(auth, args) {
|
|
354
|
+
const vargs = index_client_1.sdk.validateRelinquishCertificateArgs(args);
|
|
355
|
+
const cert = (0, index_client_1.verifyOne)(await this.findCertificates({
|
|
356
|
+
partial: {
|
|
357
|
+
certifier: vargs.certifier,
|
|
358
|
+
serialNumber: vargs.serialNumber,
|
|
359
|
+
type: vargs.type
|
|
360
|
+
}
|
|
361
|
+
}));
|
|
362
|
+
return await this.updateCertificate(cert.certificateId, {
|
|
363
|
+
isDeleted: true
|
|
364
|
+
});
|
|
365
|
+
}
|
|
366
|
+
async relinquishOutput(auth, args) {
|
|
367
|
+
const vargs = index_client_1.sdk.validateRelinquishOutputArgs(args);
|
|
368
|
+
const { txid, vout } = index_client_1.sdk.parseWalletOutpoint(vargs.output);
|
|
369
|
+
const output = (0, index_client_1.verifyOne)(await this.findOutputs({ partial: { txid, vout } }));
|
|
370
|
+
return await this.updateOutput(output.outputId, { basketId: undefined });
|
|
371
|
+
}
|
|
372
|
+
async processSyncChunk(args, chunk) {
|
|
373
|
+
const user = (0, index_client_1.verifyTruthy)(await this.findUserByIdentityKey(args.identityKey));
|
|
374
|
+
const ss = new entities_1.EntitySyncState((0, index_client_1.verifyOne)(await this.findSyncStates({
|
|
375
|
+
partial: {
|
|
376
|
+
storageIdentityKey: args.fromStorageIdentityKey,
|
|
377
|
+
userId: user.userId
|
|
378
|
+
}
|
|
379
|
+
})));
|
|
380
|
+
const r = await ss.processSyncChunk(this, args, chunk);
|
|
381
|
+
return r;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* Handles storage changes when a valid MerklePath and mined block header are found for a ProvenTxReq txid.
|
|
385
|
+
*
|
|
386
|
+
* Performs the following storage updates (typically):
|
|
387
|
+
* 1. Lookup the exising `ProvenTxReq` record for its rawTx
|
|
388
|
+
* 2. Insert a new ProvenTx record using properties from `args` and rawTx, yielding a new provenTxId
|
|
389
|
+
* 3. Update ProvenTxReq record with status 'completed' and new provenTxId value (and history of status changed)
|
|
390
|
+
* 4. Unpack notify transactionIds from req and update each transaction's status to 'completed', provenTxId value.
|
|
391
|
+
* 5. Update ProvenTxReq history again to record that transactions have been notified.
|
|
392
|
+
* 6. Return results...
|
|
393
|
+
*
|
|
394
|
+
* Alterations of "typically" to handle:
|
|
395
|
+
*/
|
|
396
|
+
async updateProvenTxReqWithNewProvenTx(args) {
|
|
397
|
+
const req = await entities_1.EntityProvenTxReq.fromStorageId(this, args.provenTxReqId);
|
|
398
|
+
let proven;
|
|
399
|
+
if (req.provenTxId) {
|
|
400
|
+
// Someone beat us to it, grab what we need for results...
|
|
401
|
+
proven = new entities_1.EntityProvenTx((0, index_client_1.verifyOne)(await this.findProvenTxs({ partial: { txid: args.txid } })));
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
let isNew;
|
|
405
|
+
({ proven, isNew } = await this.transaction(async (trx) => {
|
|
406
|
+
const { proven: api, isNew } = await this.findOrInsertProvenTx({
|
|
407
|
+
created_at: new Date(),
|
|
408
|
+
updated_at: new Date(),
|
|
409
|
+
provenTxId: 0,
|
|
410
|
+
txid: args.txid,
|
|
411
|
+
height: args.height,
|
|
412
|
+
index: args.index,
|
|
413
|
+
merklePath: args.merklePath,
|
|
414
|
+
rawTx: req.rawTx,
|
|
415
|
+
blockHash: args.blockHash,
|
|
416
|
+
merkleRoot: args.merkleRoot
|
|
417
|
+
}, trx);
|
|
418
|
+
proven = new entities_1.EntityProvenTx(api);
|
|
419
|
+
if (isNew) {
|
|
420
|
+
req.status = 'completed';
|
|
421
|
+
req.provenTxId = proven.provenTxId;
|
|
422
|
+
await req.updateStorageDynamicProperties(this, trx);
|
|
423
|
+
// upate the transaction notifications outside of storage transaction....
|
|
424
|
+
}
|
|
425
|
+
return { proven, isNew };
|
|
426
|
+
}));
|
|
427
|
+
if (isNew) {
|
|
428
|
+
const ids = req.notify.transactionIds || [];
|
|
429
|
+
if (ids.length > 0) {
|
|
430
|
+
for (const id of ids) {
|
|
431
|
+
try {
|
|
432
|
+
await this.updateTransaction(id, {
|
|
433
|
+
provenTxId: proven.provenTxId,
|
|
434
|
+
status: 'completed'
|
|
435
|
+
});
|
|
436
|
+
req.addHistoryNote({ what: 'notifyTxOfProof', transactionId: id });
|
|
437
|
+
}
|
|
438
|
+
catch (eu) {
|
|
439
|
+
const { code, description } = index_client_1.sdk.WalletError.fromUnknown(eu);
|
|
440
|
+
const { provenTxId } = proven;
|
|
441
|
+
req.addHistoryNote({ what: 'notifyTxOfProofError', id, provenTxId, code, description });
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
await req.updateStorageDynamicProperties(this);
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
const r = {
|
|
449
|
+
status: req.status,
|
|
450
|
+
history: req.apiHistory,
|
|
451
|
+
provenTxId: proven.provenTxId
|
|
452
|
+
};
|
|
453
|
+
return r;
|
|
454
|
+
}
|
|
455
|
+
/**
|
|
456
|
+
* For each spendable output in the 'default' basket of the authenticated user,
|
|
457
|
+
* verify that the output script, satoshis, vout and txid match that of an output
|
|
458
|
+
* still in the mempool of at least one service provider.
|
|
459
|
+
*
|
|
460
|
+
* @returns object with invalidSpendableOutputs array. A good result is an empty array.
|
|
461
|
+
*/
|
|
462
|
+
async confirmSpendableOutputs() {
|
|
463
|
+
const invalidSpendableOutputs = [];
|
|
464
|
+
const users = await this.findUsers({ partial: {} });
|
|
465
|
+
for (const { userId } of users) {
|
|
466
|
+
const defaultBasket = (0, index_client_1.verifyOne)(await this.findOutputBaskets({ partial: { userId, name: 'default' } }));
|
|
467
|
+
const where = {
|
|
468
|
+
userId,
|
|
469
|
+
basketId: defaultBasket.basketId,
|
|
470
|
+
spendable: true
|
|
471
|
+
};
|
|
472
|
+
const outputs = await this.findOutputs({ partial: where });
|
|
473
|
+
const services = this.getServices();
|
|
474
|
+
for (let i = outputs.length - 1; i >= 0; i--) {
|
|
475
|
+
const o = outputs[i];
|
|
476
|
+
const oid = (0, index_client_1.verifyId)(o.outputId);
|
|
477
|
+
if (o.spendable) {
|
|
478
|
+
let ok = false;
|
|
479
|
+
if (o.lockingScript && o.lockingScript.length > 0) {
|
|
480
|
+
const hash = services.hashOutputScript((0, index_client_1.asString)(o.lockingScript));
|
|
481
|
+
const r = await services.getUtxoStatus(hash, undefined, `${o.txid}.${o.vout}`);
|
|
482
|
+
if (r.isUtxo === true)
|
|
483
|
+
ok = true;
|
|
484
|
+
}
|
|
485
|
+
if (!ok)
|
|
486
|
+
invalidSpendableOutputs.push(o);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
return { invalidSpendableOutputs };
|
|
491
|
+
}
|
|
492
|
+
async updateProvenTxReqDynamics(id, update, trx) {
|
|
493
|
+
const partial = {};
|
|
494
|
+
if (update['updated_at'])
|
|
495
|
+
partial['updated_at'] = update['updated_at'];
|
|
496
|
+
if (update['provenTxId'])
|
|
497
|
+
partial['provenTxId'] = update['provenTxId'];
|
|
498
|
+
if (update['status'])
|
|
499
|
+
partial['status'] = update['status'];
|
|
500
|
+
if (Number.isInteger(update['attempts']))
|
|
501
|
+
partial['attempts'] = update['attempts'];
|
|
502
|
+
if (update['notified'] !== undefined)
|
|
503
|
+
partial['notified'] = update['notified'];
|
|
504
|
+
if (update['batch'])
|
|
505
|
+
partial['batch'] = update['batch'];
|
|
506
|
+
if (update['history'])
|
|
507
|
+
partial['history'] = update['history'];
|
|
508
|
+
if (update['notify'])
|
|
509
|
+
partial['notify'] = update['notify'];
|
|
510
|
+
return await this.updateProvenTxReq(id, partial, trx);
|
|
511
|
+
}
|
|
512
|
+
async extendOutput(o, includeBasket = false, includeTags = false, trx) {
|
|
513
|
+
const ox = o;
|
|
514
|
+
if (includeBasket && ox.basketId)
|
|
515
|
+
ox.basket = await this.findOutputBasketById(o.basketId, trx);
|
|
516
|
+
if (includeTags) {
|
|
517
|
+
ox.tags = await this.getTagsForOutputId(o.outputId);
|
|
518
|
+
}
|
|
519
|
+
return o;
|
|
520
|
+
}
|
|
521
|
+
async validateOutputScript(o, trx) {
|
|
522
|
+
// without offset and length values return what we have (make no changes)
|
|
523
|
+
if (!o.scriptLength || !o.scriptOffset || !o.txid)
|
|
524
|
+
return;
|
|
525
|
+
// if there is an outputScript and its length is the expected length return what we have.
|
|
526
|
+
if (o.lockingScript && o.lockingScript.length === o.scriptLength)
|
|
527
|
+
return;
|
|
528
|
+
// outputScript is missing or has incorrect length...
|
|
529
|
+
const script = await this.getRawTxOfKnownValidTransaction(o.txid, o.scriptOffset, o.scriptLength, trx);
|
|
530
|
+
if (!script)
|
|
531
|
+
return;
|
|
532
|
+
o.lockingScript = script;
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
exports.StorageProvider = StorageProvider;
|
|
536
|
+
function validateStorageFeeModel(v) {
|
|
537
|
+
const r = {
|
|
538
|
+
model: 'sat/kb',
|
|
539
|
+
value: 1
|
|
540
|
+
};
|
|
541
|
+
if (typeof v === 'object') {
|
|
542
|
+
if (v.model !== 'sat/kb')
|
|
543
|
+
throw new index_client_1.sdk.WERR_INVALID_PARAMETER('StorageFeeModel.model', `"sat/kb"`);
|
|
544
|
+
if (typeof v.value === 'number') {
|
|
545
|
+
r.value = v.value;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
return r;
|
|
549
|
+
}
|
|
550
|
+
//# sourceMappingURL=StorageProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StorageProvider.js","sourceRoot":"","sources":["../../../../src/storage/StorageProvider.ts"],"names":[],"mappings":";;;AA6qBA,0DAYC;AAzrBD,kCAciB;AACjB,kDAkBwB;AACxB,2EAAuE;AACvE,2DAAmG;AACnG,qFAA0G;AAC1G,iEAA6D;AAC7D,yDAAqD;AACrD,mEAA+D;AAC/D,+DAAuF;AACvF,gDAAyG;AAEzG,MAAsB,eAAgB,SAAQ,yCAAmB;IAQ/D,MAAM,CAAC,cAAc;QACnB,OAAO;YACL,QAAQ,EAAuB,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE;YAC5D,kBAAkB,EAAE,CAAC;YACrB,mBAAmB,EAAE,SAAS;SAC/B,CAAA;IACH,CAAC;IAED,MAAM,CAAC,wBAAwB,CAAC,KAAgB;QAC9C,MAAM,OAAO,GAA2B;YACtC,GAAG,eAAe,CAAC,cAAc,EAAE;YACnC,KAAK;SACN,CAAA;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IAED,YAAY,OAA+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,IAAI,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,YAAY,EAAE,GAAG,CAAC,CAAA;QACtG,IAAI,CAAC,MAAM;YAAE,OAAM;QACnB,CAAC,CAAC,aAAa,GAAG,MAAM,CAAA;IAC1B,CAAC;CACF;AAhnBD,0CAgnBC;AAkBD,SAAgB,uBAAuB,CAAC,CAAuB;IAC7D,MAAM,CAAC,GAAwB;QAC7B,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,CAAC;KACT,CAAA;IACD,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC1B,IAAI,CAAC,CAAC,KAAK,KAAK,QAAQ;YAAE,MAAM,IAAI,kBAAG,CAAC,sBAAsB,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAA;QACnG,IAAI,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YAChC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAA;QACnB,CAAC;IACH,CAAC;IACD,OAAO,CAAC,CAAA;AACV,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { sdk, TableCertificateField, TableCertificateX, TableCommission, TableMonitorEvent, TableOutput, TableOutputBasket, TableOutputTag, TableOutputTagMap, TableProvenTx, TableProvenTxReq, TableSettings, TableSyncState, TableTransaction, TableTxLabel, TableTxLabelMap, TableUser } from '../index.client';
|
|
2
|
+
/**
|
|
3
|
+
* The `StorageReader` abstract class is the base of the concrete wallet storage provider classes.
|
|
4
|
+
*
|
|
5
|
+
* It is the minimal interface required to read all wallet state records and is the base class for sync readers.
|
|
6
|
+
*
|
|
7
|
+
* The next class in the heirarchy is the `StorageReaderWriter` which supports sync readers and writers.
|
|
8
|
+
*
|
|
9
|
+
* The last class in the heirarchy is the `Storage` class which supports all active wallet operations.
|
|
10
|
+
*
|
|
11
|
+
* The ability to construct a properly configured instance of this class implies authentication.
|
|
12
|
+
* As such there are no user specific authenticated access checks implied in the implementation of any of these methods.
|
|
13
|
+
*/
|
|
14
|
+
export declare abstract class StorageReader implements sdk.WalletStorageSyncReader {
|
|
15
|
+
chain: sdk.Chain;
|
|
16
|
+
_settings?: TableSettings;
|
|
17
|
+
whenLastAccess?: Date;
|
|
18
|
+
get dbtype(): DBType | undefined;
|
|
19
|
+
constructor(options: StorageReaderOptions);
|
|
20
|
+
isAvailable(): boolean;
|
|
21
|
+
makeAvailable(): Promise<TableSettings>;
|
|
22
|
+
getSettings(): TableSettings;
|
|
23
|
+
isStorageProvider(): boolean;
|
|
24
|
+
abstract destroy(): Promise<void>;
|
|
25
|
+
abstract transaction<T>(scope: (trx: sdk.TrxToken) => Promise<T>, trx?: sdk.TrxToken): Promise<T>;
|
|
26
|
+
abstract readSettings(trx?: sdk.TrxToken): Promise<TableSettings>;
|
|
27
|
+
abstract findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<TableCertificateField[]>;
|
|
28
|
+
abstract findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>;
|
|
29
|
+
abstract findCommissions(args: sdk.FindCommissionsArgs): Promise<TableCommission[]>;
|
|
30
|
+
abstract findMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<TableMonitorEvent[]>;
|
|
31
|
+
abstract findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>;
|
|
32
|
+
abstract findOutputs(args: sdk.FindOutputsArgs): Promise<TableOutput[]>;
|
|
33
|
+
abstract findOutputTags(args: sdk.FindOutputTagsArgs): Promise<TableOutputTag[]>;
|
|
34
|
+
abstract findSyncStates(args: sdk.FindSyncStatesArgs): Promise<TableSyncState[]>;
|
|
35
|
+
abstract findTransactions(args: sdk.FindTransactionsArgs): Promise<TableTransaction[]>;
|
|
36
|
+
abstract findTxLabels(args: sdk.FindTxLabelsArgs): Promise<TableTxLabel[]>;
|
|
37
|
+
abstract findUsers(args: sdk.FindUsersArgs): Promise<TableUser[]>;
|
|
38
|
+
abstract countCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<number>;
|
|
39
|
+
abstract countCertificates(args: sdk.FindCertificatesArgs): Promise<number>;
|
|
40
|
+
abstract countCommissions(args: sdk.FindCommissionsArgs): Promise<number>;
|
|
41
|
+
abstract countMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<number>;
|
|
42
|
+
abstract countOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<number>;
|
|
43
|
+
abstract countOutputs(args: sdk.FindOutputsArgs): Promise<number>;
|
|
44
|
+
abstract countOutputTags(args: sdk.FindOutputTagsArgs): Promise<number>;
|
|
45
|
+
abstract countSyncStates(args: sdk.FindSyncStatesArgs): Promise<number>;
|
|
46
|
+
abstract countTransactions(args: sdk.FindTransactionsArgs): Promise<number>;
|
|
47
|
+
abstract countTxLabels(args: sdk.FindTxLabelsArgs): Promise<number>;
|
|
48
|
+
abstract countUsers(args: sdk.FindUsersArgs): Promise<number>;
|
|
49
|
+
abstract getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTx[]>;
|
|
50
|
+
abstract getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTxReq[]>;
|
|
51
|
+
abstract getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableTxLabelMap[]>;
|
|
52
|
+
abstract getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableOutputTagMap[]>;
|
|
53
|
+
findUserByIdentityKey(key: string): Promise<TableUser | undefined>;
|
|
54
|
+
getSyncChunk(args: sdk.RequestSyncChunkArgs): Promise<sdk.SyncChunk>;
|
|
55
|
+
/**
|
|
56
|
+
* Force dates to strings on SQLite and Date objects on MySQL
|
|
57
|
+
* @param date
|
|
58
|
+
* @returns
|
|
59
|
+
*/
|
|
60
|
+
validateEntityDate(date: Date | string | number): Date | string;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @param date
|
|
64
|
+
* @param useNowAsDefault if true and date is null or undefiend, set to current time.
|
|
65
|
+
* @returns
|
|
66
|
+
*/
|
|
67
|
+
validateOptionalEntityDate(date: Date | string | number | null | undefined, useNowAsDefault?: boolean): Date | string | undefined;
|
|
68
|
+
validateDate(date: Date | string | number): Date;
|
|
69
|
+
validateOptionalDate(date: Date | string | number | null | undefined): Date | undefined;
|
|
70
|
+
validateDateForWhere(date: Date | string | number): Date | string | number;
|
|
71
|
+
}
|
|
72
|
+
export interface StorageReaderOptions {
|
|
73
|
+
chain: sdk.Chain;
|
|
74
|
+
}
|
|
75
|
+
export type DBType = 'SQLite' | 'MySQL' | 'IndexedDB';
|
|
76
|
+
//# sourceMappingURL=StorageReader.d.ts.map
|