@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,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChaintracksChainTracker = void 0;
|
|
4
|
+
const index_client_1 = require("../../index.client");
|
|
5
|
+
const ChaintracksServiceClient_1 = require("./chaintracks/ChaintracksServiceClient");
|
|
6
|
+
class ChaintracksChainTracker {
|
|
7
|
+
constructor(chain, chaintracks, options) {
|
|
8
|
+
chain || (chain = 'main');
|
|
9
|
+
this.chaintracks =
|
|
10
|
+
chaintracks !== null && chaintracks !== void 0 ? chaintracks : new ChaintracksServiceClient_1.ChaintracksServiceClient(chain, `https://npm-registry.babbage.systems:808${chain === 'main' ? '4' : '3'}`);
|
|
11
|
+
this.cache = {};
|
|
12
|
+
this.options = options || {};
|
|
13
|
+
}
|
|
14
|
+
async currentHeight() {
|
|
15
|
+
return await this.chaintracks.getPresentHeight();
|
|
16
|
+
}
|
|
17
|
+
async isValidRootForHeight(root, height) {
|
|
18
|
+
const cachedRoot = this.cache[height];
|
|
19
|
+
if (cachedRoot) {
|
|
20
|
+
return cachedRoot === root;
|
|
21
|
+
}
|
|
22
|
+
let header;
|
|
23
|
+
const retries = this.options.maxRetries || 3;
|
|
24
|
+
let error = undefined;
|
|
25
|
+
for (let tryCount = 1; tryCount <= retries; tryCount++) {
|
|
26
|
+
try {
|
|
27
|
+
header = await this.chaintracks.findHeaderForHeight(height);
|
|
28
|
+
if (!header) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
catch (eu) {
|
|
34
|
+
error = index_client_1.sdk.WalletError.fromUnknown(eu);
|
|
35
|
+
if (tryCount > retries) {
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
await (0, index_client_1.wait)(1000);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
if (!header)
|
|
42
|
+
throw new index_client_1.sdk.WERR_INTERNAL('no header should have returned false or thrown an error.');
|
|
43
|
+
this.cache[height] = header.merkleRoot;
|
|
44
|
+
if (header.merkleRoot !== root) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.ChaintracksChainTracker = ChaintracksChainTracker;
|
|
51
|
+
//# sourceMappingURL=ChaintracksChainTracker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChaintracksChainTracker.js","sourceRoot":"","sources":["../../../../../src/services/chaintracker/ChaintracksChainTracker.ts"],"names":[],"mappings":";;;AAAA,qDAA8C;AAG9C,qFAAiF;AAMjF,MAAa,uBAAuB;IAKlC,YAAY,KAAiB,EAAE,WAAsC,EAAE,OAAwC;QAC7G,KAAK,KAAL,KAAK,GAAK,MAAM,EAAA;QAChB,IAAI,CAAC,WAAW;YACd,WAAW,aAAX,WAAW,cAAX,WAAW,GACX,IAAI,mDAAwB,CAAC,KAAK,EAAE,2CAA2C,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAA;QAChH,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;QACf,IAAI,CAAC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAA;IAC9B,CAAC;IAED,KAAK,CAAC,aAAa;QACjB,OAAO,MAAM,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAA;IAClD,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,IAAY,EAAE,MAAc;QACrD,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;QACrC,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,UAAU,KAAK,IAAI,CAAA;QAC5B,CAAC;QAED,IAAI,MAA+B,CAAA;QAEnC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,CAAC,CAAA;QAE5C,IAAI,KAAK,GAAgC,SAAS,CAAA;QAElD,KAAK,IAAI,QAAQ,GAAG,CAAC,EAAE,QAAQ,IAAI,OAAO,EAAE,QAAQ,EAAE,EAAE,CAAC;YACvD,IAAI,CAAC;gBACH,MAAM,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAA;gBAE3D,IAAI,CAAC,MAAM,EAAE,CAAC;oBACZ,OAAO,KAAK,CAAA;gBACd,CAAC;gBAED,MAAK;YACP,CAAC;YAAC,OAAO,EAAW,EAAE,CAAC;gBACrB,KAAK,GAAG,kBAAG,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,CAAC,CAAA;gBACvC,IAAI,QAAQ,GAAG,OAAO,EAAE,CAAC;oBACvB,MAAM,KAAK,CAAA;gBACb,CAAC;gBACD,MAAM,IAAA,mBAAI,EAAC,IAAI,CAAC,CAAA;YAClB,CAAC;QACH,CAAC;QAED,IAAI,CAAC,MAAM;YAAE,MAAM,IAAI,kBAAG,CAAC,aAAa,CAAC,0DAA0D,CAAC,CAAA;QAEpG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,UAAU,CAAA;QAEtC,IAAI,MAAM,CAAC,UAAU,KAAK,IAAI,EAAE,CAAC;YAC/B,OAAO,KAAK,CAAA;QACd,CAAC;QAED,OAAO,IAAI,CAAA;IACb,CAAC;CACF;AA1DD,0DA0DC"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* These are fields of 80 byte serialized header in order whose double sha256 hash is a block's hash value
|
|
3
|
+
* and the next block's previousHash value.
|
|
4
|
+
*
|
|
5
|
+
* All block hash values and merkleRoot values are 32 byte hex string values with the byte order reversed from the serialized byte order.
|
|
6
|
+
*/
|
|
7
|
+
export interface BaseBlockHeader {
|
|
8
|
+
/**
|
|
9
|
+
* Block header version value. Serialized length is 4 bytes.
|
|
10
|
+
*/
|
|
11
|
+
version: number;
|
|
12
|
+
/**
|
|
13
|
+
* Hash of previous block's block header. Serialized length is 32 bytes.
|
|
14
|
+
*/
|
|
15
|
+
previousHash: string;
|
|
16
|
+
/**
|
|
17
|
+
* Root hash of the merkle tree of all transactions in this block. Serialized length is 32 bytes.
|
|
18
|
+
*/
|
|
19
|
+
merkleRoot: string;
|
|
20
|
+
/**
|
|
21
|
+
* Block header time value. Serialized length is 4 bytes.
|
|
22
|
+
*/
|
|
23
|
+
time: number;
|
|
24
|
+
/**
|
|
25
|
+
* Block header bits value. Serialized length is 4 bytes.
|
|
26
|
+
*/
|
|
27
|
+
bits: number;
|
|
28
|
+
/**
|
|
29
|
+
* Block header nonce value. Serialized length is 4 bytes.
|
|
30
|
+
*/
|
|
31
|
+
nonce: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* A `BaseBlockHeader` extended with its computed hash and height in its chain.
|
|
35
|
+
*/
|
|
36
|
+
export interface BlockHeader extends BaseBlockHeader {
|
|
37
|
+
/**
|
|
38
|
+
* Height of the header, starting from zero.
|
|
39
|
+
*/
|
|
40
|
+
height: number;
|
|
41
|
+
/**
|
|
42
|
+
* The double sha256 hash of the serialized `BaseBlockHeader` fields.
|
|
43
|
+
*/
|
|
44
|
+
hash: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* The "live" portion of the block chain is recent history that can conceivably be subject to reorganizations.
|
|
48
|
+
* The additional fields support tracking orphan blocks, chain forks, and chain reorgs.
|
|
49
|
+
*/
|
|
50
|
+
export interface LiveBlockHeader extends BlockHeader {
|
|
51
|
+
/**
|
|
52
|
+
* The cummulative chainwork achieved by the addition of this block to the chain.
|
|
53
|
+
* Chainwork only matters in selecting the active chain.
|
|
54
|
+
*/
|
|
55
|
+
chainWork: string;
|
|
56
|
+
/**
|
|
57
|
+
* True only if this header is currently a chain tip. e.g. There is no header that follows it by previousHash or previousHeaderId.
|
|
58
|
+
*/
|
|
59
|
+
isChainTip: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* True only if this header is currently on the active chain.
|
|
62
|
+
*/
|
|
63
|
+
isActive: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* As there may be more than one header with identical height values due to orphan tracking,
|
|
66
|
+
* headers are assigned a unique headerId while part of the "live" portion of the block chain.
|
|
67
|
+
*/
|
|
68
|
+
headerId: number;
|
|
69
|
+
/**
|
|
70
|
+
* Every header in the "live" portion of the block chain is linked to an ancestor header through
|
|
71
|
+
* both its previousHash and previousHeaderId properties.
|
|
72
|
+
*
|
|
73
|
+
* Due to forks, there may be multiple headers with identical `previousHash` and `previousHeaderId` values.
|
|
74
|
+
* Of these, only one (the header on the active chain) will have `isActive` === true.
|
|
75
|
+
*/
|
|
76
|
+
previousHeaderId: number | null;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Type guard function.
|
|
80
|
+
* @publicbody
|
|
81
|
+
*/
|
|
82
|
+
export declare function isLive(header: BlockHeader | LiveBlockHeader): header is LiveBlockHeader;
|
|
83
|
+
/**
|
|
84
|
+
* Type guard function.
|
|
85
|
+
* @publicbody
|
|
86
|
+
*/
|
|
87
|
+
export declare function isBaseBlockHeader(header: BaseBlockHeader | BlockHeader | LiveBlockHeader): header is BaseBlockHeader;
|
|
88
|
+
/**
|
|
89
|
+
* Type guard function.
|
|
90
|
+
* @publicbody
|
|
91
|
+
*/
|
|
92
|
+
export declare function isBlockHeader(header: BaseBlockHeader | BlockHeader | LiveBlockHeader): header is LiveBlockHeader;
|
|
93
|
+
/**
|
|
94
|
+
* Type guard function.
|
|
95
|
+
* @publicbody
|
|
96
|
+
*/
|
|
97
|
+
export declare function isLiveBlockHeader(header: BaseBlockHeader | BlockHeader | LiveBlockHeader): header is LiveBlockHeader;
|
|
98
|
+
//# sourceMappingURL=BlockHeaderApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockHeaderApi.d.ts","sourceRoot":"","sources":["../../../../../../src/services/cha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@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isLive = isLive;
|
|
4
|
+
exports.isBaseBlockHeader = isBaseBlockHeader;
|
|
5
|
+
exports.isBlockHeader = isBlockHeader;
|
|
6
|
+
exports.isLiveBlockHeader = isLiveBlockHeader;
|
|
7
|
+
//
|
|
8
|
+
// TYPE GUARDS
|
|
9
|
+
//
|
|
10
|
+
/**
|
|
11
|
+
* Type guard function.
|
|
12
|
+
* @publicbody
|
|
13
|
+
*/
|
|
14
|
+
function isLive(header) {
|
|
15
|
+
return header.headerId !== undefined;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Type guard function.
|
|
19
|
+
* @publicbody
|
|
20
|
+
*/
|
|
21
|
+
function isBaseBlockHeader(header) {
|
|
22
|
+
return typeof header.previousHash === 'string';
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Type guard function.
|
|
26
|
+
* @publicbody
|
|
27
|
+
*/
|
|
28
|
+
function isBlockHeader(header) {
|
|
29
|
+
return 'height' in header && typeof header.previousHash === 'string';
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Type guard function.
|
|
33
|
+
* @publicbody
|
|
34
|
+
*/
|
|
35
|
+
function isLiveBlockHeader(header) {
|
|
36
|
+
return 'chainwork' in header && typeof header.previousHash === 'string';
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=BlockHeaderApi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlockHeaderApi.js","sourceRoot":"","sources":["../../../../../../src/services/chaintracker/chaintracks/BlockHeaderApi.ts"],"names":[],"mappings":";;AAwFA,wBAEC;AAMD,8CAEC;AAMD,sCAEC;AAMD,8CAEC;AAlCD,EAAE;AACF,cAAc;AACd,EAAE;AAEF;;;GAGG;AACH,SAAgB,MAAM,CAAC,MAAqC;IAC1D,OAAQ,MAA0B,CAAC,QAAQ,KAAK,SAAS,CAAA;AAC3D,CAAC;AAED;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,MAAuD;IACvF,OAAO,OAAO,MAAM,CAAC,YAAY,KAAK,QAAQ,CAAA;AAChD,CAAC;AAED;;;GAGG;AACH,SAAgB,aAAa,CAAC,MAAuD;IACnF,OAAO,QAAQ,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,YAAY,KAAK,QAAQ,CAAA;AACtE,CAAC;AAED;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,MAAuD;IACvF,OAAO,WAAW,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,YAAY,KAAK,QAAQ,CAAA;AACzE,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { sdk } from '../../../index.client';
|
|
2
|
+
import { BaseBlockHeader, BlockHeader } from './BlockHeaderApi';
|
|
3
|
+
export interface ChaintracksServiceClientOptions {
|
|
4
|
+
useAuthrite: boolean;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Connects to a ChaintracksService to implement 'ChaintracksClientApi'
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
export declare class ChaintracksServiceClient {
|
|
11
|
+
chain: sdk.Chain;
|
|
12
|
+
serviceUrl: string;
|
|
13
|
+
static createChaintracksServiceClientOptions(): ChaintracksServiceClientOptions;
|
|
14
|
+
options: ChaintracksServiceClientOptions;
|
|
15
|
+
constructor(chain: sdk.Chain, serviceUrl: string, options?: ChaintracksServiceClientOptions);
|
|
16
|
+
currentHeight(): Promise<number>;
|
|
17
|
+
isValidRootForHeight(root: string, height: number): Promise<boolean>;
|
|
18
|
+
getJsonOrUndefined<T>(path: string): Promise<T | undefined>;
|
|
19
|
+
getJson<T>(path: string): Promise<T>;
|
|
20
|
+
postJsonVoid<T>(path: string, params: T): Promise<void>;
|
|
21
|
+
addHeader(header: BaseBlockHeader): Promise<void>;
|
|
22
|
+
startListening(): Promise<void>;
|
|
23
|
+
listening(): Promise<void>;
|
|
24
|
+
getChain(): Promise<sdk.Chain>;
|
|
25
|
+
isListening(): Promise<boolean>;
|
|
26
|
+
isSynchronized(): Promise<boolean>;
|
|
27
|
+
getPresentHeight(): Promise<number>;
|
|
28
|
+
findChainTipHeader(): Promise<BlockHeader>;
|
|
29
|
+
findChainTipHashHex(): Promise<string>;
|
|
30
|
+
getHeaders(height: number, count: number): Promise<string>;
|
|
31
|
+
findHeaderForHeight(height: number): Promise<BlockHeader | undefined>;
|
|
32
|
+
findChainWorkForBlockHash(hash: string): Promise<string | undefined>;
|
|
33
|
+
findHeaderForBlockHash(hash: string): Promise<BlockHeader | undefined>;
|
|
34
|
+
findHeaderForMerkleRoot(merkleRoot: string, height?: number): Promise<BlockHeader | undefined>;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=ChaintracksServiceClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChaintracksServiceClient.d.ts","sourceRoot":"","sources":["../../../../../../src/services/chaintracker/chaintracks/ChaintracksServiceClient.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,GAAG,EAAE,MAAM,uBAAuB,CAAA;AAErD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAqB,MAAM,kBAAkB,CAAA;AASlF,MAAM,WAAW,+BAA+B;IAC9C,WAAW,EAAE,OAAO,CAAA;CACrB;AAED;;;GAGG;AACH,qBAAa,wBAAwB;IAW1B,KAAK,EAAE,GAAG,CAAC,KAAK;IAChB,UAAU,EAAE,MAAM;IAX3B,MAAM,CAAC,qCAAqC,IAAI,+BAA+B;IAO/E,OAAO,EAAE,+BAA+B,CAAA;gBAG/B,KAAK,EAAE,GAAG,CAAC,KAAK,EAChB,UAAU,EAAE,MAAM,EACzB,OAAO,CAAC,EAAE,+BAA+B;IAKrC,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC;IAIhC,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,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+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChaintracksServiceClient = void 0;
|
|
4
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5
|
+
const index_client_1 = require("../../../index.client");
|
|
6
|
+
/**
|
|
7
|
+
* Connects to a ChaintracksService to implement 'ChaintracksClientApi'
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
class ChaintracksServiceClient {
|
|
11
|
+
static createChaintracksServiceClientOptions() {
|
|
12
|
+
const options = {
|
|
13
|
+
useAuthrite: false
|
|
14
|
+
};
|
|
15
|
+
return options;
|
|
16
|
+
}
|
|
17
|
+
constructor(chain, serviceUrl, options) {
|
|
18
|
+
this.chain = chain;
|
|
19
|
+
this.serviceUrl = serviceUrl;
|
|
20
|
+
this.options = options || ChaintracksServiceClient.createChaintracksServiceClientOptions();
|
|
21
|
+
}
|
|
22
|
+
async currentHeight() {
|
|
23
|
+
return await this.getPresentHeight();
|
|
24
|
+
}
|
|
25
|
+
async isValidRootForHeight(root, height) {
|
|
26
|
+
const r = await this.findHeaderForHeight(height);
|
|
27
|
+
if (!r)
|
|
28
|
+
return false;
|
|
29
|
+
const isValid = root === (0, index_client_1.asString)(r.merkleRoot);
|
|
30
|
+
return isValid;
|
|
31
|
+
}
|
|
32
|
+
async getJsonOrUndefined(path) {
|
|
33
|
+
let e = undefined;
|
|
34
|
+
for (let retry = 0; retry < 3; retry++) {
|
|
35
|
+
try {
|
|
36
|
+
const r = await fetch(`${this.serviceUrl}${path}`);
|
|
37
|
+
const v = await r.json();
|
|
38
|
+
if (v.status === 'success')
|
|
39
|
+
return v.value;
|
|
40
|
+
else
|
|
41
|
+
e = new Error(JSON.stringify(v));
|
|
42
|
+
}
|
|
43
|
+
catch (eu) {
|
|
44
|
+
e = eu;
|
|
45
|
+
}
|
|
46
|
+
if (e && e.name !== 'ECONNRESET')
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
if (e)
|
|
50
|
+
throw e;
|
|
51
|
+
}
|
|
52
|
+
async getJson(path) {
|
|
53
|
+
const r = await this.getJsonOrUndefined(path);
|
|
54
|
+
if (r === undefined)
|
|
55
|
+
throw new Error('Value was undefined. Requested object may not exist.');
|
|
56
|
+
return r;
|
|
57
|
+
}
|
|
58
|
+
async postJsonVoid(path, params) {
|
|
59
|
+
const headers = {};
|
|
60
|
+
headers['Content-Type'] = 'application/json';
|
|
61
|
+
const r = await fetch(`${this.serviceUrl}${path}`, {
|
|
62
|
+
body: JSON.stringify(params),
|
|
63
|
+
method: 'POST',
|
|
64
|
+
headers
|
|
65
|
+
//cache: 'no-cache',
|
|
66
|
+
});
|
|
67
|
+
try {
|
|
68
|
+
const s = await r.json();
|
|
69
|
+
if (s.status === 'success')
|
|
70
|
+
return;
|
|
71
|
+
throw new Error(JSON.stringify(s));
|
|
72
|
+
}
|
|
73
|
+
catch (e) {
|
|
74
|
+
console.log(`Exception: ${JSON.stringify(e)}`);
|
|
75
|
+
throw new Error(JSON.stringify(e));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
//
|
|
79
|
+
// HTTP API FUNCTIONS
|
|
80
|
+
//
|
|
81
|
+
async addHeader(header) {
|
|
82
|
+
const r = await this.postJsonVoid('/addHeaderHex', header);
|
|
83
|
+
if (typeof r === 'string')
|
|
84
|
+
throw new Error(r);
|
|
85
|
+
}
|
|
86
|
+
async startListening() {
|
|
87
|
+
return await this.getJsonOrUndefined('/startListening');
|
|
88
|
+
}
|
|
89
|
+
async listening() {
|
|
90
|
+
return await this.getJsonOrUndefined('/listening');
|
|
91
|
+
}
|
|
92
|
+
async getChain() {
|
|
93
|
+
return this.chain;
|
|
94
|
+
//return await this.getJson('/getChain')
|
|
95
|
+
}
|
|
96
|
+
async isListening() {
|
|
97
|
+
return await this.getJson('/isListening');
|
|
98
|
+
}
|
|
99
|
+
async isSynchronized() {
|
|
100
|
+
return await this.getJson('/isSynchronized');
|
|
101
|
+
}
|
|
102
|
+
async getPresentHeight() {
|
|
103
|
+
return await this.getJson('/getPresentHeight');
|
|
104
|
+
}
|
|
105
|
+
async findChainTipHeader() {
|
|
106
|
+
return await this.getJson('/findChainTipHeaderHex');
|
|
107
|
+
}
|
|
108
|
+
async findChainTipHashHex() {
|
|
109
|
+
return await this.getJson('/findChainTipHashHex');
|
|
110
|
+
}
|
|
111
|
+
async getHeaders(height, count) {
|
|
112
|
+
return await this.getJson(`/getHeaders?height=${height}&count=${count}`);
|
|
113
|
+
}
|
|
114
|
+
async findHeaderForHeight(height) {
|
|
115
|
+
return await this.getJsonOrUndefined(`/findHeaderHexForHeight?height=${height}`);
|
|
116
|
+
}
|
|
117
|
+
async findChainWorkForBlockHash(hash) {
|
|
118
|
+
return await this.getJsonOrUndefined(`/findChainWorkHexForBlockHash?hash=${(0, index_client_1.asString)(hash)}`);
|
|
119
|
+
}
|
|
120
|
+
async findHeaderForBlockHash(hash) {
|
|
121
|
+
return await this.getJsonOrUndefined(`/findHeaderHexForBlockHash?hash=${(0, index_client_1.asString)(hash)}`);
|
|
122
|
+
}
|
|
123
|
+
async findHeaderForMerkleRoot(merkleRoot, height) {
|
|
124
|
+
return await this.getJsonOrUndefined(`/findHeaderHexForMerkleRoot?root=${(0, index_client_1.asString)(merkleRoot)}&height=${height}`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
exports.ChaintracksServiceClient = ChaintracksServiceClient;
|
|
128
|
+
//# sourceMappingURL=ChaintracksServiceClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChaintracksServiceClient.js","sourceRoot":"","sources":["../../../../../../src/services/chaintracker/chaintracks/ChaintracksServiceClient.ts"],"names":[],"mappings":";;;AAAA,sDAAsD;AACtD,wDAAqD;AAerD;;;GAGG;AACH,MAAa,wBAAwB;IACnC,MAAM,CAAC,qCAAqC;QAC1C,MAAM,OAAO,GAAoC;YAC/C,WAAW,EAAE,KAAK;SACnB,CAAA;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;IA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AC,kBAAkB,CAAC,sCAAsC,IAAA,uBAAQ,EAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC9F,CAAC;IACD,KAAK,CAAC,sBAAsB,CAAC,IAAY;QACvC,OAAO,MAAM,IAAI,CAAC,kBAAkB,CAAC,mCAAmC,IAAA,uBAAQ,EAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC3F,CAAC;IACD,KAAK,CAAC,uBAAuB,CAAC,UAAkB,EAAE,MAAe;QAC/D,OAAO,MAAM,IAAI,CAAC,kBAAkB,CAAC,oCAAoC,IAAA,uBAAQ,EAAC,UAAU,CAAC,WAAW,MAAM,EAAE,CAAC,CAAA;IACnH,CAAC;CACF;AAzHD,4DAyHC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/services/chaintracker/chaintracks/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ChaintracksServiceClient"), exports);
|
|
18
|
+
__exportStar(require("./BlockHeaderApi"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/services/chaintracker/chaintracks/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA0C;AAC1C,mDAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/services/chaintracker/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,2BAA2B,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./chaintracks"), exports);
|
|
18
|
+
__exportStar(require("./ChaintracksChainTracker"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/services/chaintracker/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B;AAC7B,4DAAyC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { sdk } from '../index.client';
|
|
2
|
+
export declare function createDefaultWalletServicesOptions(chain: sdk.Chain): sdk.WalletServicesOptions;
|
|
3
|
+
export declare function arcDefaultUrl(chain: sdk.Chain): string;
|
|
4
|
+
//# sourceMappingURL=createDefaultWalletServicesOptions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createDefaultWalletServicesOptions.d.ts","sourceRoot":"","sources":["../../../../src/services/createDefaultWalletServicesOptions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAGrD,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,qBAAqB,CAuC9F;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,CAAC,KAAK,GAAG,MAAM,CAGtD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createDefaultWalletServicesOptions = createDefaultWalletServicesOptions;
|
|
4
|
+
exports.arcDefaultUrl = arcDefaultUrl;
|
|
5
|
+
const index_client_1 = require("../index.client");
|
|
6
|
+
const chaintracker_1 = require("./chaintracker");
|
|
7
|
+
function createDefaultWalletServicesOptions(chain) {
|
|
8
|
+
const taalApiKey = chain === 'main'
|
|
9
|
+
? 'mainnet_9596de07e92300c6287e4393594ae39c' // no plan
|
|
10
|
+
: 'testnet_0e6cf72133b43ea2d7861da2a38684e3'; // personal "starter" key
|
|
11
|
+
const o = {
|
|
12
|
+
chain,
|
|
13
|
+
taalApiKey,
|
|
14
|
+
bsvExchangeRate: {
|
|
15
|
+
timestamp: new Date('2023-12-13'),
|
|
16
|
+
base: 'USD',
|
|
17
|
+
rate: 47.52
|
|
18
|
+
},
|
|
19
|
+
bsvUpdateMsecs: 1000 * 60 * 15, // 15 minutes
|
|
20
|
+
fiatExchangeRates: {
|
|
21
|
+
timestamp: new Date('2023-12-13'),
|
|
22
|
+
base: 'USD',
|
|
23
|
+
rates: {
|
|
24
|
+
USD: 1,
|
|
25
|
+
GBP: 0.8,
|
|
26
|
+
EUR: 0.93
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
fiatUpdateMsecs: 1000 * 60 * 60 * 24, // 24 hours
|
|
30
|
+
disableMapiCallback: true, // Rely on WalletMonitor by default.
|
|
31
|
+
exchangeratesapiKey: 'bd539d2ff492bcb5619d5f27726a766f',
|
|
32
|
+
chaintracksFiatExchangeRatesUrl: `https://npm-registry.babbage.systems:${chain === 'main' ? 8084 : 8083}/getFiatExchangeRates`,
|
|
33
|
+
chaintracks: new chaintracker_1.ChaintracksServiceClient(chain, `https://npm-registry.babbage.systems:${chain === 'main' ? 8084 : 8083}`),
|
|
34
|
+
arcUrl: arcDefaultUrl(chain),
|
|
35
|
+
arcConfig: {
|
|
36
|
+
apiKey: taalApiKey,
|
|
37
|
+
deploymentId: `wallet-toolbox-${(0, index_client_1.randomBytesHex)(16)}`
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return o;
|
|
41
|
+
}
|
|
42
|
+
function arcDefaultUrl(chain) {
|
|
43
|
+
const url = chain === 'main' ? 'https://arc.taal.com' : 'https://arc-test.taal.com';
|
|
44
|
+
return url;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=createDefaultWalletServicesOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createDefaultWalletServicesOptions.js","sourceRoot":"","sources":["../../../../src/services/createDefaultWalletServicesOptions.ts"],"names":[],"mappings":";;AAGA,gFAuCC;AAED,sCAGC;AA/CD,kDAAqD;AACrD,iDAAyD;AAEzD,SAAgB,kCAAkC,CAA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,CAAC,CAAC,CAAC,2BAA2B,CAAA;IACnF,OAAO,GAAG,CAAA;AACZ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Services"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA0B"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Beef, HexString, HttpClient } from '@bsv/sdk';
|
|
2
|
+
import { sdk } from '../../index.client';
|
|
3
|
+
/** Configuration options for the ARC broadcaster. */
|
|
4
|
+
export interface ArcConfig {
|
|
5
|
+
/** Authentication token for the ARC API */
|
|
6
|
+
apiKey?: string;
|
|
7
|
+
/** The HTTP client used to make requests to the ARC API. */
|
|
8
|
+
httpClient?: HttpClient;
|
|
9
|
+
/** Deployment id used annotating api calls in XDeployment-ID header - this value will be randomly generated if not set */
|
|
10
|
+
deploymentId?: string;
|
|
11
|
+
/** notification callback endpoint for proofs and double spend notification */
|
|
12
|
+
callbackUrl?: string;
|
|
13
|
+
/** default access token for notification callback endpoint. It will be used as a Authorization header for the http callback */
|
|
14
|
+
callbackToken?: string;
|
|
15
|
+
/** additional headers to be attached to all tx submissions. */
|
|
16
|
+
headers?: Record<string, string>;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Represents an ARC transaction broadcaster.
|
|
20
|
+
*/
|
|
21
|
+
export declare class ARC {
|
|
22
|
+
readonly URL: string;
|
|
23
|
+
readonly apiKey: string | undefined;
|
|
24
|
+
readonly deploymentId: string;
|
|
25
|
+
readonly callbackUrl: string | undefined;
|
|
26
|
+
readonly callbackToken: string | undefined;
|
|
27
|
+
readonly headers: Record<string, string> | undefined;
|
|
28
|
+
private readonly httpClient;
|
|
29
|
+
/**
|
|
30
|
+
* Constructs an instance of the ARC broadcaster.
|
|
31
|
+
*
|
|
32
|
+
* @param {string} URL - The URL endpoint for the ARC API.
|
|
33
|
+
* @param {ArcConfig} config - Configuration options for the ARC broadcaster.
|
|
34
|
+
*/
|
|
35
|
+
constructor(URL: string, config?: ArcConfig);
|
|
36
|
+
/**
|
|
37
|
+
* Constructs an instance of the ARC broadcaster.
|
|
38
|
+
*
|
|
39
|
+
* @param {string} URL - The URL endpoint for the ARC API.
|
|
40
|
+
* @param {string} apiKey - The API key used for authorization with the ARC API.
|
|
41
|
+
*/
|
|
42
|
+
constructor(URL: string, apiKey?: string);
|
|
43
|
+
/**
|
|
44
|
+
* Constructs a dictionary of the default & supplied request headers.
|
|
45
|
+
*/
|
|
46
|
+
private requestHeaders;
|
|
47
|
+
/**
|
|
48
|
+
* The ARC '/v1/tx' endpoint, as of 2025-02-17 supports all of the following hex string formats:
|
|
49
|
+
* 1. Single serialized raw transaction.
|
|
50
|
+
* 2. Single EF serialized raw transaction (untested).
|
|
51
|
+
* 3. V1 serialized Beef (results returned reflect only the last transaction in the beef)
|
|
52
|
+
*
|
|
53
|
+
* The ARC '/v1/tx' endpoint, as of 2025-02-17 DOES NOT support the following hex string formats:
|
|
54
|
+
* 1. V2 serialized Beef
|
|
55
|
+
*
|
|
56
|
+
* @param rawTx
|
|
57
|
+
* @param txids
|
|
58
|
+
* @returns
|
|
59
|
+
*/
|
|
60
|
+
postRawTx(rawTx: HexString, txids?: string[]): Promise<sdk.PostTxResultForTxid>;
|
|
61
|
+
/**
|
|
62
|
+
* ARC does not natively support a postBeef end-point aware of multiple txids of interest in the Beef.
|
|
63
|
+
*
|
|
64
|
+
* It does process multiple new transactions, however, which allows results for all txids of interest
|
|
65
|
+
* to be collected by the `/v1/tx/${txid}` endpoint.
|
|
66
|
+
*
|
|
67
|
+
* @param beef
|
|
68
|
+
* @param txids
|
|
69
|
+
* @returns
|
|
70
|
+
*/
|
|
71
|
+
postBeef(beef: Beef, txids: string[]): Promise<sdk.PostBeefResult>;
|
|
72
|
+
/**
|
|
73
|
+
* This seems to only work for recently submitted txids...but that's all we need to complete postBeef!
|
|
74
|
+
* @param txid
|
|
75
|
+
* @returns
|
|
76
|
+
*/
|
|
77
|
+
getTxData(txid: string): Promise<ArcMinerGetTxData>;
|
|
78
|
+
}
|
|
79
|
+
export interface ArcMinerGetTxData {
|
|
80
|
+
status: number;
|
|
81
|
+
title: string;
|
|
82
|
+
blockHash: string;
|
|
83
|
+
blockHeight: number;
|
|
84
|
+
competingTxs: null | string[];
|
|
85
|
+
extraInfo: string;
|
|
86
|
+
merklePath: string;
|
|
87
|
+
timestamp: string;
|
|
88
|
+
txid: string;
|
|
89
|
+
txStatus: string;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=ARC.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ARC.d.ts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