@bsv/wallet-toolbox 1.3.20 → 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/.github/workflows/push.yaml +5 -0
- 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 +22 -0
- package/mobile/package.json +25 -0
- package/out/src/index.mobile.d.ts +19 -0
- package/out/src/index.mobile.d.ts.map +1 -0
- package/out/src/index.mobile.js +58 -0
- package/out/src/index.mobile.js.map +1 -0
- package/out/src/storage/index.mobile.d.ts +7 -0
- package/out/src/storage/index.mobile.d.ts.map +1 -0
- package/out/src/storage/index.mobile.js +23 -0
- package/out/src/storage/index.mobile.js.map +1 -0
- package/out/src/wab-client/WABClient.js +2 -5
- package/out/src/wab-client/WABClient.js.map +1 -1
- package/out/tsconfig.all.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/index.mobile.ts +18 -0
- package/src/storage/index.mobile.ts +6 -0
- package/src/wab-client/WABClient.ts +2 -2
- package/tsconfig.json +3 -0
- package/tsconfig.mobile.json +22 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { sdk, StorageProvider } from '../../../index.client';
|
|
2
|
+
export type EntityStorage = StorageProvider;
|
|
3
|
+
export declare abstract class EntityBase<T> {
|
|
4
|
+
api: T;
|
|
5
|
+
constructor(api: T);
|
|
6
|
+
/**
|
|
7
|
+
* Standard property for entity database Id
|
|
8
|
+
*/
|
|
9
|
+
abstract get id(): number;
|
|
10
|
+
/**
|
|
11
|
+
* Name of derived entity class
|
|
12
|
+
*/
|
|
13
|
+
abstract get entityName(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Schema table name of entity
|
|
16
|
+
*/
|
|
17
|
+
abstract get entityTable(): string;
|
|
18
|
+
/**
|
|
19
|
+
* On construction, an entity may decode properties of the `api` object,
|
|
20
|
+
* such as JSON stringified objects.
|
|
21
|
+
*
|
|
22
|
+
* The `updateApi` method must re-encode the current state of those decoded properties
|
|
23
|
+
* into the `api` object.
|
|
24
|
+
*
|
|
25
|
+
* Used by the `toApi` method to return an updated `api` object.
|
|
26
|
+
*/
|
|
27
|
+
abstract updateApi(): void;
|
|
28
|
+
/**
|
|
29
|
+
* Tests for equality or 'merge' / 'convergent' equality if syncMap is provided.
|
|
30
|
+
*
|
|
31
|
+
* 'convergent' equality must satisfy (A sync B) equals (B sync A)
|
|
32
|
+
*
|
|
33
|
+
* @param ei
|
|
34
|
+
* @param syncMap
|
|
35
|
+
*/
|
|
36
|
+
abstract equals(ei: T, syncMap?: SyncMap): boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Perform a 'merge' / 'convergent' equality migration of state
|
|
39
|
+
* to this new local entity which was constructed
|
|
40
|
+
* as a copy of the external object.
|
|
41
|
+
*
|
|
42
|
+
* @param userId local userId
|
|
43
|
+
* @param syncMap
|
|
44
|
+
*/
|
|
45
|
+
abstract mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Perform a 'merge' / 'convergent' equality migration of state
|
|
48
|
+
* from external `ei` to this existing local EntityUser
|
|
49
|
+
*
|
|
50
|
+
* @param ei
|
|
51
|
+
* @param syncMap
|
|
52
|
+
* @returns true iff entity state changed and was updated to storage
|
|
53
|
+
*/
|
|
54
|
+
abstract mergeExisting(storage: EntityStorage, since: Date | undefined, ei: T, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>;
|
|
55
|
+
/**
|
|
56
|
+
* An entity may decode properties of the underlying Api object on construction.
|
|
57
|
+
*
|
|
58
|
+
* The `toApi` method forces an `updateApi` before returning the underlying,
|
|
59
|
+
* now updated, Api object.
|
|
60
|
+
*
|
|
61
|
+
* @returns The underlying Api object with any entity decoded properties updated.
|
|
62
|
+
*/
|
|
63
|
+
toApi(): T;
|
|
64
|
+
}
|
|
65
|
+
export interface EntitySyncMap {
|
|
66
|
+
entityName: string;
|
|
67
|
+
/**
|
|
68
|
+
* Maps foreign ids to local ids
|
|
69
|
+
* Some entities don't have idMaps (CertificateField, TxLabelMap and OutputTagMap)
|
|
70
|
+
*/
|
|
71
|
+
idMap: Record<number, number>;
|
|
72
|
+
/**
|
|
73
|
+
* the maximum updated_at value seen for this entity over chunks received
|
|
74
|
+
* during this udpate cycle.
|
|
75
|
+
*/
|
|
76
|
+
maxUpdated_at?: Date;
|
|
77
|
+
/**
|
|
78
|
+
* The cummulative count of items of this entity type received over all the `SyncChunk`s
|
|
79
|
+
* since the `since` was last updated.
|
|
80
|
+
*
|
|
81
|
+
* This is the `offset` value to use for the next SyncChunk request.
|
|
82
|
+
*/
|
|
83
|
+
count: number;
|
|
84
|
+
}
|
|
85
|
+
export interface SyncMap {
|
|
86
|
+
provenTx: EntitySyncMap;
|
|
87
|
+
outputBasket: EntitySyncMap;
|
|
88
|
+
transaction: EntitySyncMap;
|
|
89
|
+
provenTxReq: EntitySyncMap;
|
|
90
|
+
txLabel: EntitySyncMap;
|
|
91
|
+
txLabelMap: EntitySyncMap;
|
|
92
|
+
output: EntitySyncMap;
|
|
93
|
+
outputTag: EntitySyncMap;
|
|
94
|
+
outputTagMap: EntitySyncMap;
|
|
95
|
+
certificate: EntitySyncMap;
|
|
96
|
+
certificateField: EntitySyncMap;
|
|
97
|
+
commission: EntitySyncMap;
|
|
98
|
+
}
|
|
99
|
+
export declare function createSyncMap(): SyncMap;
|
|
100
|
+
export interface SyncError {
|
|
101
|
+
code: string;
|
|
102
|
+
description: string;
|
|
103
|
+
stack?: string;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=EntityBase.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityBase.d.ts","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAE5D,MAAM,MAAM,aAAa,GAAG,eAAe,CAAA;AAE3C,8BAAsB,UAAU,CAAC,CAAC;IAChC,GAAG,EAAE,CAAC,CAAA;gBAEM,GAAG,EAAE,CAAC;IAIlB;;OAEG;IACH,QAAQ,KAAK,EAAE,IAAI,MAAM,CAAA;IAEzB;;OAEG;IACH,QAAQ,KAAK,UAAU,IAAI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C3B,WAAW,EAAE,aAAa,CAAA;IAC1B,gBAAgB,EAAE,aAAa,CAAA;IAC/B,UAAU,EAAE,aAAa,CAAA;CAC1B;AAED,wBAAgB,aAAa,IAAI,OAAO,CA4EvC;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EntityBase = void 0;
|
|
4
|
+
exports.createSyncMap = createSyncMap;
|
|
5
|
+
class EntityBase {
|
|
6
|
+
constructor(api) {
|
|
7
|
+
this.api = api;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* An entity may decode properties of the underlying Api object on construction.
|
|
11
|
+
*
|
|
12
|
+
* The `toApi` method forces an `updateApi` before returning the underlying,
|
|
13
|
+
* now updated, Api object.
|
|
14
|
+
*
|
|
15
|
+
* @returns The underlying Api object with any entity decoded properties updated.
|
|
16
|
+
*/
|
|
17
|
+
toApi() {
|
|
18
|
+
this.updateApi();
|
|
19
|
+
return this.api;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.EntityBase = EntityBase;
|
|
23
|
+
function createSyncMap() {
|
|
24
|
+
const r = {
|
|
25
|
+
provenTx: {
|
|
26
|
+
entityName: 'provenTx',
|
|
27
|
+
idMap: {},
|
|
28
|
+
maxUpdated_at: undefined,
|
|
29
|
+
count: 0
|
|
30
|
+
},
|
|
31
|
+
outputBasket: {
|
|
32
|
+
entityName: 'outputBasket',
|
|
33
|
+
idMap: {},
|
|
34
|
+
maxUpdated_at: undefined,
|
|
35
|
+
count: 0
|
|
36
|
+
},
|
|
37
|
+
transaction: {
|
|
38
|
+
entityName: 'transaction',
|
|
39
|
+
idMap: {},
|
|
40
|
+
maxUpdated_at: undefined,
|
|
41
|
+
count: 0
|
|
42
|
+
},
|
|
43
|
+
provenTxReq: {
|
|
44
|
+
entityName: 'provenTxReq',
|
|
45
|
+
idMap: {},
|
|
46
|
+
maxUpdated_at: undefined,
|
|
47
|
+
count: 0
|
|
48
|
+
},
|
|
49
|
+
txLabel: {
|
|
50
|
+
entityName: 'txLabel',
|
|
51
|
+
idMap: {},
|
|
52
|
+
maxUpdated_at: undefined,
|
|
53
|
+
count: 0
|
|
54
|
+
},
|
|
55
|
+
txLabelMap: {
|
|
56
|
+
entityName: 'txLabelMap',
|
|
57
|
+
idMap: {},
|
|
58
|
+
maxUpdated_at: undefined,
|
|
59
|
+
count: 0
|
|
60
|
+
},
|
|
61
|
+
output: {
|
|
62
|
+
entityName: 'output',
|
|
63
|
+
idMap: {},
|
|
64
|
+
maxUpdated_at: undefined,
|
|
65
|
+
count: 0
|
|
66
|
+
},
|
|
67
|
+
outputTag: {
|
|
68
|
+
entityName: 'outputTag',
|
|
69
|
+
idMap: {},
|
|
70
|
+
maxUpdated_at: undefined,
|
|
71
|
+
count: 0
|
|
72
|
+
},
|
|
73
|
+
outputTagMap: {
|
|
74
|
+
entityName: 'outputTagMap',
|
|
75
|
+
idMap: {},
|
|
76
|
+
maxUpdated_at: undefined,
|
|
77
|
+
count: 0
|
|
78
|
+
},
|
|
79
|
+
certificate: {
|
|
80
|
+
entityName: 'certificate',
|
|
81
|
+
idMap: {},
|
|
82
|
+
maxUpdated_at: undefined,
|
|
83
|
+
count: 0
|
|
84
|
+
},
|
|
85
|
+
certificateField: {
|
|
86
|
+
entityName: 'certificateField',
|
|
87
|
+
idMap: {},
|
|
88
|
+
maxUpdated_at: undefined,
|
|
89
|
+
count: 0
|
|
90
|
+
},
|
|
91
|
+
commission: {
|
|
92
|
+
entityName: 'commission',
|
|
93
|
+
idMap: {},
|
|
94
|
+
maxUpdated_at: undefined,
|
|
95
|
+
count: 0
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
return r;
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=EntityBase.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityBase.js","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityBase.ts"],"names":[],"mappings":";;;AA8HA,sCA4EC;AAtMD,MAAsB,UAAU;IAG9B,YAAY,GAAM;QAChB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;IAChB,CAAC;IAgED;;;;;;;OAOG;IACH,KAAK;QACH,IAAI,CAAC,SAAS,EAAE,CAAA;QAChB,OAAO,IAAI,CAAC,GAAG,CAAA;IACjB,CAAC;CACF;AAjFD,gCAiFC;AAyCD,SAAgB,aAAa;IAC3B,MAAM,CAAC,GAAY;QACjB,QAAQ,EAAE;YACR,UAAU,EAAE,UAAU;YACtB,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,CAAC;SACT;QACD,YAAY,EAAE;YACZ,UAAU,EAAE,cAAc;YAC1B,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,CAAC;SACT;QACD,WAAW,EAAE;YACX,UAAU,EAAE,aAAa;YACzB,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,CAAC;SACT;QACD,WAAW,EAAE;YACX,UAAU,EAAE,aAAa;YACzB,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,CAAC;SACT;QACD,OAAO,EAAE;YACP,UAAU,EAAE,SAAS;YACrB,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,CAAC;SACT;QACD,UAAU,EAAE;YACV,UAAU,EAAE,YAAY;YACxB,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,CAAC;SACT;QACD,MAAM,EAAE;YACN,UAAU,EAAE,QAAQ;YACpB,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,CAAC;SACT;QACD,SAAS,EAAE;YACT,UAAU,EAAE,WAAW;YACvB,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,CAAC;SACT;QACD,YAAY,EAAE;YACZ,UAAU,EAAE,cAAc;YAC1B,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,CAAC;SACT;QACD,WAAW,EAAE;YACX,UAAU,EAAE,aAAa;YACzB,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,CAAC;SACT;QACD,gBAAgB,EAAE;YAChB,UAAU,EAAE,kBAAkB;YAC9B,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,CAAC;SACT;QACD,UAAU,EAAE;YACV,UAAU,EAAE,YAAY;YACxB,KAAK,EAAE,EAAE;YACT,aAAa,EAAE,SAAS;YACxB,KAAK,EAAE,CAAC;SACT;KACF,CAAA;IACD,OAAO,CAAC,CAAA;AACV,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { sdk, TableCertificate } from '../../../index.client';
|
|
2
|
+
import { EntityBase, EntityStorage, SyncMap } from '.';
|
|
3
|
+
export declare class EntityCertificate extends EntityBase<TableCertificate> {
|
|
4
|
+
constructor(api?: TableCertificate);
|
|
5
|
+
updateApi(): void;
|
|
6
|
+
get certificateId(): number;
|
|
7
|
+
set certificateId(v: number);
|
|
8
|
+
get created_at(): Date;
|
|
9
|
+
set created_at(v: Date);
|
|
10
|
+
get updated_at(): Date;
|
|
11
|
+
set updated_at(v: Date);
|
|
12
|
+
get userId(): number;
|
|
13
|
+
set userId(v: number);
|
|
14
|
+
get type(): string;
|
|
15
|
+
set type(v: string);
|
|
16
|
+
get subject(): string;
|
|
17
|
+
set subject(v: string);
|
|
18
|
+
get verifier(): string | undefined;
|
|
19
|
+
set verifier(v: string | undefined);
|
|
20
|
+
get serialNumber(): string;
|
|
21
|
+
set serialNumber(v: string);
|
|
22
|
+
get certifier(): string;
|
|
23
|
+
set certifier(v: string);
|
|
24
|
+
get revocationOutpoint(): string;
|
|
25
|
+
set revocationOutpoint(v: string);
|
|
26
|
+
get signature(): string;
|
|
27
|
+
set signature(v: string);
|
|
28
|
+
get isDeleted(): boolean;
|
|
29
|
+
set isDeleted(v: boolean);
|
|
30
|
+
get id(): number;
|
|
31
|
+
set id(v: number);
|
|
32
|
+
get entityName(): string;
|
|
33
|
+
get entityTable(): string;
|
|
34
|
+
equals(ei: TableCertificate, syncMap?: SyncMap): boolean;
|
|
35
|
+
static mergeFind(storage: EntityStorage, userId: number, ei: TableCertificate, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
36
|
+
found: boolean;
|
|
37
|
+
eo: EntityCertificate;
|
|
38
|
+
eiId: number;
|
|
39
|
+
}>;
|
|
40
|
+
mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>;
|
|
41
|
+
mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableCertificate, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=EntityCertificate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityCertificate.d.ts","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityCertificate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,GAAG,EAAE,gBAAgB,EAA6B,MAAM,uBAAuB,CAAA;AACrG,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,CAAA;AAEtD,qBAAa,iBAAkB,SAAQ,UAAU,CAAC,gBAAgB,CAAC;gBACrD,GAAG,CAAC,EAAE,gBAAgB;IAoBzB,SAAS,IAAI,IAAI;IAI1B,IAAI,aAAa,IAGI,MAAM,CAD1B;IACD,IAAI,aAAa,CAAC,CAAC,EAAE,MAAM,E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M,EAAE,MAAM,EACd,EAAE,EAAE,gBAAgB,EACpB,OAAO,EAAE,OAAO,EAChB,GAAG,CAAC,EAAE,GAAG,CAAC,QAAQ,GACjB,OAAO,CAAC;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,EAAE,EAAE,iBAAiB,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAkBpD,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrG,aAAa,CAC1B,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,IAAI,GAAG,SAAS,EACvB,EAAE,EAAE,gBAAgB,EACpB,OAAO,EAAE,OAAO,EAChB,GAAG,CAAC,EAAE,GAAG,CAAC,QAAQ,GACjB,OAAO,CAAC,OAAO,CAAC;CAgBpB"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EntityCertificate = void 0;
|
|
4
|
+
const index_client_1 = require("../../../index.client");
|
|
5
|
+
const _1 = require(".");
|
|
6
|
+
class EntityCertificate extends _1.EntityBase {
|
|
7
|
+
constructor(api) {
|
|
8
|
+
const now = new Date();
|
|
9
|
+
super(api || {
|
|
10
|
+
certificateId: 0,
|
|
11
|
+
created_at: now,
|
|
12
|
+
updated_at: now,
|
|
13
|
+
userId: 0,
|
|
14
|
+
type: '',
|
|
15
|
+
subject: '',
|
|
16
|
+
verifier: undefined,
|
|
17
|
+
serialNumber: '',
|
|
18
|
+
certifier: '',
|
|
19
|
+
revocationOutpoint: '',
|
|
20
|
+
signature: '',
|
|
21
|
+
isDeleted: false
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
updateApi() {
|
|
25
|
+
/* nothing needed yet... */
|
|
26
|
+
}
|
|
27
|
+
get certificateId() {
|
|
28
|
+
return this.api.certificateId;
|
|
29
|
+
}
|
|
30
|
+
set certificateId(v) {
|
|
31
|
+
this.api.certificateId = v;
|
|
32
|
+
}
|
|
33
|
+
get created_at() {
|
|
34
|
+
return this.api.created_at;
|
|
35
|
+
}
|
|
36
|
+
set created_at(v) {
|
|
37
|
+
this.api.created_at = v;
|
|
38
|
+
}
|
|
39
|
+
get updated_at() {
|
|
40
|
+
return this.api.updated_at;
|
|
41
|
+
}
|
|
42
|
+
set updated_at(v) {
|
|
43
|
+
this.api.updated_at = v;
|
|
44
|
+
}
|
|
45
|
+
get userId() {
|
|
46
|
+
return this.api.userId;
|
|
47
|
+
}
|
|
48
|
+
set userId(v) {
|
|
49
|
+
this.api.userId = v;
|
|
50
|
+
}
|
|
51
|
+
get type() {
|
|
52
|
+
return this.api.type;
|
|
53
|
+
}
|
|
54
|
+
set type(v) {
|
|
55
|
+
this.api.type = v;
|
|
56
|
+
}
|
|
57
|
+
get subject() {
|
|
58
|
+
return this.api.subject;
|
|
59
|
+
}
|
|
60
|
+
set subject(v) {
|
|
61
|
+
this.api.subject = v;
|
|
62
|
+
}
|
|
63
|
+
get verifier() {
|
|
64
|
+
return this.api.verifier;
|
|
65
|
+
}
|
|
66
|
+
set verifier(v) {
|
|
67
|
+
this.api.verifier = v;
|
|
68
|
+
}
|
|
69
|
+
get serialNumber() {
|
|
70
|
+
return this.api.serialNumber;
|
|
71
|
+
}
|
|
72
|
+
set serialNumber(v) {
|
|
73
|
+
this.api.serialNumber = v;
|
|
74
|
+
}
|
|
75
|
+
get certifier() {
|
|
76
|
+
return this.api.certifier;
|
|
77
|
+
}
|
|
78
|
+
set certifier(v) {
|
|
79
|
+
this.api.certifier = v;
|
|
80
|
+
}
|
|
81
|
+
get revocationOutpoint() {
|
|
82
|
+
return this.api.revocationOutpoint;
|
|
83
|
+
}
|
|
84
|
+
set revocationOutpoint(v) {
|
|
85
|
+
this.api.revocationOutpoint = v;
|
|
86
|
+
}
|
|
87
|
+
get signature() {
|
|
88
|
+
return this.api.signature;
|
|
89
|
+
}
|
|
90
|
+
set signature(v) {
|
|
91
|
+
this.api.signature = v;
|
|
92
|
+
}
|
|
93
|
+
get isDeleted() {
|
|
94
|
+
return this.api.isDeleted;
|
|
95
|
+
}
|
|
96
|
+
set isDeleted(v) {
|
|
97
|
+
this.api.isDeleted = v;
|
|
98
|
+
}
|
|
99
|
+
//get fields() { return this.api.fields }
|
|
100
|
+
//set fields(v: Record<string, string> | undefined) { this.api.fields = v }
|
|
101
|
+
get id() {
|
|
102
|
+
return this.api.certificateId;
|
|
103
|
+
}
|
|
104
|
+
set id(v) {
|
|
105
|
+
this.api.certificateId = v;
|
|
106
|
+
}
|
|
107
|
+
get entityName() {
|
|
108
|
+
return 'certificate';
|
|
109
|
+
}
|
|
110
|
+
get entityTable() {
|
|
111
|
+
return 'certificates';
|
|
112
|
+
}
|
|
113
|
+
equals(ei, syncMap) {
|
|
114
|
+
if (this.type !== ei.type ||
|
|
115
|
+
this.subject !== ei.subject ||
|
|
116
|
+
this.serialNumber !== ei.serialNumber ||
|
|
117
|
+
this.revocationOutpoint !== ei.revocationOutpoint ||
|
|
118
|
+
this.signature !== ei.signature ||
|
|
119
|
+
this.verifier !== ei.verifier ||
|
|
120
|
+
this.isDeleted !== ei.isDeleted)
|
|
121
|
+
return false;
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
static async mergeFind(storage, userId, ei, syncMap, trx) {
|
|
125
|
+
const ef = (0, index_client_1.verifyOneOrNone)(await storage.findCertificates({
|
|
126
|
+
partial: {
|
|
127
|
+
serialNumber: ei.serialNumber,
|
|
128
|
+
certifier: ei.certifier,
|
|
129
|
+
userId
|
|
130
|
+
},
|
|
131
|
+
trx
|
|
132
|
+
}));
|
|
133
|
+
return {
|
|
134
|
+
found: !!ef,
|
|
135
|
+
eo: new EntityCertificate(ef || { ...ei }),
|
|
136
|
+
eiId: (0, index_client_1.verifyId)(ei.certificateId)
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
async mergeNew(storage, userId, syncMap, trx) {
|
|
140
|
+
this.userId = userId;
|
|
141
|
+
this.certificateId = 0;
|
|
142
|
+
this.certificateId = await storage.insertCertificate(this.toApi(), trx);
|
|
143
|
+
}
|
|
144
|
+
async mergeExisting(storage, since, ei, syncMap, trx) {
|
|
145
|
+
let wasMerged = false;
|
|
146
|
+
if (ei.updated_at > this.updated_at) {
|
|
147
|
+
this.type = ei.type;
|
|
148
|
+
this.subject = ei.subject;
|
|
149
|
+
this.serialNumber = ei.serialNumber;
|
|
150
|
+
this.revocationOutpoint = ei.revocationOutpoint;
|
|
151
|
+
this.signature = ei.signature;
|
|
152
|
+
this.verifier = ei.verifier;
|
|
153
|
+
this.isDeleted = ei.isDeleted;
|
|
154
|
+
this.updated_at = new Date(Math.max(ei.updated_at.getTime(), this.updated_at.getTime()));
|
|
155
|
+
await storage.updateCertificate(this.id, this.toApi(), trx);
|
|
156
|
+
wasMerged = true;
|
|
157
|
+
}
|
|
158
|
+
return wasMerged;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
exports.EntityCertificate = EntityCertificate;
|
|
162
|
+
//# sourceMappingURL=EntityCertificate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityCertificate.js","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityCertificate.ts"],"names":[],"mappings":";;;AAEA,wDAAqG;AACrG,wBAAsD;AAEtD,MAAa,iBAAkB,SAAQ,aAA4B;IACjE,YAAY,GAAsB;QAChC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAA;QACtB,KAAK,CACH,GAAG,IAAI;YACL,aAAa,EAAE,CAAC;YAChB,UAAU,EAAE,GAAG;YACf,UAAU,EAAE,GAAG;YACf,MAAM,EAAE,CAAC;YACT,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE;YACX,QAAQ,EAAE,SAAS;YACnB,YAAY,EAAE,EAAE;YACh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AA;QACtB,IAAI,CAAC,aAAa,GAAG,MAAM,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,CAAA;IACzE,CAAC;IAEQ,KAAK,CAAC,aAAa,CAC1B,OAAsB,EACtB,KAAuB,EACvB,EAAoB,EACpB,OAAgB,EAChB,GAAkB;QAElB,IAAI,SAAS,GAAG,KAAK,CAAA;QACrB,IAAI,EAAE,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;YACpC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,IAAI,CAAA;YACnB,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC,OAAO,CAAA;YACzB,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,YAAY,CAAA;YACnC,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC,kBAAkB,CAAA;YAC/C,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,CAAA;YAC7B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAA;YAC3B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,CAAA;YAC7B,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;YACxF,MAAM,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,CAAA;YAC3D,SAAS,GAAG,IAAI,CAAA;QAClB,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AArLD,8CAqLC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { sdk, TableCertificateField } from '../../../index.client';
|
|
2
|
+
import { EntityBase, EntityStorage, SyncMap } from '.';
|
|
3
|
+
export declare class EntityCertificateField extends EntityBase<TableCertificateField> {
|
|
4
|
+
constructor(api?: TableCertificateField);
|
|
5
|
+
updateApi(): void;
|
|
6
|
+
get userId(): number;
|
|
7
|
+
set userId(v: number);
|
|
8
|
+
get certificateId(): number;
|
|
9
|
+
set certificateId(v: number);
|
|
10
|
+
get created_at(): Date;
|
|
11
|
+
set created_at(v: Date);
|
|
12
|
+
get updated_at(): Date;
|
|
13
|
+
set updated_at(v: Date);
|
|
14
|
+
get fieldName(): string;
|
|
15
|
+
set fieldName(v: string);
|
|
16
|
+
get fieldValue(): string;
|
|
17
|
+
set fieldValue(v: string);
|
|
18
|
+
get masterKey(): string;
|
|
19
|
+
set masterKey(v: string);
|
|
20
|
+
get id(): number;
|
|
21
|
+
get entityName(): string;
|
|
22
|
+
get entityTable(): string;
|
|
23
|
+
equals(ei: TableCertificateField, syncMap?: SyncMap | undefined): boolean;
|
|
24
|
+
static mergeFind(storage: EntityStorage, userId: number, ei: TableCertificateField, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
25
|
+
found: boolean;
|
|
26
|
+
eo: EntityCertificateField;
|
|
27
|
+
eiId: number;
|
|
28
|
+
}>;
|
|
29
|
+
mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>;
|
|
30
|
+
mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableCertificateField, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=EntityCertificateField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityCertificateField.d.ts","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityCertificateField.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,GAAG,EAAE,qBAAqB,EAA6B,MAAM,uBAAuB,CAAA;AAC1G,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,CAAA;AAEtD,qBAAa,s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O,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE,GAAG,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrG,aAAa,CAC1B,OAAO,EAAE,aAAa,EACtB,KAAK,EAAE,IAAI,GAAG,SAAS,EACvB,EAAE,EAAE,qBAAqB,EACzB,OAAO,EAAE,OAAO,EAChB,GAAG,CAAC,EAAE,GAAG,CAAC,QAAQ,GACjB,OAAO,CAAC,OAAO,CAAC;CAWpB"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EntityCertificateField = void 0;
|
|
4
|
+
const index_client_1 = require("../../../index.client");
|
|
5
|
+
const _1 = require(".");
|
|
6
|
+
class EntityCertificateField extends _1.EntityBase {
|
|
7
|
+
constructor(api) {
|
|
8
|
+
const now = new Date();
|
|
9
|
+
super(api || {
|
|
10
|
+
created_at: now,
|
|
11
|
+
updated_at: now,
|
|
12
|
+
userId: 0,
|
|
13
|
+
certificateId: 0,
|
|
14
|
+
fieldName: '',
|
|
15
|
+
fieldValue: '',
|
|
16
|
+
masterKey: ''
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
updateApi() {
|
|
20
|
+
/* nothing needed yet... */
|
|
21
|
+
}
|
|
22
|
+
get userId() {
|
|
23
|
+
return this.api.userId;
|
|
24
|
+
}
|
|
25
|
+
set userId(v) {
|
|
26
|
+
this.api.userId = v;
|
|
27
|
+
}
|
|
28
|
+
get certificateId() {
|
|
29
|
+
return this.api.certificateId;
|
|
30
|
+
}
|
|
31
|
+
set certificateId(v) {
|
|
32
|
+
this.api.certificateId = v;
|
|
33
|
+
}
|
|
34
|
+
get created_at() {
|
|
35
|
+
return this.api.created_at;
|
|
36
|
+
}
|
|
37
|
+
set created_at(v) {
|
|
38
|
+
this.api.created_at = v;
|
|
39
|
+
}
|
|
40
|
+
get updated_at() {
|
|
41
|
+
return this.api.updated_at;
|
|
42
|
+
}
|
|
43
|
+
set updated_at(v) {
|
|
44
|
+
this.api.updated_at = v;
|
|
45
|
+
}
|
|
46
|
+
get fieldName() {
|
|
47
|
+
return this.api.fieldName;
|
|
48
|
+
}
|
|
49
|
+
set fieldName(v) {
|
|
50
|
+
this.api.fieldName = v;
|
|
51
|
+
}
|
|
52
|
+
get fieldValue() {
|
|
53
|
+
return this.api.fieldValue;
|
|
54
|
+
}
|
|
55
|
+
set fieldValue(v) {
|
|
56
|
+
this.api.fieldValue = v;
|
|
57
|
+
}
|
|
58
|
+
get masterKey() {
|
|
59
|
+
return this.api.masterKey;
|
|
60
|
+
}
|
|
61
|
+
set masterKey(v) {
|
|
62
|
+
this.api.masterKey = v;
|
|
63
|
+
}
|
|
64
|
+
get id() {
|
|
65
|
+
throw new index_client_1.sdk.WERR_INVALID_OPERATION('entity has no "id" value');
|
|
66
|
+
}
|
|
67
|
+
get entityName() {
|
|
68
|
+
return 'certificateField';
|
|
69
|
+
}
|
|
70
|
+
get entityTable() {
|
|
71
|
+
return 'certificate_fields';
|
|
72
|
+
}
|
|
73
|
+
equals(ei, syncMap) {
|
|
74
|
+
if (this.certificateId !== (syncMap ? syncMap.certificate.idMap[ei.certificateId] : ei.certificateId) ||
|
|
75
|
+
this.fieldName !== ei.fieldName ||
|
|
76
|
+
this.fieldValue !== ei.fieldValue ||
|
|
77
|
+
this.masterKey !== ei.masterKey)
|
|
78
|
+
return false;
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
static async mergeFind(storage, userId, ei, syncMap, trx) {
|
|
82
|
+
const certificateId = syncMap.certificate.idMap[ei.certificateId];
|
|
83
|
+
const ef = (0, index_client_1.verifyOneOrNone)(await storage.findCertificateFields({
|
|
84
|
+
partial: { certificateId, userId, fieldName: ei.fieldName },
|
|
85
|
+
trx
|
|
86
|
+
}));
|
|
87
|
+
return {
|
|
88
|
+
found: !!ef,
|
|
89
|
+
eo: new EntityCertificateField(ef || { ...ei }),
|
|
90
|
+
eiId: -1
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
async mergeNew(storage, userId, syncMap, trx) {
|
|
94
|
+
this.certificateId = syncMap.certificate.idMap[this.certificateId];
|
|
95
|
+
this.userId = userId;
|
|
96
|
+
await storage.insertCertificateField(this.toApi(), trx);
|
|
97
|
+
}
|
|
98
|
+
async mergeExisting(storage, since, ei, syncMap, trx) {
|
|
99
|
+
let wasMerged = false;
|
|
100
|
+
if (ei.updated_at > this.updated_at) {
|
|
101
|
+
this.fieldValue = ei.fieldValue;
|
|
102
|
+
this.masterKey = ei.masterKey;
|
|
103
|
+
this.updated_at = new Date(Math.max(ei.updated_at.getTime(), this.updated_at.getTime()));
|
|
104
|
+
await storage.updateCertificateField(this.certificateId, this.fieldName, this.toApi(), trx);
|
|
105
|
+
wasMerged = true;
|
|
106
|
+
}
|
|
107
|
+
return wasMerged;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
exports.EntityCertificateField = EntityCertificateField;
|
|
111
|
+
//# sourceMappingURL=EntityCertificateField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityCertificateField.js","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityCertificateField.ts"],"names":[],"mappings":";;;AACA,wDAA0G;AAC1G,wBAAsD;AAEtD,MAAa,sBAAuB,SAAQ,aAAiC;IAC3E,YAAY,GAA2B;QACrC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAA;QACtB,KAAK,CACH,GAAG,IAAI;YACL,UAAU,EAAE,GAAG;YACf,UAAU,EAAE,GAAG;YACf,MAAM,EAAE,CAAC;YACT,aAAa,EAAE,CAAC;YAChB,SAAS,EAAE,EAAE;YACb,UAAU,EAAE,EAAE;YACd,SAAS,EAAE,EAAE;SACd,CACF,CAAA;IACH,CAAC;IAEQ,SAAS;QAChB,2BAA2B;IAC7B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAA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K,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QAClE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,MAAM,OAAO,CAAC,sBAAsB,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,CAAA;IACzD,CAAC;IAEQ,KAAK,CAAC,aAAa,CAC1B,OAAsB,EACtB,KAAuB,EACvB,EAAyB,EACzB,OAAgB,EAChB,GAAkB;QAElB,IAAI,SAAS,GAAG,KAAK,CAAA;QACrB,IAAI,EAAE,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;YACpC,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC,UAAU,CAAA;YAC/B,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC,SAAS,CAAA;YAC7B,IAAI,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;YACxF,MAAM,OAAO,CAAC,sBAAsB,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,EAAE,EAAE,GAAG,CAAC,CAAA;YAC3F,SAAS,GAAG,IAAI,CAAA;QAClB,CAAC;QACD,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AAjID,wDAiIC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { sdk, TableCommission } from '../../../index.client';
|
|
2
|
+
import { EntityBase, EntityStorage, SyncMap } from '.';
|
|
3
|
+
export declare class EntityCommission extends EntityBase<TableCommission> {
|
|
4
|
+
constructor(api?: TableCommission);
|
|
5
|
+
updateApi(): void;
|
|
6
|
+
get commissionId(): number;
|
|
7
|
+
set commissionId(v: number);
|
|
8
|
+
get created_at(): Date;
|
|
9
|
+
set created_at(v: Date);
|
|
10
|
+
get updated_at(): Date;
|
|
11
|
+
set updated_at(v: Date);
|
|
12
|
+
get transactionId(): number;
|
|
13
|
+
set transactionId(v: number);
|
|
14
|
+
get userId(): number;
|
|
15
|
+
set userId(v: number);
|
|
16
|
+
get isRedeemed(): boolean;
|
|
17
|
+
set isRedeemed(v: boolean);
|
|
18
|
+
get keyOffset(): string;
|
|
19
|
+
set keyOffset(v: string);
|
|
20
|
+
get lockingScript(): number[];
|
|
21
|
+
set lockingScript(v: number[]);
|
|
22
|
+
get satoshis(): number;
|
|
23
|
+
set satoshis(v: number);
|
|
24
|
+
get id(): number;
|
|
25
|
+
set id(v: number);
|
|
26
|
+
get entityName(): string;
|
|
27
|
+
get entityTable(): string;
|
|
28
|
+
equals(ei: TableCommission, syncMap?: SyncMap | undefined): boolean;
|
|
29
|
+
static mergeFind(storage: EntityStorage, userId: number, ei: TableCommission, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
30
|
+
found: boolean;
|
|
31
|
+
eo: EntityCommission;
|
|
32
|
+
eiId: number;
|
|
33
|
+
}>;
|
|
34
|
+
mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>;
|
|
35
|
+
mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableCommission, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=EntityCommission.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityCommission.d.ts","sourceRoot":"","sources":["../../../../../../src/storage/schema/entities/EntityCommission.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,GAAG,EAAE,eAAe,EAA6B,MAAM,uBAAuB,CAAA;AACpG,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,GAAG,CAAA;AAEtD,qBAAa,gBAAiB,SAAQ,UAAU,CAAC,eAAe,CAAC;gBACnD,GAAG,CAAC,EAAE,eAAe;IAiBxB,SAAS,IAAI,IAAI;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