@bsv/wallet-toolbox 1.1.7 → 1.1.9
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/docs/client.md +3872 -1555
- package/docs/monitor.md +29 -27
- package/docs/services.md +22 -22
- package/docs/setup.md +23 -23
- package/docs/storage.md +2747 -438
- package/docs/wallet.md +3872 -1555
- package/out/src/monitor/tasks/TaskCheckForProofs.d.ts +4 -4
- package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskCheckForProofs.js +2 -2
- package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.d.ts +2 -2
- package/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.js +2 -2
- package/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -1
- package/out/src/sdk/StorageSyncReader.d.ts +30 -30
- package/out/src/sdk/StorageSyncReader.d.ts.map +1 -1
- package/out/src/sdk/StorageSyncReaderWriter.d.ts +60 -60
- package/out/src/sdk/StorageSyncReaderWriter.d.ts.map +1 -1
- package/out/src/sdk/WalletStorage.interfaces.d.ts +36 -36
- package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
- package/out/src/signer/methods/acquireDirectCertificate.d.ts.map +1 -1
- package/out/src/signer/methods/acquireDirectCertificate.js.map +1 -1
- package/out/src/storage/StorageKnex.d.ts +61 -61
- package/out/src/storage/StorageKnex.d.ts.map +1 -1
- package/out/src/storage/StorageKnex.js +13 -4
- package/out/src/storage/StorageKnex.js.map +1 -1
- package/out/src/storage/StorageProvider.d.ts +16 -15
- package/out/src/storage/StorageProvider.d.ts.map +1 -1
- package/out/src/storage/StorageProvider.js +8 -8
- package/out/src/storage/StorageProvider.js.map +1 -1
- package/out/src/storage/StorageReader.d.ts +21 -21
- package/out/src/storage/StorageReader.d.ts.map +1 -1
- package/out/src/storage/StorageReader.js.map +1 -1
- package/out/src/storage/StorageReaderWriter.d.ts +60 -60
- package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
- package/out/src/storage/StorageReaderWriter.js.map +1 -1
- package/out/src/storage/StorageSyncReader.d.ts +17 -17
- package/out/src/storage/StorageSyncReader.d.ts.map +1 -1
- package/out/src/storage/StorageSyncReader.js.map +1 -1
- package/out/src/storage/WalletStorageManager.d.ts +9 -9
- package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
- package/out/src/storage/WalletStorageManager.js +2 -2
- package/out/src/storage/WalletStorageManager.js.map +1 -1
- package/out/src/storage/index.all.d.ts +2 -2
- package/out/src/storage/index.all.d.ts.map +1 -1
- package/out/src/storage/index.all.js +3 -3
- package/out/src/storage/index.all.js.map +1 -1
- package/out/src/storage/index.client.d.ts +2 -2
- package/out/src/storage/index.client.d.ts.map +1 -1
- package/out/src/storage/index.client.js +2 -25
- package/out/src/storage/index.client.js.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +3 -3
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -1
- package/out/src/storage/methods/createAction.d.ts.map +1 -1
- package/out/src/storage/methods/createAction.js +1 -1
- package/out/src/storage/methods/createAction.js.map +1 -1
- package/out/src/storage/methods/getBeefForTransaction.js +2 -2
- package/out/src/storage/methods/getBeefForTransaction.js.map +1 -1
- package/out/src/storage/methods/getSyncChunk.d.ts.map +1 -1
- package/out/src/storage/methods/getSyncChunk.js.map +1 -1
- package/out/src/storage/methods/internalizeAction.d.ts.map +1 -1
- package/out/src/storage/methods/internalizeAction.js +1 -1
- package/out/src/storage/methods/internalizeAction.js.map +1 -1
- package/out/src/storage/methods/listActions.js.map +1 -1
- package/out/src/storage/methods/listCertificates.d.ts.map +1 -1
- package/out/src/storage/methods/listCertificates.js.map +1 -1
- package/out/src/storage/methods/listOutputs.js.map +1 -1
- package/out/src/storage/methods/processAction.d.ts +4 -4
- package/out/src/storage/methods/processAction.d.ts.map +1 -1
- package/out/src/storage/methods/processAction.js +2 -2
- package/out/src/storage/methods/processAction.js.map +1 -1
- package/out/src/storage/methods/purgeData.d.ts.map +1 -1
- package/out/src/storage/methods/purgeData.js.map +1 -1
- package/out/src/storage/methods/reviewStatus.js.map +1 -1
- package/out/src/storage/remoting/StorageClient.d.ts +230 -15
- package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageClient.js +222 -7
- package/out/src/storage/remoting/StorageClient.js.map +1 -1
- package/out/src/storage/schema/entities/Certificate.d.ts +9 -9
- package/out/src/storage/schema/entities/Certificate.d.ts.map +1 -1
- package/out/src/storage/schema/entities/Certificate.js +5 -5
- package/out/src/storage/schema/entities/Certificate.js.map +1 -1
- package/out/src/storage/schema/entities/CertificateField.d.ts +9 -9
- package/out/src/storage/schema/entities/CertificateField.d.ts.map +1 -1
- package/out/src/storage/schema/entities/CertificateField.js +5 -5
- package/out/src/storage/schema/entities/CertificateField.js.map +1 -1
- package/out/src/storage/schema/entities/Commission.d.ts +9 -9
- package/out/src/storage/schema/entities/Commission.d.ts.map +1 -1
- package/out/src/storage/schema/entities/Commission.js +5 -5
- package/out/src/storage/schema/entities/Commission.js.map +1 -1
- package/out/src/storage/schema/entities/EntityBase.d.ts +1 -1
- package/out/src/storage/schema/entities/MergeEntity.d.ts +6 -7
- package/out/src/storage/schema/entities/MergeEntity.d.ts.map +1 -1
- package/out/src/storage/schema/entities/MergeEntity.js.map +1 -1
- package/out/src/storage/schema/entities/Output.d.ts +9 -9
- package/out/src/storage/schema/entities/Output.d.ts.map +1 -1
- package/out/src/storage/schema/entities/Output.js +5 -5
- package/out/src/storage/schema/entities/Output.js.map +1 -1
- package/out/src/storage/schema/entities/OutputBasket.d.ts +9 -9
- package/out/src/storage/schema/entities/OutputBasket.d.ts.map +1 -1
- package/out/src/storage/schema/entities/OutputBasket.js +5 -5
- package/out/src/storage/schema/entities/OutputBasket.js.map +1 -1
- package/out/src/storage/schema/entities/OutputTag.d.ts +9 -9
- package/out/src/storage/schema/entities/OutputTag.d.ts.map +1 -1
- package/out/src/storage/schema/entities/OutputTag.js +5 -5
- package/out/src/storage/schema/entities/OutputTag.js.map +1 -1
- package/out/src/storage/schema/entities/OutputTagMap.d.ts +9 -9
- package/out/src/storage/schema/entities/OutputTagMap.d.ts.map +1 -1
- package/out/src/storage/schema/entities/OutputTagMap.js +5 -5
- package/out/src/storage/schema/entities/OutputTagMap.js.map +1 -1
- package/out/src/storage/schema/entities/ProvenTx.d.ts +11 -11
- package/out/src/storage/schema/entities/ProvenTx.d.ts.map +1 -1
- package/out/src/storage/schema/entities/ProvenTx.js +11 -11
- package/out/src/storage/schema/entities/ProvenTx.js.map +1 -1
- package/out/src/storage/schema/entities/ProvenTxReq.d.ts +19 -19
- package/out/src/storage/schema/entities/ProvenTxReq.d.ts.map +1 -1
- package/out/src/storage/schema/entities/ProvenTxReq.js +13 -13
- package/out/src/storage/schema/entities/ProvenTxReq.js.map +1 -1
- package/out/src/storage/schema/entities/SyncState.d.ts +11 -11
- package/out/src/storage/schema/entities/SyncState.d.ts.map +1 -1
- package/out/src/storage/schema/entities/SyncState.js +27 -27
- package/out/src/storage/schema/entities/SyncState.js.map +1 -1
- package/out/src/storage/schema/entities/Transaction.d.ts +11 -11
- package/out/src/storage/schema/entities/Transaction.d.ts.map +1 -1
- package/out/src/storage/schema/entities/Transaction.js +6 -6
- package/out/src/storage/schema/entities/Transaction.js.map +1 -1
- package/out/src/storage/schema/entities/TxLabel.d.ts +9 -9
- package/out/src/storage/schema/entities/TxLabel.d.ts.map +1 -1
- package/out/src/storage/schema/entities/TxLabel.js +5 -5
- package/out/src/storage/schema/entities/TxLabel.js.map +1 -1
- package/out/src/storage/schema/entities/TxLabelMap.d.ts +9 -9
- package/out/src/storage/schema/entities/TxLabelMap.d.ts.map +1 -1
- package/out/src/storage/schema/entities/TxLabelMap.js +5 -5
- package/out/src/storage/schema/entities/TxLabelMap.js.map +1 -1
- package/out/src/storage/schema/entities/User.d.ts +9 -9
- package/out/src/storage/schema/entities/User.d.ts.map +1 -1
- package/out/src/storage/schema/entities/User.js +5 -5
- package/out/src/storage/schema/entities/User.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/CertificateFieldTests.test.js +20 -307
- package/out/src/storage/schema/entities/__tests/CertificateFieldTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/CertificateTests.test.js +17 -158
- package/out/src/storage/schema/entities/__tests/CertificateTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/CommissionTests.test.js +23 -309
- package/out/src/storage/schema/entities/__tests/CommissionTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/OutputBasketTests.test.js +19 -306
- package/out/src/storage/schema/entities/__tests/OutputBasketTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/OutputTagMapTests.test.js +19 -306
- package/out/src/storage/schema/entities/__tests/OutputTagMapTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/OutputTagTests.test.js +23 -237
- package/out/src/storage/schema/entities/__tests/OutputTagTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/OutputTests.test.js +20 -233
- package/out/src/storage/schema/entities/__tests/OutputTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/ProvenTxReqTests.test.js +27 -98
- package/out/src/storage/schema/entities/__tests/ProvenTxReqTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/ProvenTxTests.test.js +25 -241
- package/out/src/storage/schema/entities/__tests/ProvenTxTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/SyncStateTests.test.js +38 -112
- package/out/src/storage/schema/entities/__tests/SyncStateTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/TransactionTests.test.js +39 -323
- package/out/src/storage/schema/entities/__tests/TransactionTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/TxLabelMapTests.test.js +31 -169
- package/out/src/storage/schema/entities/__tests/TxLabelMapTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/TxLabelTests.test.js +16 -159
- package/out/src/storage/schema/entities/__tests/TxLabelTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/usersTests.test.js +21 -168
- package/out/src/storage/schema/entities/__tests/usersTests.test.js.map +1 -1
- package/out/src/storage/schema/tables/Certificate.d.ts +4 -4
- package/out/src/storage/schema/tables/Certificate.d.ts.map +1 -1
- package/out/src/storage/schema/tables/CertificateField.d.ts +1 -1
- package/out/src/storage/schema/tables/CertificateField.d.ts.map +1 -1
- package/out/src/storage/schema/tables/Commission.d.ts +1 -1
- package/out/src/storage/schema/tables/Commission.d.ts.map +1 -1
- package/out/src/storage/schema/tables/MonitorEvent.d.ts +1 -1
- package/out/src/storage/schema/tables/MonitorEvent.d.ts.map +1 -1
- package/out/src/storage/schema/tables/Output.d.ts +5 -5
- package/out/src/storage/schema/tables/Output.d.ts.map +1 -1
- package/out/src/storage/schema/tables/OutputBasket.d.ts +1 -1
- package/out/src/storage/schema/tables/OutputBasket.d.ts.map +1 -1
- package/out/src/storage/schema/tables/OutputTag.d.ts +1 -1
- package/out/src/storage/schema/tables/OutputTag.d.ts.map +1 -1
- package/out/src/storage/schema/tables/OutputTagMap.d.ts +1 -1
- package/out/src/storage/schema/tables/OutputTagMap.d.ts.map +1 -1
- package/out/src/storage/schema/tables/ProvenTx.d.ts +1 -1
- package/out/src/storage/schema/tables/ProvenTx.d.ts.map +1 -1
- package/out/src/storage/schema/tables/ProvenTxReq.d.ts +2 -2
- package/out/src/storage/schema/tables/ProvenTxReq.d.ts.map +1 -1
- package/out/src/storage/schema/tables/SyncState.d.ts +1 -1
- package/out/src/storage/schema/tables/SyncState.d.ts.map +1 -1
- package/out/src/storage/schema/tables/{Settings.d.ts → TableSettings.d.ts} +2 -2
- package/out/src/storage/schema/tables/TableSettings.d.ts.map +1 -0
- package/out/src/storage/schema/tables/{Settings.js → TableSettings.js} +1 -1
- package/out/src/storage/schema/tables/TableSettings.js.map +1 -0
- package/out/src/storage/schema/tables/Transaction.d.ts +1 -1
- package/out/src/storage/schema/tables/Transaction.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TxLabel.d.ts +1 -1
- package/out/src/storage/schema/tables/TxLabel.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TxLabelMap.d.ts +1 -1
- package/out/src/storage/schema/tables/TxLabelMap.d.ts.map +1 -1
- package/out/src/storage/schema/tables/User.d.ts +1 -1
- package/out/src/storage/schema/tables/User.d.ts.map +1 -1
- package/out/src/storage/schema/tables/index.d.ts +1 -1
- package/out/src/storage/schema/tables/index.d.ts.map +1 -1
- package/out/src/storage/schema/tables/index.js +1 -1
- package/out/src/storage/schema/tables/index.js.map +1 -1
- package/out/src/storage/sync/StorageMySQLDojoReader.d.ts +17 -17
- package/out/src/storage/sync/StorageMySQLDojoReader.d.ts.map +1 -1
- package/out/src/storage/sync/StorageMySQLDojoReader.js +2 -2
- package/out/src/storage/sync/StorageMySQLDojoReader.js.map +1 -1
- package/out/test/Wallet/certificate/listCertificates.test.js.map +1 -1
- package/out/test/Wallet/live/walletLive.man.test.js +1 -1
- package/out/test/Wallet/live/walletLive.man.test.js.map +1 -1
- package/out/test/monitor/Monitor.test.js +7 -7
- package/out/test/monitor/Monitor.test.js.map +1 -1
- package/out/test/storage/StorageMySQLDojoReader.man.test.js +1 -1
- package/out/test/storage/StorageMySQLDojoReader.man.test.js.map +1 -1
- package/out/test/storage/insert.test.js.map +1 -1
- package/out/test/storage/update.test.js.map +1 -1
- package/out/test/storage/update2.test.js.map +1 -1
- package/out/test/utils/TestUtilsWalletStorage.d.ts +56 -56
- package/out/test/utils/TestUtilsWalletStorage.d.ts.map +1 -1
- package/out/test/utils/TestUtilsWalletStorage.js +11 -4
- package/out/test/utils/TestUtilsWalletStorage.js.map +1 -1
- package/out/test/wallet/action/createActionToGenerateBeefs.man.test.js.map +1 -1
- package/out/tsconfig.all.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/monitor/tasks/TaskCheckForProofs.ts +11 -10
- package/src/monitor/tasks/TaskSendWaiting.ts +5 -5
- package/src/sdk/StorageSyncReader.ts +48 -30
- package/src/sdk/StorageSyncReaderWriter.ts +77 -63
- package/src/sdk/WalletStorage.interfaces.ts +55 -36
- package/src/signer/methods/acquireDirectCertificate.ts +2 -2
- package/src/storage/StorageKnex.ts +137 -106
- package/src/storage/StorageProvider.ts +43 -30
- package/src/storage/StorageReader.ts +37 -21
- package/src/storage/StorageReaderWriter.ts +78 -65
- package/src/storage/StorageSyncReader.ts +35 -17
- package/src/storage/WalletStorageManager.ts +18 -12
- package/src/storage/index.all.ts +2 -2
- package/src/storage/index.client.ts +2 -2
- package/src/storage/methods/attemptToPostReqsToNetwork.ts +3 -3
- package/src/storage/methods/createAction.ts +29 -26
- package/src/storage/methods/getBeefForTransaction.ts +3 -3
- package/src/storage/methods/getSyncChunk.ts +28 -13
- package/src/storage/methods/internalizeAction.ts +19 -17
- package/src/storage/methods/listActions.ts +5 -5
- package/src/storage/methods/listCertificates.ts +2 -2
- package/src/storage/methods/listOutputs.ts +5 -5
- package/src/storage/methods/processAction.ts +21 -17
- package/src/storage/methods/purgeData.ts +17 -11
- package/src/storage/methods/reviewStatus.ts +4 -4
- package/src/storage/remoting/StorageClient.ts +250 -26
- package/src/storage/schema/entities/Certificate.ts +16 -17
- package/src/storage/schema/entities/CertificateField.ts +17 -18
- package/src/storage/schema/entities/Commission.ts +16 -20
- package/src/storage/schema/entities/EntityBase.ts +1 -1
- package/src/storage/schema/entities/MergeEntity.ts +7 -7
- package/src/storage/schema/entities/Output.ts +16 -20
- package/src/storage/schema/entities/OutputBasket.ts +16 -17
- package/src/storage/schema/entities/OutputTag.ts +16 -20
- package/src/storage/schema/entities/OutputTagMap.ts +17 -18
- package/src/storage/schema/entities/ProvenTx.ts +24 -28
- package/src/storage/schema/entities/ProvenTxReq.ts +42 -45
- package/src/storage/schema/entities/SyncState.ts +61 -38
- package/src/storage/schema/entities/Transaction.ts +23 -23
- package/src/storage/schema/entities/TxLabel.ts +16 -17
- package/src/storage/schema/entities/TxLabelMap.ts +16 -20
- package/src/storage/schema/entities/User.ts +15 -19
- package/src/storage/schema/entities/__tests/CertificateFieldTests.test.ts +39 -318
- package/src/storage/schema/entities/__tests/CertificateTests.test.ts +29 -169
- package/src/storage/schema/entities/__tests/CommissionTests.test.ts +47 -325
- package/src/storage/schema/entities/__tests/OutputBasketTests.test.ts +35 -316
- package/src/storage/schema/entities/__tests/OutputTagMapTests.test.ts +38 -318
- package/src/storage/schema/entities/__tests/OutputTagTests.test.ts +36 -249
- package/src/storage/schema/entities/__tests/OutputTests.test.ts +30 -244
- package/src/storage/schema/entities/__tests/ProvenTxReqTests.test.ts +35 -101
- package/src/storage/schema/entities/__tests/ProvenTxTests.test.ts +27 -243
- package/src/storage/schema/entities/__tests/SyncStateTests.test.ts +54 -122
- package/src/storage/schema/entities/__tests/TransactionTests.test.ts +53 -333
- package/src/storage/schema/entities/__tests/TxLabelMapTests.test.ts +44 -177
- package/src/storage/schema/entities/__tests/TxLabelTests.test.ts +19 -163
- package/src/storage/schema/entities/__tests/usersTests.test.ts +31 -179
- package/src/storage/schema/tables/Certificate.ts +4 -4
- package/src/storage/schema/tables/CertificateField.ts +1 -1
- package/src/storage/schema/tables/Commission.ts +1 -1
- package/src/storage/schema/tables/MonitorEvent.ts +1 -1
- package/src/storage/schema/tables/Output.ts +5 -5
- package/src/storage/schema/tables/OutputBasket.ts +1 -1
- package/src/storage/schema/tables/OutputTag.ts +1 -1
- package/src/storage/schema/tables/OutputTagMap.ts +1 -1
- package/src/storage/schema/tables/ProvenTx.ts +1 -1
- package/src/storage/schema/tables/ProvenTxReq.ts +2 -2
- package/src/storage/schema/tables/SyncState.ts +1 -1
- package/src/storage/schema/tables/{Settings.ts → TableSettings.ts} +3 -1
- package/src/storage/schema/tables/Transaction.ts +1 -1
- package/src/storage/schema/tables/TxLabel.ts +1 -1
- package/src/storage/schema/tables/TxLabelMap.ts +1 -1
- package/src/storage/schema/tables/User.ts +1 -1
- package/src/storage/schema/tables/index.ts +1 -1
- package/src/storage/sync/StorageMySQLDojoReader.ts +68 -50
- package/test/Wallet/certificate/listCertificates.test.ts +12 -8
- package/test/Wallet/live/walletLive.man.test.ts +6 -6
- package/test/monitor/Monitor.test.ts +8 -8
- package/test/storage/StorageMySQLDojoReader.man.test.ts +1 -1
- package/test/storage/insert.test.ts +2 -2
- package/test/storage/update.test.ts +30 -30
- package/test/storage/update2.test.ts +23 -24
- package/test/utils/TestUtilsWalletStorage.ts +103 -82
- package/test/wallet/action/createActionToGenerateBeefs.man.test.ts +1 -2
- package/ts2md.json +1 -1
- package/out/src/storage/index.db.d.ts +0 -1
- package/out/src/storage/index.db.d.ts.map +0 -1
- package/out/src/storage/index.db.js +0 -2
- package/out/src/storage/index.db.js.map +0 -1
- package/out/src/storage/schema/tables/Settings.d.ts.map +0 -1
- package/out/src/storage/schema/tables/Settings.js.map +0 -1
- package/src/storage/index.db.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bsv/wallet-toolbox",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.9",
|
|
4
4
|
"description": "BRC100 conforming wallet, wallet storage and wallet signer components",
|
|
5
5
|
"main": "./out/src/index.js",
|
|
6
6
|
"types": "./out/src/index.d.ts",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"standard": "^17.1.0",
|
|
58
58
|
"ts-jest": "^29.0.5",
|
|
59
59
|
"ts-node": "^10.9.1",
|
|
60
|
-
"ts2md": "^0.2.
|
|
60
|
+
"ts2md": "^0.2.8",
|
|
61
61
|
"typescript": "^5.2.2"
|
|
62
62
|
}
|
|
63
63
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
asString,
|
|
3
3
|
doubleSha256BE,
|
|
4
|
-
|
|
4
|
+
EntityProvenTx,
|
|
5
|
+
EntityProvenTxReq,
|
|
5
6
|
sdk,
|
|
6
|
-
|
|
7
|
+
TableProvenTxReq
|
|
7
8
|
} from '../../index.client'
|
|
8
9
|
import { Monitor } from '../Monitor'
|
|
9
10
|
import { WalletMonitorTask } from './WalletMonitorTask'
|
|
@@ -96,17 +97,17 @@ export class TaskCheckForProofs extends WalletMonitorTask {
|
|
|
96
97
|
* @returns reqs partitioned by status
|
|
97
98
|
*/
|
|
98
99
|
async getProofs(
|
|
99
|
-
reqs:
|
|
100
|
+
reqs: TableProvenTxReq[],
|
|
100
101
|
indent = 0,
|
|
101
102
|
countsAsAttempt = false,
|
|
102
103
|
ignoreStatus = false
|
|
103
104
|
): Promise<{
|
|
104
|
-
proven:
|
|
105
|
-
invalid:
|
|
105
|
+
proven: TableProvenTxReq[]
|
|
106
|
+
invalid: TableProvenTxReq[]
|
|
106
107
|
log: string
|
|
107
108
|
}> {
|
|
108
|
-
const proven:
|
|
109
|
-
const invalid:
|
|
109
|
+
const proven: TableProvenTxReq[] = []
|
|
110
|
+
const invalid: TableProvenTxReq[] = []
|
|
110
111
|
|
|
111
112
|
let log = ''
|
|
112
113
|
for (const reqApi of reqs) {
|
|
@@ -126,7 +127,7 @@ export class TaskCheckForProofs extends WalletMonitorTask {
|
|
|
126
127
|
continue
|
|
127
128
|
}
|
|
128
129
|
|
|
129
|
-
const req = new
|
|
130
|
+
const req = new EntityProvenTxReq(reqApi)
|
|
130
131
|
|
|
131
132
|
if (Number.isInteger(req.provenTxId)) {
|
|
132
133
|
log += `Already linked to provenTxId ${req.provenTxId}.\n`
|
|
@@ -170,7 +171,7 @@ export class TaskCheckForProofs extends WalletMonitorTask {
|
|
|
170
171
|
const since = new Date()
|
|
171
172
|
|
|
172
173
|
let r: sdk.GetMerklePathResult
|
|
173
|
-
let ptx:
|
|
174
|
+
let ptx: EntityProvenTx | undefined
|
|
174
175
|
|
|
175
176
|
// External services will try multiple providers until one returns a proof,
|
|
176
177
|
// or they all fail.
|
|
@@ -188,7 +189,7 @@ export class TaskCheckForProofs extends WalletMonitorTask {
|
|
|
188
189
|
// one more time.
|
|
189
190
|
//
|
|
190
191
|
r = await this.monitor.services.getMerklePath(req.txid)
|
|
191
|
-
ptx = await
|
|
192
|
+
ptx = await EntityProvenTx.fromReq(
|
|
192
193
|
req,
|
|
193
194
|
r,
|
|
194
195
|
countsAsAttempt && req.status !== 'nosend'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EntityProvenTxReq, TableProvenTxReq } from '../../storage/index.client'
|
|
2
2
|
import { verifyTruthy } from '../../utility/index.client'
|
|
3
3
|
import { Monitor } from '../Monitor'
|
|
4
4
|
import { WalletMonitorTask } from './WalletMonitorTask'
|
|
@@ -63,7 +63,7 @@ export class TaskSendWaiting extends WalletMonitorTask {
|
|
|
63
63
|
* @param reqApis
|
|
64
64
|
*/
|
|
65
65
|
async processUnsent(
|
|
66
|
-
reqApis:
|
|
66
|
+
reqApis: TableProvenTxReq[],
|
|
67
67
|
indent = 0
|
|
68
68
|
): Promise<string> {
|
|
69
69
|
let log = ''
|
|
@@ -75,8 +75,8 @@ export class TaskSendWaiting extends WalletMonitorTask {
|
|
|
75
75
|
log += ` status now ${reqApi.status}\n`
|
|
76
76
|
continue
|
|
77
77
|
}
|
|
78
|
-
const req = new
|
|
79
|
-
const reqs:
|
|
78
|
+
const req = new EntityProvenTxReq(reqApi)
|
|
79
|
+
const reqs: EntityProvenTxReq[] = []
|
|
80
80
|
if (req.batch) {
|
|
81
81
|
// Make sure wew process entire batch together for efficient beef generation
|
|
82
82
|
const batchReqApis = await this.storage.findProvenTxReqs({
|
|
@@ -89,7 +89,7 @@ export class TaskSendWaiting extends WalletMonitorTask {
|
|
|
89
89
|
)
|
|
90
90
|
if (index > -1) reqApis.slice(index, index + 1)
|
|
91
91
|
// And add to reqs being processed now:
|
|
92
|
-
reqs.push(new
|
|
92
|
+
reqs.push(new EntityProvenTxReq(bra))
|
|
93
93
|
}
|
|
94
94
|
} else {
|
|
95
95
|
// Just a single non-batched req...
|
|
@@ -1,11 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
sdk,
|
|
3
|
+
TableCertificate,
|
|
4
|
+
TableCertificateField,
|
|
5
|
+
TableCertificateX,
|
|
6
|
+
TableCommission,
|
|
7
|
+
TableOutput,
|
|
8
|
+
TableOutputBasket,
|
|
9
|
+
TableOutputTag,
|
|
10
|
+
TableOutputTagMap,
|
|
11
|
+
TableProvenTx,
|
|
12
|
+
TableProvenTxReq,
|
|
13
|
+
TableSettings,
|
|
14
|
+
TableSyncState,
|
|
15
|
+
TableTransaction,
|
|
16
|
+
TableTxLabel,
|
|
17
|
+
TableTxLabelMap,
|
|
18
|
+
TableUser
|
|
19
|
+
} from '../index.client'
|
|
2
20
|
|
|
3
21
|
/**
|
|
4
22
|
* This is the minimal interface required for a WalletStorageProvider to export data to another provider.
|
|
5
23
|
*/
|
|
6
24
|
export interface StorageSyncReader {
|
|
7
25
|
isAvailable(): boolean
|
|
8
|
-
makeAvailable(): Promise<
|
|
26
|
+
makeAvailable(): Promise<TableSettings>
|
|
9
27
|
|
|
10
28
|
destroy(): Promise<void>
|
|
11
29
|
|
|
@@ -15,37 +33,37 @@ export interface StorageSyncReader {
|
|
|
15
33
|
//
|
|
16
34
|
/////////////////
|
|
17
35
|
|
|
18
|
-
getSettings():
|
|
36
|
+
getSettings(): TableSettings
|
|
19
37
|
|
|
20
|
-
findUserByIdentityKey(key: string): Promise<
|
|
38
|
+
findUserByIdentityKey(key: string): Promise<TableUser | undefined>
|
|
21
39
|
|
|
22
|
-
findSyncStates(args: sdk.FindSyncStatesArgs): Promise<
|
|
40
|
+
findSyncStates(args: sdk.FindSyncStatesArgs): Promise<TableSyncState[]>
|
|
23
41
|
|
|
24
42
|
findCertificateFields(
|
|
25
43
|
args: sdk.FindCertificateFieldsArgs
|
|
26
|
-
): Promise<
|
|
27
|
-
findCertificates(args: sdk.FindCertificatesArgs): Promise<
|
|
28
|
-
findCommissions(args: sdk.FindCommissionsArgs): Promise<
|
|
44
|
+
): Promise<TableCertificateField[]>
|
|
45
|
+
findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>
|
|
46
|
+
findCommissions(args: sdk.FindCommissionsArgs): Promise<TableCommission[]>
|
|
29
47
|
findOutputBaskets(
|
|
30
48
|
args: sdk.FindOutputBasketsArgs
|
|
31
|
-
): Promise<
|
|
32
|
-
findOutputs(args: sdk.FindOutputsArgs): Promise<
|
|
33
|
-
findOutputTags(args: sdk.FindOutputTagsArgs): Promise<
|
|
34
|
-
findTransactions(args: sdk.FindTransactionsArgs): Promise<
|
|
35
|
-
findTxLabels(args: sdk.FindTxLabelsArgs): Promise<
|
|
49
|
+
): Promise<TableOutputBasket[]>
|
|
50
|
+
findOutputs(args: sdk.FindOutputsArgs): Promise<TableOutput[]>
|
|
51
|
+
findOutputTags(args: sdk.FindOutputTagsArgs): Promise<TableOutputTag[]>
|
|
52
|
+
findTransactions(args: sdk.FindTransactionsArgs): Promise<TableTransaction[]>
|
|
53
|
+
findTxLabels(args: sdk.FindTxLabelsArgs): Promise<TableTxLabel[]>
|
|
36
54
|
|
|
37
55
|
getProvenTxsForUser(
|
|
38
56
|
args: sdk.FindForUserSincePagedArgs
|
|
39
|
-
): Promise<
|
|
57
|
+
): Promise<TableProvenTx[]>
|
|
40
58
|
getProvenTxReqsForUser(
|
|
41
59
|
args: sdk.FindForUserSincePagedArgs
|
|
42
|
-
): Promise<
|
|
60
|
+
): Promise<TableProvenTxReq[]>
|
|
43
61
|
getTxLabelMapsForUser(
|
|
44
62
|
args: sdk.FindForUserSincePagedArgs
|
|
45
|
-
): Promise<
|
|
63
|
+
): Promise<TableTxLabelMap[]>
|
|
46
64
|
getOutputTagMapsForUser(
|
|
47
65
|
args: sdk.FindForUserSincePagedArgs
|
|
48
|
-
): Promise<
|
|
66
|
+
): Promise<TableOutputTagMap[]>
|
|
49
67
|
|
|
50
68
|
getSyncChunk(args: RequestSyncChunkArgs): Promise<SyncChunk>
|
|
51
69
|
}
|
|
@@ -131,19 +149,19 @@ export interface SyncChunk {
|
|
|
131
149
|
toStorageIdentityKey: string
|
|
132
150
|
userIdentityKey: string
|
|
133
151
|
|
|
134
|
-
user?:
|
|
135
|
-
provenTxs?:
|
|
136
|
-
provenTxReqs?:
|
|
137
|
-
outputBaskets?:
|
|
138
|
-
txLabels?:
|
|
139
|
-
outputTags?:
|
|
140
|
-
transactions?:
|
|
141
|
-
txLabelMaps?:
|
|
142
|
-
commissions?:
|
|
143
|
-
outputs?:
|
|
144
|
-
outputTagMaps?:
|
|
145
|
-
certificates?:
|
|
146
|
-
certificateFields?:
|
|
152
|
+
user?: TableUser
|
|
153
|
+
provenTxs?: TableProvenTx[]
|
|
154
|
+
provenTxReqs?: TableProvenTxReq[]
|
|
155
|
+
outputBaskets?: TableOutputBasket[]
|
|
156
|
+
txLabels?: TableTxLabel[]
|
|
157
|
+
outputTags?: TableOutputTag[]
|
|
158
|
+
transactions?: TableTransaction[]
|
|
159
|
+
txLabelMaps?: TableTxLabelMap[]
|
|
160
|
+
commissions?: TableCommission[]
|
|
161
|
+
outputs?: TableOutput[]
|
|
162
|
+
outputTagMaps?: TableOutputTagMap[]
|
|
163
|
+
certificates?: TableCertificate[]
|
|
164
|
+
certificateFields?: TableCertificateField[]
|
|
147
165
|
}
|
|
148
166
|
|
|
149
167
|
export interface ProcessSyncChunkResult {
|
|
@@ -1,4 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
sdk,
|
|
3
|
+
TableCertificate,
|
|
4
|
+
TableCertificateField,
|
|
5
|
+
TableCommission,
|
|
6
|
+
TableOutput,
|
|
7
|
+
TableOutputBasket,
|
|
8
|
+
TableOutputTag,
|
|
9
|
+
TableOutputTagMap,
|
|
10
|
+
TableProvenTx,
|
|
11
|
+
TableProvenTxReq,
|
|
12
|
+
TableProvenTxReqDynamics,
|
|
13
|
+
TableSyncState,
|
|
14
|
+
TableTransaction,
|
|
15
|
+
TableTxLabel,
|
|
16
|
+
TableTxLabelMap,
|
|
17
|
+
TableUser
|
|
18
|
+
} from '../index.client'
|
|
2
19
|
|
|
3
20
|
/**
|
|
4
21
|
* This is the minimal interface required for a WalletStorageProvider to import and export data to another provider.
|
|
@@ -18,97 +35,94 @@ export interface StorageSyncReaderWriter extends sdk.StorageSyncReader {
|
|
|
18
35
|
|
|
19
36
|
findOutputTagMaps(
|
|
20
37
|
args: sdk.FindOutputTagMapsArgs
|
|
21
|
-
): Promise<
|
|
22
|
-
findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<
|
|
23
|
-
findProvenTxs(args: sdk.FindProvenTxsArgs): Promise<
|
|
24
|
-
findTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<
|
|
38
|
+
): Promise<TableOutputTagMap[]>
|
|
39
|
+
findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>
|
|
40
|
+
findProvenTxs(args: sdk.FindProvenTxsArgs): Promise<TableProvenTx[]>
|
|
41
|
+
findTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<TableTxLabelMap[]>
|
|
25
42
|
|
|
26
43
|
countOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<number>
|
|
27
44
|
countProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<number>
|
|
28
45
|
countProvenTxs(args: sdk.FindProvenTxsArgs): Promise<number>
|
|
29
46
|
countTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<number>
|
|
30
47
|
|
|
31
|
-
insertProvenTx(tx:
|
|
32
|
-
insertProvenTxReq(tx:
|
|
33
|
-
insertUser(user:
|
|
48
|
+
insertProvenTx(tx: TableProvenTx, trx?: sdk.TrxToken): Promise<number>
|
|
49
|
+
insertProvenTxReq(tx: TableProvenTxReq, trx?: sdk.TrxToken): Promise<number>
|
|
50
|
+
insertUser(user: TableUser, trx?: sdk.TrxToken): Promise<number>
|
|
34
51
|
insertCertificate(
|
|
35
|
-
certificate:
|
|
52
|
+
certificate: TableCertificate,
|
|
36
53
|
trx?: sdk.TrxToken
|
|
37
54
|
): Promise<number>
|
|
38
55
|
insertCertificateField(
|
|
39
|
-
certificateField:
|
|
56
|
+
certificateField: TableCertificateField,
|
|
40
57
|
trx?: sdk.TrxToken
|
|
41
58
|
): Promise<void>
|
|
42
59
|
insertOutputBasket(
|
|
43
|
-
basket:
|
|
60
|
+
basket: TableOutputBasket,
|
|
44
61
|
trx?: sdk.TrxToken
|
|
45
62
|
): Promise<number>
|
|
46
|
-
insertTransaction(tx:
|
|
63
|
+
insertTransaction(tx: TableTransaction, trx?: sdk.TrxToken): Promise<number>
|
|
47
64
|
insertCommission(
|
|
48
|
-
commission:
|
|
65
|
+
commission: TableCommission,
|
|
49
66
|
trx?: sdk.TrxToken
|
|
50
67
|
): Promise<number>
|
|
51
|
-
insertOutput(output:
|
|
52
|
-
insertOutputTag(tag:
|
|
68
|
+
insertOutput(output: TableOutput, trx?: sdk.TrxToken): Promise<number>
|
|
69
|
+
insertOutputTag(tag: TableOutputTag, trx?: sdk.TrxToken): Promise<number>
|
|
53
70
|
insertOutputTagMap(
|
|
54
|
-
tagMap:
|
|
55
|
-
trx?: sdk.TrxToken
|
|
56
|
-
): Promise<void>
|
|
57
|
-
insertTxLabel(label: table.TxLabel, trx?: sdk.TrxToken): Promise<number>
|
|
58
|
-
insertTxLabelMap(
|
|
59
|
-
labelMap: table.TxLabelMap,
|
|
71
|
+
tagMap: TableOutputTagMap,
|
|
60
72
|
trx?: sdk.TrxToken
|
|
61
73
|
): Promise<void>
|
|
74
|
+
insertTxLabel(label: TableTxLabel, trx?: sdk.TrxToken): Promise<number>
|
|
75
|
+
insertTxLabelMap(labelMap: TableTxLabelMap, trx?: sdk.TrxToken): Promise<void>
|
|
62
76
|
insertSyncState(
|
|
63
|
-
syncState:
|
|
77
|
+
syncState: TableSyncState,
|
|
64
78
|
trx?: sdk.TrxToken
|
|
65
79
|
): Promise<number>
|
|
66
80
|
|
|
67
81
|
updateCertificateField(
|
|
68
82
|
certificateId: number,
|
|
69
83
|
fieldName: string,
|
|
70
|
-
update: Partial<
|
|
84
|
+
update: Partial<TableCertificateField>,
|
|
71
85
|
trx?: sdk.TrxToken
|
|
72
86
|
): Promise<number>
|
|
73
87
|
updateCertificate(
|
|
74
88
|
id: number,
|
|
75
|
-
update: Partial<
|
|
89
|
+
update: Partial<TableCertificate>,
|
|
76
90
|
trx?: sdk.TrxToken
|
|
77
91
|
): Promise<number>
|
|
78
92
|
updateCommission(
|
|
79
93
|
id: number,
|
|
80
|
-
update: Partial<
|
|
94
|
+
update: Partial<TableCommission>,
|
|
81
95
|
trx?: sdk.TrxToken
|
|
82
96
|
): Promise<number>
|
|
83
97
|
updateOutputBasket(
|
|
84
98
|
id: number,
|
|
85
|
-
update: Partial<
|
|
99
|
+
update: Partial<TableOutputBasket>,
|
|
86
100
|
trx?: sdk.TrxToken
|
|
87
101
|
): Promise<number>
|
|
88
102
|
updateOutput(
|
|
89
103
|
id: number,
|
|
90
|
-
update: Partial<
|
|
104
|
+
update: Partial<TableOutput>,
|
|
91
105
|
trx?: sdk.TrxToken
|
|
92
106
|
): Promise<number>
|
|
93
107
|
updateOutputTagMap(
|
|
94
108
|
outputId: number,
|
|
95
109
|
tagId: number,
|
|
96
|
-
update: Partial<
|
|
110
|
+
update: Partial<TableOutputTagMap>,
|
|
97
111
|
trx?: sdk.TrxToken
|
|
98
112
|
): Promise<number>
|
|
99
113
|
updateOutputTag(
|
|
100
114
|
id: number,
|
|
101
|
-
update: Partial<
|
|
115
|
+
update: Partial<TableOutputTag>,
|
|
102
116
|
trx?: sdk.TrxToken
|
|
103
117
|
): Promise<number>
|
|
104
118
|
updateProvenTxReq(
|
|
105
119
|
id: number | number[],
|
|
106
|
-
update: Partial<
|
|
120
|
+
update: Partial<TableProvenTxReq>,
|
|
107
121
|
trx?: sdk.TrxToken
|
|
108
122
|
): Promise<number>
|
|
109
123
|
updateProvenTxReqDynamics(
|
|
110
124
|
id: number,
|
|
111
|
-
update: Partial<
|
|
125
|
+
update: Partial<TableProvenTxReqDynamics>,
|
|
112
126
|
trx?: sdk.TrxToken
|
|
113
127
|
): Promise<number>
|
|
114
128
|
updateProvenTxReqWithNewProvenTx(
|
|
@@ -116,17 +130,17 @@ export interface StorageSyncReaderWriter extends sdk.StorageSyncReader {
|
|
|
116
130
|
): Promise<sdk.UpdateProvenTxReqWithNewProvenTxResult>
|
|
117
131
|
updateProvenTx(
|
|
118
132
|
id: number,
|
|
119
|
-
update: Partial<
|
|
133
|
+
update: Partial<TableProvenTx>,
|
|
120
134
|
trx?: sdk.TrxToken
|
|
121
135
|
): Promise<number>
|
|
122
136
|
updateSyncState(
|
|
123
137
|
id: number,
|
|
124
|
-
update: Partial<
|
|
138
|
+
update: Partial<TableSyncState>,
|
|
125
139
|
trx?: sdk.TrxToken
|
|
126
140
|
): Promise<number>
|
|
127
141
|
updateTransaction(
|
|
128
142
|
id: number | number[],
|
|
129
|
-
update: Partial<
|
|
143
|
+
update: Partial<TableTransaction>,
|
|
130
144
|
trx?: sdk.TrxToken
|
|
131
145
|
): Promise<number>
|
|
132
146
|
updateTransactionStatus(
|
|
@@ -143,115 +157,115 @@ export interface StorageSyncReaderWriter extends sdk.StorageSyncReader {
|
|
|
143
157
|
updateTxLabelMap(
|
|
144
158
|
transactionId: number,
|
|
145
159
|
txLabelId: number,
|
|
146
|
-
update: Partial<
|
|
160
|
+
update: Partial<TableTxLabelMap>,
|
|
147
161
|
trx?: sdk.TrxToken
|
|
148
162
|
): Promise<number>
|
|
149
163
|
updateTxLabel(
|
|
150
164
|
id: number,
|
|
151
|
-
update: Partial<
|
|
165
|
+
update: Partial<TableTxLabel>,
|
|
152
166
|
trx?: sdk.TrxToken
|
|
153
167
|
): Promise<number>
|
|
154
168
|
updateUser(
|
|
155
169
|
id: number,
|
|
156
|
-
update: Partial<
|
|
170
|
+
update: Partial<TableUser>,
|
|
157
171
|
trx?: sdk.TrxToken
|
|
158
172
|
): Promise<number>
|
|
159
173
|
|
|
160
174
|
findCertificateById(
|
|
161
175
|
id: number,
|
|
162
176
|
trx?: sdk.TrxToken
|
|
163
|
-
): Promise<
|
|
177
|
+
): Promise<TableCertificate | undefined>
|
|
164
178
|
findCommissionById(
|
|
165
179
|
id: number,
|
|
166
180
|
trx?: sdk.TrxToken
|
|
167
|
-
): Promise<
|
|
181
|
+
): Promise<TableCommission | undefined>
|
|
168
182
|
findOutputById(
|
|
169
183
|
id: number,
|
|
170
184
|
trx?: sdk.TrxToken,
|
|
171
185
|
noScript?: boolean
|
|
172
|
-
): Promise<
|
|
186
|
+
): Promise<TableOutput | undefined>
|
|
173
187
|
findOutputBasketById(
|
|
174
188
|
id: number,
|
|
175
189
|
trx?: sdk.TrxToken
|
|
176
|
-
): Promise<
|
|
190
|
+
): Promise<TableOutputBasket | undefined>
|
|
177
191
|
findProvenTxById(
|
|
178
192
|
id: number,
|
|
179
193
|
trx?: sdk.TrxToken | undefined
|
|
180
|
-
): Promise<
|
|
194
|
+
): Promise<TableProvenTx | undefined>
|
|
181
195
|
findProvenTxReqById(
|
|
182
196
|
id: number,
|
|
183
197
|
trx?: sdk.TrxToken | undefined
|
|
184
|
-
): Promise<
|
|
198
|
+
): Promise<TableProvenTxReq | undefined>
|
|
185
199
|
findSyncStateById(
|
|
186
200
|
id: number,
|
|
187
201
|
trx?: sdk.TrxToken
|
|
188
|
-
): Promise<
|
|
202
|
+
): Promise<TableSyncState | undefined>
|
|
189
203
|
findTransactionById(
|
|
190
204
|
id: number,
|
|
191
205
|
trx?: sdk.TrxToken,
|
|
192
206
|
noRawTx?: boolean
|
|
193
|
-
): Promise<
|
|
207
|
+
): Promise<TableTransaction | undefined>
|
|
194
208
|
findTxLabelById(
|
|
195
209
|
id: number,
|
|
196
210
|
trx?: sdk.TrxToken
|
|
197
|
-
): Promise<
|
|
211
|
+
): Promise<TableTxLabel | undefined>
|
|
198
212
|
findOutputTagById(
|
|
199
213
|
id: number,
|
|
200
214
|
trx?: sdk.TrxToken
|
|
201
|
-
): Promise<
|
|
202
|
-
findUserById(id: number, trx?: sdk.TrxToken): Promise<
|
|
215
|
+
): Promise<TableOutputTag | undefined>
|
|
216
|
+
findUserById(id: number, trx?: sdk.TrxToken): Promise<TableUser | undefined>
|
|
203
217
|
|
|
204
218
|
findOrInsertUser(
|
|
205
219
|
identityKey: string,
|
|
206
220
|
trx?: sdk.TrxToken
|
|
207
|
-
): Promise<{ user:
|
|
221
|
+
): Promise<{ user: TableUser; isNew: boolean }>
|
|
208
222
|
|
|
209
223
|
findOrInsertTransaction(
|
|
210
|
-
newTx:
|
|
224
|
+
newTx: TableTransaction,
|
|
211
225
|
trx?: sdk.TrxToken
|
|
212
|
-
): Promise<{ tx:
|
|
226
|
+
): Promise<{ tx: TableTransaction; isNew: boolean }>
|
|
213
227
|
findOrInsertOutputBasket(
|
|
214
228
|
userId: number,
|
|
215
229
|
name: string,
|
|
216
230
|
trx?: sdk.TrxToken
|
|
217
|
-
): Promise<
|
|
231
|
+
): Promise<TableOutputBasket>
|
|
218
232
|
findOrInsertTxLabel(
|
|
219
233
|
userId: number,
|
|
220
234
|
label: string,
|
|
221
235
|
trx?: sdk.TrxToken
|
|
222
|
-
): Promise<
|
|
236
|
+
): Promise<TableTxLabel>
|
|
223
237
|
findOrInsertTxLabelMap(
|
|
224
238
|
transactionId: number,
|
|
225
239
|
txLabelId: number,
|
|
226
240
|
trx?: sdk.TrxToken
|
|
227
|
-
): Promise<
|
|
241
|
+
): Promise<TableTxLabelMap>
|
|
228
242
|
findOrInsertOutputTag(
|
|
229
243
|
userId: number,
|
|
230
244
|
tag: string,
|
|
231
245
|
trx?: sdk.TrxToken
|
|
232
|
-
): Promise<
|
|
246
|
+
): Promise<TableOutputTag>
|
|
233
247
|
findOrInsertOutputTagMap(
|
|
234
248
|
outputId: number,
|
|
235
249
|
outputTagId: number,
|
|
236
250
|
trx?: sdk.TrxToken
|
|
237
|
-
): Promise<
|
|
251
|
+
): Promise<TableOutputTagMap>
|
|
238
252
|
findOrInsertSyncStateAuth(
|
|
239
253
|
auth: sdk.AuthId,
|
|
240
254
|
storageIdentityKey: string,
|
|
241
255
|
storageName: string
|
|
242
|
-
): Promise<{ syncState:
|
|
256
|
+
): Promise<{ syncState: TableSyncState; isNew: boolean }>
|
|
243
257
|
findOrInsertProvenTxReq(
|
|
244
|
-
newReq:
|
|
258
|
+
newReq: TableProvenTxReq,
|
|
245
259
|
trx?: sdk.TrxToken
|
|
246
|
-
): Promise<{ req:
|
|
260
|
+
): Promise<{ req: TableProvenTxReq; isNew: boolean }>
|
|
247
261
|
findOrInsertProvenTx(
|
|
248
|
-
newProven:
|
|
262
|
+
newProven: TableProvenTx,
|
|
249
263
|
trx?: sdk.TrxToken
|
|
250
|
-
): Promise<{ proven:
|
|
251
|
-
findUsers(args: sdk.FindUsersArgs): Promise<
|
|
264
|
+
): Promise<{ proven: TableProvenTx; isNew: boolean }>
|
|
265
|
+
findUsers(args: sdk.FindUsersArgs): Promise<TableUser[]>
|
|
252
266
|
|
|
253
267
|
tagOutput(
|
|
254
|
-
partial: Partial<
|
|
268
|
+
partial: Partial<TableOutput>,
|
|
255
269
|
tag: string,
|
|
256
270
|
trx?: sdk.TrxToken
|
|
257
271
|
): Promise<void>
|