@bsv/wallet-toolbox 1.3.21 → 1.3.23
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 +17 -0
- package/mobile/out/src/index.mobile.d.ts.map +1 -0
- package/mobile/out/src/index.mobile.js +56 -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 +209 -0
- package/mobile/out/src/storage/StorageIdb.d.ts.map +1 -0
- package/mobile/out/src/storage/StorageIdb.js +2330 -0
- package/mobile/out/src/storage/StorageIdb.js.map +1 -0
- package/mobile/out/src/storage/StorageProvider.d.ts +210 -0
- package/mobile/out/src/storage/StorageProvider.d.ts.map +1 -0
- package/mobile/out/src/storage/StorageProvider.js +585 -0
- package/mobile/out/src/storage/StorageProvider.js.map +1 -0
- package/mobile/out/src/storage/StorageReader.d.ts +77 -0
- package/mobile/out/src/storage/StorageReader.d.ts.map +1 -0
- package/mobile/out/src/storage/StorageReader.js +163 -0
- package/mobile/out/src/storage/StorageReader.js.map +1 -0
- package/mobile/out/src/storage/StorageReaderWriter.d.ts +88 -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 +18 -0
- package/mobile/out/src/storage/StorageSyncReader.d.ts.map +1 -0
- package/mobile/out/src/storage/StorageSyncReader.js +71 -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/remoting/StorageMobile.d.ts +283 -0
- package/mobile/out/src/storage/remoting/StorageMobile.d.ts.map +1 -0
- package/mobile/out/src/storage/remoting/StorageMobile.js +477 -0
- package/mobile/out/src/storage/remoting/StorageMobile.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 +8 -16
- package/mobile/package.json +1 -1
- package/out/src/WalletPermissionsManager.d.ts.map +1 -1
- package/out/src/WalletPermissionsManager.js.map +1 -1
- package/out/src/index.mobile.d.ts +0 -2
- package/out/src/index.mobile.d.ts.map +1 -1
- package/out/src/index.mobile.js +0 -2
- package/out/src/index.mobile.js.map +1 -1
- package/out/src/storage/StorageIdb.d.ts +2 -1
- package/out/src/storage/StorageIdb.d.ts.map +1 -1
- package/out/src/storage/StorageIdb.js +63 -29
- package/out/src/storage/StorageIdb.js.map +1 -1
- package/out/src/storage/StorageKnex.d.ts +1 -1
- package/out/src/storage/StorageKnex.d.ts.map +1 -1
- package/out/src/storage/StorageKnex.js +10 -6
- package/out/src/storage/StorageKnex.js.map +1 -1
- package/out/src/storage/StorageProvider.d.ts +2 -1
- package/out/src/storage/StorageProvider.d.ts.map +1 -1
- package/out/src/storage/StorageProvider.js +75 -40
- package/out/src/storage/StorageProvider.js.map +1 -1
- package/out/src/storage/StorageReader.d.ts +2 -1
- package/out/src/storage/StorageReader.d.ts.map +1 -1
- package/out/src/storage/StorageReader.js +45 -11
- package/out/src/storage/StorageReader.js.map +1 -1
- package/out/src/storage/StorageReaderWriter.d.ts +2 -1
- package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
- package/out/src/storage/StorageReaderWriter.js +29 -29
- package/out/src/storage/StorageReaderWriter.js.map +1 -1
- package/out/src/storage/StorageSyncReader.d.ts +2 -1
- package/out/src/storage/StorageSyncReader.d.ts.map +1 -1
- package/out/src/storage/StorageSyncReader.js +36 -3
- package/out/src/storage/StorageSyncReader.js.map +1 -1
- package/out/src/storage/index.mobile.d.ts +1 -1
- package/out/src/storage/index.mobile.js +1 -1
- package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageClient.js.map +1 -1
- package/out/src/storage/remoting/StorageMobile.d.ts +283 -0
- package/out/src/storage/remoting/StorageMobile.d.ts.map +1 -0
- package/out/src/storage/remoting/StorageMobile.js +477 -0
- package/out/src/storage/remoting/StorageMobile.js.map +1 -0
- package/out/tsconfig.all.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/WalletPermissionsManager.ts +19 -8
- package/src/index.mobile.ts +0 -2
- package/src/storage/StorageIdb.ts +4 -5
- package/src/storage/StorageKnex.ts +7 -6
- package/src/storage/StorageProvider.ts +5 -9
- package/src/storage/StorageReader.ts +4 -7
- package/src/storage/StorageReaderWriter.ts +4 -8
- package/src/storage/StorageSyncReader.ts +2 -19
- package/src/storage/index.mobile.ts +1 -1
- package/src/storage/remoting/StorageClient.ts +0 -1
- package/src/storage/remoting/StorageMobile.ts +527 -0
- package/tsconfig.all.json +2 -1
- package/tsconfig.client.json +6 -0
- package/tsconfig.json +3 -0
- package/tsconfig.mobile.json +28 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WalletError = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Derived class constructors should use the derived class name as the value for `name`,
|
|
6
|
+
* and an internationalizable constant string for `message`.
|
|
7
|
+
*
|
|
8
|
+
* If a derived class intends to wrap another WalletError, the public property should
|
|
9
|
+
* be named `walletError` and will be recovered by `fromUnknown`.
|
|
10
|
+
*
|
|
11
|
+
* Optionaly, the derived class `message` can include template parameters passed in
|
|
12
|
+
* to the constructor. See WERR_MISSING_PARAMETER for an example.
|
|
13
|
+
*
|
|
14
|
+
* To avoid derived class name colisions, packages should include a package specific
|
|
15
|
+
* identifier after the 'WERR_' prefix. e.g. 'WERR_FOO_' as the prefix for Foo package error
|
|
16
|
+
* classes.
|
|
17
|
+
*/
|
|
18
|
+
class WalletError extends Error {
|
|
19
|
+
constructor(name, message, stack, details) {
|
|
20
|
+
super(message);
|
|
21
|
+
this.details = details;
|
|
22
|
+
// Facilitates detection of Error objects from non-error return values.
|
|
23
|
+
this.isError = true;
|
|
24
|
+
this.name = name;
|
|
25
|
+
if (stack)
|
|
26
|
+
this.stack = stack;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Error class compatible accessor for `code`.
|
|
30
|
+
*/
|
|
31
|
+
get code() {
|
|
32
|
+
return this.name;
|
|
33
|
+
}
|
|
34
|
+
set code(v) {
|
|
35
|
+
this.name = v;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Error class compatible accessor for `description`.
|
|
39
|
+
*/
|
|
40
|
+
get description() {
|
|
41
|
+
return this.message;
|
|
42
|
+
}
|
|
43
|
+
set description(v) {
|
|
44
|
+
this.message = v;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Recovers all public fields from WalletError derived error classes and relevant Error derived errors.
|
|
48
|
+
*
|
|
49
|
+
*/
|
|
50
|
+
static fromUnknown(err) {
|
|
51
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
52
|
+
let name = 'WERR_UNKNOWN';
|
|
53
|
+
let message = '';
|
|
54
|
+
let stack;
|
|
55
|
+
const details = {};
|
|
56
|
+
if (err !== null && typeof err === 'object') {
|
|
57
|
+
if (err['name'] === 'Error' || err['name'] === 'FetchError')
|
|
58
|
+
name = err['code'] || err['status'] || 'WERR_UNKNOWN';
|
|
59
|
+
else
|
|
60
|
+
name = err['name'] || err['code'] || err['status'] || 'WERR_UNKNOWN';
|
|
61
|
+
if (typeof name !== 'string')
|
|
62
|
+
name = 'WERR_UNKNOWN';
|
|
63
|
+
message = err['message'] || err['description'] || '';
|
|
64
|
+
if (typeof message !== 'string')
|
|
65
|
+
message = 'WERR_UNKNOWN';
|
|
66
|
+
if (typeof err['stack'] === 'string')
|
|
67
|
+
stack = err['stack'];
|
|
68
|
+
if (typeof err['sql'] === 'string')
|
|
69
|
+
details.sql = err['sql'];
|
|
70
|
+
if (typeof err['sqlMessage'] === 'string')
|
|
71
|
+
details.sqlMessage = err['sqlMessage'];
|
|
72
|
+
}
|
|
73
|
+
const e = new WalletError(name, message, stack, Object.keys(details).length > 0 ? details : undefined);
|
|
74
|
+
if (err !== null && typeof err === 'object') {
|
|
75
|
+
for (const [key, value] of Object.entries(err)) {
|
|
76
|
+
if (key !== 'walletError' && typeof value !== 'string' && typeof value !== 'number' && !Array.isArray(value))
|
|
77
|
+
continue;
|
|
78
|
+
switch (key) {
|
|
79
|
+
case 'walletError':
|
|
80
|
+
e[key] = WalletError.fromUnknown(value);
|
|
81
|
+
break;
|
|
82
|
+
case 'status':
|
|
83
|
+
break;
|
|
84
|
+
case 'name':
|
|
85
|
+
break;
|
|
86
|
+
case 'code':
|
|
87
|
+
break;
|
|
88
|
+
case 'message':
|
|
89
|
+
break;
|
|
90
|
+
case 'description':
|
|
91
|
+
break;
|
|
92
|
+
case 'stack':
|
|
93
|
+
break;
|
|
94
|
+
case 'sql':
|
|
95
|
+
break;
|
|
96
|
+
case 'sqlMessage':
|
|
97
|
+
break;
|
|
98
|
+
default:
|
|
99
|
+
e[key] = value;
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return e;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* @returns standard HTTP error status object with status property set to 'error'.
|
|
108
|
+
*/
|
|
109
|
+
asStatus() {
|
|
110
|
+
return {
|
|
111
|
+
status: 'error',
|
|
112
|
+
code: this.name,
|
|
113
|
+
description: this.message
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
exports.WalletError = WalletError;
|
|
118
|
+
//# sourceMappingURL=WalletError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletError.js","sourceRoot":"","sources":["../../../../src/sdk/WalletError.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;;;;GAaG;AACH,MAAa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;oBACP,KAAK,QAAQ;wBACX,MAAK;oBACP,KAAK,MAAM;wBACT,MAAK;oBACP,KAAK,MAAM;wBACT,MAAK;oBACP,KAAK,SAAS;wBACZ,MAAK;oBACP,KAAK,aAAa;wBAChB,MAAK;oBACP,KAAK,OAAO;wBACV,MAAK;oBACP,KAAK,KAAK;wBACR,MAAK;oBACP,KAAK,YAAY;wBACf,MAAK;oBACP;wBACE,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;wBACd,MAAK;gBACT,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO,CAAC,CAAA;IACV,CAAC;IAED;;OAEG;IACH,QAAQ;QACN,OAAO;YACL,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,OAAO;SAC1B,CAAA;IACH,CAAC;CACF;AAtGD,kCAsGC"}
|
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
import { ArcConfig, Beef, Transaction as BsvTransaction, ChainTracker, MerklePath } from '@bsv/sdk';
|
|
2
|
+
import { ChaintracksServiceClient } from '../services/chaintracker';
|
|
3
|
+
import { Chain, ReqHistoryNote } from './types';
|
|
4
|
+
import { WalletError } from './WalletError';
|
|
5
|
+
import { TableOutput } from '../storage/schema/tables/TableOutput';
|
|
6
|
+
/**
|
|
7
|
+
* Defines standard interfaces to access functionality implemented by external transaction processing services.
|
|
8
|
+
*/
|
|
9
|
+
export interface WalletServices {
|
|
10
|
+
/**
|
|
11
|
+
* The chain being serviced.
|
|
12
|
+
*/
|
|
13
|
+
chain: Chain;
|
|
14
|
+
/**
|
|
15
|
+
* @returns standard `ChainTracker` service which requires `options.chaintracks` be valid.
|
|
16
|
+
*/
|
|
17
|
+
getChainTracker(): Promise<ChainTracker>;
|
|
18
|
+
/**
|
|
19
|
+
* @returns serialized block header for height on active chain
|
|
20
|
+
* @param height
|
|
21
|
+
*/
|
|
22
|
+
getHeaderForHeight(height: number): Promise<number[]>;
|
|
23
|
+
/**
|
|
24
|
+
* @returns the height of the active chain
|
|
25
|
+
*/
|
|
26
|
+
getHeight(): Promise<number>;
|
|
27
|
+
/**
|
|
28
|
+
* Approximate exchange rate US Dollar / BSV, USD / BSV
|
|
29
|
+
*
|
|
30
|
+
* This is the US Dollar price of one BSV
|
|
31
|
+
*/
|
|
32
|
+
getBsvExchangeRate(): Promise<number>;
|
|
33
|
+
/**
|
|
34
|
+
* Approximate exchange rate currency per base.
|
|
35
|
+
*/
|
|
36
|
+
getFiatExchangeRate(currency: 'USD' | 'GBP' | 'EUR', base?: 'USD' | 'GBP' | 'EUR'): Promise<number>;
|
|
37
|
+
/**
|
|
38
|
+
* Attempts to obtain the raw transaction bytes associated with a 32 byte transaction hash (txid).
|
|
39
|
+
*
|
|
40
|
+
* Cycles through configured transaction processing services attempting to get a valid response.
|
|
41
|
+
*
|
|
42
|
+
* On success:
|
|
43
|
+
* Result txid is the requested transaction hash
|
|
44
|
+
* Result rawTx will be an array containing raw transaction bytes.
|
|
45
|
+
* Result name will be the responding service's identifying name.
|
|
46
|
+
* Returns result without incrementing active service.
|
|
47
|
+
*
|
|
48
|
+
* On failure:
|
|
49
|
+
* Result txid is the requested transaction hash
|
|
50
|
+
* Result mapi will be the first mapi response obtained (service name and response), or null
|
|
51
|
+
* Result error will be the first error thrown (service name and CwiError), or null
|
|
52
|
+
* Increments to next configured service and tries again until all services have been tried.
|
|
53
|
+
*
|
|
54
|
+
* @param txid transaction hash for which raw transaction bytes are requested
|
|
55
|
+
* @param useNext optional, forces skip to next service before starting service requests cycle.
|
|
56
|
+
*/
|
|
57
|
+
getRawTx(txid: string, useNext?: boolean): Promise<GetRawTxResult>;
|
|
58
|
+
/**
|
|
59
|
+
* Attempts to obtain the merkle proof associated with a 32 byte transaction hash (txid).
|
|
60
|
+
*
|
|
61
|
+
* Cycles through configured transaction processing services attempting to get a valid response.
|
|
62
|
+
*
|
|
63
|
+
* On success:
|
|
64
|
+
* Result txid is the requested transaction hash
|
|
65
|
+
* Result proof will be the merkle proof.
|
|
66
|
+
* Result name will be the responding service's identifying name.
|
|
67
|
+
* Returns result without incrementing active service.
|
|
68
|
+
*
|
|
69
|
+
* On failure:
|
|
70
|
+
* Result txid is the requested transaction hash
|
|
71
|
+
* Result mapi will be the first mapi response obtained (service name and response), or null
|
|
72
|
+
* Result error will be the first error thrown (service name and CwiError), or null
|
|
73
|
+
* Increments to next configured service and tries again until all services have been tried.
|
|
74
|
+
*
|
|
75
|
+
* @param txid transaction hash for which proof is requested
|
|
76
|
+
* @param useNext optional, forces skip to next service before starting service requests cycle.
|
|
77
|
+
*/
|
|
78
|
+
getMerklePath(txid: string, useNext?: boolean): Promise<GetMerklePathResult>;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @param beef
|
|
82
|
+
* @param txids
|
|
83
|
+
* @param chain
|
|
84
|
+
* @returns
|
|
85
|
+
*/
|
|
86
|
+
postBeef(beef: Beef, txids: string[]): Promise<PostBeefResult[]>;
|
|
87
|
+
/**
|
|
88
|
+
* @param script Output script to be hashed for `getUtxoStatus` default `outputFormat`
|
|
89
|
+
* @returns script hash in 'hashLE' format, which is the default.
|
|
90
|
+
*/
|
|
91
|
+
hashOutputScript(script: string): string;
|
|
92
|
+
/**
|
|
93
|
+
* For an array of one or more txids, returns for each wether it is a 'known', 'mined', or 'unknown' transaction.
|
|
94
|
+
*
|
|
95
|
+
* Primarily useful for determining if a recently broadcast transaction is known to the processing network.
|
|
96
|
+
*
|
|
97
|
+
* Also returns the current depth from chain tip if 'mined'.
|
|
98
|
+
*
|
|
99
|
+
* @param txids
|
|
100
|
+
* @param useNext
|
|
101
|
+
*/
|
|
102
|
+
getStatusForTxids(txids: string[], useNext?: boolean): Promise<GetStatusForTxidsResult>;
|
|
103
|
+
/**
|
|
104
|
+
* Calls getUtxoStatus with the hash of the output's lockingScript,
|
|
105
|
+
* and ensures that the output's outpoint matches an unspent use of that script.
|
|
106
|
+
*
|
|
107
|
+
* @param output
|
|
108
|
+
* @returns true if the output appears to currently be spendable.
|
|
109
|
+
*/
|
|
110
|
+
isUtxo(output: TableOutput): Promise<boolean>;
|
|
111
|
+
/**
|
|
112
|
+
* Attempts to determine the UTXO status of a transaction output.
|
|
113
|
+
*
|
|
114
|
+
* Cycles through configured transaction processing services attempting to get a valid response.
|
|
115
|
+
*
|
|
116
|
+
* @param output transaction output identifier in format determined by `outputFormat`.
|
|
117
|
+
* @param chain which chain to post to, all of rawTx's inputs must be unspent on this chain.
|
|
118
|
+
* @param outputFormat optional, supported values:
|
|
119
|
+
* 'hashLE' little-endian sha256 hash of output script
|
|
120
|
+
* 'hashBE' big-endian sha256 hash of output script
|
|
121
|
+
* 'script' entire transaction output script
|
|
122
|
+
* undefined if length of `output` is 32 hex bytes then 'hashBE`, otherwise 'script'.
|
|
123
|
+
* @param outpoint if valid, result isUtxo is true only if this txid and vout match an unspent occurance of output script. `${txid}.${vout}` format.
|
|
124
|
+
* @param useNext optional, forces skip to next service before starting service requests cycle.
|
|
125
|
+
*/
|
|
126
|
+
getUtxoStatus(output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string, useNext?: boolean): Promise<GetUtxoStatusResult>;
|
|
127
|
+
getScriptHashHistory(hash: string, useNext?: boolean): Promise<GetScriptHashHistoryResult>;
|
|
128
|
+
/**
|
|
129
|
+
* @returns a block header
|
|
130
|
+
* @param hash block hash
|
|
131
|
+
*/
|
|
132
|
+
hashToHeader(hash: string): Promise<BlockHeader>;
|
|
133
|
+
/**
|
|
134
|
+
* @returns whether the locktime value allows the transaction to be mined at the current chain height
|
|
135
|
+
* @param txOrLockTime either a bitcoin locktime value or hex, binary, un-encoded Transaction
|
|
136
|
+
*/
|
|
137
|
+
nLockTimeIsFinal(txOrLockTime: string | number[] | BsvTransaction | number): Promise<boolean>;
|
|
138
|
+
/**
|
|
139
|
+
* Constructs a `Beef` for the given `txid` using only external data retrieval services.
|
|
140
|
+
*
|
|
141
|
+
* In most cases, the `getBeefForTransaction` method of the `StorageProvider` class should be
|
|
142
|
+
* used instead to avoid redundantly retrieving data.
|
|
143
|
+
*
|
|
144
|
+
* @throws errors if txid does not correspond to a valid transaction as determined by the
|
|
145
|
+
* configured services.
|
|
146
|
+
*
|
|
147
|
+
* @param txid
|
|
148
|
+
*/
|
|
149
|
+
getBeefForTxid(txid: string): Promise<Beef>;
|
|
150
|
+
}
|
|
151
|
+
export type ScriptHashFormat = 'hashLE' | 'hashBE' | 'script';
|
|
152
|
+
export type GetUtxoStatusOutputFormat = 'hashLE' | 'hashBE' | 'script';
|
|
153
|
+
export interface BsvExchangeRate {
|
|
154
|
+
timestamp: Date;
|
|
155
|
+
base: 'USD';
|
|
156
|
+
rate: number;
|
|
157
|
+
}
|
|
158
|
+
export interface FiatExchangeRates {
|
|
159
|
+
timestamp: Date;
|
|
160
|
+
base: 'USD';
|
|
161
|
+
rates: Record<string, number>;
|
|
162
|
+
}
|
|
163
|
+
export interface WalletServicesOptions {
|
|
164
|
+
chain: Chain;
|
|
165
|
+
taalApiKey?: string;
|
|
166
|
+
bitailsApiKey?: string;
|
|
167
|
+
whatsOnChainApiKey?: string;
|
|
168
|
+
bsvExchangeRate: BsvExchangeRate;
|
|
169
|
+
bsvUpdateMsecs: number;
|
|
170
|
+
fiatExchangeRates: FiatExchangeRates;
|
|
171
|
+
fiatUpdateMsecs: number;
|
|
172
|
+
disableMapiCallback?: boolean;
|
|
173
|
+
exchangeratesapiKey?: string;
|
|
174
|
+
chaintracksFiatExchangeRatesUrl?: string;
|
|
175
|
+
chaintracks?: ChaintracksServiceClient;
|
|
176
|
+
arcUrl: string;
|
|
177
|
+
arcConfig: ArcConfig;
|
|
178
|
+
}
|
|
179
|
+
export interface GetStatusForTxidsResult {
|
|
180
|
+
/**
|
|
181
|
+
* The name of the service returning these results.
|
|
182
|
+
*/
|
|
183
|
+
name: string;
|
|
184
|
+
status: 'success' | 'error';
|
|
185
|
+
/**
|
|
186
|
+
* The first exception error that occurred during processing, if any.
|
|
187
|
+
*/
|
|
188
|
+
error?: WalletError;
|
|
189
|
+
results: StatusForTxidResult[];
|
|
190
|
+
}
|
|
191
|
+
export interface StatusForTxidResult {
|
|
192
|
+
txid: string;
|
|
193
|
+
/**
|
|
194
|
+
* roughly depth of block containing txid from chain tip.
|
|
195
|
+
*/
|
|
196
|
+
depth: number | undefined;
|
|
197
|
+
/**
|
|
198
|
+
* 'mined' if depth > 0
|
|
199
|
+
* 'known' if depth === 0
|
|
200
|
+
* 'unknown' if depth === undefined, txid may be old an purged or never processed.
|
|
201
|
+
*/
|
|
202
|
+
status: 'mined' | 'known' | 'unknown';
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Properties on result returned from `WalletServices` function `getRawTx`.
|
|
206
|
+
*/
|
|
207
|
+
export interface GetRawTxResult {
|
|
208
|
+
/**
|
|
209
|
+
* Transaction hash or rawTx (and of initial request)
|
|
210
|
+
*/
|
|
211
|
+
txid: string;
|
|
212
|
+
/**
|
|
213
|
+
* The name of the service returning the rawTx, or undefined if no rawTx
|
|
214
|
+
*/
|
|
215
|
+
name?: string;
|
|
216
|
+
/**
|
|
217
|
+
* Multiple proofs may be returned when a transaction also appears in
|
|
218
|
+
* one or more orphaned blocks
|
|
219
|
+
*/
|
|
220
|
+
rawTx?: number[];
|
|
221
|
+
/**
|
|
222
|
+
* The first exception error that occurred during processing, if any.
|
|
223
|
+
*/
|
|
224
|
+
error?: WalletError;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Properties on result returned from `WalletServices` function `getMerkleProof`.
|
|
228
|
+
*/
|
|
229
|
+
export interface GetMerklePathResult {
|
|
230
|
+
/**
|
|
231
|
+
* The name of the service returning the proof, or undefined if no proof
|
|
232
|
+
*/
|
|
233
|
+
name?: string;
|
|
234
|
+
/**
|
|
235
|
+
* Multiple proofs may be returned when a transaction also appears in
|
|
236
|
+
* one or more orphaned blocks
|
|
237
|
+
*/
|
|
238
|
+
merklePath?: MerklePath;
|
|
239
|
+
header?: BlockHeader;
|
|
240
|
+
/**
|
|
241
|
+
* The first exception error that occurred during processing, if any.
|
|
242
|
+
*/
|
|
243
|
+
error?: WalletError;
|
|
244
|
+
notes?: ReqHistoryNote[];
|
|
245
|
+
}
|
|
246
|
+
export interface PostTxResultForTxid {
|
|
247
|
+
txid: string;
|
|
248
|
+
/**
|
|
249
|
+
* 'success' - The transaction was accepted for processing
|
|
250
|
+
*/
|
|
251
|
+
status: 'success' | 'error';
|
|
252
|
+
/**
|
|
253
|
+
* if true, the transaction was already known to this service. Usually treat as a success.
|
|
254
|
+
*
|
|
255
|
+
* Potentially stop posting to additional transaction processors.
|
|
256
|
+
*/
|
|
257
|
+
alreadyKnown?: boolean;
|
|
258
|
+
/**
|
|
259
|
+
* service indicated this broadcast double spends at least one input
|
|
260
|
+
* `competingTxs` may be an array of txids that were first seen spends of at least one input.
|
|
261
|
+
*/
|
|
262
|
+
doubleSpend?: boolean;
|
|
263
|
+
blockHash?: string;
|
|
264
|
+
blockHeight?: number;
|
|
265
|
+
merklePath?: MerklePath;
|
|
266
|
+
competingTxs?: string[];
|
|
267
|
+
data?: object | string | PostTxResultForTxidError;
|
|
268
|
+
notes?: ReqHistoryNote[];
|
|
269
|
+
/**
|
|
270
|
+
* true iff service was unable to process a potentially valid transaction
|
|
271
|
+
*/
|
|
272
|
+
serviceError?: boolean;
|
|
273
|
+
}
|
|
274
|
+
export interface PostTxResultForTxidError {
|
|
275
|
+
status?: string;
|
|
276
|
+
detail?: string;
|
|
277
|
+
more?: object;
|
|
278
|
+
}
|
|
279
|
+
export interface PostBeefResult extends PostTxsResult {
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Properties on array items of result returned from `WalletServices` function `postBeef`.
|
|
283
|
+
*/
|
|
284
|
+
export interface PostTxsResult {
|
|
285
|
+
/**
|
|
286
|
+
* The name of the service to which the transaction was submitted for processing
|
|
287
|
+
*/
|
|
288
|
+
name: string;
|
|
289
|
+
/**
|
|
290
|
+
* 'success' all txids returned status of 'success'
|
|
291
|
+
* 'error' one or more txids returned status of 'error'. See txidResults for details.
|
|
292
|
+
*/
|
|
293
|
+
status: 'success' | 'error';
|
|
294
|
+
error?: WalletError;
|
|
295
|
+
txidResults: PostTxResultForTxid[];
|
|
296
|
+
/**
|
|
297
|
+
* Service response object. Use service name and status to infer type of object.
|
|
298
|
+
*/
|
|
299
|
+
data?: object;
|
|
300
|
+
notes?: ReqHistoryNote[];
|
|
301
|
+
}
|
|
302
|
+
export interface GetUtxoStatusDetails {
|
|
303
|
+
/**
|
|
304
|
+
* if isUtxo, the block height containing the matching unspent transaction output
|
|
305
|
+
*
|
|
306
|
+
* typically there will be only one, but future orphans can result in multiple values
|
|
307
|
+
*/
|
|
308
|
+
height?: number;
|
|
309
|
+
/**
|
|
310
|
+
* if isUtxo, the transaction hash (txid) of the transaction containing the matching unspent transaction output
|
|
311
|
+
*
|
|
312
|
+
* typically there will be only one, but future orphans can result in multiple values
|
|
313
|
+
*/
|
|
314
|
+
txid?: string;
|
|
315
|
+
/**
|
|
316
|
+
* if isUtxo, the output index in the transaction containing of the matching unspent transaction output
|
|
317
|
+
*
|
|
318
|
+
* typically there will be only one, but future orphans can result in multiple values
|
|
319
|
+
*/
|
|
320
|
+
index?: number;
|
|
321
|
+
/**
|
|
322
|
+
* if isUtxo, the amount of the matching unspent transaction output
|
|
323
|
+
*
|
|
324
|
+
* typically there will be only one, but future orphans can result in multiple values
|
|
325
|
+
*/
|
|
326
|
+
satoshis?: number;
|
|
327
|
+
}
|
|
328
|
+
export interface GetUtxoStatusResult {
|
|
329
|
+
/**
|
|
330
|
+
* The name of the service to which the transaction was submitted for processing
|
|
331
|
+
*/
|
|
332
|
+
name: string;
|
|
333
|
+
/**
|
|
334
|
+
* 'success' - the operation was successful, non-error results are valid.
|
|
335
|
+
* 'error' - the operation failed, error may have relevant information.
|
|
336
|
+
*/
|
|
337
|
+
status: 'success' | 'error';
|
|
338
|
+
/**
|
|
339
|
+
* When status is 'error', provides code and description
|
|
340
|
+
*/
|
|
341
|
+
error?: WalletError;
|
|
342
|
+
/**
|
|
343
|
+
* true if the output is associated with at least one unspent transaction output
|
|
344
|
+
*/
|
|
345
|
+
isUtxo?: boolean;
|
|
346
|
+
/**
|
|
347
|
+
* Additional details about occurances of this output script as a utxo.
|
|
348
|
+
*
|
|
349
|
+
* Normally there will be one item in the array but due to the possibility of orphan races
|
|
350
|
+
* there could be more than one block in which it is a valid utxo.
|
|
351
|
+
*/
|
|
352
|
+
details: GetUtxoStatusDetails[];
|
|
353
|
+
}
|
|
354
|
+
export interface GetScriptHashHistory {
|
|
355
|
+
txid: string;
|
|
356
|
+
height?: number;
|
|
357
|
+
}
|
|
358
|
+
export interface GetScriptHashHistoryResult {
|
|
359
|
+
/**
|
|
360
|
+
* The name of the service to which the transaction was submitted for processing
|
|
361
|
+
*/
|
|
362
|
+
name: string;
|
|
363
|
+
/**
|
|
364
|
+
* 'success' - the operation was successful, non-error results are valid.
|
|
365
|
+
* 'error' - the operation failed, error may have relevant information.
|
|
366
|
+
*/
|
|
367
|
+
status: 'success' | 'error';
|
|
368
|
+
/**
|
|
369
|
+
* When status is 'error', provides code and description
|
|
370
|
+
*/
|
|
371
|
+
error?: WalletError;
|
|
372
|
+
/**
|
|
373
|
+
* Transaction txid (and height if mined) that consumes the script hash. May not be a complete history.
|
|
374
|
+
*/
|
|
375
|
+
history: GetScriptHashHistory[];
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* These are fields of 80 byte serialized header in order whose double sha256 hash is a block's hash value
|
|
379
|
+
* and the next block's previousHash value.
|
|
380
|
+
*
|
|
381
|
+
* All block hash values and merkleRoot values are 32 byte hex string values with the byte order reversed from the serialized byte order.
|
|
382
|
+
*/
|
|
383
|
+
export interface BaseBlockHeader {
|
|
384
|
+
/**
|
|
385
|
+
* Block header version value. Serialized length is 4 bytes.
|
|
386
|
+
*/
|
|
387
|
+
version: number;
|
|
388
|
+
/**
|
|
389
|
+
* Hash of previous block's block header. Serialized length is 32 bytes.
|
|
390
|
+
*/
|
|
391
|
+
previousHash: string;
|
|
392
|
+
/**
|
|
393
|
+
* Root hash of the merkle tree of all transactions in this block. Serialized length is 32 bytes.
|
|
394
|
+
*/
|
|
395
|
+
merkleRoot: string;
|
|
396
|
+
/**
|
|
397
|
+
* Block header time value. Serialized length is 4 bytes.
|
|
398
|
+
*/
|
|
399
|
+
time: number;
|
|
400
|
+
/**
|
|
401
|
+
* Block header bits value. Serialized length is 4 bytes.
|
|
402
|
+
*/
|
|
403
|
+
bits: number;
|
|
404
|
+
/**
|
|
405
|
+
* Block header nonce value. Serialized length is 4 bytes.
|
|
406
|
+
*/
|
|
407
|
+
nonce: number;
|
|
408
|
+
}
|
|
409
|
+
/**
|
|
410
|
+
* A `BaseBlockHeader` extended with its computed hash and height in its chain.
|
|
411
|
+
*/
|
|
412
|
+
export interface BlockHeader extends BaseBlockHeader {
|
|
413
|
+
/**
|
|
414
|
+
* Height of the header, starting from zero.
|
|
415
|
+
*/
|
|
416
|
+
height: number;
|
|
417
|
+
/**
|
|
418
|
+
* The double sha256 hash of the serialized `BaseBlockHeader` fields.
|
|
419
|
+
*/
|
|
420
|
+
hash: string;
|
|
421
|
+
}
|
|
422
|
+
export type GetUtxoStatusService = (output: string, outputFormat?: GetUtxoStatusOutputFormat, outpoint?: string) => Promise<GetUtxoStatusResult>;
|
|
423
|
+
export type GetStatusForTxidsService = (txids: string[]) => Promise<GetStatusForTxidsResult>;
|
|
424
|
+
export type GetScriptHashHistoryService = (hash: string) => Promise<GetScriptHashHistoryResult>;
|
|
425
|
+
export type GetMerklePathService = (txid: string, services: WalletServices) => Promise<GetMerklePathResult>;
|
|
426
|
+
export type GetRawTxService = (txid: string, chain: Chain) => Promise<GetRawTxResult>;
|
|
427
|
+
export type PostTxsService = (beef: Beef, txids: string[], services: WalletServices) => Promise<PostTxsResult>;
|
|
428
|
+
export type PostBeefService = (beef: Beef, txids: string[]) => Promise<PostBeefResult>;
|
|
429
|
+
export type UpdateFiatExchangeRateService = (targetCurrencies: string[], options: WalletServicesOptions) => Promise<FiatExchangeRates>;
|
|
430
|
+
//# sourceMappingURL=WalletServices.interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletServices.interfaces.d.ts","sourceRoot":"","sources":["../../../../src/sdk/WalletServices.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,IAAI,cAAc,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AACnG,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;AACnE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAA;AAClE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,EAAE,KAAK,CAAA;IAEZ;;OAEG;IACH,eAAe,IAAI,OAAO,CAAC,YAAY,CAAC,CAAA;IAExC;;;OAGG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;IAErD;;OAEG;IACH,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAE5B;;;;OAIG;IACH,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAErC;;OAEG;IACH,mBAAmB,CAAC,QAAQ,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,EAAE,IAAI,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;IAEnG;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;IAElE;;;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GAAG,CAC1C,gBAAgB,EAAE,MAAM,EAAE,EAC1B,OAAO,EAAE,qBAAqB,KAC3B,OAAO,CAAC,iBAAiB,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletServices.interfaces.js","sourceRoot":"","sources":["../../../../src/sdk/WalletServices.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletSigner.interfaces.d.ts","sourceRoot":"","sources":["../../../../src/sdk/WalletSigner.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B;GACG;AACH,MAAM,WAAW,YAAY;IAC3B,cAAc,EAAE,IAAI,CAAA;IAEpB,KAAK,EAAE,KAAK,CAAA;IACZ,UAAU,EAAE,aAAa,CAAA;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WalletSigner.interfaces.js","sourceRoot":"","sources":["../../../../src/sdk/WalletSigner.interfaces.ts"],"names":[],"mappings":""}
|