@bsv/wallet-toolbox 1.1.6 → 1.1.8
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 +499 -900
- package/docs/monitor.md +29 -69
- package/docs/services.md +22 -40
- package/docs/setup.md +23 -65
- package/docs/storage.md +2163 -489
- package/docs/wallet.md +499 -900
- 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 +2 -2
- 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 +4 -2
- package/out/src/storage/methods/purgeData.js.map +1 -1
- package/out/src/storage/methods/reviewStatus.js +1 -1
- package/out/src/storage/methods/reviewStatus.js.map +1 -1
- package/out/src/storage/remoting/StorageClient.d.ts +11 -11
- package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageClient.js.map +1 -1
- package/out/src/storage/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.d.ts.map +1 -1
- package/out/test/Wallet/live/walletLive.man.test.js +35 -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 +47 -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 +124 -104
- package/src/storage/StorageProvider.ts +43 -30
- package/src/storage/StorageReader.ts +36 -21
- package/src/storage/StorageReaderWriter.ts +78 -65
- package/src/storage/StorageSyncReader.ts +34 -17
- package/src/storage/WalletStorageManager.ts +17 -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 +20 -12
- package/src/storage/methods/reviewStatus.ts +5 -5
- package/src/storage/remoting/StorageClient.ts +28 -18
- 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 +67 -50
- package/test/Wallet/certificate/listCertificates.test.ts +12 -8
- package/test/Wallet/live/walletLive.man.test.ts +46 -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 +12 -6
- 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/docs/storage.md
CHANGED
|
@@ -20,18 +20,24 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
20
20
|
|
|
21
21
|
#### Interfaces
|
|
22
22
|
|
|
23
|
-
| | |
|
|
24
|
-
| --- | --- |
|
|
25
|
-
| [CommitNewTxResults](#interface-commitnewtxresults) | [
|
|
26
|
-
| [
|
|
27
|
-
| [
|
|
28
|
-
| [
|
|
29
|
-
| [
|
|
30
|
-
| [
|
|
31
|
-
| [
|
|
32
|
-
| [
|
|
33
|
-
| [
|
|
34
|
-
| [
|
|
23
|
+
| | | |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| [CommitNewTxResults](#interface-commitnewtxresults) | [ProvenTxReqHistorySummaryApi](#interface-proventxreqhistorysummaryapi) | [TableOutputTag](#interface-tableoutputtag) |
|
|
26
|
+
| [EntitySyncMap](#interface-entitysyncmap) | [ProvenTxReqNotify](#interface-proventxreqnotify) | [TableOutputTagMap](#interface-tableoutputtagmap) |
|
|
27
|
+
| [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput) | [StorageInternalizeActionResult](#interface-storageinternalizeactionresult) | [TableOutputX](#interface-tableoutputx) |
|
|
28
|
+
| [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput) | [StorageKnexOptions](#interface-storageknexoptions) | [TableProvenTx](#interface-tableproventx) |
|
|
29
|
+
| [GenerateChangeSdkInput](#interface-generatechangesdkinput) | [StorageProviderOptions](#interface-storageprovideroptions) | [TableProvenTxReq](#interface-tableproventxreq) |
|
|
30
|
+
| [GenerateChangeSdkOutput](#interface-generatechangesdkoutput) | [StorageReaderOptions](#interface-storagereaderoptions) | [TableProvenTxReqDynamics](#interface-tableproventxreqdynamics) |
|
|
31
|
+
| [GenerateChangeSdkParams](#interface-generatechangesdkparams) | [StorageReaderWriterOptions](#interface-storagereaderwriteroptions) | [TableSettings](#interface-tablesettings) |
|
|
32
|
+
| [GenerateChangeSdkResult](#interface-generatechangesdkresult) | [SyncError](#interface-syncerror) | [TableSyncState](#interface-tablesyncstate) |
|
|
33
|
+
| [GenerateChangeSdkStorageChange](#interface-generatechangesdkstoragechange) | [SyncMap](#interface-syncmap) | [TableTransaction](#interface-tabletransaction) |
|
|
34
|
+
| [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail) | [TableCertificate](#interface-tablecertificate) | [TableTxLabel](#interface-tabletxlabel) |
|
|
35
|
+
| [GetReqsAndBeefResult](#interface-getreqsandbeefresult) | [TableCertificateField](#interface-tablecertificatefield) | [TableTxLabelMap](#interface-tabletxlabelmap) |
|
|
36
|
+
| [PostBeefResultForTxidApi](#interface-postbeefresultfortxidapi) | [TableCertificateX](#interface-tablecertificatex) | [TableUser](#interface-tableuser) |
|
|
37
|
+
| [PostReqsToNetworkDetails](#interface-postreqstonetworkdetails) | [TableCommission](#interface-tablecommission) | [WalletStorageServerOptions](#interface-walletstorageserveroptions) |
|
|
38
|
+
| [PostReqsToNetworkResult](#interface-postreqstonetworkresult) | [TableMonitorEvent](#interface-tablemonitorevent) | [XValidCreateActionOutput](#interface-xvalidcreateactionoutput) |
|
|
39
|
+
| [ProvenTxFromTxidResult](#interface-proventxfromtxidresult) | [TableOutput](#interface-tableoutput) | |
|
|
40
|
+
| [ProvenTxReqHistory](#interface-proventxreqhistory) | [TableOutputBasket](#interface-tableoutputbasket) | |
|
|
35
41
|
|
|
36
42
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
37
43
|
|
|
@@ -41,11 +47,56 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
41
47
|
|
|
42
48
|
```ts
|
|
43
49
|
export interface CommitNewTxResults {
|
|
44
|
-
req:
|
|
50
|
+
req: EntityProvenTxReq;
|
|
45
51
|
log?: string;
|
|
46
52
|
}
|
|
47
53
|
```
|
|
48
54
|
|
|
55
|
+
See also: [EntityProvenTxReq](./storage.md#class-entityproventxreq)
|
|
56
|
+
|
|
57
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
##### Interface: EntitySyncMap
|
|
61
|
+
|
|
62
|
+
```ts
|
|
63
|
+
export interface EntitySyncMap {
|
|
64
|
+
entityName: string;
|
|
65
|
+
idMap: Record<number, number>;
|
|
66
|
+
maxUpdated_at?: Date;
|
|
67
|
+
count: number;
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
###### Property count
|
|
72
|
+
|
|
73
|
+
The cummulative count of items of this entity type received over all the `SyncChunk`s
|
|
74
|
+
since the `since` was last updated.
|
|
75
|
+
|
|
76
|
+
This is the `offset` value to use for the next SyncChunk request.
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
count: number
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
###### Property idMap
|
|
83
|
+
|
|
84
|
+
Maps foreign ids to local ids
|
|
85
|
+
Some entities don't have idMaps (CertificateField, TxLabelMap and OutputTagMap)
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
idMap: Record<number, number>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
###### Property maxUpdated_at
|
|
92
|
+
|
|
93
|
+
the maximum updated_at value seen for this entity over chunks received
|
|
94
|
+
during this udpate cycle.
|
|
95
|
+
|
|
96
|
+
```ts
|
|
97
|
+
maxUpdated_at?: Date
|
|
98
|
+
```
|
|
99
|
+
|
|
49
100
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
50
101
|
|
|
51
102
|
---
|
|
@@ -115,11 +166,7 @@ export interface GenerateChangeSdkParams {
|
|
|
115
166
|
}
|
|
116
167
|
```
|
|
117
168
|
|
|
118
|
-
See also: [GenerateChangeSdkInput](#interface-generatechangesdkinput), [GenerateChangeSdkOutput](#interface-generatechangesdkoutput), [StorageFeeModel](#interface-storagefeemodel)
|
|
119
|
-
|
|
120
|
-
<details>
|
|
121
|
-
|
|
122
|
-
<summary>Interface GenerateChangeSdkParams Details</summary>
|
|
169
|
+
See also: [GenerateChangeSdkInput](./storage.md#interface-generatechangesdkinput), [GenerateChangeSdkOutput](./storage.md#interface-generatechangesdkoutput), [StorageFeeModel](./client.md#interface-storagefeemodel)
|
|
123
170
|
|
|
124
171
|
###### Property changeFirstSatoshis
|
|
125
172
|
|
|
@@ -168,332 +215,1884 @@ If undefined, only a single change output will be added if excess fees must be r
|
|
|
168
215
|
targetNetCount?: number
|
|
169
216
|
```
|
|
170
217
|
|
|
171
|
-
|
|
218
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
##### Interface: GenerateChangeSdkResult
|
|
222
|
+
|
|
223
|
+
```ts
|
|
224
|
+
export interface GenerateChangeSdkResult {
|
|
225
|
+
allocatedChangeInputs: GenerateChangeSdkChangeInput[];
|
|
226
|
+
changeOutputs: GenerateChangeSdkChangeOutput[];
|
|
227
|
+
size: number;
|
|
228
|
+
fee: number;
|
|
229
|
+
satsPerKb: number;
|
|
230
|
+
}
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
See also: [GenerateChangeSdkChangeInput](./storage.md#interface-generatechangesdkchangeinput), [GenerateChangeSdkChangeOutput](./storage.md#interface-generatechangesdkchangeoutput)
|
|
234
|
+
|
|
235
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
236
|
+
|
|
237
|
+
---
|
|
238
|
+
##### Interface: GenerateChangeSdkStorageChange
|
|
239
|
+
|
|
240
|
+
```ts
|
|
241
|
+
export interface GenerateChangeSdkStorageChange extends GenerateChangeSdkChangeInput {
|
|
242
|
+
spendable: boolean;
|
|
243
|
+
}
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
See also: [GenerateChangeSdkChangeInput](./storage.md#interface-generatechangesdkchangeinput)
|
|
247
|
+
|
|
248
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
##### Interface: GetReqsAndBeefDetail
|
|
252
|
+
|
|
253
|
+
```ts
|
|
254
|
+
export interface GetReqsAndBeefDetail {
|
|
255
|
+
txid: string;
|
|
256
|
+
req?: TableProvenTxReq;
|
|
257
|
+
proven?: TableProvenTx;
|
|
258
|
+
status: "readyToSend" | "alreadySent" | "error" | "unknown";
|
|
259
|
+
error?: string;
|
|
260
|
+
}
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
See also: [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq)
|
|
264
|
+
|
|
265
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
##### Interface: GetReqsAndBeefResult
|
|
269
|
+
|
|
270
|
+
```ts
|
|
271
|
+
export interface GetReqsAndBeefResult {
|
|
272
|
+
beef: Beef;
|
|
273
|
+
details: GetReqsAndBeefDetail[];
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
See also: [GetReqsAndBeefDetail](./storage.md#interface-getreqsandbeefdetail)
|
|
278
|
+
|
|
279
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
##### Interface: PostBeefResultForTxidApi
|
|
283
|
+
|
|
284
|
+
```ts
|
|
285
|
+
export interface PostBeefResultForTxidApi {
|
|
286
|
+
txid: string;
|
|
287
|
+
status: "success" | "error";
|
|
288
|
+
alreadyKnown?: boolean;
|
|
289
|
+
blockHash?: string;
|
|
290
|
+
blockHeight?: number;
|
|
291
|
+
merklePath?: string;
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
###### Property alreadyKnown
|
|
296
|
+
|
|
297
|
+
if true, the transaction was already known to this service. Usually treat as a success.
|
|
298
|
+
|
|
299
|
+
Potentially stop posting to additional transaction processors.
|
|
300
|
+
|
|
301
|
+
```ts
|
|
302
|
+
alreadyKnown?: boolean
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
###### Property status
|
|
306
|
+
|
|
307
|
+
'success' - The transaction was accepted for processing
|
|
308
|
+
|
|
309
|
+
```ts
|
|
310
|
+
status: "success" | "error"
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
##### Interface: PostReqsToNetworkDetails
|
|
317
|
+
|
|
318
|
+
```ts
|
|
319
|
+
export interface PostReqsToNetworkDetails {
|
|
320
|
+
txid: string;
|
|
321
|
+
req: EntityProvenTxReq;
|
|
322
|
+
status: PostReqsToNetworkDetailsStatus;
|
|
323
|
+
pbrft: sdk.PostTxResultForTxid;
|
|
324
|
+
data?: string;
|
|
325
|
+
error?: string;
|
|
326
|
+
}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
See also: [EntityProvenTxReq](./storage.md#class-entityproventxreq), [PostReqsToNetworkDetailsStatus](./storage.md#type-postreqstonetworkdetailsstatus), [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
330
|
+
|
|
331
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
332
|
+
|
|
333
|
+
---
|
|
334
|
+
##### Interface: PostReqsToNetworkResult
|
|
335
|
+
|
|
336
|
+
```ts
|
|
337
|
+
export interface PostReqsToNetworkResult {
|
|
338
|
+
status: "success" | "error";
|
|
339
|
+
beef: Beef;
|
|
340
|
+
details: PostReqsToNetworkDetails[];
|
|
341
|
+
pbr?: sdk.PostBeefResult;
|
|
342
|
+
log: string;
|
|
343
|
+
}
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
See also: [PostBeefResult](./client.md#interface-postbeefresult), [PostReqsToNetworkDetails](./storage.md#interface-postreqstonetworkdetails)
|
|
347
|
+
|
|
348
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
##### Interface: ProvenTxFromTxidResult
|
|
352
|
+
|
|
353
|
+
```ts
|
|
354
|
+
export interface ProvenTxFromTxidResult {
|
|
355
|
+
proven?: EntityProvenTx;
|
|
356
|
+
rawTx?: number[];
|
|
357
|
+
}
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
See also: [EntityProvenTx](./storage.md#class-entityproventx)
|
|
361
|
+
|
|
362
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
##### Interface: ProvenTxReqHistory
|
|
366
|
+
|
|
367
|
+
```ts
|
|
368
|
+
export interface ProvenTxReqHistory {
|
|
369
|
+
notes?: Record<string, string>;
|
|
370
|
+
}
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
###### Property notes
|
|
374
|
+
|
|
375
|
+
Keys are Date().toISOString()
|
|
376
|
+
Values are a description of what happened.
|
|
377
|
+
|
|
378
|
+
```ts
|
|
379
|
+
notes?: Record<string, string>
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
##### Interface: ProvenTxReqHistorySummaryApi
|
|
386
|
+
|
|
387
|
+
```ts
|
|
388
|
+
export interface ProvenTxReqHistorySummaryApi {
|
|
389
|
+
setToCompleted: boolean;
|
|
390
|
+
setToCallback: boolean;
|
|
391
|
+
setToUnmined: boolean;
|
|
392
|
+
setToDoubleSpend: boolean;
|
|
393
|
+
setToSending: boolean;
|
|
394
|
+
setToUnconfirmed: boolean;
|
|
395
|
+
}
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
399
|
+
|
|
400
|
+
---
|
|
401
|
+
##### Interface: ProvenTxReqNotify
|
|
402
|
+
|
|
403
|
+
```ts
|
|
404
|
+
export interface ProvenTxReqNotify {
|
|
405
|
+
transactionIds?: number[];
|
|
406
|
+
}
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
##### Interface: StorageInternalizeActionResult
|
|
413
|
+
|
|
414
|
+
```ts
|
|
415
|
+
export interface StorageInternalizeActionResult extends InternalizeActionResult {
|
|
416
|
+
isMerge: boolean;
|
|
417
|
+
txid: string;
|
|
418
|
+
satoshis: number;
|
|
419
|
+
}
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
###### Property isMerge
|
|
423
|
+
|
|
424
|
+
true if internalizing outputs on an existing storage transaction
|
|
425
|
+
|
|
426
|
+
```ts
|
|
427
|
+
isMerge: boolean
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
###### Property satoshis
|
|
431
|
+
|
|
432
|
+
net change in change balance for user due to this internalization
|
|
433
|
+
|
|
434
|
+
```ts
|
|
435
|
+
satoshis: number
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
###### Property txid
|
|
439
|
+
|
|
440
|
+
txid of transaction being internalized
|
|
441
|
+
|
|
442
|
+
```ts
|
|
443
|
+
txid: string
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
447
|
+
|
|
448
|
+
---
|
|
449
|
+
##### Interface: StorageKnexOptions
|
|
450
|
+
|
|
451
|
+
```ts
|
|
452
|
+
export interface StorageKnexOptions extends StorageProviderOptions {
|
|
453
|
+
knex: Knex;
|
|
454
|
+
}
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
See also: [StorageProviderOptions](./storage.md#interface-storageprovideroptions)
|
|
458
|
+
|
|
459
|
+
###### Property knex
|
|
460
|
+
|
|
461
|
+
Knex database interface initialized with valid connection configuration.
|
|
462
|
+
|
|
463
|
+
```ts
|
|
464
|
+
knex: Knex
|
|
465
|
+
```
|
|
466
|
+
|
|
467
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
468
|
+
|
|
469
|
+
---
|
|
470
|
+
##### Interface: StorageProviderOptions
|
|
471
|
+
|
|
472
|
+
```ts
|
|
473
|
+
export interface StorageProviderOptions extends StorageReaderWriterOptions {
|
|
474
|
+
chain: sdk.Chain;
|
|
475
|
+
feeModel: sdk.StorageFeeModel;
|
|
476
|
+
commissionSatoshis: number;
|
|
477
|
+
commissionPubKeyHex?: PubKeyHex;
|
|
478
|
+
}
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
See also: [Chain](./client.md#type-chain), [StorageFeeModel](./client.md#interface-storagefeemodel), [StorageReaderWriterOptions](./storage.md#interface-storagereaderwriteroptions)
|
|
482
|
+
|
|
483
|
+
###### Property commissionPubKeyHex
|
|
484
|
+
|
|
485
|
+
If commissionSatoshis is greater than zero, must be a valid public key hex string.
|
|
486
|
+
The actual locking script for each commission will use a public key derived
|
|
487
|
+
from this key by information stored in the commissions table.
|
|
488
|
+
|
|
489
|
+
```ts
|
|
490
|
+
commissionPubKeyHex?: PubKeyHex
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
###### Property commissionSatoshis
|
|
494
|
+
|
|
495
|
+
Transactions created by this Storage can charge a fee per transaction.
|
|
496
|
+
A value of zero disables commission fees.
|
|
497
|
+
|
|
498
|
+
```ts
|
|
499
|
+
commissionSatoshis: number
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
503
|
+
|
|
504
|
+
---
|
|
505
|
+
##### Interface: StorageReaderOptions
|
|
506
|
+
|
|
507
|
+
```ts
|
|
508
|
+
export interface StorageReaderOptions {
|
|
509
|
+
chain: sdk.Chain;
|
|
510
|
+
}
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
See also: [Chain](./client.md#type-chain)
|
|
514
|
+
|
|
515
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
516
|
+
|
|
517
|
+
---
|
|
518
|
+
##### Interface: StorageReaderWriterOptions
|
|
519
|
+
|
|
520
|
+
```ts
|
|
521
|
+
export interface StorageReaderWriterOptions extends StorageReaderOptions {
|
|
522
|
+
}
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
See also: [StorageReaderOptions](./storage.md#interface-storagereaderoptions)
|
|
526
|
+
|
|
527
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
528
|
+
|
|
529
|
+
---
|
|
530
|
+
##### Interface: SyncError
|
|
531
|
+
|
|
532
|
+
```ts
|
|
533
|
+
export interface SyncError {
|
|
534
|
+
code: string;
|
|
535
|
+
description: string;
|
|
536
|
+
stack?: string;
|
|
537
|
+
}
|
|
538
|
+
```
|
|
539
|
+
|
|
540
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
541
|
+
|
|
542
|
+
---
|
|
543
|
+
##### Interface: SyncMap
|
|
544
|
+
|
|
545
|
+
```ts
|
|
546
|
+
export interface SyncMap {
|
|
547
|
+
provenTx: EntitySyncMap;
|
|
548
|
+
outputBasket: EntitySyncMap;
|
|
549
|
+
transaction: EntitySyncMap;
|
|
550
|
+
provenTxReq: EntitySyncMap;
|
|
551
|
+
txLabel: EntitySyncMap;
|
|
552
|
+
txLabelMap: EntitySyncMap;
|
|
553
|
+
output: EntitySyncMap;
|
|
554
|
+
outputTag: EntitySyncMap;
|
|
555
|
+
outputTagMap: EntitySyncMap;
|
|
556
|
+
certificate: EntitySyncMap;
|
|
557
|
+
certificateField: EntitySyncMap;
|
|
558
|
+
commission: EntitySyncMap;
|
|
559
|
+
}
|
|
560
|
+
```
|
|
561
|
+
|
|
562
|
+
See also: [EntitySyncMap](./storage.md#interface-entitysyncmap)
|
|
563
|
+
|
|
564
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
565
|
+
|
|
566
|
+
---
|
|
567
|
+
##### Interface: TableCertificate
|
|
568
|
+
|
|
569
|
+
```ts
|
|
570
|
+
export interface TableCertificate extends sdk.EntityTimeStamp {
|
|
571
|
+
created_at: Date;
|
|
572
|
+
updated_at: Date;
|
|
573
|
+
certificateId: number;
|
|
574
|
+
userId: number;
|
|
575
|
+
type: Base64String;
|
|
576
|
+
serialNumber: Base64String;
|
|
577
|
+
certifier: PubKeyHex;
|
|
578
|
+
subject: PubKeyHex;
|
|
579
|
+
verifier?: PubKeyHex;
|
|
580
|
+
revocationOutpoint: OutpointString;
|
|
581
|
+
signature: HexString;
|
|
582
|
+
isDeleted: boolean;
|
|
583
|
+
}
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
587
|
+
|
|
588
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
589
|
+
|
|
590
|
+
---
|
|
591
|
+
##### Interface: TableCertificateField
|
|
592
|
+
|
|
593
|
+
```ts
|
|
594
|
+
export interface TableCertificateField extends sdk.EntityTimeStamp {
|
|
595
|
+
created_at: Date;
|
|
596
|
+
updated_at: Date;
|
|
597
|
+
userId: number;
|
|
598
|
+
certificateId: number;
|
|
599
|
+
fieldName: string;
|
|
600
|
+
fieldValue: string;
|
|
601
|
+
masterKey: Base64String;
|
|
602
|
+
}
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
606
|
+
|
|
607
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
608
|
+
|
|
609
|
+
---
|
|
610
|
+
##### Interface: TableCertificateX
|
|
611
|
+
|
|
612
|
+
```ts
|
|
613
|
+
export interface TableCertificateX extends TableCertificate {
|
|
614
|
+
fields?: TableCertificateField[];
|
|
615
|
+
}
|
|
616
|
+
```
|
|
617
|
+
|
|
618
|
+
See also: [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield)
|
|
619
|
+
|
|
620
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
621
|
+
|
|
622
|
+
---
|
|
623
|
+
##### Interface: TableCommission
|
|
624
|
+
|
|
625
|
+
```ts
|
|
626
|
+
export interface TableCommission extends sdk.EntityTimeStamp {
|
|
627
|
+
created_at: Date;
|
|
628
|
+
updated_at: Date;
|
|
629
|
+
commissionId: number;
|
|
630
|
+
userId: number;
|
|
631
|
+
transactionId: number;
|
|
632
|
+
satoshis: number;
|
|
633
|
+
keyOffset: string;
|
|
634
|
+
isRedeemed: boolean;
|
|
635
|
+
lockingScript: number[];
|
|
636
|
+
}
|
|
637
|
+
```
|
|
638
|
+
|
|
639
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
640
|
+
|
|
641
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
642
|
+
|
|
643
|
+
---
|
|
644
|
+
##### Interface: TableMonitorEvent
|
|
645
|
+
|
|
646
|
+
```ts
|
|
647
|
+
export interface TableMonitorEvent extends sdk.EntityTimeStamp {
|
|
648
|
+
created_at: Date;
|
|
649
|
+
updated_at: Date;
|
|
650
|
+
id: number;
|
|
651
|
+
event: string;
|
|
652
|
+
details?: string;
|
|
653
|
+
}
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
657
|
+
|
|
658
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
659
|
+
|
|
660
|
+
---
|
|
661
|
+
##### Interface: TableOutput
|
|
662
|
+
|
|
663
|
+
```ts
|
|
664
|
+
export interface TableOutput extends sdk.EntityTimeStamp {
|
|
665
|
+
created_at: Date;
|
|
666
|
+
updated_at: Date;
|
|
667
|
+
outputId: number;
|
|
668
|
+
userId: number;
|
|
669
|
+
transactionId: number;
|
|
670
|
+
basketId?: number;
|
|
671
|
+
spendable: boolean;
|
|
672
|
+
change: boolean;
|
|
673
|
+
outputDescription: DescriptionString5to50Bytes;
|
|
674
|
+
vout: number;
|
|
675
|
+
satoshis: number;
|
|
676
|
+
providedBy: sdk.StorageProvidedBy;
|
|
677
|
+
purpose: string;
|
|
678
|
+
type: string;
|
|
679
|
+
txid?: string;
|
|
680
|
+
senderIdentityKey?: PubKeyHex;
|
|
681
|
+
derivationPrefix?: Base64String;
|
|
682
|
+
derivationSuffix?: Base64String;
|
|
683
|
+
customInstructions?: string;
|
|
684
|
+
spentBy?: number;
|
|
685
|
+
sequenceNumber?: number;
|
|
686
|
+
spendingDescription?: string;
|
|
687
|
+
scriptLength?: number;
|
|
688
|
+
scriptOffset?: number;
|
|
689
|
+
lockingScript?: number[];
|
|
690
|
+
}
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp), [StorageProvidedBy](./client.md#type-storageprovidedby)
|
|
694
|
+
|
|
695
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
696
|
+
|
|
697
|
+
---
|
|
698
|
+
##### Interface: TableOutputBasket
|
|
699
|
+
|
|
700
|
+
```ts
|
|
701
|
+
export interface TableOutputBasket extends sdk.EntityTimeStamp {
|
|
702
|
+
created_at: Date;
|
|
703
|
+
updated_at: Date;
|
|
704
|
+
basketId: number;
|
|
705
|
+
userId: number;
|
|
706
|
+
name: string;
|
|
707
|
+
numberOfDesiredUTXOs: number;
|
|
708
|
+
minimumDesiredUTXOValue: number;
|
|
709
|
+
isDeleted: boolean;
|
|
710
|
+
}
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
714
|
+
|
|
715
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
716
|
+
|
|
717
|
+
---
|
|
718
|
+
##### Interface: TableOutputTag
|
|
719
|
+
|
|
720
|
+
```ts
|
|
721
|
+
export interface TableOutputTag extends sdk.EntityTimeStamp {
|
|
722
|
+
created_at: Date;
|
|
723
|
+
updated_at: Date;
|
|
724
|
+
outputTagId: number;
|
|
725
|
+
userId: number;
|
|
726
|
+
tag: string;
|
|
727
|
+
isDeleted: boolean;
|
|
728
|
+
}
|
|
729
|
+
```
|
|
730
|
+
|
|
731
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
732
|
+
|
|
733
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
734
|
+
|
|
735
|
+
---
|
|
736
|
+
##### Interface: TableOutputTagMap
|
|
737
|
+
|
|
738
|
+
```ts
|
|
739
|
+
export interface TableOutputTagMap extends sdk.EntityTimeStamp {
|
|
740
|
+
created_at: Date;
|
|
741
|
+
updated_at: Date;
|
|
742
|
+
outputTagId: number;
|
|
743
|
+
outputId: number;
|
|
744
|
+
isDeleted: boolean;
|
|
745
|
+
}
|
|
746
|
+
```
|
|
747
|
+
|
|
748
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
749
|
+
|
|
750
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
751
|
+
|
|
752
|
+
---
|
|
753
|
+
##### Interface: TableOutputX
|
|
754
|
+
|
|
755
|
+
```ts
|
|
756
|
+
export interface TableOutputX extends TableOutput {
|
|
757
|
+
basket?: TableOutputBasket;
|
|
758
|
+
tags?: TableOutputTag[];
|
|
759
|
+
}
|
|
760
|
+
```
|
|
761
|
+
|
|
762
|
+
See also: [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag)
|
|
763
|
+
|
|
764
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
765
|
+
|
|
766
|
+
---
|
|
767
|
+
##### Interface: TableProvenTx
|
|
768
|
+
|
|
769
|
+
```ts
|
|
770
|
+
export interface TableProvenTx extends sdk.EntityTimeStamp {
|
|
771
|
+
created_at: Date;
|
|
772
|
+
updated_at: Date;
|
|
773
|
+
provenTxId: number;
|
|
774
|
+
txid: string;
|
|
775
|
+
height: number;
|
|
776
|
+
index: number;
|
|
777
|
+
merklePath: number[];
|
|
778
|
+
rawTx: number[];
|
|
779
|
+
blockHash: string;
|
|
780
|
+
merkleRoot: string;
|
|
781
|
+
}
|
|
782
|
+
```
|
|
783
|
+
|
|
784
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
785
|
+
|
|
786
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
787
|
+
|
|
788
|
+
---
|
|
789
|
+
##### Interface: TableProvenTxReq
|
|
790
|
+
|
|
791
|
+
```ts
|
|
792
|
+
export interface TableProvenTxReq extends TableProvenTxReqDynamics {
|
|
793
|
+
created_at: Date;
|
|
794
|
+
updated_at: Date;
|
|
795
|
+
provenTxReqId: number;
|
|
796
|
+
provenTxId?: number;
|
|
797
|
+
status: sdk.ProvenTxReqStatus;
|
|
798
|
+
attempts: number;
|
|
799
|
+
notified: boolean;
|
|
800
|
+
txid: string;
|
|
801
|
+
batch?: string;
|
|
802
|
+
history: string;
|
|
803
|
+
notify: string;
|
|
804
|
+
rawTx: number[];
|
|
805
|
+
inputBEEF?: number[];
|
|
806
|
+
}
|
|
807
|
+
```
|
|
808
|
+
|
|
809
|
+
See also: [ProvenTxReqStatus](./client.md#type-proventxreqstatus), [TableProvenTxReqDynamics](./storage.md#interface-tableproventxreqdynamics)
|
|
810
|
+
|
|
811
|
+
###### Property attempts
|
|
812
|
+
|
|
813
|
+
Count of how many times a service has been asked about this txid
|
|
814
|
+
|
|
815
|
+
```ts
|
|
816
|
+
attempts: number
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
###### Property batch
|
|
820
|
+
|
|
821
|
+
If valid, a unique string identifying a batch of transactions to be sent together for processing.
|
|
822
|
+
|
|
823
|
+
```ts
|
|
824
|
+
batch?: string
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
###### Property history
|
|
828
|
+
|
|
829
|
+
JSON string of processing history.
|
|
830
|
+
Parses to `ProvenTxReqHistoryApi`.
|
|
831
|
+
|
|
832
|
+
```ts
|
|
833
|
+
history: string
|
|
834
|
+
```
|
|
835
|
+
|
|
836
|
+
###### Property notified
|
|
837
|
+
|
|
838
|
+
Set to true when a terminal status has been set and notification has occurred.
|
|
839
|
+
|
|
840
|
+
```ts
|
|
841
|
+
notified: boolean
|
|
842
|
+
```
|
|
843
|
+
|
|
844
|
+
###### Property notify
|
|
845
|
+
|
|
846
|
+
JSON string of data to drive notifications when this request completes.
|
|
847
|
+
Parses to `ProvenTxReqNotifyApi`.
|
|
848
|
+
|
|
849
|
+
```ts
|
|
850
|
+
notify: string
|
|
851
|
+
```
|
|
852
|
+
|
|
853
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
854
|
+
|
|
855
|
+
---
|
|
856
|
+
##### Interface: TableProvenTxReqDynamics
|
|
857
|
+
|
|
858
|
+
Table properties that may change after initial record insertion.
|
|
859
|
+
|
|
860
|
+
```ts
|
|
861
|
+
export interface TableProvenTxReqDynamics extends sdk.EntityTimeStamp {
|
|
862
|
+
updated_at: Date;
|
|
863
|
+
provenTxId?: number;
|
|
864
|
+
status: sdk.ProvenTxReqStatus;
|
|
865
|
+
attempts: number;
|
|
866
|
+
notified: boolean;
|
|
867
|
+
batch?: string;
|
|
868
|
+
history: string;
|
|
869
|
+
notify: string;
|
|
870
|
+
}
|
|
871
|
+
```
|
|
872
|
+
|
|
873
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp), [ProvenTxReqStatus](./client.md#type-proventxreqstatus)
|
|
874
|
+
|
|
875
|
+
###### Property attempts
|
|
876
|
+
|
|
877
|
+
Count of how many times a service has been asked about this txid
|
|
878
|
+
|
|
879
|
+
```ts
|
|
880
|
+
attempts: number
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
###### Property batch
|
|
884
|
+
|
|
885
|
+
If valid, a unique string identifying a batch of transactions to be sent together for processing.
|
|
886
|
+
|
|
887
|
+
```ts
|
|
888
|
+
batch?: string
|
|
889
|
+
```
|
|
890
|
+
|
|
891
|
+
###### Property history
|
|
892
|
+
|
|
893
|
+
JSON string of processing history.
|
|
894
|
+
Parses to `ProvenTxReqHistoryApi`.
|
|
895
|
+
|
|
896
|
+
```ts
|
|
897
|
+
history: string
|
|
898
|
+
```
|
|
899
|
+
|
|
900
|
+
###### Property notified
|
|
901
|
+
|
|
902
|
+
Set to true when a terminal status has been set and notification has occurred.
|
|
903
|
+
|
|
904
|
+
```ts
|
|
905
|
+
notified: boolean
|
|
906
|
+
```
|
|
907
|
+
|
|
908
|
+
###### Property notify
|
|
909
|
+
|
|
910
|
+
JSON string of data to drive notifications when this request completes.
|
|
911
|
+
Parses to `ProvenTxReqNotifyApi`.
|
|
912
|
+
|
|
913
|
+
```ts
|
|
914
|
+
notify: string
|
|
915
|
+
```
|
|
916
|
+
|
|
917
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
918
|
+
|
|
919
|
+
---
|
|
920
|
+
##### Interface: TableSettings
|
|
921
|
+
|
|
922
|
+
```ts
|
|
923
|
+
export interface TableSettings extends sdk.StorageIdentity, sdk.EntityTimeStamp {
|
|
924
|
+
created_at: Date;
|
|
925
|
+
updated_at: Date;
|
|
926
|
+
storageIdentityKey: string;
|
|
927
|
+
storageName: string;
|
|
928
|
+
chain: sdk.Chain;
|
|
929
|
+
dbtype: "SQLite" | "MySQL";
|
|
930
|
+
maxOutputScript: number;
|
|
931
|
+
}
|
|
932
|
+
```
|
|
933
|
+
|
|
934
|
+
See also: [Chain](./client.md#type-chain), [EntityTimeStamp](./client.md#interface-entitytimestamp), [StorageIdentity](./client.md#interface-storageidentity)
|
|
935
|
+
|
|
936
|
+
###### Property storageIdentityKey
|
|
937
|
+
|
|
938
|
+
The identity key (public key) assigned to this storage
|
|
939
|
+
|
|
940
|
+
```ts
|
|
941
|
+
storageIdentityKey: string
|
|
942
|
+
```
|
|
943
|
+
|
|
944
|
+
###### Property storageName
|
|
945
|
+
|
|
946
|
+
The human readable name assigned to this storage.
|
|
947
|
+
|
|
948
|
+
```ts
|
|
949
|
+
storageName: string
|
|
950
|
+
```
|
|
951
|
+
|
|
952
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
953
|
+
|
|
954
|
+
---
|
|
955
|
+
##### Interface: TableSyncState
|
|
956
|
+
|
|
957
|
+
```ts
|
|
958
|
+
export interface TableSyncState extends sdk.EntityTimeStamp {
|
|
959
|
+
created_at: Date;
|
|
960
|
+
updated_at: Date;
|
|
961
|
+
syncStateId: number;
|
|
962
|
+
userId: number;
|
|
963
|
+
storageIdentityKey: string;
|
|
964
|
+
storageName: string;
|
|
965
|
+
status: sdk.SyncStatus;
|
|
966
|
+
init: boolean;
|
|
967
|
+
refNum: string;
|
|
968
|
+
syncMap: string;
|
|
969
|
+
when?: Date;
|
|
970
|
+
satoshis?: number;
|
|
971
|
+
errorLocal?: string;
|
|
972
|
+
errorOther?: string;
|
|
973
|
+
}
|
|
974
|
+
```
|
|
975
|
+
|
|
976
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp), [SyncStatus](./client.md#type-syncstatus)
|
|
977
|
+
|
|
978
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
979
|
+
|
|
980
|
+
---
|
|
981
|
+
##### Interface: TableTransaction
|
|
982
|
+
|
|
983
|
+
```ts
|
|
984
|
+
export interface TableTransaction extends sdk.EntityTimeStamp {
|
|
985
|
+
created_at: Date;
|
|
986
|
+
updated_at: Date;
|
|
987
|
+
transactionId: number;
|
|
988
|
+
userId: number;
|
|
989
|
+
provenTxId?: number;
|
|
990
|
+
status: sdk.TransactionStatus;
|
|
991
|
+
reference: Base64String;
|
|
992
|
+
isOutgoing: boolean;
|
|
993
|
+
satoshis: number;
|
|
994
|
+
description: string;
|
|
995
|
+
version?: number;
|
|
996
|
+
lockTime?: number;
|
|
997
|
+
txid?: string;
|
|
998
|
+
inputBEEF?: number[];
|
|
999
|
+
rawTx?: number[];
|
|
1000
|
+
}
|
|
1001
|
+
```
|
|
1002
|
+
|
|
1003
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp), [TransactionStatus](./client.md#type-transactionstatus)
|
|
1004
|
+
|
|
1005
|
+
###### Property isOutgoing
|
|
1006
|
+
|
|
1007
|
+
true if transaction originated in this wallet, change returns to it.
|
|
1008
|
+
false for a transaction created externally and handed in to this wallet.
|
|
1009
|
+
|
|
1010
|
+
```ts
|
|
1011
|
+
isOutgoing: boolean
|
|
1012
|
+
```
|
|
1013
|
+
|
|
1014
|
+
###### Property lockTime
|
|
1015
|
+
|
|
1016
|
+
Optional. Default is zero.
|
|
1017
|
+
When the transaction can be processed into a block:
|
|
1018
|
+
>= 500,000,000 values are interpreted as minimum required unix time stamps in seconds
|
|
1019
|
+
< 500,000,000 values are interpreted as minimum required block height
|
|
1020
|
+
|
|
1021
|
+
```ts
|
|
1022
|
+
lockTime?: number
|
|
1023
|
+
```
|
|
1024
|
+
|
|
1025
|
+
###### Property reference
|
|
1026
|
+
|
|
1027
|
+
max length of 64, hex encoded
|
|
1028
|
+
|
|
1029
|
+
```ts
|
|
1030
|
+
reference: Base64String
|
|
1031
|
+
```
|
|
1032
|
+
|
|
1033
|
+
###### Property version
|
|
1034
|
+
|
|
1035
|
+
If not undefined, must match value in associated rawTransaction.
|
|
1036
|
+
|
|
1037
|
+
```ts
|
|
1038
|
+
version?: number
|
|
1039
|
+
```
|
|
1040
|
+
|
|
1041
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1042
|
+
|
|
1043
|
+
---
|
|
1044
|
+
##### Interface: TableTxLabel
|
|
1045
|
+
|
|
1046
|
+
```ts
|
|
1047
|
+
export interface TableTxLabel extends sdk.EntityTimeStamp {
|
|
1048
|
+
created_at: Date;
|
|
1049
|
+
updated_at: Date;
|
|
1050
|
+
txLabelId: number;
|
|
1051
|
+
userId: number;
|
|
1052
|
+
label: string;
|
|
1053
|
+
isDeleted: boolean;
|
|
1054
|
+
}
|
|
1055
|
+
```
|
|
1056
|
+
|
|
1057
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
1058
|
+
|
|
1059
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1060
|
+
|
|
1061
|
+
---
|
|
1062
|
+
##### Interface: TableTxLabelMap
|
|
1063
|
+
|
|
1064
|
+
```ts
|
|
1065
|
+
export interface TableTxLabelMap extends sdk.EntityTimeStamp {
|
|
1066
|
+
created_at: Date;
|
|
1067
|
+
updated_at: Date;
|
|
1068
|
+
txLabelId: number;
|
|
1069
|
+
transactionId: number;
|
|
1070
|
+
isDeleted: boolean;
|
|
1071
|
+
}
|
|
1072
|
+
```
|
|
1073
|
+
|
|
1074
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
1075
|
+
|
|
1076
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1077
|
+
|
|
1078
|
+
---
|
|
1079
|
+
##### Interface: TableUser
|
|
1080
|
+
|
|
1081
|
+
```ts
|
|
1082
|
+
export interface TableUser extends sdk.EntityTimeStamp {
|
|
1083
|
+
created_at: Date;
|
|
1084
|
+
updated_at: Date;
|
|
1085
|
+
userId: number;
|
|
1086
|
+
identityKey: string;
|
|
1087
|
+
activeStorage?: string;
|
|
1088
|
+
}
|
|
1089
|
+
```
|
|
1090
|
+
|
|
1091
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
1092
|
+
|
|
1093
|
+
###### Property activeStorage
|
|
1094
|
+
|
|
1095
|
+
The storageIdentityKey value of the active wallet storage.
|
|
1096
|
+
|
|
1097
|
+
```ts
|
|
1098
|
+
activeStorage?: string
|
|
1099
|
+
```
|
|
1100
|
+
|
|
1101
|
+
###### Property identityKey
|
|
1102
|
+
|
|
1103
|
+
PubKeyHex uniquely identifying user.
|
|
1104
|
+
Typically 66 hex digits.
|
|
1105
|
+
|
|
1106
|
+
```ts
|
|
1107
|
+
identityKey: string
|
|
1108
|
+
```
|
|
1109
|
+
|
|
1110
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1111
|
+
|
|
1112
|
+
---
|
|
1113
|
+
##### Interface: WalletStorageServerOptions
|
|
1114
|
+
|
|
1115
|
+
```ts
|
|
1116
|
+
export interface WalletStorageServerOptions {
|
|
1117
|
+
port: number;
|
|
1118
|
+
wallet: Wallet;
|
|
1119
|
+
monetize: boolean;
|
|
1120
|
+
calculateRequestPrice?: (req: Request) => number | Promise<number>;
|
|
1121
|
+
}
|
|
1122
|
+
```
|
|
1123
|
+
|
|
1124
|
+
See also: [Wallet](./client.md#class-wallet)
|
|
1125
|
+
|
|
1126
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1127
|
+
|
|
1128
|
+
---
|
|
1129
|
+
##### Interface: XValidCreateActionOutput
|
|
1130
|
+
|
|
1131
|
+
```ts
|
|
1132
|
+
export interface XValidCreateActionOutput extends sdk.ValidCreateActionOutput {
|
|
1133
|
+
vout: number;
|
|
1134
|
+
providedBy: sdk.StorageProvidedBy;
|
|
1135
|
+
purpose?: string;
|
|
1136
|
+
derivationSuffix?: string;
|
|
1137
|
+
keyOffset?: string;
|
|
1138
|
+
}
|
|
1139
|
+
```
|
|
1140
|
+
|
|
1141
|
+
See also: [StorageProvidedBy](./client.md#type-storageprovidedby), [ValidCreateActionOutput](./client.md#interface-validcreateactionoutput)
|
|
1142
|
+
|
|
1143
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1144
|
+
|
|
1145
|
+
---
|
|
1146
|
+
#### Classes
|
|
1147
|
+
|
|
1148
|
+
| | | |
|
|
1149
|
+
| --- | --- | --- |
|
|
1150
|
+
| [EntityBase](#class-entitybase) | [EntityProvenTxReq](#class-entityproventxreq) | [StorageKnex](#class-storageknex) |
|
|
1151
|
+
| [EntityCertificate](#class-entitycertificate) | [EntitySyncState](#class-entitysyncstate) | [StorageProvider](#class-storageprovider) |
|
|
1152
|
+
| [EntityCertificateField](#class-entitycertificatefield) | [EntityTransaction](#class-entitytransaction) | [StorageReader](#class-storagereader) |
|
|
1153
|
+
| [EntityCommission](#class-entitycommission) | [EntityTxLabel](#class-entitytxlabel) | [StorageReaderWriter](#class-storagereaderwriter) |
|
|
1154
|
+
| [EntityOutput](#class-entityoutput) | [EntityTxLabelMap](#class-entitytxlabelmap) | [StorageServer](#class-storageserver) |
|
|
1155
|
+
| [EntityOutputBasket](#class-entityoutputbasket) | [EntityUser](#class-entityuser) | [StorageSyncReader](#class-storagesyncreader) |
|
|
1156
|
+
| [EntityOutputTag](#class-entityoutputtag) | [KnexMigrations](#class-knexmigrations) | [WalletStorageManager](#class-walletstoragemanager) |
|
|
1157
|
+
| [EntityOutputTagMap](#class-entityoutputtagmap) | [MergeEntity](#class-mergeentity) | |
|
|
1158
|
+
| [EntityProvenTx](#class-entityproventx) | [StorageClient](#class-storageclient) | |
|
|
1159
|
+
|
|
1160
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1161
|
+
|
|
1162
|
+
---
|
|
1163
|
+
|
|
1164
|
+
##### Class: EntityBase
|
|
1165
|
+
|
|
1166
|
+
```ts
|
|
1167
|
+
export abstract class EntityBase<T> {
|
|
1168
|
+
api: T;
|
|
1169
|
+
constructor(api: T)
|
|
1170
|
+
abstract get id(): number;
|
|
1171
|
+
abstract get entityName(): string;
|
|
1172
|
+
abstract get entityTable(): string;
|
|
1173
|
+
abstract updateApi(): void;
|
|
1174
|
+
abstract equals(ei: T, syncMap?: SyncMap): boolean;
|
|
1175
|
+
abstract mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>;
|
|
1176
|
+
abstract mergeExisting(storage: EntityStorage, since: Date | undefined, ei: T, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>;
|
|
1177
|
+
toApi(): T
|
|
1178
|
+
}
|
|
1179
|
+
```
|
|
1180
|
+
|
|
1181
|
+
See also: [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TrxToken](./client.md#interface-trxtoken)
|
|
1182
|
+
|
|
1183
|
+
###### Method equals
|
|
1184
|
+
|
|
1185
|
+
Tests for equality or 'merge' / 'convergent' equality if syncMap is provided.
|
|
1186
|
+
|
|
1187
|
+
'convergent' equality must satisfy (A sync B) equals (B sync A)
|
|
1188
|
+
|
|
1189
|
+
```ts
|
|
1190
|
+
abstract equals(ei: T, syncMap?: SyncMap): boolean
|
|
1191
|
+
```
|
|
1192
|
+
See also: [SyncMap](./storage.md#interface-syncmap)
|
|
1193
|
+
|
|
1194
|
+
###### Method mergeExisting
|
|
1195
|
+
|
|
1196
|
+
Perform a 'merge' / 'convergent' equality migration of state
|
|
1197
|
+
from external `ei` to this existing local EntityUser
|
|
1198
|
+
|
|
1199
|
+
```ts
|
|
1200
|
+
abstract mergeExisting(storage: EntityStorage, since: Date | undefined, ei: T, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
1201
|
+
```
|
|
1202
|
+
See also: [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TrxToken](./client.md#interface-trxtoken)
|
|
1203
|
+
|
|
1204
|
+
Returns
|
|
1205
|
+
|
|
1206
|
+
true iff entity state changed and was updated to storage
|
|
1207
|
+
|
|
1208
|
+
###### Method mergeNew
|
|
1209
|
+
|
|
1210
|
+
Perform a 'merge' / 'convergent' equality migration of state
|
|
1211
|
+
to this new local entity which was constructed
|
|
1212
|
+
as a copy of the external object.
|
|
1213
|
+
|
|
1214
|
+
```ts
|
|
1215
|
+
abstract mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
1216
|
+
```
|
|
1217
|
+
See also: [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TrxToken](./client.md#interface-trxtoken)
|
|
1218
|
+
|
|
1219
|
+
Argument Details
|
|
1220
|
+
|
|
1221
|
+
+ **userId**
|
|
1222
|
+
+ local userId
|
|
1223
|
+
|
|
1224
|
+
###### Method toApi
|
|
1225
|
+
|
|
1226
|
+
An entity may decode properties of the underlying Api object on construction.
|
|
1227
|
+
|
|
1228
|
+
The `toApi` method forces an `updateApi` before returning the underlying,
|
|
1229
|
+
now updated, Api object.
|
|
1230
|
+
|
|
1231
|
+
```ts
|
|
1232
|
+
toApi(): T
|
|
1233
|
+
```
|
|
1234
|
+
|
|
1235
|
+
Returns
|
|
1236
|
+
|
|
1237
|
+
The underlying Api object with any entity decoded properties updated.
|
|
1238
|
+
|
|
1239
|
+
###### Method updateApi
|
|
1240
|
+
|
|
1241
|
+
On construction, an entity may decode properties of the `api` object,
|
|
1242
|
+
such as JSON stringified objects.
|
|
1243
|
+
|
|
1244
|
+
The `updateApi` method must re-encode the current state of those decoded properties
|
|
1245
|
+
into the `api` object.
|
|
1246
|
+
|
|
1247
|
+
Used by the `toApi` method to return an updated `api` object.
|
|
1248
|
+
|
|
1249
|
+
```ts
|
|
1250
|
+
abstract updateApi(): void
|
|
1251
|
+
```
|
|
1252
|
+
|
|
1253
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1254
|
+
|
|
1255
|
+
---
|
|
1256
|
+
##### Class: EntityCertificate
|
|
1257
|
+
|
|
1258
|
+
```ts
|
|
1259
|
+
export class EntityCertificate extends EntityBase<TableCertificate> {
|
|
1260
|
+
constructor(api?: TableCertificate)
|
|
1261
|
+
override updateApi(): void
|
|
1262
|
+
get certificateId()
|
|
1263
|
+
set certificateId(v: number)
|
|
1264
|
+
get created_at()
|
|
1265
|
+
set created_at(v: Date)
|
|
1266
|
+
get updated_at()
|
|
1267
|
+
set updated_at(v: Date)
|
|
1268
|
+
get userId()
|
|
1269
|
+
set userId(v: number)
|
|
1270
|
+
get type()
|
|
1271
|
+
set type(v: string)
|
|
1272
|
+
get subject()
|
|
1273
|
+
set subject(v: string)
|
|
1274
|
+
get verifier()
|
|
1275
|
+
set verifier(v: string | undefined)
|
|
1276
|
+
get serialNumber()
|
|
1277
|
+
set serialNumber(v: string)
|
|
1278
|
+
get certifier()
|
|
1279
|
+
set certifier(v: string)
|
|
1280
|
+
get revocationOutpoint()
|
|
1281
|
+
set revocationOutpoint(v: string)
|
|
1282
|
+
get signature()
|
|
1283
|
+
set signature(v: string)
|
|
1284
|
+
get isDeleted()
|
|
1285
|
+
set isDeleted(v: boolean)
|
|
1286
|
+
override get id(): number
|
|
1287
|
+
override set id(v: number)
|
|
1288
|
+
override get entityName(): string
|
|
1289
|
+
override get entityTable(): string
|
|
1290
|
+
override equals(ei: TableCertificate, syncMap?: SyncMap): boolean
|
|
1291
|
+
static async mergeFind(storage: EntityStorage, userId: number, ei: TableCertificate, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
1292
|
+
found: boolean;
|
|
1293
|
+
eo: EntityCertificate;
|
|
1294
|
+
eiId: number;
|
|
1295
|
+
}>
|
|
1296
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
1297
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableCertificate, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
1298
|
+
}
|
|
1299
|
+
```
|
|
1300
|
+
|
|
1301
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TableCertificate](./storage.md#interface-tablecertificate), [TrxToken](./client.md#interface-trxtoken)
|
|
1302
|
+
|
|
1303
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1304
|
+
|
|
1305
|
+
---
|
|
1306
|
+
##### Class: EntityCertificateField
|
|
1307
|
+
|
|
1308
|
+
```ts
|
|
1309
|
+
export class EntityCertificateField extends EntityBase<TableCertificateField> {
|
|
1310
|
+
constructor(api?: TableCertificateField)
|
|
1311
|
+
override updateApi(): void
|
|
1312
|
+
get userId()
|
|
1313
|
+
set userId(v: number)
|
|
1314
|
+
get certificateId()
|
|
1315
|
+
set certificateId(v: number)
|
|
1316
|
+
get created_at()
|
|
1317
|
+
set created_at(v: Date)
|
|
1318
|
+
get updated_at()
|
|
1319
|
+
set updated_at(v: Date)
|
|
1320
|
+
get fieldName()
|
|
1321
|
+
set fieldName(v: string)
|
|
1322
|
+
get fieldValue()
|
|
1323
|
+
set fieldValue(v: string)
|
|
1324
|
+
get masterKey()
|
|
1325
|
+
set masterKey(v: string)
|
|
1326
|
+
override get id(): number
|
|
1327
|
+
override get entityName(): string
|
|
1328
|
+
override get entityTable(): string
|
|
1329
|
+
override equals(ei: TableCertificateField, syncMap?: SyncMap | undefined): boolean
|
|
1330
|
+
static async mergeFind(storage: EntityStorage, userId: number, ei: TableCertificateField, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
1331
|
+
found: boolean;
|
|
1332
|
+
eo: EntityCertificateField;
|
|
1333
|
+
eiId: number;
|
|
1334
|
+
}>
|
|
1335
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
1336
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableCertificateField, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
1337
|
+
}
|
|
1338
|
+
```
|
|
1339
|
+
|
|
1340
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TrxToken](./client.md#interface-trxtoken)
|
|
1341
|
+
|
|
1342
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1343
|
+
|
|
1344
|
+
---
|
|
1345
|
+
##### Class: EntityCommission
|
|
1346
|
+
|
|
1347
|
+
```ts
|
|
1348
|
+
export class EntityCommission extends EntityBase<TableCommission> {
|
|
1349
|
+
constructor(api?: TableCommission)
|
|
1350
|
+
override updateApi(): void
|
|
1351
|
+
get commissionId()
|
|
1352
|
+
set commissionId(v: number)
|
|
1353
|
+
get created_at()
|
|
1354
|
+
set created_at(v: Date)
|
|
1355
|
+
get updated_at()
|
|
1356
|
+
set updated_at(v: Date)
|
|
1357
|
+
get transactionId()
|
|
1358
|
+
set transactionId(v: number)
|
|
1359
|
+
get userId()
|
|
1360
|
+
set userId(v: number)
|
|
1361
|
+
get isRedeemed()
|
|
1362
|
+
set isRedeemed(v: boolean)
|
|
1363
|
+
get keyOffset()
|
|
1364
|
+
set keyOffset(v: string)
|
|
1365
|
+
get lockingScript()
|
|
1366
|
+
set lockingScript(v: number[])
|
|
1367
|
+
get satoshis()
|
|
1368
|
+
set satoshis(v: number)
|
|
1369
|
+
override get id(): number
|
|
1370
|
+
override set id(v: number)
|
|
1371
|
+
override get entityName(): string
|
|
1372
|
+
override get entityTable(): string
|
|
1373
|
+
override equals(ei: TableCommission, syncMap?: SyncMap | undefined): boolean
|
|
1374
|
+
static async mergeFind(storage: EntityStorage, userId: number, ei: TableCommission, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
1375
|
+
found: boolean;
|
|
1376
|
+
eo: EntityCommission;
|
|
1377
|
+
eiId: number;
|
|
1378
|
+
}>
|
|
1379
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
1380
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableCommission, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
1381
|
+
}
|
|
1382
|
+
```
|
|
1383
|
+
|
|
1384
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TableCommission](./storage.md#interface-tablecommission), [TrxToken](./client.md#interface-trxtoken)
|
|
172
1385
|
|
|
173
1386
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
174
1387
|
|
|
175
1388
|
---
|
|
176
|
-
#####
|
|
177
|
-
|
|
178
|
-
```ts
|
|
179
|
-
export
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
1389
|
+
##### Class: EntityOutput
|
|
1390
|
+
|
|
1391
|
+
```ts
|
|
1392
|
+
export class EntityOutput extends EntityBase<TableOutput> {
|
|
1393
|
+
constructor(api?: TableOutput)
|
|
1394
|
+
override updateApi(): void
|
|
1395
|
+
get outputId()
|
|
1396
|
+
set outputId(v: number)
|
|
1397
|
+
get created_at()
|
|
1398
|
+
set created_at(v: Date)
|
|
1399
|
+
get updated_at()
|
|
1400
|
+
set updated_at(v: Date)
|
|
1401
|
+
get userId()
|
|
1402
|
+
set userId(v: number)
|
|
1403
|
+
get transactionId()
|
|
1404
|
+
set transactionId(v: number)
|
|
1405
|
+
get basketId()
|
|
1406
|
+
set basketId(v: number | undefined)
|
|
1407
|
+
get spentBy()
|
|
1408
|
+
set spentBy(v: number | undefined)
|
|
1409
|
+
get vout()
|
|
1410
|
+
set vout(v: number)
|
|
1411
|
+
get satoshis()
|
|
1412
|
+
set satoshis(v: number)
|
|
1413
|
+
get outputDescription()
|
|
1414
|
+
set outputDescription(v: string)
|
|
1415
|
+
get spendable()
|
|
1416
|
+
set spendable(v: boolean)
|
|
1417
|
+
get change()
|
|
1418
|
+
set change(v: boolean)
|
|
1419
|
+
get txid()
|
|
1420
|
+
set txid(v: string | undefined)
|
|
1421
|
+
get type()
|
|
1422
|
+
set type(v: string)
|
|
1423
|
+
get providedBy()
|
|
1424
|
+
set providedBy(v: sdk.StorageProvidedBy)
|
|
1425
|
+
get purpose()
|
|
1426
|
+
set purpose(v: string)
|
|
1427
|
+
get spendingDescription()
|
|
1428
|
+
set spendingDescription(v: string | undefined)
|
|
1429
|
+
get derivationPrefix()
|
|
1430
|
+
set derivationPrefix(v: string | undefined)
|
|
1431
|
+
get derivationSuffix()
|
|
1432
|
+
set derivationSuffix(v: string | undefined)
|
|
1433
|
+
get senderIdentityKey()
|
|
1434
|
+
set senderIdentityKey(v: string | undefined)
|
|
1435
|
+
get customInstructions()
|
|
1436
|
+
set customInstructions(v: string | undefined)
|
|
1437
|
+
get lockingScript()
|
|
1438
|
+
set lockingScript(v: number[] | undefined)
|
|
1439
|
+
get scriptLength()
|
|
1440
|
+
set scriptLength(v: number | undefined)
|
|
1441
|
+
get scriptOffset()
|
|
1442
|
+
set scriptOffset(v: number | undefined)
|
|
1443
|
+
override get id(): number
|
|
1444
|
+
override set id(v: number)
|
|
1445
|
+
override get entityName(): string
|
|
1446
|
+
override get entityTable(): string
|
|
1447
|
+
override equals(ei: TableOutput, syncMap?: SyncMap | undefined): boolean
|
|
1448
|
+
static async mergeFind(storage: EntityStorage, userId: number, ei: TableOutput, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
1449
|
+
found: boolean;
|
|
1450
|
+
eo: EntityOutput;
|
|
1451
|
+
eiId: number;
|
|
1452
|
+
}>
|
|
1453
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
1454
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableOutput, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
185
1455
|
}
|
|
186
1456
|
```
|
|
187
1457
|
|
|
188
|
-
See also: [
|
|
1458
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [StorageProvidedBy](./client.md#type-storageprovidedby), [SyncMap](./storage.md#interface-syncmap), [TableOutput](./storage.md#interface-tableoutput), [TrxToken](./client.md#interface-trxtoken)
|
|
189
1459
|
|
|
190
1460
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
191
1461
|
|
|
192
1462
|
---
|
|
193
|
-
#####
|
|
194
|
-
|
|
195
|
-
```ts
|
|
196
|
-
export
|
|
197
|
-
|
|
1463
|
+
##### Class: EntityOutputBasket
|
|
1464
|
+
|
|
1465
|
+
```ts
|
|
1466
|
+
export class EntityOutputBasket extends EntityBase<TableOutputBasket> {
|
|
1467
|
+
constructor(api?: TableOutputBasket)
|
|
1468
|
+
get basketId()
|
|
1469
|
+
set basketId(v: number)
|
|
1470
|
+
get created_at()
|
|
1471
|
+
set created_at(v: Date)
|
|
1472
|
+
get updated_at()
|
|
1473
|
+
set updated_at(v: Date)
|
|
1474
|
+
get userId()
|
|
1475
|
+
set userId(v: number)
|
|
1476
|
+
get name()
|
|
1477
|
+
set name(v: string)
|
|
1478
|
+
get numberOfDesiredUTXOs()
|
|
1479
|
+
set numberOfDesiredUTXOs(v: number)
|
|
1480
|
+
get minimumDesiredUTXOValue()
|
|
1481
|
+
set minimumDesiredUTXOValue(v: number)
|
|
1482
|
+
get isDeleted()
|
|
1483
|
+
set isDeleted(v: boolean)
|
|
1484
|
+
override get id()
|
|
1485
|
+
override set id(v: number)
|
|
1486
|
+
override get entityName(): string
|
|
1487
|
+
override get entityTable(): string
|
|
1488
|
+
override updateApi(): void
|
|
1489
|
+
override equals(ei: TableOutputBasket, syncMap?: SyncMap): boolean
|
|
1490
|
+
static async mergeFind(storage: EntityStorage, userId: number, ei: TableOutputBasket, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
1491
|
+
found: boolean;
|
|
1492
|
+
eo: EntityOutputBasket;
|
|
1493
|
+
eiId: number;
|
|
1494
|
+
}>
|
|
1495
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
1496
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableOutputBasket, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
198
1497
|
}
|
|
199
1498
|
```
|
|
200
1499
|
|
|
201
|
-
See also: [
|
|
1500
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TrxToken](./client.md#interface-trxtoken)
|
|
202
1501
|
|
|
203
1502
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
204
1503
|
|
|
205
1504
|
---
|
|
206
|
-
#####
|
|
207
|
-
|
|
208
|
-
```ts
|
|
209
|
-
export
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
1505
|
+
##### Class: EntityOutputTag
|
|
1506
|
+
|
|
1507
|
+
```ts
|
|
1508
|
+
export class EntityOutputTag extends EntityBase<TableOutputTag> {
|
|
1509
|
+
constructor(api?: TableOutputTag)
|
|
1510
|
+
override updateApi(): void
|
|
1511
|
+
get outputTagId()
|
|
1512
|
+
set outputTagId(v: number)
|
|
1513
|
+
get created_at()
|
|
1514
|
+
set created_at(v: Date)
|
|
1515
|
+
get updated_at()
|
|
1516
|
+
set updated_at(v: Date)
|
|
1517
|
+
get tag()
|
|
1518
|
+
set tag(v: string)
|
|
1519
|
+
get userId()
|
|
1520
|
+
set userId(v: number)
|
|
1521
|
+
get isDeleted()
|
|
1522
|
+
set isDeleted(v: boolean)
|
|
1523
|
+
override get id(): number
|
|
1524
|
+
override set id(v: number)
|
|
1525
|
+
override get entityName(): string
|
|
1526
|
+
override get entityTable(): string
|
|
1527
|
+
override equals(ei: TableOutputTag, syncMap?: SyncMap | undefined): boolean
|
|
1528
|
+
static async mergeFind(storage: EntityStorage, userId: number, ei: TableOutputTag, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
1529
|
+
found: boolean;
|
|
1530
|
+
eo: EntityOutputTag;
|
|
1531
|
+
eiId: number;
|
|
1532
|
+
}>
|
|
1533
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
1534
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableOutputTag, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
215
1535
|
}
|
|
216
1536
|
```
|
|
217
1537
|
|
|
1538
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TableOutputTag](./storage.md#interface-tableoutputtag), [TrxToken](./client.md#interface-trxtoken)
|
|
1539
|
+
|
|
218
1540
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
219
1541
|
|
|
220
1542
|
---
|
|
221
|
-
#####
|
|
222
|
-
|
|
223
|
-
```ts
|
|
224
|
-
export
|
|
225
|
-
|
|
226
|
-
|
|
1543
|
+
##### Class: EntityOutputTagMap
|
|
1544
|
+
|
|
1545
|
+
```ts
|
|
1546
|
+
export class EntityOutputTagMap extends EntityBase<TableOutputTagMap> {
|
|
1547
|
+
constructor(api?: TableOutputTagMap)
|
|
1548
|
+
override updateApi(): void
|
|
1549
|
+
get outputTagId()
|
|
1550
|
+
set outputTagId(v: number)
|
|
1551
|
+
get outputId()
|
|
1552
|
+
set outputId(v: number)
|
|
1553
|
+
get created_at()
|
|
1554
|
+
set created_at(v: Date)
|
|
1555
|
+
get updated_at()
|
|
1556
|
+
set updated_at(v: Date)
|
|
1557
|
+
get isDeleted()
|
|
1558
|
+
set isDeleted(v: boolean)
|
|
1559
|
+
override get id(): number
|
|
1560
|
+
override get entityName(): string
|
|
1561
|
+
override get entityTable(): string
|
|
1562
|
+
override equals(ei: TableOutputTagMap, syncMap?: SyncMap | undefined): boolean
|
|
1563
|
+
static async mergeFind(storage: EntityStorage, userId: number, ei: TableOutputTagMap, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
1564
|
+
found: boolean;
|
|
1565
|
+
eo: EntityOutputTagMap;
|
|
1566
|
+
eiId: number;
|
|
1567
|
+
}>
|
|
1568
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
1569
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableOutputTagMap, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
227
1570
|
}
|
|
228
1571
|
```
|
|
229
1572
|
|
|
230
|
-
See also: [
|
|
1573
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TrxToken](./client.md#interface-trxtoken)
|
|
231
1574
|
|
|
232
1575
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
233
1576
|
|
|
234
1577
|
---
|
|
235
|
-
#####
|
|
236
|
-
|
|
237
|
-
```ts
|
|
238
|
-
export
|
|
239
|
-
txid: string
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
1578
|
+
##### Class: EntityProvenTx
|
|
1579
|
+
|
|
1580
|
+
```ts
|
|
1581
|
+
export class EntityProvenTx extends EntityBase<TableProvenTx> {
|
|
1582
|
+
static async fromTxid(txid: string, services: sdk.WalletServices, rawTx?: number[]): Promise<ProvenTxFromTxidResult>
|
|
1583
|
+
constructor(api?: TableProvenTx)
|
|
1584
|
+
override updateApi(): void
|
|
1585
|
+
getMerklePath(): MerklePath
|
|
1586
|
+
_mp?: MerklePath;
|
|
1587
|
+
get provenTxId()
|
|
1588
|
+
set provenTxId(v: number)
|
|
1589
|
+
get created_at()
|
|
1590
|
+
set created_at(v: Date)
|
|
1591
|
+
get updated_at()
|
|
1592
|
+
set updated_at(v: Date)
|
|
1593
|
+
get txid()
|
|
1594
|
+
set txid(v: string)
|
|
1595
|
+
get height()
|
|
1596
|
+
set height(v: number)
|
|
1597
|
+
get index()
|
|
1598
|
+
set index(v: number)
|
|
1599
|
+
get merklePath()
|
|
1600
|
+
set merklePath(v: number[])
|
|
1601
|
+
get rawTx()
|
|
1602
|
+
set rawTx(v: number[])
|
|
1603
|
+
get blockHash()
|
|
1604
|
+
set blockHash(v: string)
|
|
1605
|
+
get merkleRoot()
|
|
1606
|
+
set merkleRoot(v: string)
|
|
1607
|
+
override get id()
|
|
1608
|
+
override set id(v: number)
|
|
1609
|
+
override get entityName(): string
|
|
1610
|
+
override get entityTable(): string
|
|
1611
|
+
override equals(ei: TableProvenTx, syncMap?: SyncMap | undefined): boolean
|
|
1612
|
+
static async mergeFind(storage: EntityStorage, userId: number, ei: TableProvenTx, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
1613
|
+
found: boolean;
|
|
1614
|
+
eo: EntityProvenTx;
|
|
1615
|
+
eiId: number;
|
|
1616
|
+
}>
|
|
1617
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
1618
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableProvenTx, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
1619
|
+
static getProofAttemptsLimit = 8;
|
|
1620
|
+
static getProofMinutes = 60;
|
|
1621
|
+
static async fromReq(req: EntityProvenTxReq, gmpResult: sdk.GetMerklePathResult, countsAsAttempt: boolean): Promise<EntityProvenTx | undefined>
|
|
245
1622
|
}
|
|
246
1623
|
```
|
|
247
1624
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
<summary>Interface PostBeefResultForTxidApi Details</summary>
|
|
1625
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityProvenTxReq](./storage.md#class-entityproventxreq), [EntityStorage](./storage.md#type-entitystorage), [GetMerklePathResult](./client.md#interface-getmerklepathresult), [ProvenTxFromTxidResult](./storage.md#interface-proventxfromtxidresult), [SyncMap](./storage.md#interface-syncmap), [TableProvenTx](./storage.md#interface-tableproventx), [TrxToken](./client.md#interface-trxtoken), [WalletServices](./client.md#interface-walletservices)
|
|
251
1626
|
|
|
252
|
-
###### Property
|
|
253
|
-
|
|
254
|
-
if true, the transaction was already known to this service. Usually treat as a success.
|
|
1627
|
+
###### Property getProofAttemptsLimit
|
|
255
1628
|
|
|
256
|
-
|
|
1629
|
+
How high attempts can go before status is forced to invalid
|
|
257
1630
|
|
|
258
1631
|
```ts
|
|
259
|
-
|
|
1632
|
+
static getProofAttemptsLimit = 8
|
|
260
1633
|
```
|
|
261
1634
|
|
|
262
|
-
###### Property
|
|
1635
|
+
###### Property getProofMinutes
|
|
263
1636
|
|
|
264
|
-
|
|
1637
|
+
How many hours we have to try for a poof
|
|
265
1638
|
|
|
266
1639
|
```ts
|
|
267
|
-
|
|
1640
|
+
static getProofMinutes = 60
|
|
268
1641
|
```
|
|
269
1642
|
|
|
270
|
-
|
|
1643
|
+
###### Method fromReq
|
|
271
1644
|
|
|
272
|
-
|
|
1645
|
+
Try to create a new ProvenTx from a ProvenTxReq and GetMerkleProofResultApi
|
|
273
1646
|
|
|
274
|
-
|
|
275
|
-
##### Interface: PostReqsToNetworkDetails
|
|
1647
|
+
Otherwise it returns undefined and updates req.status to either 'unknown', 'invalid', or 'unconfirmed'
|
|
276
1648
|
|
|
277
1649
|
```ts
|
|
278
|
-
|
|
279
|
-
txid: string;
|
|
280
|
-
req: entity.ProvenTxReq;
|
|
281
|
-
status: PostReqsToNetworkDetailsStatus;
|
|
282
|
-
pbrft: sdk.PostTxResultForTxid;
|
|
283
|
-
data?: string;
|
|
284
|
-
error?: string;
|
|
285
|
-
}
|
|
1650
|
+
static async fromReq(req: EntityProvenTxReq, gmpResult: sdk.GetMerklePathResult, countsAsAttempt: boolean): Promise<EntityProvenTx | undefined>
|
|
286
1651
|
```
|
|
1652
|
+
See also: [EntityProvenTx](./storage.md#class-entityproventx), [EntityProvenTxReq](./storage.md#class-entityproventxreq), [GetMerklePathResult](./client.md#interface-getmerklepathresult)
|
|
287
1653
|
|
|
288
|
-
|
|
1654
|
+
###### Method fromTxid
|
|
289
1655
|
|
|
290
|
-
|
|
1656
|
+
Given a txid and optionally its rawTx, create a new ProvenTx object.
|
|
291
1657
|
|
|
292
|
-
|
|
293
|
-
##### Interface: PostReqsToNetworkResult
|
|
1658
|
+
rawTx is fetched if not provided.
|
|
294
1659
|
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
status: "success" | "error";
|
|
298
|
-
beef: Beef;
|
|
299
|
-
details: PostReqsToNetworkDetails[];
|
|
300
|
-
pbr?: sdk.PostBeefResult;
|
|
301
|
-
log: string;
|
|
302
|
-
}
|
|
303
|
-
```
|
|
1660
|
+
Only succeeds (proven is not undefined) if a proof is confirmed for rawTx,
|
|
1661
|
+
and hash of rawTx is confirmed to match txid
|
|
304
1662
|
|
|
305
|
-
|
|
1663
|
+
The returned ProvenTx and ProvenTxReq objects have not been added to the storage database,
|
|
1664
|
+
this is optional and can be done by the caller if appropriate.
|
|
306
1665
|
|
|
307
|
-
|
|
1666
|
+
```ts
|
|
1667
|
+
static async fromTxid(txid: string, services: sdk.WalletServices, rawTx?: number[]): Promise<ProvenTxFromTxidResult>
|
|
1668
|
+
```
|
|
1669
|
+
See also: [ProvenTxFromTxidResult](./storage.md#interface-proventxfromtxidresult), [WalletServices](./client.md#interface-walletservices)
|
|
308
1670
|
|
|
309
|
-
|
|
310
|
-
##### Interface: StorageInternalizeActionResult
|
|
1671
|
+
###### Method getMerklePath
|
|
311
1672
|
|
|
312
1673
|
```ts
|
|
313
|
-
|
|
314
|
-
isMerge: boolean;
|
|
315
|
-
txid: string;
|
|
316
|
-
satoshis: number;
|
|
317
|
-
}
|
|
1674
|
+
getMerklePath(): MerklePath
|
|
318
1675
|
```
|
|
319
1676
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
<summary>Interface StorageInternalizeActionResult Details</summary>
|
|
1677
|
+
Returns
|
|
323
1678
|
|
|
324
|
-
|
|
1679
|
+
desirialized `MerklePath` object, value is cached.
|
|
325
1680
|
|
|
326
|
-
|
|
1681
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
327
1682
|
|
|
328
|
-
|
|
329
|
-
|
|
1683
|
+
---
|
|
1684
|
+
##### Class: EntityProvenTxReq
|
|
1685
|
+
|
|
1686
|
+
```ts
|
|
1687
|
+
export class EntityProvenTxReq extends EntityBase<TableProvenTxReq> {
|
|
1688
|
+
static async fromStorageTxid(storage: EntityStorage, txid: string, trx?: sdk.TrxToken): Promise<EntityProvenTxReq | undefined>
|
|
1689
|
+
static async fromStorageId(storage: EntityStorage, id: number, trx?: sdk.TrxToken): Promise<EntityProvenTxReq>
|
|
1690
|
+
static fromTxid(txid: string, rawTx: number[], inputBEEF?: number[]): EntityProvenTxReq
|
|
1691
|
+
history: ProvenTxReqHistory;
|
|
1692
|
+
notify: ProvenTxReqNotify;
|
|
1693
|
+
packApiHistory()
|
|
1694
|
+
packApiNotify()
|
|
1695
|
+
unpackApiHistory()
|
|
1696
|
+
unpackApiNotify()
|
|
1697
|
+
get apiHistory(): string
|
|
1698
|
+
get apiNotify(): string
|
|
1699
|
+
set apiHistory(v: string)
|
|
1700
|
+
set apiNotify(v: string)
|
|
1701
|
+
updateApi(): void
|
|
1702
|
+
unpackApi(): void
|
|
1703
|
+
async refreshFromStorage(storage: EntityStorage | WalletStorageManager): Promise<void>
|
|
1704
|
+
constructor(api?: TableProvenTxReq)
|
|
1705
|
+
historySince(since: Date): ProvenTxReqHistory
|
|
1706
|
+
historyPretty(since?: Date, indent = 0): string
|
|
1707
|
+
getHistorySummary(): ProvenTxReqHistorySummaryApi
|
|
1708
|
+
parseHistoryNote(note: string, summary?: ProvenTxReqHistorySummaryApi): string
|
|
1709
|
+
addNotifyTransactionId(id: number)
|
|
1710
|
+
addHistoryNote<T extends {
|
|
1711
|
+
what: string;
|
|
1712
|
+
}>(note: string | T, when?: Date, noDupes?: boolean)
|
|
1713
|
+
async updateStorage(storage: EntityStorage, trx?: sdk.TrxToken)
|
|
1714
|
+
async updateStorageDynamicProperties(storage: WalletStorageManager | StorageProvider, trx?: sdk.TrxToken)
|
|
1715
|
+
async insertOrMerge(storage: EntityStorage, trx?: sdk.TrxToken): Promise<EntityProvenTxReq>
|
|
1716
|
+
get status()
|
|
1717
|
+
set status(v: sdk.ProvenTxReqStatus)
|
|
1718
|
+
get provenTxReqId()
|
|
1719
|
+
set provenTxReqId(v: number)
|
|
1720
|
+
get created_at()
|
|
1721
|
+
set created_at(v: Date)
|
|
1722
|
+
get updated_at()
|
|
1723
|
+
set updated_at(v: Date)
|
|
1724
|
+
get txid()
|
|
1725
|
+
set txid(v: string)
|
|
1726
|
+
get inputBEEF()
|
|
1727
|
+
set inputBEEF(v: number[] | undefined)
|
|
1728
|
+
get rawTx()
|
|
1729
|
+
set rawTx(v: number[])
|
|
1730
|
+
get attempts()
|
|
1731
|
+
set attempts(v: number)
|
|
1732
|
+
get provenTxId()
|
|
1733
|
+
set provenTxId(v: number | undefined)
|
|
1734
|
+
get notified()
|
|
1735
|
+
set notified(v: boolean)
|
|
1736
|
+
get batch()
|
|
1737
|
+
set batch(v: string | undefined)
|
|
1738
|
+
override get id()
|
|
1739
|
+
override set id(v: number)
|
|
1740
|
+
override get entityName(): string
|
|
1741
|
+
override get entityTable(): string
|
|
1742
|
+
override equals(ei: TableProvenTxReq, syncMap?: SyncMap | undefined): boolean
|
|
1743
|
+
static async mergeFind(storage: EntityStorage, userId: number, ei: TableProvenTxReq, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
1744
|
+
found: boolean;
|
|
1745
|
+
eo: EntityProvenTxReq;
|
|
1746
|
+
eiId: number;
|
|
1747
|
+
}>
|
|
1748
|
+
mapNotifyTransactionIds(syncMap: SyncMap): void
|
|
1749
|
+
mergeNotifyTransactionIds(ei: TableProvenTxReq, syncMap?: SyncMap): void
|
|
1750
|
+
mergeHistory(ei: TableProvenTxReq, syncMap?: SyncMap, noDupes?: boolean): void
|
|
1751
|
+
static isTerminalStatus(status: sdk.ProvenTxReqStatus): boolean
|
|
1752
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
1753
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableProvenTxReq, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
1754
|
+
}
|
|
330
1755
|
```
|
|
331
1756
|
|
|
332
|
-
|
|
1757
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [ProvenTxReqHistory](./storage.md#interface-proventxreqhistory), [ProvenTxReqHistorySummaryApi](./storage.md#interface-proventxreqhistorysummaryapi), [ProvenTxReqNotify](./storage.md#interface-proventxreqnotify), [ProvenTxReqStatus](./client.md#type-proventxreqstatus), [StorageProvider](./storage.md#class-storageprovider), [SyncMap](./storage.md#interface-syncmap), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TrxToken](./client.md#interface-trxtoken), [WalletStorageManager](./storage.md#class-walletstoragemanager)
|
|
333
1758
|
|
|
334
|
-
|
|
1759
|
+
###### Method equals
|
|
1760
|
+
|
|
1761
|
+
'convergent' equality must satisfy (A sync B) equals (B sync A)
|
|
335
1762
|
|
|
336
1763
|
```ts
|
|
337
|
-
|
|
1764
|
+
override equals(ei: TableProvenTxReq, syncMap?: SyncMap | undefined): boolean
|
|
338
1765
|
```
|
|
1766
|
+
See also: [SyncMap](./storage.md#interface-syncmap), [TableProvenTxReq](./storage.md#interface-tableproventxreq)
|
|
339
1767
|
|
|
340
|
-
######
|
|
1768
|
+
###### Method historySince
|
|
341
1769
|
|
|
342
|
-
|
|
1770
|
+
Returns history to only what followed since date.
|
|
343
1771
|
|
|
344
1772
|
```ts
|
|
345
|
-
|
|
1773
|
+
historySince(since: Date): ProvenTxReqHistory
|
|
346
1774
|
```
|
|
1775
|
+
See also: [ProvenTxReqHistory](./storage.md#interface-proventxreqhistory)
|
|
347
1776
|
|
|
348
|
-
|
|
1777
|
+
###### Method mergeExisting
|
|
349
1778
|
|
|
350
|
-
|
|
1779
|
+
When merging `ProvenTxReq`, care is taken to avoid short-cirtuiting notification: `status` must not transition to `completed` without
|
|
1780
|
+
passing through `notifying`. Thus a full convergent merge passes through these sequence steps:
|
|
1781
|
+
1. Remote storage completes before local storage.
|
|
1782
|
+
2. The remotely completed req and ProvenTx sync to local storage.
|
|
1783
|
+
3. The local storage transitions to `notifying`, after merging the remote attempts and history.
|
|
1784
|
+
4. The local storage notifies, transitioning to `completed`.
|
|
1785
|
+
5. Having been updated, the local req, but not ProvenTx sync to remote storage, but do not merge because the earlier `completed` wins.
|
|
1786
|
+
6. Convergent equality is achieved (completing work - history and attempts are equal)
|
|
351
1787
|
|
|
352
|
-
|
|
353
|
-
##### Interface: StorageKnexOptions
|
|
1788
|
+
On terminal failure: `doubleSpend` trumps `invalid` as it contains more data.
|
|
354
1789
|
|
|
355
1790
|
```ts
|
|
356
|
-
|
|
357
|
-
knex: Knex;
|
|
358
|
-
}
|
|
1791
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableProvenTxReq, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
359
1792
|
```
|
|
1793
|
+
See also: [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TrxToken](./client.md#interface-trxtoken)
|
|
360
1794
|
|
|
361
|
-
|
|
1795
|
+
###### Method updateStorage
|
|
362
1796
|
|
|
363
|
-
|
|
1797
|
+
Updates database record with current state of this EntityUser
|
|
364
1798
|
|
|
365
|
-
|
|
1799
|
+
```ts
|
|
1800
|
+
async updateStorage(storage: EntityStorage, trx?: sdk.TrxToken)
|
|
1801
|
+
```
|
|
1802
|
+
See also: [EntityStorage](./storage.md#type-entitystorage), [TrxToken](./client.md#interface-trxtoken)
|
|
366
1803
|
|
|
367
|
-
######
|
|
1804
|
+
###### Method updateStorageDynamicProperties
|
|
368
1805
|
|
|
369
|
-
|
|
1806
|
+
Update storage with changes to non-static properties:
|
|
1807
|
+
updated_at
|
|
1808
|
+
provenTxId
|
|
1809
|
+
status
|
|
1810
|
+
history
|
|
1811
|
+
notify
|
|
1812
|
+
notified
|
|
1813
|
+
attempts
|
|
1814
|
+
batch
|
|
370
1815
|
|
|
371
1816
|
```ts
|
|
372
|
-
|
|
1817
|
+
async updateStorageDynamicProperties(storage: WalletStorageManager | StorageProvider, trx?: sdk.TrxToken)
|
|
373
1818
|
```
|
|
374
|
-
|
|
375
|
-
</details>
|
|
1819
|
+
See also: [StorageProvider](./storage.md#class-storageprovider), [TrxToken](./client.md#interface-trxtoken), [WalletStorageManager](./storage.md#class-walletstoragemanager)
|
|
376
1820
|
|
|
377
1821
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
378
1822
|
|
|
379
1823
|
---
|
|
380
|
-
#####
|
|
381
|
-
|
|
382
|
-
```ts
|
|
383
|
-
export
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
1824
|
+
##### Class: EntitySyncState
|
|
1825
|
+
|
|
1826
|
+
```ts
|
|
1827
|
+
export class EntitySyncState extends EntityBase<TableSyncState> {
|
|
1828
|
+
constructor(api?: TableSyncState)
|
|
1829
|
+
validateSyncMap(sm: SyncMap)
|
|
1830
|
+
static async fromStorage(storage: sdk.WalletStorageSync, userIdentityKey: string, remoteSettings: TableSettings): Promise<EntitySyncState>
|
|
1831
|
+
async updateStorage(storage: EntityStorage, notSyncMap?: boolean, trx?: sdk.TrxToken)
|
|
1832
|
+
override updateApi(notSyncMap?: boolean): void
|
|
1833
|
+
set created_at(v: Date)
|
|
1834
|
+
get created_at()
|
|
1835
|
+
set updated_at(v: Date)
|
|
1836
|
+
get updated_at()
|
|
1837
|
+
set userId(v: number)
|
|
1838
|
+
get userId()
|
|
1839
|
+
set storageIdentityKey(v: string)
|
|
1840
|
+
get storageIdentityKey()
|
|
1841
|
+
set storageName(v: string)
|
|
1842
|
+
get storageName()
|
|
1843
|
+
set init(v: boolean)
|
|
1844
|
+
get init()
|
|
1845
|
+
set refNum(v: string)
|
|
1846
|
+
get refNum()
|
|
1847
|
+
set status(v: sdk.SyncStatus)
|
|
1848
|
+
get status(): sdk.SyncStatus
|
|
1849
|
+
set when(v: Date | undefined)
|
|
1850
|
+
get when()
|
|
1851
|
+
set satoshis(v: number | undefined)
|
|
1852
|
+
get satoshis()
|
|
1853
|
+
get apiErrorLocal()
|
|
1854
|
+
get apiErrorOther()
|
|
1855
|
+
get apiSyncMap()
|
|
1856
|
+
override get id(): number
|
|
1857
|
+
set id(id: number)
|
|
1858
|
+
override get entityName(): string
|
|
1859
|
+
override get entityTable(): string
|
|
1860
|
+
static mergeIdMap(fromMap: Record<number, number>, toMap: Record<number, number>)
|
|
1861
|
+
mergeSyncMap(iSyncMap: SyncMap)
|
|
1862
|
+
errorLocal: SyncError | undefined;
|
|
1863
|
+
errorOther: SyncError | undefined;
|
|
1864
|
+
syncMap: SyncMap;
|
|
1865
|
+
override equals(ei: TableSyncState, syncMap?: SyncMap | undefined): boolean
|
|
1866
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
1867
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableSyncState, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
1868
|
+
makeRequestSyncChunkArgs(forIdentityKey: string, forStorageIdentityKey: string, maxRoughSize?: number, maxItems?: number): sdk.RequestSyncChunkArgs
|
|
1869
|
+
async processSyncChunk(writer: EntityStorage, args: sdk.RequestSyncChunkArgs, chunk: sdk.SyncChunk): Promise<{
|
|
1870
|
+
done: boolean;
|
|
1871
|
+
maxUpdated_at: Date | undefined;
|
|
1872
|
+
updates: number;
|
|
1873
|
+
inserts: number;
|
|
1874
|
+
}>
|
|
388
1875
|
}
|
|
389
1876
|
```
|
|
390
1877
|
|
|
391
|
-
See also: [
|
|
1878
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [SyncChunk](./client.md#interface-syncchunk), [SyncError](./storage.md#interface-syncerror), [SyncMap](./storage.md#interface-syncmap), [SyncStatus](./client.md#type-syncstatus), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TrxToken](./client.md#interface-trxtoken), [WalletStorageSync](./client.md#interface-walletstoragesync)
|
|
392
1879
|
|
|
393
|
-
|
|
1880
|
+
###### Method mergeSyncMap
|
|
394
1881
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
###### Property commissionPubKeyHex
|
|
398
|
-
|
|
399
|
-
If commissionSatoshis is greater than zero, must be a valid public key hex string.
|
|
400
|
-
The actual locking script for each commission will use a public key derived
|
|
401
|
-
from this key by information stored in the commissions table.
|
|
1882
|
+
Merge additions to the syncMap
|
|
402
1883
|
|
|
403
1884
|
```ts
|
|
404
|
-
|
|
1885
|
+
mergeSyncMap(iSyncMap: SyncMap)
|
|
405
1886
|
```
|
|
1887
|
+
See also: [SyncMap](./storage.md#interface-syncmap)
|
|
406
1888
|
|
|
407
|
-
######
|
|
1889
|
+
###### Method updateStorage
|
|
408
1890
|
|
|
409
|
-
|
|
410
|
-
A value of zero disables commission fees.
|
|
1891
|
+
Handles both insert and update based on id value: zero indicates insert.
|
|
411
1892
|
|
|
412
1893
|
```ts
|
|
413
|
-
|
|
1894
|
+
async updateStorage(storage: EntityStorage, notSyncMap?: boolean, trx?: sdk.TrxToken)
|
|
414
1895
|
```
|
|
1896
|
+
See also: [EntityStorage](./storage.md#type-entitystorage), [TrxToken](./client.md#interface-trxtoken)
|
|
1897
|
+
|
|
1898
|
+
Argument Details
|
|
415
1899
|
|
|
416
|
-
|
|
1900
|
+
+ **notSyncMap**
|
|
1901
|
+
+ if not new and true, excludes updating syncMap in storage.
|
|
417
1902
|
|
|
418
1903
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
419
1904
|
|
|
420
1905
|
---
|
|
421
|
-
#####
|
|
1906
|
+
##### Class: EntityTransaction
|
|
1907
|
+
|
|
1908
|
+
```ts
|
|
1909
|
+
export class EntityTransaction extends EntityBase<TableTransaction> {
|
|
1910
|
+
getBsvTx(): BsvTransaction | undefined
|
|
1911
|
+
getBsvTxIns(): TransactionInput[]
|
|
1912
|
+
async getInputs(storage: EntityStorage, trx?: sdk.TrxToken): Promise<TableOutput[]>
|
|
1913
|
+
constructor(api?: TableTransaction)
|
|
1914
|
+
override updateApi(): void
|
|
1915
|
+
get transactionId()
|
|
1916
|
+
set transactionId(v: number)
|
|
1917
|
+
get created_at()
|
|
1918
|
+
set created_at(v: Date)
|
|
1919
|
+
get updated_at()
|
|
1920
|
+
set updated_at(v: Date)
|
|
1921
|
+
get version()
|
|
1922
|
+
set version(v: number | undefined)
|
|
1923
|
+
get lockTime()
|
|
1924
|
+
set lockTime(v: number | undefined)
|
|
1925
|
+
get isOutgoing()
|
|
1926
|
+
set isOutgoing(v: boolean)
|
|
1927
|
+
get status()
|
|
1928
|
+
set status(v: sdk.TransactionStatus)
|
|
1929
|
+
get userId()
|
|
1930
|
+
set userId(v: number)
|
|
1931
|
+
get provenTxId()
|
|
1932
|
+
set provenTxId(v: number | undefined)
|
|
1933
|
+
get satoshis()
|
|
1934
|
+
set satoshis(v: number)
|
|
1935
|
+
get txid()
|
|
1936
|
+
set txid(v: string | undefined)
|
|
1937
|
+
get reference()
|
|
1938
|
+
set reference(v: string)
|
|
1939
|
+
get inputBEEF()
|
|
1940
|
+
set inputBEEF(v: number[] | undefined)
|
|
1941
|
+
get description()
|
|
1942
|
+
set description(v: string)
|
|
1943
|
+
get rawTx()
|
|
1944
|
+
set rawTx(v: number[] | undefined)
|
|
1945
|
+
override get id(): number
|
|
1946
|
+
override set id(v: number)
|
|
1947
|
+
override get entityName(): string
|
|
1948
|
+
override get entityTable(): string
|
|
1949
|
+
override equals(ei: TableTransaction, syncMap?: SyncMap | undefined): boolean
|
|
1950
|
+
static async mergeFind(storage: EntityStorage, userId: number, ei: TableTransaction, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
1951
|
+
found: boolean;
|
|
1952
|
+
eo: EntityTransaction;
|
|
1953
|
+
eiId: number;
|
|
1954
|
+
}>
|
|
1955
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
1956
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableTransaction, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
1957
|
+
async getProvenTx(storage: EntityStorage, trx?: sdk.TrxToken): Promise<EntityProvenTx | undefined>
|
|
1958
|
+
}
|
|
1959
|
+
```
|
|
1960
|
+
|
|
1961
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityProvenTx](./storage.md#class-entityproventx), [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TableOutput](./storage.md#interface-tableoutput), [TableTransaction](./storage.md#interface-tabletransaction), [TransactionStatus](./client.md#type-transactionstatus), [TrxToken](./client.md#interface-trxtoken)
|
|
1962
|
+
|
|
1963
|
+
###### Method getBsvTxIns
|
|
422
1964
|
|
|
423
1965
|
```ts
|
|
424
|
-
|
|
425
|
-
chain: sdk.Chain;
|
|
426
|
-
}
|
|
1966
|
+
getBsvTxIns(): TransactionInput[]
|
|
427
1967
|
```
|
|
428
1968
|
|
|
429
|
-
|
|
1969
|
+
Returns
|
|
430
1970
|
|
|
431
|
-
|
|
1971
|
+
array of
|
|
432
1972
|
|
|
433
|
-
|
|
434
|
-
|
|
1973
|
+
###### Method getInputs
|
|
1974
|
+
|
|
1975
|
+
Returns an array of "known" inputs to this transaction which belong to the same userId.
|
|
1976
|
+
Uses both spentBy and rawTx inputs (if available) to locate inputs from among user's outputs.
|
|
1977
|
+
Not all transaction inputs correspond to prior storage outputs.
|
|
435
1978
|
|
|
436
1979
|
```ts
|
|
437
|
-
|
|
438
|
-
}
|
|
1980
|
+
async getInputs(storage: EntityStorage, trx?: sdk.TrxToken): Promise<TableOutput[]>
|
|
439
1981
|
```
|
|
440
|
-
|
|
441
|
-
See also: [StorageReaderOptions](#interface-storagereaderoptions)
|
|
1982
|
+
See also: [EntityStorage](./storage.md#type-entitystorage), [TableOutput](./storage.md#interface-tableoutput), [TrxToken](./client.md#interface-trxtoken)
|
|
442
1983
|
|
|
443
1984
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
444
1985
|
|
|
445
1986
|
---
|
|
446
|
-
#####
|
|
447
|
-
|
|
448
|
-
```ts
|
|
449
|
-
export
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
1987
|
+
##### Class: EntityTxLabel
|
|
1988
|
+
|
|
1989
|
+
```ts
|
|
1990
|
+
export class EntityTxLabel extends EntityBase<TableTxLabel> {
|
|
1991
|
+
constructor(api?: TableTxLabel)
|
|
1992
|
+
override updateApi(): void
|
|
1993
|
+
get txLabelId()
|
|
1994
|
+
set txLabelId(v: number)
|
|
1995
|
+
get created_at()
|
|
1996
|
+
set created_at(v: Date)
|
|
1997
|
+
get updated_at()
|
|
1998
|
+
set updated_at(v: Date)
|
|
1999
|
+
get label()
|
|
2000
|
+
set label(v: string)
|
|
2001
|
+
get userId()
|
|
2002
|
+
set userId(v: number)
|
|
2003
|
+
get isDeleted()
|
|
2004
|
+
set isDeleted(v: boolean)
|
|
2005
|
+
override get id(): number
|
|
2006
|
+
override set id(v: number)
|
|
2007
|
+
override get entityName(): string
|
|
2008
|
+
override get entityTable(): string
|
|
2009
|
+
override equals(ei: TableTxLabel, syncMap?: SyncMap): boolean
|
|
2010
|
+
static async mergeFind(storage: EntityStorage, userId: number, ei: TableTxLabel, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
2011
|
+
found: boolean;
|
|
2012
|
+
eo: EntityTxLabel;
|
|
2013
|
+
eiId: number;
|
|
2014
|
+
}>
|
|
2015
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
2016
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableTxLabel, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
454
2017
|
}
|
|
455
2018
|
```
|
|
456
2019
|
|
|
457
|
-
See also: [
|
|
2020
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TableTxLabel](./storage.md#interface-tabletxlabel), [TrxToken](./client.md#interface-trxtoken)
|
|
458
2021
|
|
|
459
2022
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
460
2023
|
|
|
461
2024
|
---
|
|
462
|
-
#####
|
|
463
|
-
|
|
464
|
-
```ts
|
|
465
|
-
export
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
2025
|
+
##### Class: EntityTxLabelMap
|
|
2026
|
+
|
|
2027
|
+
```ts
|
|
2028
|
+
export class EntityTxLabelMap extends EntityBase<TableTxLabelMap> {
|
|
2029
|
+
constructor(api?: TableTxLabelMap)
|
|
2030
|
+
override updateApi(): void
|
|
2031
|
+
get txLabelId()
|
|
2032
|
+
set txLabelId(v: number)
|
|
2033
|
+
get transactionId()
|
|
2034
|
+
set transactionId(v: number)
|
|
2035
|
+
get created_at()
|
|
2036
|
+
set created_at(v: Date)
|
|
2037
|
+
get updated_at()
|
|
2038
|
+
set updated_at(v: Date)
|
|
2039
|
+
get isDeleted()
|
|
2040
|
+
set isDeleted(v: boolean)
|
|
2041
|
+
override get id(): number
|
|
2042
|
+
override get entityName(): string
|
|
2043
|
+
override get entityTable(): string
|
|
2044
|
+
override equals(ei: TableTxLabelMap, syncMap?: SyncMap | undefined): boolean
|
|
2045
|
+
static async mergeFind(storage: EntityStorage, userId: number, ei: TableTxLabelMap, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
2046
|
+
found: boolean;
|
|
2047
|
+
eo: EntityTxLabelMap;
|
|
2048
|
+
eiId: number;
|
|
2049
|
+
}>
|
|
2050
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
2051
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableTxLabelMap, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
471
2052
|
}
|
|
472
2053
|
```
|
|
473
2054
|
|
|
474
|
-
See also: [
|
|
2055
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TrxToken](./client.md#interface-trxtoken)
|
|
475
2056
|
|
|
476
2057
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
477
2058
|
|
|
478
2059
|
---
|
|
479
|
-
|
|
2060
|
+
##### Class: EntityUser
|
|
2061
|
+
|
|
2062
|
+
```ts
|
|
2063
|
+
export class EntityUser extends EntityBase<TableUser> {
|
|
2064
|
+
constructor(api?: TableUser)
|
|
2065
|
+
override updateApi(): void
|
|
2066
|
+
get userId()
|
|
2067
|
+
set userId(v: number)
|
|
2068
|
+
get created_at()
|
|
2069
|
+
set created_at(v: Date)
|
|
2070
|
+
get updated_at()
|
|
2071
|
+
set updated_at(v: Date)
|
|
2072
|
+
get identityKey()
|
|
2073
|
+
set identityKey(v: string)
|
|
2074
|
+
get activeStorage()
|
|
2075
|
+
set activeStorage(v: string | undefined)
|
|
2076
|
+
override get id(): number
|
|
2077
|
+
override set id(v: number)
|
|
2078
|
+
override get entityName(): string
|
|
2079
|
+
override get entityTable(): string
|
|
2080
|
+
override equals(ei: TableUser, syncMap?: SyncMap | undefined): boolean
|
|
2081
|
+
static async mergeFind(storage: EntityStorage, userId: number, ei: TableUser, trx?: sdk.TrxToken): Promise<{
|
|
2082
|
+
found: boolean;
|
|
2083
|
+
eo: EntityUser;
|
|
2084
|
+
eiId: number;
|
|
2085
|
+
}>
|
|
2086
|
+
override async mergeNew(storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<void>
|
|
2087
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableUser, syncMap?: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
2088
|
+
}
|
|
2089
|
+
```
|
|
480
2090
|
|
|
481
|
-
|
|
482
|
-
| --- |
|
|
483
|
-
| [KnexMigrations](#class-knexmigrations) |
|
|
484
|
-
| [StorageClient](#class-storageclient) |
|
|
485
|
-
| [StorageKnex](#class-storageknex) |
|
|
486
|
-
| [StorageProvider](#class-storageprovider) |
|
|
487
|
-
| [StorageReader](#class-storagereader) |
|
|
488
|
-
| [StorageReaderWriter](#class-storagereaderwriter) |
|
|
489
|
-
| [StorageServer](#class-storageserver) |
|
|
490
|
-
| [StorageSyncReader](#class-storagesyncreader) |
|
|
491
|
-
| [WalletStorageManager](#class-walletstoragemanager) |
|
|
2091
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken)
|
|
492
2092
|
|
|
493
2093
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
494
2094
|
|
|
495
2095
|
---
|
|
496
|
-
|
|
497
2096
|
##### Class: KnexMigrations
|
|
498
2097
|
|
|
499
2098
|
```ts
|
|
@@ -534,18 +2133,14 @@ export class KnexMigrations implements MigrationSource<string> {
|
|
|
534
2133
|
}
|
|
535
2134
|
```
|
|
536
2135
|
|
|
537
|
-
See also: [Chain](#type-chain), [DBType](#type-dbtype), [WERR_NOT_IMPLEMENTED](#class-werr_not_implemented), [WalletError](#class-walleterror)
|
|
538
|
-
|
|
539
|
-
<details>
|
|
540
|
-
|
|
541
|
-
<summary>Class KnexMigrations Details</summary>
|
|
2136
|
+
See also: [Chain](./client.md#type-chain), [DBType](./storage.md#type-dbtype), [WERR_NOT_IMPLEMENTED](./client.md#class-werr_not_implemented), [WalletError](./client.md#class-walleterror)
|
|
542
2137
|
|
|
543
2138
|
###### Constructor
|
|
544
2139
|
|
|
545
2140
|
```ts
|
|
546
2141
|
constructor(public chain: sdk.Chain, public storageName: string, public storageIdentityKey: string, public maxOutputScriptLength: number)
|
|
547
2142
|
```
|
|
548
|
-
See also: [Chain](#type-chain)
|
|
2143
|
+
See also: [Chain](./client.md#type-chain)
|
|
549
2144
|
|
|
550
2145
|
Argument Details
|
|
551
2146
|
|
|
@@ -559,13 +2154,49 @@ Argument Details
|
|
|
559
2154
|
```ts
|
|
560
2155
|
static async dbtype(knex: Knex<any, any[]>): Promise<DBType>
|
|
561
2156
|
```
|
|
562
|
-
See also: [DBType](#type-dbtype)
|
|
2157
|
+
See also: [DBType](./storage.md#type-dbtype)
|
|
563
2158
|
|
|
564
2159
|
Returns
|
|
565
2160
|
|
|
566
2161
|
connected database engine variant
|
|
567
2162
|
|
|
568
|
-
|
|
2163
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2164
|
+
|
|
2165
|
+
---
|
|
2166
|
+
##### Class: MergeEntity
|
|
2167
|
+
|
|
2168
|
+
```ts
|
|
2169
|
+
export class MergeEntity<API extends sdk.EntityTimeStamp, DE extends EntityBase<API>> {
|
|
2170
|
+
idMap: Record<number, number>;
|
|
2171
|
+
constructor(public stateArray: API[] | undefined, public find: (storage: EntityStorage, userId: number, ei: API, syncMap: SyncMap, trx?: sdk.TrxToken) => Promise<{
|
|
2172
|
+
found: boolean;
|
|
2173
|
+
eo: DE;
|
|
2174
|
+
eiId: number;
|
|
2175
|
+
}>, public esm: EntitySyncMap)
|
|
2176
|
+
updateSyncMap(map: Record<number, number>, inId: number, outId: number)
|
|
2177
|
+
async merge(since: Date | undefined, storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
2178
|
+
inserts: number;
|
|
2179
|
+
updates: number;
|
|
2180
|
+
}>
|
|
2181
|
+
}
|
|
2182
|
+
```
|
|
2183
|
+
|
|
2184
|
+
See also: [EntityBase](./storage.md#class-entitybase), [EntityStorage](./storage.md#type-entitystorage), [EntitySyncMap](./storage.md#interface-entitysyncmap), [EntityTimeStamp](./client.md#interface-entitytimestamp), [SyncMap](./storage.md#interface-syncmap), [TrxToken](./client.md#interface-trxtoken)
|
|
2185
|
+
|
|
2186
|
+
###### Method merge
|
|
2187
|
+
|
|
2188
|
+
```ts
|
|
2189
|
+
async merge(since: Date | undefined, storage: EntityStorage, userId: number, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<{
|
|
2190
|
+
inserts: number;
|
|
2191
|
+
updates: number;
|
|
2192
|
+
}>
|
|
2193
|
+
```
|
|
2194
|
+
See also: [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TrxToken](./client.md#interface-trxtoken)
|
|
2195
|
+
|
|
2196
|
+
Argument Details
|
|
2197
|
+
|
|
2198
|
+
+ **since**
|
|
2199
|
+
+ date of current sync chunk
|
|
569
2200
|
|
|
570
2201
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
571
2202
|
|
|
@@ -574,12 +2205,12 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
574
2205
|
|
|
575
2206
|
```ts
|
|
576
2207
|
export class StorageClient implements sdk.WalletStorageProvider {
|
|
577
|
-
public settings?:
|
|
2208
|
+
public settings?: TableSettings;
|
|
578
2209
|
constructor(wallet: WalletInterface, endpointUrl: string)
|
|
579
2210
|
isStorageProvider(): boolean
|
|
580
2211
|
isAvailable(): boolean
|
|
581
|
-
getSettings():
|
|
582
|
-
async makeAvailable(): Promise<
|
|
2212
|
+
getSettings(): TableSettings
|
|
2213
|
+
async makeAvailable(): Promise<TableSettings>
|
|
583
2214
|
async destroy(): Promise<void>
|
|
584
2215
|
async migrate(storageName: string, storageIdentityKey: string): Promise<string>
|
|
585
2216
|
getServices(): sdk.WalletServices
|
|
@@ -589,21 +2220,21 @@ export class StorageClient implements sdk.WalletStorageProvider {
|
|
|
589
2220
|
async processAction(auth: sdk.AuthId, args: sdk.StorageProcessActionArgs): Promise<sdk.StorageProcessActionResults>
|
|
590
2221
|
async abortAction(auth: sdk.AuthId, args: AbortActionArgs): Promise<AbortActionResult>
|
|
591
2222
|
async findOrInsertUser(identityKey): Promise<{
|
|
592
|
-
user:
|
|
2223
|
+
user: TableUser;
|
|
593
2224
|
isNew: boolean;
|
|
594
2225
|
}>
|
|
595
2226
|
async findOrInsertSyncStateAuth(auth: sdk.AuthId, storageIdentityKey: string, storageName: string): Promise<{
|
|
596
|
-
syncState:
|
|
2227
|
+
syncState: TableSyncState;
|
|
597
2228
|
isNew: boolean;
|
|
598
2229
|
}>
|
|
599
|
-
async insertCertificateAuth(auth: sdk.AuthId, certificate:
|
|
2230
|
+
async insertCertificateAuth(auth: sdk.AuthId, certificate: TableCertificateX): Promise<number>
|
|
600
2231
|
async listActions(auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
|
|
601
2232
|
async listOutputs(auth: sdk.AuthId, vargs: sdk.ValidListOutputsArgs): Promise<ListOutputsResult>
|
|
602
2233
|
async listCertificates(auth: sdk.AuthId, vargs: sdk.ValidListCertificatesArgs): Promise<ListCertificatesResult>
|
|
603
|
-
async findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<
|
|
604
|
-
async findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<
|
|
605
|
-
async findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<
|
|
606
|
-
findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<
|
|
2234
|
+
async findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<TableCertificate[]>
|
|
2235
|
+
async findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
|
|
2236
|
+
async findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<TableOutput[]>
|
|
2237
|
+
findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>
|
|
607
2238
|
async relinquishCertificate(auth: sdk.AuthId, args: RelinquishCertificateArgs): Promise<number>
|
|
608
2239
|
async relinquishOutput(auth: sdk.AuthId, args: RelinquishOutputArgs): Promise<number>
|
|
609
2240
|
async processSyncChunk(args: sdk.RequestSyncChunkArgs, chunk: sdk.SyncChunk): Promise<sdk.ProcessSyncChunkResult>
|
|
@@ -613,7 +2244,7 @@ export class StorageClient implements sdk.WalletStorageProvider {
|
|
|
613
2244
|
}
|
|
614
2245
|
```
|
|
615
2246
|
|
|
616
|
-
See also: [AuthId](#interface-authid), [FindCertificatesArgs](#interface-findcertificatesargs), [FindOutputBasketsArgs](#interface-findoutputbasketsargs), [FindOutputsArgs](#interface-findoutputsargs), [FindProvenTxReqsArgs](#interface-findproventxreqsargs), [ProcessSyncChunkResult](#interface-processsyncchunkresult), [RequestSyncChunkArgs](#interface-requestsyncchunkargs), [StorageCreateActionResult](#interface-storagecreateactionresult), [StorageProcessActionArgs](#interface-storageprocessactionargs), [StorageProcessActionResults](#interface-storageprocessactionresults), [SyncChunk](#interface-syncchunk), [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs), [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult), [ValidCreateActionArgs](#interface-validcreateactionargs), [ValidListActionsArgs](#interface-validlistactionsargs), [ValidListCertificatesArgs](#interface-validlistcertificatesargs), [ValidListOutputsArgs](#interface-validlistoutputsargs), [WalletServices](#interface-walletservices), [WalletStorageProvider](#interface-walletstorageprovider), [createAction](#function-createaction), [getSyncChunk](#function-getsyncchunk), [internalizeAction](#function-internalizeaction), [listActions](#function-listactions), [listCertificates](#function-listcertificates), [listOutputs](#function-listoutputs), [processAction](#function-processaction)
|
|
2247
|
+
See also: [AuthId](./client.md#interface-authid), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [ProcessSyncChunkResult](./client.md#interface-processsyncchunkresult), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [SyncChunk](./client.md#interface-syncchunk), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableUser](./storage.md#interface-tableuser), [UpdateProvenTxReqWithNewProvenTxArgs](./client.md#interface-updateproventxreqwithnewproventxargs), [UpdateProvenTxReqWithNewProvenTxResult](./client.md#interface-updateproventxreqwithnewproventxresult), [ValidCreateActionArgs](./client.md#interface-validcreateactionargs), [ValidListActionsArgs](./client.md#interface-validlistactionsargs), [ValidListCertificatesArgs](./client.md#interface-validlistcertificatesargs), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs), [WalletServices](./client.md#interface-walletservices), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [createAction](./storage.md#function-createaction), [getSyncChunk](./storage.md#function-getsyncchunk), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [processAction](./storage.md#function-processaction)
|
|
617
2248
|
|
|
618
2249
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
619
2250
|
|
|
@@ -624,51 +2255,51 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
624
2255
|
export class StorageKnex extends StorageProvider implements sdk.WalletStorageProvider {
|
|
625
2256
|
knex: Knex;
|
|
626
2257
|
constructor(options: StorageKnexOptions)
|
|
627
|
-
async readSettings(): Promise<
|
|
2258
|
+
async readSettings(): Promise<TableSettings>
|
|
628
2259
|
override async getProvenOrRawTx(txid: string, trx?: sdk.TrxToken): Promise<sdk.ProvenOrRawTx>
|
|
629
2260
|
dbTypeSubstring(source: string, fromOffset: number, forLength?: number)
|
|
630
2261
|
override async getRawTxOfKnownValidTransaction(txid?: string, offset?: number, length?: number, trx?: sdk.TrxToken): Promise<number[] | undefined>
|
|
631
2262
|
getProvenTxsForUserQuery(args: sdk.FindForUserSincePagedArgs): Knex.QueryBuilder
|
|
632
|
-
override async getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
2263
|
+
override async getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTx[]>
|
|
633
2264
|
getProvenTxReqsForUserQuery(args: sdk.FindForUserSincePagedArgs): Knex.QueryBuilder
|
|
634
|
-
override async getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
2265
|
+
override async getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTxReq[]>
|
|
635
2266
|
getTxLabelMapsForUserQuery(args: sdk.FindForUserSincePagedArgs): Knex.QueryBuilder
|
|
636
|
-
override async getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
2267
|
+
override async getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableTxLabelMap[]>
|
|
637
2268
|
getOutputTagMapsForUserQuery(args: sdk.FindForUserSincePagedArgs): Knex.QueryBuilder
|
|
638
|
-
override async getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
2269
|
+
override async getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableOutputTagMap[]>
|
|
639
2270
|
override async listActions(auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
|
|
640
2271
|
override async listOutputs(auth: sdk.AuthId, vargs: sdk.ValidListOutputsArgs): Promise<ListOutputsResult>
|
|
641
|
-
override async insertProvenTx(tx:
|
|
642
|
-
override async insertProvenTxReq(tx:
|
|
643
|
-
override async insertUser(user:
|
|
644
|
-
override async insertCertificateAuth(auth: sdk.AuthId, certificate:
|
|
645
|
-
override async insertCertificate(certificate:
|
|
646
|
-
override async insertCertificateField(certificateField:
|
|
647
|
-
override async insertOutputBasket(basket:
|
|
648
|
-
override async insertTransaction(tx:
|
|
649
|
-
override async insertCommission(commission:
|
|
650
|
-
override async insertOutput(output:
|
|
651
|
-
override async insertOutputTag(tag:
|
|
652
|
-
override async insertOutputTagMap(tagMap:
|
|
653
|
-
override async insertTxLabel(label:
|
|
654
|
-
override async insertTxLabelMap(labelMap:
|
|
655
|
-
override async insertMonitorEvent(event:
|
|
656
|
-
override async insertSyncState(syncState:
|
|
657
|
-
override async updateCertificateField(certificateId: number, fieldName: string, update: Partial<
|
|
658
|
-
override async updateCertificate(id: number, update: Partial<
|
|
659
|
-
override async updateCommission(id: number, update: Partial<
|
|
660
|
-
override async updateOutputBasket(id: number, update: Partial<
|
|
661
|
-
override async updateOutput(id: number, update: Partial<
|
|
662
|
-
override async updateOutputTagMap(outputId: number, tagId: number, update: Partial<
|
|
663
|
-
override async updateOutputTag(id: number, update: Partial<
|
|
664
|
-
override async updateProvenTxReq(id: number | number[], update: Partial<
|
|
665
|
-
override async updateProvenTx(id: number, update: Partial<
|
|
666
|
-
override async updateSyncState(id: number, update: Partial<
|
|
667
|
-
override async updateTransaction(id: number | number[], update: Partial<
|
|
668
|
-
override async updateTxLabelMap(transactionId: number, txLabelId: number, update: Partial<
|
|
669
|
-
override async updateTxLabel(id: number, update: Partial<
|
|
670
|
-
override async updateUser(id: number, update: Partial<
|
|
671
|
-
override async updateMonitorEvent(id: number, update: Partial<
|
|
2272
|
+
override async insertProvenTx(tx: TableProvenTx, trx?: sdk.TrxToken): Promise<number>
|
|
2273
|
+
override async insertProvenTxReq(tx: TableProvenTxReq, trx?: sdk.TrxToken): Promise<number>
|
|
2274
|
+
override async insertUser(user: TableUser, trx?: sdk.TrxToken): Promise<number>
|
|
2275
|
+
override async insertCertificateAuth(auth: sdk.AuthId, certificate: TableCertificateX): Promise<number>
|
|
2276
|
+
override async insertCertificate(certificate: TableCertificateX, trx?: sdk.TrxToken): Promise<number>
|
|
2277
|
+
override async insertCertificateField(certificateField: TableCertificateField, trx?: sdk.TrxToken): Promise<void>
|
|
2278
|
+
override async insertOutputBasket(basket: TableOutputBasket, trx?: sdk.TrxToken): Promise<number>
|
|
2279
|
+
override async insertTransaction(tx: TableTransaction, trx?: sdk.TrxToken): Promise<number>
|
|
2280
|
+
override async insertCommission(commission: TableCommission, trx?: sdk.TrxToken): Promise<number>
|
|
2281
|
+
override async insertOutput(output: TableOutput, trx?: sdk.TrxToken): Promise<number>
|
|
2282
|
+
override async insertOutputTag(tag: TableOutputTag, trx?: sdk.TrxToken): Promise<number>
|
|
2283
|
+
override async insertOutputTagMap(tagMap: TableOutputTagMap, trx?: sdk.TrxToken): Promise<void>
|
|
2284
|
+
override async insertTxLabel(label: TableTxLabel, trx?: sdk.TrxToken): Promise<number>
|
|
2285
|
+
override async insertTxLabelMap(labelMap: TableTxLabelMap, trx?: sdk.TrxToken): Promise<void>
|
|
2286
|
+
override async insertMonitorEvent(event: TableMonitorEvent, trx?: sdk.TrxToken): Promise<number>
|
|
2287
|
+
override async insertSyncState(syncState: TableSyncState, trx?: sdk.TrxToken): Promise<number>
|
|
2288
|
+
override async updateCertificateField(certificateId: number, fieldName: string, update: Partial<TableCertificateField>, trx?: sdk.TrxToken): Promise<number>
|
|
2289
|
+
override async updateCertificate(id: number, update: Partial<TableCertificate>, trx?: sdk.TrxToken): Promise<number>
|
|
2290
|
+
override async updateCommission(id: number, update: Partial<TableCommission>, trx?: sdk.TrxToken): Promise<number>
|
|
2291
|
+
override async updateOutputBasket(id: number, update: Partial<TableOutputBasket>, trx?: sdk.TrxToken): Promise<number>
|
|
2292
|
+
override async updateOutput(id: number, update: Partial<TableOutput>, trx?: sdk.TrxToken): Promise<number>
|
|
2293
|
+
override async updateOutputTagMap(outputId: number, tagId: number, update: Partial<TableOutputTagMap>, trx?: sdk.TrxToken): Promise<number>
|
|
2294
|
+
override async updateOutputTag(id: number, update: Partial<TableOutputTag>, trx?: sdk.TrxToken): Promise<number>
|
|
2295
|
+
override async updateProvenTxReq(id: number | number[], update: Partial<TableProvenTxReq>, trx?: sdk.TrxToken): Promise<number>
|
|
2296
|
+
override async updateProvenTx(id: number, update: Partial<TableProvenTx>, trx?: sdk.TrxToken): Promise<number>
|
|
2297
|
+
override async updateSyncState(id: number, update: Partial<TableSyncState>, trx?: sdk.TrxToken): Promise<number>
|
|
2298
|
+
override async updateTransaction(id: number | number[], update: Partial<TableTransaction>, trx?: sdk.TrxToken): Promise<number>
|
|
2299
|
+
override async updateTxLabelMap(transactionId: number, txLabelId: number, update: Partial<TableTxLabelMap>, trx?: sdk.TrxToken): Promise<number>
|
|
2300
|
+
override async updateTxLabel(id: number, update: Partial<TableTxLabel>, trx?: sdk.TrxToken): Promise<number>
|
|
2301
|
+
override async updateUser(id: number, update: Partial<TableUser>, trx?: sdk.TrxToken): Promise<number>
|
|
2302
|
+
override async updateMonitorEvent(id: number, update: Partial<TableMonitorEvent>, trx?: sdk.TrxToken): Promise<number>
|
|
672
2303
|
setupQuery<T extends object>(table: string, args: sdk.FindPartialSincePagedArgs<T>): Knex.QueryBuilder
|
|
673
2304
|
findCertificateFieldsQuery(args: sdk.FindCertificateFieldsArgs): Knex.QueryBuilder
|
|
674
2305
|
findCertificatesQuery(args: sdk.FindCertificatesArgs): Knex.QueryBuilder
|
|
@@ -685,24 +2316,24 @@ export class StorageKnex extends StorageProvider implements sdk.WalletStoragePro
|
|
|
685
2316
|
findTxLabelsQuery(args: sdk.FindTxLabelsArgs): Knex.QueryBuilder
|
|
686
2317
|
findUsersQuery(args: sdk.FindUsersArgs): Knex.QueryBuilder
|
|
687
2318
|
findMonitorEventsQuery(args: sdk.FindMonitorEventsArgs): Knex.QueryBuilder
|
|
688
|
-
override async findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<
|
|
689
|
-
override async findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<
|
|
690
|
-
override async findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<
|
|
691
|
-
override async findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<
|
|
692
|
-
override async findCertificates(args: sdk.FindCertificatesArgs): Promise<
|
|
693
|
-
override async findCommissions(args: sdk.FindCommissionsArgs): Promise<
|
|
694
|
-
override async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<
|
|
695
|
-
override async findOutputs(args: sdk.FindOutputsArgs): Promise<
|
|
696
|
-
override async findOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<
|
|
697
|
-
override async findOutputTags(args: sdk.FindOutputTagsArgs): Promise<
|
|
698
|
-
override async findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<
|
|
699
|
-
override async findProvenTxs(args: sdk.FindProvenTxsArgs): Promise<
|
|
700
|
-
override async findSyncStates(args: sdk.FindSyncStatesArgs): Promise<
|
|
701
|
-
override async findTransactions(args: sdk.FindTransactionsArgs): Promise<
|
|
702
|
-
override async findTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<
|
|
703
|
-
override async findTxLabels(args: sdk.FindTxLabelsArgs): Promise<
|
|
704
|
-
override async findUsers(args: sdk.FindUsersArgs): Promise<
|
|
705
|
-
override async findMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<
|
|
2319
|
+
override async findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<TableCertificate[]>
|
|
2320
|
+
override async findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
|
|
2321
|
+
override async findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<TableOutput[]>
|
|
2322
|
+
override async findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<TableCertificateField[]>
|
|
2323
|
+
override async findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificate[]>
|
|
2324
|
+
override async findCommissions(args: sdk.FindCommissionsArgs): Promise<TableCommission[]>
|
|
2325
|
+
override async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
|
|
2326
|
+
override async findOutputs(args: sdk.FindOutputsArgs): Promise<TableOutput[]>
|
|
2327
|
+
override async findOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<TableOutputTagMap[]>
|
|
2328
|
+
override async findOutputTags(args: sdk.FindOutputTagsArgs): Promise<TableOutputTag[]>
|
|
2329
|
+
override async findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>
|
|
2330
|
+
override async findProvenTxs(args: sdk.FindProvenTxsArgs): Promise<TableProvenTx[]>
|
|
2331
|
+
override async findSyncStates(args: sdk.FindSyncStatesArgs): Promise<TableSyncState[]>
|
|
2332
|
+
override async findTransactions(args: sdk.FindTransactionsArgs): Promise<TableTransaction[]>
|
|
2333
|
+
override async findTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<TableTxLabelMap[]>
|
|
2334
|
+
override async findTxLabels(args: sdk.FindTxLabelsArgs): Promise<TableTxLabel[]>
|
|
2335
|
+
override async findUsers(args: sdk.FindUsersArgs): Promise<TableUser[]>
|
|
2336
|
+
override async findMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<TableMonitorEvent[]>
|
|
706
2337
|
async getCount<T extends object>(q: Knex.QueryBuilder<T, T[]>): Promise<number>
|
|
707
2338
|
override async countCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<number>
|
|
708
2339
|
override async countCertificates(args: sdk.FindCertificatesArgs): Promise<number>
|
|
@@ -724,15 +2355,15 @@ export class StorageKnex extends StorageProvider implements sdk.WalletStoragePro
|
|
|
724
2355
|
override async dropAllData(): Promise<void>
|
|
725
2356
|
override async transaction<T>(scope: (trx: sdk.TrxToken) => Promise<T>, trx?: sdk.TrxToken): Promise<T>
|
|
726
2357
|
toDb(trx?: sdk.TrxToken)
|
|
727
|
-
async validateRawTransaction(t:
|
|
728
|
-
async validateOutputScript(o:
|
|
2358
|
+
async validateRawTransaction(t: TableTransaction, trx?: sdk.TrxToken): Promise<void>
|
|
2359
|
+
async validateOutputScript(o: TableOutput, trx?: sdk.TrxToken): Promise<void>
|
|
729
2360
|
_verifiedReadyForDatabaseAccess: boolean = false;
|
|
730
2361
|
async verifyReadyForDatabaseAccess(trx?: sdk.TrxToken): Promise<DBType>
|
|
731
2362
|
validatePartialForUpdate<T extends sdk.EntityTimeStamp>(update: Partial<T>, dateFields?: string[], booleanFields?: string[]): Partial<T>
|
|
732
2363
|
async validateEntityForInsert<T extends sdk.EntityTimeStamp>(entity: T, trx?: sdk.TrxToken, dateFields?: string[], booleanFields?: string[]): Promise<any>
|
|
733
|
-
override async getLabelsForTransactionId(transactionId?: number, trx?: sdk.TrxToken): Promise<
|
|
734
|
-
async extendOutput(o:
|
|
735
|
-
override async getTagsForOutputId(outputId: number, trx?: sdk.TrxToken): Promise<
|
|
2364
|
+
override async getLabelsForTransactionId(transactionId?: number, trx?: sdk.TrxToken): Promise<TableTxLabel[]>
|
|
2365
|
+
async extendOutput(o: TableOutput, includeBasket = false, includeTags = false, trx?: sdk.TrxToken): Promise<TableOutputX>
|
|
2366
|
+
override async getTagsForOutputId(outputId: number, trx?: sdk.TrxToken): Promise<TableOutputTag[]>
|
|
736
2367
|
override async purgeData(params: sdk.PurgeParams, trx?: sdk.TrxToken): Promise<sdk.PurgeResults>
|
|
737
2368
|
override async reviewStatus(args: {
|
|
738
2369
|
agedLimit: Date;
|
|
@@ -741,12 +2372,12 @@ export class StorageKnex extends StorageProvider implements sdk.WalletStoragePro
|
|
|
741
2372
|
log: string;
|
|
742
2373
|
}>
|
|
743
2374
|
async countChangeInputs(userId: number, basketId: number, excludeSending: boolean): Promise<number>
|
|
744
|
-
async allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<
|
|
2375
|
+
async allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<TableOutput | undefined> {
|
|
745
2376
|
const status: sdk.TransactionStatus[] = ["completed", "unproven"];
|
|
746
2377
|
if (!excludeSending)
|
|
747
2378
|
status.push("sending");
|
|
748
2379
|
const statusText = status.map(s => `'${s}'`).join(",");
|
|
749
|
-
const r:
|
|
2380
|
+
const r: TableOutput | undefined = await this.knex.transaction(async (trx) => {
|
|
750
2381
|
const txStatusCondition = `AND (SELECT status FROM transactions WHERE outputs.transactionId = transactions.transactionId) in (${statusText})`;
|
|
751
2382
|
let outputId: number | undefined;
|
|
752
2383
|
const setOutputId = async (rawQuery: string): Promise<void> => {
|
|
@@ -827,11 +2458,7 @@ export class StorageKnex extends StorageProvider implements sdk.WalletStoragePro
|
|
|
827
2458
|
}
|
|
828
2459
|
```
|
|
829
2460
|
|
|
830
|
-
See also: [AuthId](#interface-authid), [DBType](#type-dbtype), [EntityTimeStamp](#interface-entitytimestamp), [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs), [FindCertificatesArgs](#interface-findcertificatesargs), [FindCommissionsArgs](#interface-findcommissionsargs), [FindForUserSincePagedArgs](#interface-findforusersincepagedargs), [FindMonitorEventsArgs](#interface-findmonitoreventsargs), [FindOutputBasketsArgs](#interface-findoutputbasketsargs), [FindOutputTagMapsArgs](#interface-findoutputtagmapsargs), [FindOutputTagsArgs](#interface-findoutputtagsargs), [FindOutputsArgs](#interface-findoutputsargs), [FindPartialSincePagedArgs](#interface-findpartialsincepagedargs), [FindProvenTxReqsArgs](#interface-findproventxreqsargs), [FindProvenTxsArgs](#interface-findproventxsargs), [FindSyncStatesArgs](#interface-findsyncstatesargs), [FindTransactionsArgs](#interface-findtransactionsargs), [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs), [FindTxLabelsArgs](#interface-findtxlabelsargs), [FindUsersArgs](#interface-findusersargs), [ProvenOrRawTx](#interface-provenorrawtx), [PurgeParams](#interface-purgeparams), [PurgeResults](#interface-purgeresults), [StorageKnexOptions](#interface-storageknexoptions), [StorageProvider](#class-storageprovider), [TransactionStatus](#type-transactionstatus), [TrxToken](#interface-trxtoken), [ValidListActionsArgs](#interface-validlistactionsargs), [ValidListOutputsArgs](#interface-validlistoutputsargs), [WalletStorageProvider](#interface-walletstorageprovider), [listActions](#function-listactions), [listOutputs](#function-listoutputs), [purgeData](#function-purgedata), [reviewStatus](#function-reviewstatus), [verifyTruthy](#function-verifytruthy)
|
|
831
|
-
|
|
832
|
-
<details>
|
|
833
|
-
|
|
834
|
-
<summary>Class StorageKnex Details</summary>
|
|
2461
|
+
See also: [AuthId](./client.md#interface-authid), [DBType](./storage.md#type-dbtype), [EntityTimeStamp](./client.md#interface-entitytimestamp), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindMonitorEventsArgs](./client.md#interface-findmonitoreventsargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagMapsArgs](./client.md#interface-findoutputtagmapsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindPartialSincePagedArgs](./client.md#interface-findpartialsincepagedargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [FindProvenTxsArgs](./client.md#interface-findproventxsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelMapsArgs](./client.md#interface-findtxlabelmapsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [FindUsersArgs](./client.md#interface-findusersargs), [ProvenOrRawTx](./client.md#interface-provenorrawtx), [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageKnexOptions](./storage.md#interface-storageknexoptions), [StorageProvider](./storage.md#class-storageprovider), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableOutputX](./storage.md#interface-tableoutputx), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TransactionStatus](./client.md#type-transactionstatus), [TrxToken](./client.md#interface-trxtoken), [ValidListActionsArgs](./client.md#interface-validlistactionsargs), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [listActions](./storage.md#function-listactions), [listOutputs](./storage.md#function-listoutputs), [purgeData](./storage.md#function-purgedata), [reviewStatus](./storage.md#function-reviewstatus), [verifyTruthy](./client.md#function-verifytruthy)
|
|
835
2462
|
|
|
836
2463
|
###### Method allocateChangeInput
|
|
837
2464
|
|
|
@@ -840,8 +2467,9 @@ Finds closest matching available change output to use as input for new transacti
|
|
|
840
2467
|
Transactionally allocate the output such that
|
|
841
2468
|
|
|
842
2469
|
```ts
|
|
843
|
-
async allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<
|
|
2470
|
+
async allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<TableOutput | undefined>
|
|
844
2471
|
```
|
|
2472
|
+
See also: [TableOutput](./storage.md#interface-tableoutput)
|
|
845
2473
|
|
|
846
2474
|
###### Method countChangeInputs
|
|
847
2475
|
|
|
@@ -861,7 +2489,7 @@ or a Knex.Transaction as appropriate.
|
|
|
861
2489
|
```ts
|
|
862
2490
|
toDb(trx?: sdk.TrxToken)
|
|
863
2491
|
```
|
|
864
|
-
See also: [TrxToken](#interface-trxtoken)
|
|
2492
|
+
See also: [TrxToken](./client.md#interface-trxtoken)
|
|
865
2493
|
|
|
866
2494
|
###### Method validateEntities
|
|
867
2495
|
|
|
@@ -871,7 +2499,7 @@ Use to process all arrays of records with time stamps retreived from database.
|
|
|
871
2499
|
```ts
|
|
872
2500
|
validateEntities<T extends sdk.EntityTimeStamp>(entities: T[], dateFields?: string[], booleanFields?: string[]): T[]
|
|
873
2501
|
```
|
|
874
|
-
See also: [EntityTimeStamp](#interface-entitytimestamp)
|
|
2502
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
875
2503
|
|
|
876
2504
|
Returns
|
|
877
2505
|
|
|
@@ -885,7 +2513,7 @@ Use to process all individual records with time stamps retreived from database.
|
|
|
885
2513
|
```ts
|
|
886
2514
|
validateEntity<T extends sdk.EntityTimeStamp>(entity: T, dateFields?: string[], booleanFields?: string[]): T
|
|
887
2515
|
```
|
|
888
|
-
See also: [EntityTimeStamp](#interface-entitytimestamp)
|
|
2516
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
889
2517
|
|
|
890
2518
|
###### Method validateEntityForInsert
|
|
891
2519
|
|
|
@@ -895,7 +2523,7 @@ Use to process new entities being inserted into the database.
|
|
|
895
2523
|
```ts
|
|
896
2524
|
async validateEntityForInsert<T extends sdk.EntityTimeStamp>(entity: T, trx?: sdk.TrxToken, dateFields?: string[], booleanFields?: string[]): Promise<any>
|
|
897
2525
|
```
|
|
898
|
-
See also: [EntityTimeStamp](#interface-entitytimestamp), [TrxToken](#interface-trxtoken)
|
|
2526
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp), [TrxToken](./client.md#interface-trxtoken)
|
|
899
2527
|
|
|
900
2528
|
###### Method validatePartialForUpdate
|
|
901
2529
|
|
|
@@ -905,7 +2533,7 @@ Use to process the update template for entities being updated.
|
|
|
905
2533
|
```ts
|
|
906
2534
|
validatePartialForUpdate<T extends sdk.EntityTimeStamp>(update: Partial<T>, dateFields?: string[], booleanFields?: string[]): Partial<T>
|
|
907
2535
|
```
|
|
908
|
-
See also: [EntityTimeStamp](#interface-entitytimestamp)
|
|
2536
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
909
2537
|
|
|
910
2538
|
###### Method verifyReadyForDatabaseAccess
|
|
911
2539
|
|
|
@@ -917,9 +2545,7 @@ Make sure database is ready for access:
|
|
|
917
2545
|
```ts
|
|
918
2546
|
async verifyReadyForDatabaseAccess(trx?: sdk.TrxToken): Promise<DBType>
|
|
919
2547
|
```
|
|
920
|
-
See also: [DBType](#type-dbtype), [TrxToken](#interface-trxtoken)
|
|
921
|
-
|
|
922
|
-
</details>
|
|
2548
|
+
See also: [DBType](./storage.md#type-dbtype), [TrxToken](./client.md#interface-trxtoken)
|
|
923
2549
|
|
|
924
2550
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
925
2551
|
|
|
@@ -944,53 +2570,49 @@ export abstract class StorageProvider extends StorageReaderWriter implements sdk
|
|
|
944
2570
|
log: string;
|
|
945
2571
|
}>;
|
|
946
2572
|
abstract purgeData(params: sdk.PurgeParams, trx?: sdk.TrxToken): Promise<sdk.PurgeResults>;
|
|
947
|
-
abstract allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<
|
|
2573
|
+
abstract allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<TableOutput | undefined>;
|
|
948
2574
|
abstract getProvenOrRawTx(txid: string, trx?: sdk.TrxToken): Promise<sdk.ProvenOrRawTx>;
|
|
949
2575
|
abstract getRawTxOfKnownValidTransaction(txid?: string, offset?: number, length?: number, trx?: sdk.TrxToken): Promise<number[] | undefined>;
|
|
950
|
-
abstract getLabelsForTransactionId(transactionId?: number, trx?: sdk.TrxToken): Promise<
|
|
951
|
-
abstract getTagsForOutputId(outputId: number, trx?: sdk.TrxToken): Promise<
|
|
2576
|
+
abstract getLabelsForTransactionId(transactionId?: number, trx?: sdk.TrxToken): Promise<TableTxLabel[]>;
|
|
2577
|
+
abstract getTagsForOutputId(outputId: number, trx?: sdk.TrxToken): Promise<TableOutputTag[]>;
|
|
952
2578
|
abstract listActions(auth: sdk.AuthId, args: sdk.ValidListActionsArgs): Promise<ListActionsResult>;
|
|
953
2579
|
abstract listOutputs(auth: sdk.AuthId, args: sdk.ValidListOutputsArgs): Promise<ListOutputsResult>;
|
|
954
2580
|
abstract countChangeInputs(userId: number, basketId: number, excludeSending: boolean): Promise<number>;
|
|
955
|
-
abstract findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<
|
|
956
|
-
abstract findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<
|
|
957
|
-
abstract findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<
|
|
958
|
-
abstract insertCertificateAuth(auth: sdk.AuthId, certificate:
|
|
2581
|
+
abstract findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<TableCertificate[]>;
|
|
2582
|
+
abstract findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>;
|
|
2583
|
+
abstract findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<TableOutput[]>;
|
|
2584
|
+
abstract insertCertificateAuth(auth: sdk.AuthId, certificate: TableCertificateX): Promise<number>;
|
|
959
2585
|
override isStorageProvider(): boolean
|
|
960
2586
|
setServices(v: sdk.WalletServices)
|
|
961
2587
|
getServices(): sdk.WalletServices
|
|
962
|
-
async abortAction(auth: sdk.AuthId, args: Partial<
|
|
2588
|
+
async abortAction(auth: sdk.AuthId, args: Partial<TableTransaction>): Promise<AbortActionResult>
|
|
963
2589
|
async internalizeAction(auth: sdk.AuthId, args: InternalizeActionArgs): Promise<InternalizeActionResult>
|
|
964
2590
|
async getReqsAndBeefToShareWithWorld(txids: string[], knownTxids: string[], trx?: sdk.TrxToken): Promise<GetReqsAndBeefResult>
|
|
965
|
-
async mergeReqToBeefToShareExternally(req:
|
|
966
|
-
async getProvenOrReq(txid: string, newReq?:
|
|
2591
|
+
async mergeReqToBeefToShareExternally(req: TableProvenTxReq, mergeToBeef: Beef, knownTxids: string[], trx?: sdk.TrxToken): Promise<void>
|
|
2592
|
+
async getProvenOrReq(txid: string, newReq?: TableProvenTxReq, trx?: sdk.TrxToken): Promise<sdk.StorageProvenOrReq>
|
|
967
2593
|
async updateTransactionsStatus(transactionIds: number[], status: sdk.TransactionStatus): Promise<void>
|
|
968
2594
|
async updateTransactionStatus(status: sdk.TransactionStatus, transactionId?: number, userId?: number, reference?: string, trx?: sdk.TrxToken): Promise<void>
|
|
969
2595
|
async createAction(auth: sdk.AuthId, args: sdk.ValidCreateActionArgs): Promise<sdk.StorageCreateActionResult>
|
|
970
2596
|
async processAction(auth: sdk.AuthId, args: sdk.StorageProcessActionArgs): Promise<sdk.StorageProcessActionResults>
|
|
971
|
-
async attemptToPostReqsToNetwork(reqs:
|
|
2597
|
+
async attemptToPostReqsToNetwork(reqs: EntityProvenTxReq[], trx?: sdk.TrxToken): Promise<PostReqsToNetworkResult>
|
|
972
2598
|
async listCertificates(auth: sdk.AuthId, args: sdk.ValidListCertificatesArgs): Promise<ListCertificatesResult>
|
|
973
2599
|
async verifyKnownValidTransaction(txid: string, trx?: sdk.TrxToken): Promise<boolean>
|
|
974
2600
|
async getValidBeefForKnownTxid(txid: string, mergeToBeef?: Beef, trustSelf?: TrustSelf, knownTxids?: string[], trx?: sdk.TrxToken): Promise<Beef>
|
|
975
2601
|
async getValidBeefForTxid(txid: string, mergeToBeef?: Beef, trustSelf?: TrustSelf, knownTxids?: string[], trx?: sdk.TrxToken): Promise<Beef | undefined>
|
|
976
2602
|
async getBeefForTransaction(txid: string, options: sdk.StorageGetBeefOptions): Promise<Beef>
|
|
977
|
-
async findMonitorEventById(id: number, trx?: sdk.TrxToken): Promise<
|
|
2603
|
+
async findMonitorEventById(id: number, trx?: sdk.TrxToken): Promise<TableMonitorEvent | undefined>
|
|
978
2604
|
async relinquishCertificate(auth: sdk.AuthId, args: RelinquishCertificateArgs): Promise<number>
|
|
979
2605
|
async relinquishOutput(auth: sdk.AuthId, args: RelinquishOutputArgs): Promise<number>
|
|
980
2606
|
async processSyncChunk(args: sdk.RequestSyncChunkArgs, chunk: sdk.SyncChunk): Promise<sdk.ProcessSyncChunkResult>
|
|
981
2607
|
async updateProvenTxReqWithNewProvenTx(args: sdk.UpdateProvenTxReqWithNewProvenTxArgs): Promise<sdk.UpdateProvenTxReqWithNewProvenTxResult>
|
|
982
2608
|
async confirmSpendableOutputs(): Promise<{
|
|
983
|
-
invalidSpendableOutputs:
|
|
2609
|
+
invalidSpendableOutputs: TableOutput[];
|
|
984
2610
|
}>
|
|
985
|
-
async updateProvenTxReqDynamics(id: number, update: Partial<
|
|
2611
|
+
async updateProvenTxReqDynamics(id: number, update: Partial<TableProvenTxReqDynamics>, trx?: sdk.TrxToken): Promise<number>
|
|
986
2612
|
}
|
|
987
2613
|
```
|
|
988
2614
|
|
|
989
|
-
See also: [AuthId](#interface-authid), [Chain](#type-chain), [FindCertificatesArgs](#interface-findcertificatesargs), [FindOutputBasketsArgs](#interface-findoutputbasketsargs), [FindOutputsArgs](#interface-findoutputsargs), [GetReqsAndBeefResult](#interface-getreqsandbeefresult), [PostReqsToNetworkResult](#interface-postreqstonetworkresult), [ProcessSyncChunkResult](#interface-processsyncchunkresult), [ProvenOrRawTx](#interface-provenorrawtx), [PurgeParams](#interface-purgeparams), [PurgeResults](#interface-purgeresults), [RequestSyncChunkArgs](#interface-requestsyncchunkargs), [StorageCreateActionResult](#interface-storagecreateactionresult), [StorageFeeModel](#interface-storagefeemodel), [StorageGetBeefOptions](#interface-storagegetbeefoptions), [StorageProcessActionArgs](#interface-storageprocessactionargs), [StorageProcessActionResults](#interface-storageprocessactionresults), [StorageProvenOrReq](#interface-storageprovenorreq), [StorageProviderOptions](#interface-storageprovideroptions), [StorageReaderWriter](#class-storagereaderwriter), [SyncChunk](#interface-syncchunk), [TransactionStatus](#type-transactionstatus), [TrxToken](#interface-trxtoken), [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs), [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult), [ValidCreateActionArgs](#interface-validcreateactionargs), [ValidListActionsArgs](#interface-validlistactionsargs), [ValidListCertificatesArgs](#interface-validlistcertificatesargs), [ValidListOutputsArgs](#interface-validlistoutputsargs), [WalletServices](#interface-walletservices), [WalletStorageProvider](#interface-walletstorageprovider), [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork), [createAction](#function-createaction), [getBeefForTransaction](#function-getbeeffortransaction), [internalizeAction](#function-internalizeaction), [listActions](#function-listactions), [listCertificates](#function-listcertificates), [listOutputs](#function-listoutputs), [processAction](#function-processaction), [purgeData](#function-purgedata), [reviewStatus](#function-reviewstatus)
|
|
990
|
-
|
|
991
|
-
<details>
|
|
992
|
-
|
|
993
|
-
<summary>Class StorageProvider Details</summary>
|
|
2615
|
+
See also: [AuthId](./client.md#interface-authid), [Chain](./client.md#type-chain), [EntityProvenTxReq](./storage.md#class-entityproventxreq), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [GetReqsAndBeefResult](./storage.md#interface-getreqsandbeefresult), [PostReqsToNetworkResult](./storage.md#interface-postreqstonetworkresult), [ProcessSyncChunkResult](./client.md#interface-processsyncchunkresult), [ProvenOrRawTx](./client.md#interface-provenorrawtx), [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageFeeModel](./client.md#interface-storagefeemodel), [StorageGetBeefOptions](./client.md#interface-storagegetbeefoptions), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [StorageProvenOrReq](./client.md#interface-storageprovenorreq), [StorageProviderOptions](./storage.md#interface-storageprovideroptions), [StorageReaderWriter](./storage.md#class-storagereaderwriter), [SyncChunk](./client.md#interface-syncchunk), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateX](./storage.md#interface-tablecertificatex), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableProvenTxReqDynamics](./storage.md#interface-tableproventxreqdynamics), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TransactionStatus](./client.md#type-transactionstatus), [TrxToken](./client.md#interface-trxtoken), [UpdateProvenTxReqWithNewProvenTxArgs](./client.md#interface-updateproventxreqwithnewproventxargs), [UpdateProvenTxReqWithNewProvenTxResult](./client.md#interface-updateproventxreqwithnewproventxresult), [ValidCreateActionArgs](./client.md#interface-validcreateactionargs), [ValidListActionsArgs](./client.md#interface-validlistactionsargs), [ValidListCertificatesArgs](./client.md#interface-validlistcertificatesargs), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs), [WalletServices](./client.md#interface-walletservices), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [attemptToPostReqsToNetwork](./storage.md#function-attempttopostreqstonetwork), [createAction](./storage.md#function-createaction), [getBeefForTransaction](./storage.md#function-getbeeffortransaction), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [processAction](./storage.md#function-processaction), [purgeData](./storage.md#function-purgedata), [reviewStatus](./storage.md#function-reviewstatus)
|
|
994
2616
|
|
|
995
2617
|
###### Method confirmSpendableOutputs
|
|
996
2618
|
|
|
@@ -1000,9 +2622,10 @@ still in the mempool of at least one service provider.
|
|
|
1000
2622
|
|
|
1001
2623
|
```ts
|
|
1002
2624
|
async confirmSpendableOutputs(): Promise<{
|
|
1003
|
-
invalidSpendableOutputs:
|
|
2625
|
+
invalidSpendableOutputs: TableOutput[];
|
|
1004
2626
|
}>
|
|
1005
2627
|
```
|
|
2628
|
+
See also: [TableOutput](./storage.md#interface-tableoutput)
|
|
1006
2629
|
|
|
1007
2630
|
Returns
|
|
1008
2631
|
|
|
@@ -1019,9 +2642,9 @@ This is safe "findOrInsert" operation using retry if unique index constraint
|
|
|
1019
2642
|
is violated by a race condition insert.
|
|
1020
2643
|
|
|
1021
2644
|
```ts
|
|
1022
|
-
async getProvenOrReq(txid: string, newReq?:
|
|
2645
|
+
async getProvenOrReq(txid: string, newReq?: TableProvenTxReq, trx?: sdk.TrxToken): Promise<sdk.StorageProvenOrReq>
|
|
1023
2646
|
```
|
|
1024
|
-
See also: [StorageProvenOrReq](#interface-storageprovenorreq), [TrxToken](#interface-trxtoken)
|
|
2647
|
+
See also: [StorageProvenOrReq](./client.md#interface-storageprovenorreq), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TrxToken](./client.md#interface-trxtoken)
|
|
1025
2648
|
|
|
1026
2649
|
###### Method getReqsAndBeefToShareWithWorld
|
|
1027
2650
|
|
|
@@ -1032,7 +2655,7 @@ For the txids with reqs and status still ready to send construct a single merged
|
|
|
1032
2655
|
```ts
|
|
1033
2656
|
async getReqsAndBeefToShareWithWorld(txids: string[], knownTxids: string[], trx?: sdk.TrxToken): Promise<GetReqsAndBeefResult>
|
|
1034
2657
|
```
|
|
1035
|
-
See also: [GetReqsAndBeefResult](#interface-getreqsandbeefresult), [TrxToken](#interface-trxtoken)
|
|
2658
|
+
See also: [GetReqsAndBeefResult](./storage.md#interface-getreqsandbeefresult), [TrxToken](./client.md#interface-trxtoken)
|
|
1036
2659
|
|
|
1037
2660
|
###### Method updateProvenTxReqWithNewProvenTx
|
|
1038
2661
|
|
|
@@ -1051,7 +2674,7 @@ Alterations of "typically" to handle:
|
|
|
1051
2674
|
```ts
|
|
1052
2675
|
async updateProvenTxReqWithNewProvenTx(args: sdk.UpdateProvenTxReqWithNewProvenTxArgs): Promise<sdk.UpdateProvenTxReqWithNewProvenTxResult>
|
|
1053
2676
|
```
|
|
1054
|
-
See also: [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs), [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult)
|
|
2677
|
+
See also: [UpdateProvenTxReqWithNewProvenTxArgs](./client.md#interface-updateproventxreqwithnewproventxargs), [UpdateProvenTxReqWithNewProvenTxResult](./client.md#interface-updateproventxreqwithnewproventxresult)
|
|
1055
2678
|
|
|
1056
2679
|
###### Method updateTransactionStatus
|
|
1057
2680
|
|
|
@@ -1062,9 +2685,7 @@ For 'status' of 'failed', attempts to make outputs previously allocated as input
|
|
|
1062
2685
|
```ts
|
|
1063
2686
|
async updateTransactionStatus(status: sdk.TransactionStatus, transactionId?: number, userId?: number, reference?: string, trx?: sdk.TrxToken): Promise<void>
|
|
1064
2687
|
```
|
|
1065
|
-
See also: [TransactionStatus](#type-transactionstatus), [TrxToken](#interface-trxtoken)
|
|
1066
|
-
|
|
1067
|
-
</details>
|
|
2688
|
+
See also: [TransactionStatus](./client.md#type-transactionstatus), [TrxToken](./client.md#interface-trxtoken)
|
|
1068
2689
|
|
|
1069
2690
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1070
2691
|
|
|
@@ -1085,28 +2706,28 @@ As such there are no user specific authenticated access checks implied in the im
|
|
|
1085
2706
|
```ts
|
|
1086
2707
|
export abstract class StorageReader implements sdk.StorageSyncReader {
|
|
1087
2708
|
chain: sdk.Chain;
|
|
1088
|
-
_settings?:
|
|
2709
|
+
_settings?: TableSettings;
|
|
1089
2710
|
whenLastAccess?: Date;
|
|
1090
2711
|
get dbtype(): DBType | undefined
|
|
1091
2712
|
constructor(options: StorageReaderOptions)
|
|
1092
2713
|
isAvailable(): boolean
|
|
1093
|
-
async makeAvailable(): Promise<
|
|
1094
|
-
getSettings():
|
|
2714
|
+
async makeAvailable(): Promise<TableSettings>
|
|
2715
|
+
getSettings(): TableSettings
|
|
1095
2716
|
isStorageProvider(): boolean
|
|
1096
2717
|
abstract destroy(): Promise<void>;
|
|
1097
2718
|
abstract transaction<T>(scope: (trx: sdk.TrxToken) => Promise<T>, trx?: sdk.TrxToken): Promise<T>;
|
|
1098
|
-
abstract readSettings(trx?: sdk.TrxToken): Promise<
|
|
1099
|
-
abstract findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<
|
|
1100
|
-
abstract findCertificates(args: sdk.FindCertificatesArgs): Promise<
|
|
1101
|
-
abstract findCommissions(args: sdk.FindCommissionsArgs): Promise<
|
|
1102
|
-
abstract findMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<
|
|
1103
|
-
abstract findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<
|
|
1104
|
-
abstract findOutputs(args: sdk.FindOutputsArgs): Promise<
|
|
1105
|
-
abstract findOutputTags(args: sdk.FindOutputTagsArgs): Promise<
|
|
1106
|
-
abstract findSyncStates(args: sdk.FindSyncStatesArgs): Promise<
|
|
1107
|
-
abstract findTransactions(args: sdk.FindTransactionsArgs): Promise<
|
|
1108
|
-
abstract findTxLabels(args: sdk.FindTxLabelsArgs): Promise<
|
|
1109
|
-
abstract findUsers(args: sdk.FindUsersArgs): Promise<
|
|
2719
|
+
abstract readSettings(trx?: sdk.TrxToken): Promise<TableSettings>;
|
|
2720
|
+
abstract findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<TableCertificateField[]>;
|
|
2721
|
+
abstract findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificate[]>;
|
|
2722
|
+
abstract findCommissions(args: sdk.FindCommissionsArgs): Promise<TableCommission[]>;
|
|
2723
|
+
abstract findMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<TableMonitorEvent[]>;
|
|
2724
|
+
abstract findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>;
|
|
2725
|
+
abstract findOutputs(args: sdk.FindOutputsArgs): Promise<TableOutput[]>;
|
|
2726
|
+
abstract findOutputTags(args: sdk.FindOutputTagsArgs): Promise<TableOutputTag[]>;
|
|
2727
|
+
abstract findSyncStates(args: sdk.FindSyncStatesArgs): Promise<TableSyncState[]>;
|
|
2728
|
+
abstract findTransactions(args: sdk.FindTransactionsArgs): Promise<TableTransaction[]>;
|
|
2729
|
+
abstract findTxLabels(args: sdk.FindTxLabelsArgs): Promise<TableTxLabel[]>;
|
|
2730
|
+
abstract findUsers(args: sdk.FindUsersArgs): Promise<TableUser[]>;
|
|
1110
2731
|
abstract countCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<number>;
|
|
1111
2732
|
abstract countCertificates(args: sdk.FindCertificatesArgs): Promise<number>;
|
|
1112
2733
|
abstract countCommissions(args: sdk.FindCommissionsArgs): Promise<number>;
|
|
@@ -1118,11 +2739,11 @@ export abstract class StorageReader implements sdk.StorageSyncReader {
|
|
|
1118
2739
|
abstract countTransactions(args: sdk.FindTransactionsArgs): Promise<number>;
|
|
1119
2740
|
abstract countTxLabels(args: sdk.FindTxLabelsArgs): Promise<number>;
|
|
1120
2741
|
abstract countUsers(args: sdk.FindUsersArgs): Promise<number>;
|
|
1121
|
-
abstract getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1122
|
-
abstract getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1123
|
-
abstract getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1124
|
-
abstract getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1125
|
-
async findUserByIdentityKey(key: string): Promise<
|
|
2742
|
+
abstract getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTx[]>;
|
|
2743
|
+
abstract getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTxReq[]>;
|
|
2744
|
+
abstract getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableTxLabelMap[]>;
|
|
2745
|
+
abstract getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableOutputTagMap[]>;
|
|
2746
|
+
async findUserByIdentityKey(key: string): Promise<TableUser | undefined>
|
|
1126
2747
|
async getSyncChunk(args: sdk.RequestSyncChunkArgs): Promise<sdk.SyncChunk>
|
|
1127
2748
|
validateEntityDate(date: Date | string | number): Date | string
|
|
1128
2749
|
validateOptionalEntityDate(date: Date | string | number | null | undefined, useNowAsDefault?: boolean): Date | string | undefined
|
|
@@ -1132,11 +2753,7 @@ export abstract class StorageReader implements sdk.StorageSyncReader {
|
|
|
1132
2753
|
}
|
|
1133
2754
|
```
|
|
1134
2755
|
|
|
1135
|
-
See also: [Chain](#type-chain), [DBType](#type-dbtype), [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs), [FindCertificatesArgs](#interface-findcertificatesargs), [FindCommissionsArgs](#interface-findcommissionsargs), [FindForUserSincePagedArgs](#interface-findforusersincepagedargs), [FindMonitorEventsArgs](#interface-findmonitoreventsargs), [FindOutputBasketsArgs](#interface-findoutputbasketsargs), [FindOutputTagsArgs](#interface-findoutputtagsargs), [FindOutputsArgs](#interface-findoutputsargs), [FindSyncStatesArgs](#interface-findsyncstatesargs), [FindTransactionsArgs](#interface-findtransactionsargs), [FindTxLabelsArgs](#interface-findtxlabelsargs), [FindUsersArgs](#interface-findusersargs), [RequestSyncChunkArgs](#interface-requestsyncchunkargs), [StorageReaderOptions](#interface-storagereaderoptions), [StorageSyncReader](#class-storagesyncreader), [SyncChunk](#interface-syncchunk), [TrxToken](#interface-trxtoken), [getSyncChunk](#function-getsyncchunk)
|
|
1136
|
-
|
|
1137
|
-
<details>
|
|
1138
|
-
|
|
1139
|
-
<summary>Class StorageReader Details</summary>
|
|
2756
|
+
See also: [Chain](./client.md#type-chain), [DBType](./storage.md#type-dbtype), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindMonitorEventsArgs](./client.md#interface-findmonitoreventsargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [FindUsersArgs](./client.md#interface-findusersargs), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageReaderOptions](./storage.md#interface-storagereaderoptions), [StorageSyncReader](./storage.md#class-storagesyncreader), [SyncChunk](./client.md#interface-syncchunk), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken), [getSyncChunk](./storage.md#function-getsyncchunk)
|
|
1140
2757
|
|
|
1141
2758
|
###### Method validateEntityDate
|
|
1142
2759
|
|
|
@@ -1157,8 +2774,6 @@ Argument Details
|
|
|
1157
2774
|
+ **useNowAsDefault**
|
|
1158
2775
|
+ if true and date is null or undefiend, set to current time.
|
|
1159
2776
|
|
|
1160
|
-
</details>
|
|
1161
|
-
|
|
1162
2777
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1163
2778
|
|
|
1164
2779
|
---
|
|
@@ -1169,87 +2784,87 @@ export abstract class StorageReaderWriter extends StorageReader {
|
|
|
1169
2784
|
constructor(options: StorageReaderWriterOptions)
|
|
1170
2785
|
abstract dropAllData(): Promise<void>;
|
|
1171
2786
|
abstract migrate(storageName: string, storageIdentityKey: string): Promise<string>;
|
|
1172
|
-
abstract findOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<
|
|
1173
|
-
abstract findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<
|
|
1174
|
-
abstract findProvenTxs(args: sdk.FindProvenTxsArgs): Promise<
|
|
1175
|
-
abstract findTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<
|
|
2787
|
+
abstract findOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<TableOutputTagMap[]>;
|
|
2788
|
+
abstract findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>;
|
|
2789
|
+
abstract findProvenTxs(args: sdk.FindProvenTxsArgs): Promise<TableProvenTx[]>;
|
|
2790
|
+
abstract findTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<TableTxLabelMap[]>;
|
|
1176
2791
|
abstract countOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<number>;
|
|
1177
2792
|
abstract countProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<number>;
|
|
1178
2793
|
abstract countProvenTxs(args: sdk.FindProvenTxsArgs): Promise<number>;
|
|
1179
2794
|
abstract countTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<number>;
|
|
1180
|
-
abstract insertCertificate(certificate:
|
|
1181
|
-
abstract insertCertificateField(certificateField:
|
|
1182
|
-
abstract insertCommission(commission:
|
|
1183
|
-
abstract insertMonitorEvent(event:
|
|
1184
|
-
abstract insertOutput(output:
|
|
1185
|
-
abstract insertOutputBasket(basket:
|
|
1186
|
-
abstract insertOutputTag(tag:
|
|
1187
|
-
abstract insertOutputTagMap(tagMap:
|
|
1188
|
-
abstract insertProvenTx(tx:
|
|
1189
|
-
abstract insertProvenTxReq(tx:
|
|
1190
|
-
abstract insertSyncState(syncState:
|
|
1191
|
-
abstract insertTransaction(tx:
|
|
1192
|
-
abstract insertTxLabel(label:
|
|
1193
|
-
abstract insertTxLabelMap(labelMap:
|
|
1194
|
-
abstract insertUser(user:
|
|
1195
|
-
abstract updateCertificate(id: number, update: Partial<
|
|
1196
|
-
abstract updateCertificateField(certificateId: number, fieldName: string, update: Partial<
|
|
1197
|
-
abstract updateCommission(id: number, update: Partial<
|
|
1198
|
-
abstract updateMonitorEvent(id: number, update: Partial<
|
|
1199
|
-
abstract updateOutput(id: number, update: Partial<
|
|
1200
|
-
abstract updateOutputBasket(id: number, update: Partial<
|
|
1201
|
-
abstract updateOutputTag(id: number, update: Partial<
|
|
1202
|
-
abstract updateOutputTagMap(outputId: number, tagId: number, update: Partial<
|
|
1203
|
-
abstract updateProvenTx(id: number, update: Partial<
|
|
1204
|
-
abstract updateProvenTxReq(id: number | number[], update: Partial<
|
|
1205
|
-
abstract updateSyncState(id: number, update: Partial<
|
|
1206
|
-
abstract updateTransaction(id: number | number[], update: Partial<
|
|
1207
|
-
abstract updateTxLabel(id: number, update: Partial<
|
|
1208
|
-
abstract updateTxLabelMap(transactionId: number, txLabelId: number, update: Partial<
|
|
1209
|
-
abstract updateUser(id: number, update: Partial<
|
|
2795
|
+
abstract insertCertificate(certificate: TableCertificate, trx?: sdk.TrxToken): Promise<number>;
|
|
2796
|
+
abstract insertCertificateField(certificateField: TableCertificateField, trx?: sdk.TrxToken): Promise<void>;
|
|
2797
|
+
abstract insertCommission(commission: TableCommission, trx?: sdk.TrxToken): Promise<number>;
|
|
2798
|
+
abstract insertMonitorEvent(event: TableMonitorEvent, trx?: sdk.TrxToken): Promise<number>;
|
|
2799
|
+
abstract insertOutput(output: TableOutput, trx?: sdk.TrxToken): Promise<number>;
|
|
2800
|
+
abstract insertOutputBasket(basket: TableOutputBasket, trx?: sdk.TrxToken): Promise<number>;
|
|
2801
|
+
abstract insertOutputTag(tag: TableOutputTag, trx?: sdk.TrxToken): Promise<number>;
|
|
2802
|
+
abstract insertOutputTagMap(tagMap: TableOutputTagMap, trx?: sdk.TrxToken): Promise<void>;
|
|
2803
|
+
abstract insertProvenTx(tx: TableProvenTx, trx?: sdk.TrxToken): Promise<number>;
|
|
2804
|
+
abstract insertProvenTxReq(tx: TableProvenTxReq, trx?: sdk.TrxToken): Promise<number>;
|
|
2805
|
+
abstract insertSyncState(syncState: TableSyncState, trx?: sdk.TrxToken): Promise<number>;
|
|
2806
|
+
abstract insertTransaction(tx: TableTransaction, trx?: sdk.TrxToken): Promise<number>;
|
|
2807
|
+
abstract insertTxLabel(label: TableTxLabel, trx?: sdk.TrxToken): Promise<number>;
|
|
2808
|
+
abstract insertTxLabelMap(labelMap: TableTxLabelMap, trx?: sdk.TrxToken): Promise<void>;
|
|
2809
|
+
abstract insertUser(user: TableUser, trx?: sdk.TrxToken): Promise<number>;
|
|
2810
|
+
abstract updateCertificate(id: number, update: Partial<TableCertificate>, trx?: sdk.TrxToken): Promise<number>;
|
|
2811
|
+
abstract updateCertificateField(certificateId: number, fieldName: string, update: Partial<TableCertificateField>, trx?: sdk.TrxToken): Promise<number>;
|
|
2812
|
+
abstract updateCommission(id: number, update: Partial<TableCommission>, trx?: sdk.TrxToken): Promise<number>;
|
|
2813
|
+
abstract updateMonitorEvent(id: number, update: Partial<TableMonitorEvent>, trx?: sdk.TrxToken): Promise<number>;
|
|
2814
|
+
abstract updateOutput(id: number, update: Partial<TableOutput>, trx?: sdk.TrxToken): Promise<number>;
|
|
2815
|
+
abstract updateOutputBasket(id: number, update: Partial<TableOutputBasket>, trx?: sdk.TrxToken): Promise<number>;
|
|
2816
|
+
abstract updateOutputTag(id: number, update: Partial<TableOutputTag>, trx?: sdk.TrxToken): Promise<number>;
|
|
2817
|
+
abstract updateOutputTagMap(outputId: number, tagId: number, update: Partial<TableOutputTagMap>, trx?: sdk.TrxToken): Promise<number>;
|
|
2818
|
+
abstract updateProvenTx(id: number, update: Partial<TableProvenTx>, trx?: sdk.TrxToken): Promise<number>;
|
|
2819
|
+
abstract updateProvenTxReq(id: number | number[], update: Partial<TableProvenTxReq>, trx?: sdk.TrxToken): Promise<number>;
|
|
2820
|
+
abstract updateSyncState(id: number, update: Partial<TableSyncState>, trx?: sdk.TrxToken): Promise<number>;
|
|
2821
|
+
abstract updateTransaction(id: number | number[], update: Partial<TableTransaction>, trx?: sdk.TrxToken): Promise<number>;
|
|
2822
|
+
abstract updateTxLabel(id: number, update: Partial<TableTxLabel>, trx?: sdk.TrxToken): Promise<number>;
|
|
2823
|
+
abstract updateTxLabelMap(transactionId: number, txLabelId: number, update: Partial<TableTxLabelMap>, trx?: sdk.TrxToken): Promise<number>;
|
|
2824
|
+
abstract updateUser(id: number, update: Partial<TableUser>, trx?: sdk.TrxToken): Promise<number>;
|
|
1210
2825
|
async setActive(auth: sdk.AuthId, newActiveStorageIdentityKey: string): Promise<number>
|
|
1211
|
-
async findCertificateById(id: number, trx?: sdk.TrxToken): Promise<
|
|
1212
|
-
async findCommissionById(id: number, trx?: sdk.TrxToken): Promise<
|
|
1213
|
-
async findOutputById(id: number, trx?: sdk.TrxToken, noScript?: boolean): Promise<
|
|
1214
|
-
async findOutputBasketById(id: number, trx?: sdk.TrxToken): Promise<
|
|
1215
|
-
async findProvenTxById(id: number, trx?: sdk.TrxToken | undefined): Promise<
|
|
1216
|
-
async findProvenTxReqById(id: number, trx?: sdk.TrxToken | undefined): Promise<
|
|
1217
|
-
async findSyncStateById(id: number, trx?: sdk.TrxToken): Promise<
|
|
1218
|
-
async findTransactionById(id: number, trx?: sdk.TrxToken, noRawTx?: boolean): Promise<
|
|
1219
|
-
async findTxLabelById(id: number, trx?: sdk.TrxToken): Promise<
|
|
1220
|
-
async findOutputTagById(id: number, trx?: sdk.TrxToken): Promise<
|
|
1221
|
-
async findUserById(id: number, trx?: sdk.TrxToken): Promise<
|
|
2826
|
+
async findCertificateById(id: number, trx?: sdk.TrxToken): Promise<TableCertificate | undefined>
|
|
2827
|
+
async findCommissionById(id: number, trx?: sdk.TrxToken): Promise<TableCommission | undefined>
|
|
2828
|
+
async findOutputById(id: number, trx?: sdk.TrxToken, noScript?: boolean): Promise<TableOutput | undefined>
|
|
2829
|
+
async findOutputBasketById(id: number, trx?: sdk.TrxToken): Promise<TableOutputBasket | undefined>
|
|
2830
|
+
async findProvenTxById(id: number, trx?: sdk.TrxToken | undefined): Promise<TableProvenTx | undefined>
|
|
2831
|
+
async findProvenTxReqById(id: number, trx?: sdk.TrxToken | undefined): Promise<TableProvenTxReq | undefined>
|
|
2832
|
+
async findSyncStateById(id: number, trx?: sdk.TrxToken): Promise<TableSyncState | undefined>
|
|
2833
|
+
async findTransactionById(id: number, trx?: sdk.TrxToken, noRawTx?: boolean): Promise<TableTransaction | undefined>
|
|
2834
|
+
async findTxLabelById(id: number, trx?: sdk.TrxToken): Promise<TableTxLabel | undefined>
|
|
2835
|
+
async findOutputTagById(id: number, trx?: sdk.TrxToken): Promise<TableOutputTag | undefined>
|
|
2836
|
+
async findUserById(id: number, trx?: sdk.TrxToken): Promise<TableUser | undefined>
|
|
1222
2837
|
async findOrInsertUser(identityKey: string, trx?: sdk.TrxToken): Promise<{
|
|
1223
|
-
user:
|
|
2838
|
+
user: TableUser;
|
|
1224
2839
|
isNew: boolean;
|
|
1225
2840
|
}>
|
|
1226
|
-
async findOrInsertTransaction(newTx:
|
|
1227
|
-
tx:
|
|
2841
|
+
async findOrInsertTransaction(newTx: TableTransaction, trx?: sdk.TrxToken): Promise<{
|
|
2842
|
+
tx: TableTransaction;
|
|
1228
2843
|
isNew: boolean;
|
|
1229
2844
|
}>
|
|
1230
|
-
async findOrInsertOutputBasket(userId: number, name: string, trx?: sdk.TrxToken): Promise<
|
|
1231
|
-
async findOrInsertTxLabel(userId: number, label: string, trx?: sdk.TrxToken): Promise<
|
|
1232
|
-
async findOrInsertTxLabelMap(transactionId: number, txLabelId: number, trx?: sdk.TrxToken): Promise<
|
|
1233
|
-
async findOrInsertOutputTag(userId: number, tag: string, trx?: sdk.TrxToken): Promise<
|
|
1234
|
-
async findOrInsertOutputTagMap(outputId: number, outputTagId: number, trx?: sdk.TrxToken): Promise<
|
|
2845
|
+
async findOrInsertOutputBasket(userId: number, name: string, trx?: sdk.TrxToken): Promise<TableOutputBasket>
|
|
2846
|
+
async findOrInsertTxLabel(userId: number, label: string, trx?: sdk.TrxToken): Promise<TableTxLabel>
|
|
2847
|
+
async findOrInsertTxLabelMap(transactionId: number, txLabelId: number, trx?: sdk.TrxToken): Promise<TableTxLabelMap>
|
|
2848
|
+
async findOrInsertOutputTag(userId: number, tag: string, trx?: sdk.TrxToken): Promise<TableOutputTag>
|
|
2849
|
+
async findOrInsertOutputTagMap(outputId: number, outputTagId: number, trx?: sdk.TrxToken): Promise<TableOutputTagMap>
|
|
1235
2850
|
async findOrInsertSyncStateAuth(auth: sdk.AuthId, storageIdentityKey: string, storageName: string): Promise<{
|
|
1236
|
-
syncState:
|
|
2851
|
+
syncState: TableSyncState;
|
|
1237
2852
|
isNew: boolean;
|
|
1238
2853
|
}>
|
|
1239
|
-
async findOrInsertProvenTxReq(newReq:
|
|
1240
|
-
req:
|
|
2854
|
+
async findOrInsertProvenTxReq(newReq: TableProvenTxReq, trx?: sdk.TrxToken): Promise<{
|
|
2855
|
+
req: TableProvenTxReq;
|
|
1241
2856
|
isNew: boolean;
|
|
1242
2857
|
}>
|
|
1243
|
-
async findOrInsertProvenTx(newProven:
|
|
1244
|
-
proven:
|
|
2858
|
+
async findOrInsertProvenTx(newProven: TableProvenTx, trx?: sdk.TrxToken): Promise<{
|
|
2859
|
+
proven: TableProvenTx;
|
|
1245
2860
|
isNew: boolean;
|
|
1246
2861
|
}>
|
|
1247
2862
|
abstract processSyncChunk(args: sdk.RequestSyncChunkArgs, chunk: sdk.SyncChunk): Promise<sdk.ProcessSyncChunkResult>;
|
|
1248
|
-
async tagOutput(partial: Partial<
|
|
2863
|
+
async tagOutput(partial: Partial<TableOutput>, tag: string, trx?: sdk.TrxToken): Promise<void>
|
|
1249
2864
|
}
|
|
1250
2865
|
```
|
|
1251
2866
|
|
|
1252
|
-
See also: [AuthId](#interface-authid), [FindOutputTagMapsArgs](#interface-findoutputtagmapsargs), [FindProvenTxReqsArgs](#interface-findproventxreqsargs), [FindProvenTxsArgs](#interface-findproventxsargs), [FindTxLabelMapsArgs](#interface-findtxlabelmapsargs), [ProcessSyncChunkResult](#interface-processsyncchunkresult), [RequestSyncChunkArgs](#interface-requestsyncchunkargs), [StorageReader](#class-storagereader), [StorageReaderWriterOptions](#interface-storagereaderwriteroptions), [SyncChunk](#interface-syncchunk), [TrxToken](#interface-trxtoken)
|
|
2867
|
+
See also: [AuthId](./client.md#interface-authid), [FindOutputTagMapsArgs](./client.md#interface-findoutputtagmapsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [FindProvenTxsArgs](./client.md#interface-findproventxsargs), [FindTxLabelMapsArgs](./client.md#interface-findtxlabelmapsargs), [ProcessSyncChunkResult](./client.md#interface-processsyncchunkresult), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageReader](./storage.md#class-storagereader), [StorageReaderWriterOptions](./storage.md#interface-storagereaderwriteroptions), [SyncChunk](./client.md#interface-syncchunk), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCommission](./storage.md#interface-tablecommission), [TableMonitorEvent](./storage.md#interface-tablemonitorevent), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [TrxToken](./client.md#interface-trxtoken)
|
|
1253
2868
|
|
|
1254
2869
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1255
2870
|
|
|
@@ -1263,7 +2878,7 @@ export class StorageServer {
|
|
|
1263
2878
|
}
|
|
1264
2879
|
```
|
|
1265
2880
|
|
|
1266
|
-
See also: [StorageProvider](#class-storageprovider), [WalletStorageServerOptions](#interface-walletstorageserveroptions)
|
|
2881
|
+
See also: [StorageProvider](./storage.md#class-storageprovider), [WalletStorageServerOptions](./storage.md#interface-walletstorageserveroptions)
|
|
1267
2882
|
|
|
1268
2883
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1269
2884
|
|
|
@@ -1279,28 +2894,28 @@ and the `StorageBaseReader` to be protected.
|
|
|
1279
2894
|
export class StorageSyncReader implements sdk.StorageSyncReader {
|
|
1280
2895
|
constructor(public auth: sdk.AuthId, public storage: StorageReader)
|
|
1281
2896
|
isAvailable(): boolean
|
|
1282
|
-
async makeAvailable(): Promise<
|
|
2897
|
+
async makeAvailable(): Promise<TableSettings>
|
|
1283
2898
|
destroy(): Promise<void>
|
|
1284
|
-
getSettings():
|
|
2899
|
+
getSettings(): TableSettings
|
|
1285
2900
|
async getSyncChunk(args: sdk.RequestSyncChunkArgs): Promise<sdk.SyncChunk>
|
|
1286
|
-
async findUserByIdentityKey(key: string): Promise<
|
|
1287
|
-
async findSyncStates(args: sdk.FindSyncStatesArgs): Promise<
|
|
1288
|
-
async findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<
|
|
1289
|
-
async findCertificates(args: sdk.FindCertificatesArgs): Promise<
|
|
1290
|
-
async findCommissions(args: sdk.FindCommissionsArgs): Promise<
|
|
1291
|
-
async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<
|
|
1292
|
-
async findOutputs(args: sdk.FindOutputsArgs): Promise<
|
|
1293
|
-
async findOutputTags(args: sdk.FindOutputTagsArgs): Promise<
|
|
1294
|
-
async findTransactions(args: sdk.FindTransactionsArgs): Promise<
|
|
1295
|
-
async findTxLabels(args: sdk.FindTxLabelsArgs): Promise<
|
|
1296
|
-
async getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1297
|
-
async getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1298
|
-
async getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1299
|
-
async getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
2901
|
+
async findUserByIdentityKey(key: string): Promise<TableUser | undefined>
|
|
2902
|
+
async findSyncStates(args: sdk.FindSyncStatesArgs): Promise<TableSyncState[]>
|
|
2903
|
+
async findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<TableCertificateField[]>
|
|
2904
|
+
async findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificate[]>
|
|
2905
|
+
async findCommissions(args: sdk.FindCommissionsArgs): Promise<TableCommission[]>
|
|
2906
|
+
async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
|
|
2907
|
+
async findOutputs(args: sdk.FindOutputsArgs): Promise<TableOutput[]>
|
|
2908
|
+
async findOutputTags(args: sdk.FindOutputTagsArgs): Promise<TableOutputTag[]>
|
|
2909
|
+
async findTransactions(args: sdk.FindTransactionsArgs): Promise<TableTransaction[]>
|
|
2910
|
+
async findTxLabels(args: sdk.FindTxLabelsArgs): Promise<TableTxLabel[]>
|
|
2911
|
+
async getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTx[]>
|
|
2912
|
+
async getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTxReq[]>
|
|
2913
|
+
async getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableTxLabelMap[]>
|
|
2914
|
+
async getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableOutputTagMap[]>
|
|
1300
2915
|
}
|
|
1301
2916
|
```
|
|
1302
2917
|
|
|
1303
|
-
See also: [AuthId](#interface-authid), [FindCertificateFieldsArgs](#interface-findcertificatefieldsargs), [FindCertificatesArgs](#interface-findcertificatesargs), [FindCommissionsArgs](#interface-findcommissionsargs), [FindForUserSincePagedArgs](#interface-findforusersincepagedargs), [FindOutputBasketsArgs](#interface-findoutputbasketsargs), [FindOutputTagsArgs](#interface-findoutputtagsargs), [FindOutputsArgs](#interface-findoutputsargs), [FindSyncStatesArgs](#interface-findsyncstatesargs), [FindTransactionsArgs](#interface-findtransactionsargs), [FindTxLabelsArgs](#interface-findtxlabelsargs), [RequestSyncChunkArgs](#interface-requestsyncchunkargs), [StorageReader](#class-storagereader), [SyncChunk](#interface-syncchunk), [getSyncChunk](#function-getsyncchunk)
|
|
2918
|
+
See also: [AuthId](./client.md#interface-authid), [FindCertificateFieldsArgs](./client.md#interface-findcertificatefieldsargs), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindCommissionsArgs](./client.md#interface-findcommissionsargs), [FindForUserSincePagedArgs](./client.md#interface-findforusersincepagedargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputTagsArgs](./client.md#interface-findoutputtagsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindSyncStatesArgs](./client.md#interface-findsyncstatesargs), [FindTransactionsArgs](./client.md#interface-findtransactionsargs), [FindTxLabelsArgs](./client.md#interface-findtxlabelsargs), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageReader](./storage.md#class-storagereader), [SyncChunk](./client.md#interface-syncchunk), [TableCertificate](./storage.md#interface-tablecertificate), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCommission](./storage.md#interface-tablecommission), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableOutputTag](./storage.md#interface-tableoutputtag), [TableOutputTagMap](./storage.md#interface-tableoutputtagmap), [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableSyncState](./storage.md#interface-tablesyncstate), [TableTransaction](./storage.md#interface-tabletransaction), [TableTxLabel](./storage.md#interface-tabletxlabel), [TableTxLabelMap](./storage.md#interface-tabletxlabelmap), [TableUser](./storage.md#interface-tableuser), [getSyncChunk](./storage.md#function-getsyncchunk)
|
|
1304
2919
|
|
|
1305
2920
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1306
2921
|
|
|
@@ -1350,12 +2965,12 @@ export class WalletStorageManager implements sdk.WalletStorage {
|
|
|
1350
2965
|
async addWalletStorageProvider(provider: sdk.WalletStorageProvider): Promise<void>
|
|
1351
2966
|
setServices(v: sdk.WalletServices)
|
|
1352
2967
|
getServices(): sdk.WalletServices
|
|
1353
|
-
getSettings():
|
|
1354
|
-
async makeAvailable(): Promise<
|
|
2968
|
+
getSettings(): TableSettings
|
|
2969
|
+
async makeAvailable(): Promise<TableSettings>
|
|
1355
2970
|
async migrate(storageName: string, storageIdentityKey: string): Promise<string>
|
|
1356
2971
|
async destroy(): Promise<void>
|
|
1357
2972
|
async findOrInsertUser(identityKey: string): Promise<{
|
|
1358
|
-
user:
|
|
2973
|
+
user: TableUser;
|
|
1359
2974
|
isNew: boolean;
|
|
1360
2975
|
}>
|
|
1361
2976
|
async abortAction(args: AbortActionArgs): Promise<AbortActionResult>
|
|
@@ -1364,14 +2979,14 @@ export class WalletStorageManager implements sdk.WalletStorage {
|
|
|
1364
2979
|
async relinquishCertificate(args: RelinquishCertificateArgs): Promise<number>
|
|
1365
2980
|
async relinquishOutput(args: RelinquishOutputArgs): Promise<number>
|
|
1366
2981
|
async processAction(args: sdk.StorageProcessActionArgs): Promise<sdk.StorageProcessActionResults>
|
|
1367
|
-
async insertCertificate(certificate:
|
|
2982
|
+
async insertCertificate(certificate: TableCertificate): Promise<number>
|
|
1368
2983
|
async listActions(vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
|
|
1369
2984
|
async listCertificates(args: sdk.ValidListCertificatesArgs): Promise<ListCertificatesResult>
|
|
1370
2985
|
async listOutputs(vargs: sdk.ValidListOutputsArgs): Promise<ListOutputsResult>
|
|
1371
|
-
async findCertificates(args: sdk.FindCertificatesArgs): Promise<
|
|
1372
|
-
async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<
|
|
1373
|
-
async findOutputs(args: sdk.FindOutputsArgs): Promise<
|
|
1374
|
-
async findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<
|
|
2986
|
+
async findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificate[]>
|
|
2987
|
+
async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
|
|
2988
|
+
async findOutputs(args: sdk.FindOutputsArgs): Promise<TableOutput[]>
|
|
2989
|
+
async findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>
|
|
1375
2990
|
async syncFromReader(identityKey: string, reader: StorageSyncReader): Promise<void>
|
|
1376
2991
|
async updateBackups(activeSync?: sdk.WalletStorageSync)
|
|
1377
2992
|
async syncToWriter(auth: sdk.AuthId, writer: sdk.WalletStorageProvider, activeSync?: sdk.WalletStorageSync): Promise<{
|
|
@@ -1382,11 +2997,7 @@ export class WalletStorageManager implements sdk.WalletStorage {
|
|
|
1382
2997
|
}
|
|
1383
2998
|
```
|
|
1384
2999
|
|
|
1385
|
-
See also: [AuthId](#interface-authid), [FindCertificatesArgs](#interface-findcertificatesargs), [FindOutputBasketsArgs](#interface-findoutputbasketsargs), [FindOutputsArgs](#interface-findoutputsargs), [FindProvenTxReqsArgs](#interface-findproventxreqsargs), [StorageCreateActionResult](#interface-storagecreateactionresult), [StorageProcessActionArgs](#interface-storageprocessactionargs), [StorageProcessActionResults](#interface-storageprocessactionresults), [StorageProvider](#class-storageprovider), [StorageSyncReader](#class-storagesyncreader), [ValidCreateActionArgs](#interface-validcreateactionargs), [ValidListActionsArgs](#interface-validlistactionsargs), [ValidListCertificatesArgs](#interface-validlistcertificatesargs), [ValidListOutputsArgs](#interface-validlistoutputsargs), [WalletServices](#interface-walletservices), [WalletStorage](#interface-walletstorage), [WalletStorageProvider](#interface-walletstorageprovider), [WalletStorageReader](#interface-walletstoragereader), [WalletStorageSync](#interface-walletstoragesync), [WalletStorageWriter](#interface-walletstoragewriter), [createAction](#function-createaction), [internalizeAction](#function-internalizeaction), [listActions](#function-listactions), [listCertificates](#function-listcertificates), [listOutputs](#function-listoutputs), [processAction](#function-processaction)
|
|
1386
|
-
|
|
1387
|
-
<details>
|
|
1388
|
-
|
|
1389
|
-
<summary>Class WalletStorageManager Details</summary>
|
|
3000
|
+
See also: [AuthId](./client.md#interface-authid), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [FindOutputsArgs](./client.md#interface-findoutputsargs), [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [StorageProvider](./storage.md#class-storageprovider), [StorageSyncReader](./storage.md#class-storagesyncreader), [TableCertificate](./storage.md#interface-tablecertificate), [TableOutput](./storage.md#interface-tableoutput), [TableOutputBasket](./storage.md#interface-tableoutputbasket), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TableSettings](./storage.md#interface-tablesettings), [TableUser](./storage.md#interface-tableuser), [ValidCreateActionArgs](./client.md#interface-validcreateactionargs), [ValidListActionsArgs](./client.md#interface-validlistactionsargs), [ValidListCertificatesArgs](./client.md#interface-validlistcertificatesargs), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs), [WalletServices](./client.md#interface-walletservices), [WalletStorage](./client.md#interface-walletstorage), [WalletStorageProvider](./client.md#interface-walletstorageprovider), [WalletStorageReader](./client.md#interface-walletstoragereader), [WalletStorageSync](./client.md#interface-walletstoragesync), [WalletStorageWriter](./client.md#interface-walletstoragewriter), [createAction](./storage.md#function-createaction), [internalizeAction](./storage.md#function-internalizeaction), [listActions](./storage.md#function-listactions), [listCertificates](./storage.md#function-listcertificates), [listOutputs](./storage.md#function-listoutputs), [processAction](./storage.md#function-processaction)
|
|
1390
3001
|
|
|
1391
3002
|
###### Property _isSingleWriter
|
|
1392
3003
|
|
|
@@ -1430,7 +3041,7 @@ true if the active `WalletStorageProvider` also implements `StorageProvider`
|
|
|
1430
3041
|
```ts
|
|
1431
3042
|
async runAsSync<R>(sync: (active: sdk.WalletStorageSync) => Promise<R>, activeSync?: sdk.WalletStorageSync): Promise<R>
|
|
1432
3043
|
```
|
|
1433
|
-
See also: [WalletStorageSync](#interface-walletstoragesync)
|
|
3044
|
+
See also: [WalletStorageSync](./client.md#interface-walletstoragesync)
|
|
1434
3045
|
|
|
1435
3046
|
Argument Details
|
|
1436
3047
|
|
|
@@ -1452,8 +3063,6 @@ Argument Details
|
|
|
1452
3063
|
+ **storageIdentityKey**
|
|
1453
3064
|
+ of current backup storage provider that is to become the new active provider.
|
|
1454
3065
|
|
|
1455
|
-
</details>
|
|
1456
|
-
|
|
1457
3066
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1458
3067
|
|
|
1459
3068
|
---
|
|
@@ -1461,9 +3070,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1461
3070
|
|
|
1462
3071
|
| | |
|
|
1463
3072
|
| --- | --- |
|
|
1464
|
-
| [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [
|
|
1465
|
-
| [createAction](#function-createaction) | [
|
|
1466
|
-
| [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [
|
|
3073
|
+
| [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) |
|
|
3074
|
+
| [createAction](#function-createaction) | [offsetPubKey](#function-offsetpubkey) |
|
|
3075
|
+
| [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [processAction](#function-processaction) |
|
|
3076
|
+
| [createSyncMap](#function-createsyncmap) | [purgeData](#function-purgedata) |
|
|
1467
3077
|
| [generateChangeSdk](#function-generatechangesdk) | [reviewStatus](#function-reviewstatus) |
|
|
1468
3078
|
| [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [transactionInputSize](#function-transactioninputsize) |
|
|
1469
3079
|
| [getBeefForTransaction](#function-getbeeffortransaction) | [transactionOutputSize](#function-transactionoutputsize) |
|
|
@@ -1472,7 +3082,6 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1472
3082
|
| [listActions](#function-listactions) | [validateGenerateChangeSdkResult](#function-validategeneratechangesdkresult) |
|
|
1473
3083
|
| [listCertificates](#function-listcertificates) | [validateStorageFeeModel](#function-validatestoragefeemodel) |
|
|
1474
3084
|
| [listOutputs](#function-listoutputs) | [varUintSize](#function-varuintsize) |
|
|
1475
|
-
| [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) | |
|
|
1476
3085
|
|
|
1477
3086
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1478
3087
|
|
|
@@ -1484,10 +3093,10 @@ Attempt to post one or more `ProvenTxReq` with status 'unsent'
|
|
|
1484
3093
|
to the bitcoin network.
|
|
1485
3094
|
|
|
1486
3095
|
```ts
|
|
1487
|
-
export async function attemptToPostReqsToNetwork(storage: StorageProvider, reqs:
|
|
3096
|
+
export async function attemptToPostReqsToNetwork(storage: StorageProvider, reqs: EntityProvenTxReq[], trx?: sdk.TrxToken): Promise<PostReqsToNetworkResult>
|
|
1488
3097
|
```
|
|
1489
3098
|
|
|
1490
|
-
See also: [PostReqsToNetworkResult](#interface-postreqstonetworkresult), [StorageProvider](#class-storageprovider), [TrxToken](#interface-trxtoken)
|
|
3099
|
+
See also: [EntityProvenTxReq](./storage.md#class-entityproventxreq), [PostReqsToNetworkResult](./storage.md#interface-postreqstonetworkresult), [StorageProvider](./storage.md#class-storageprovider), [TrxToken](./client.md#interface-trxtoken)
|
|
1491
3100
|
|
|
1492
3101
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1493
3102
|
|
|
@@ -1498,7 +3107,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1498
3107
|
export async function createAction(storage: StorageProvider, auth: sdk.AuthId, vargs: sdk.ValidCreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<sdk.StorageCreateActionResult>
|
|
1499
3108
|
```
|
|
1500
3109
|
|
|
1501
|
-
See also: [AuthId](#interface-authid), [StorageCreateActionResult](#interface-storagecreateactionresult), [StorageProvider](#class-storageprovider), [ValidCreateActionArgs](#interface-validcreateactionargs)
|
|
3110
|
+
See also: [AuthId](./client.md#interface-authid), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageProvider](./storage.md#class-storageprovider), [ValidCreateActionArgs](./client.md#interface-validcreateactionargs)
|
|
1502
3111
|
|
|
1503
3112
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1504
3113
|
|
|
@@ -1514,6 +3123,17 @@ export function createStorageServiceChargeScript(pubKeyHex: PubKeyHex): {
|
|
|
1514
3123
|
|
|
1515
3124
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1516
3125
|
|
|
3126
|
+
---
|
|
3127
|
+
##### Function: createSyncMap
|
|
3128
|
+
|
|
3129
|
+
```ts
|
|
3130
|
+
export function createSyncMap(): SyncMap
|
|
3131
|
+
```
|
|
3132
|
+
|
|
3133
|
+
See also: [SyncMap](./storage.md#interface-syncmap)
|
|
3134
|
+
|
|
3135
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3136
|
+
|
|
1517
3137
|
---
|
|
1518
3138
|
##### Function: generateChangeSdk
|
|
1519
3139
|
|
|
@@ -1527,7 +3147,7 @@ Confirms for each availbleChange output that it remains available as they are al
|
|
|
1527
3147
|
export async function generateChangeSdk(params: GenerateChangeSdkParams, allocateChangeInput: (targetSatoshis: number, exactSatoshis?: number) => Promise<GenerateChangeSdkChangeInput | undefined>, releaseChangeInput: (outputId: number) => Promise<void>): Promise<GenerateChangeSdkResult>
|
|
1528
3148
|
```
|
|
1529
3149
|
|
|
1530
|
-
See also: [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput), [GenerateChangeSdkParams](#interface-generatechangesdkparams), [GenerateChangeSdkResult](#interface-generatechangesdkresult)
|
|
3150
|
+
See also: [GenerateChangeSdkChangeInput](./storage.md#interface-generatechangesdkchangeinput), [GenerateChangeSdkParams](./storage.md#interface-generatechangesdkparams), [GenerateChangeSdkResult](./storage.md#interface-generatechangesdkresult)
|
|
1531
3151
|
|
|
1532
3152
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1533
3153
|
|
|
@@ -1542,7 +3162,7 @@ export function generateChangeSdkMakeStorage(availableChange: GenerateChangeSdkC
|
|
|
1542
3162
|
}
|
|
1543
3163
|
```
|
|
1544
3164
|
|
|
1545
|
-
See also: [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput)
|
|
3165
|
+
See also: [GenerateChangeSdkChangeInput](./storage.md#interface-generatechangesdkchangeinput)
|
|
1546
3166
|
|
|
1547
3167
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1548
3168
|
|
|
@@ -1566,11 +3186,7 @@ If `knownTxids` is defined, any 'txid' required by the `Beef` that appears in th
|
|
|
1566
3186
|
export async function getBeefForTransaction(storage: StorageProvider, txid: string, options: sdk.StorageGetBeefOptions): Promise<Beef>
|
|
1567
3187
|
```
|
|
1568
3188
|
|
|
1569
|
-
See also: [StorageGetBeefOptions](#interface-storagegetbeefoptions), [StorageProvider](#class-storageprovider)
|
|
1570
|
-
|
|
1571
|
-
<details>
|
|
1572
|
-
|
|
1573
|
-
<summary>Function getBeefForTransaction Details</summary>
|
|
3189
|
+
See also: [StorageGetBeefOptions](./client.md#interface-storagegetbeefoptions), [StorageProvider](./storage.md#class-storageprovider)
|
|
1574
3190
|
|
|
1575
3191
|
Argument Details
|
|
1576
3192
|
|
|
@@ -1579,8 +3195,6 @@ Argument Details
|
|
|
1579
3195
|
+ **txid**
|
|
1580
3196
|
+ the transaction hash for which an envelope is requested.
|
|
1581
3197
|
|
|
1582
|
-
</details>
|
|
1583
|
-
|
|
1584
3198
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1585
3199
|
|
|
1586
3200
|
---
|
|
@@ -1592,7 +3206,7 @@ Gets the next sync chunk of updated data from un-remoted storage (could be using
|
|
|
1592
3206
|
export async function getSyncChunk(storage: StorageReader, args: sdk.RequestSyncChunkArgs): Promise<sdk.SyncChunk>
|
|
1593
3207
|
```
|
|
1594
3208
|
|
|
1595
|
-
See also: [RequestSyncChunkArgs](#interface-requestsyncchunkargs), [StorageReader](#class-storagereader), [SyncChunk](#interface-syncchunk)
|
|
3209
|
+
See also: [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageReader](./storage.md#class-storagereader), [SyncChunk](./client.md#interface-syncchunk)
|
|
1596
3210
|
|
|
1597
3211
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1598
3212
|
|
|
@@ -1628,7 +3242,7 @@ When the transaction already exists, the description is updated. The isOutgoing
|
|
|
1628
3242
|
export async function internalizeAction(storage: StorageProvider, auth: sdk.AuthId, args: InternalizeActionArgs): Promise<InternalizeActionResult>
|
|
1629
3243
|
```
|
|
1630
3244
|
|
|
1631
|
-
See also: [AuthId](#interface-authid), [StorageProvider](#class-storageprovider)
|
|
3245
|
+
See also: [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md#class-storageprovider)
|
|
1632
3246
|
|
|
1633
3247
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1634
3248
|
|
|
@@ -1639,7 +3253,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1639
3253
|
export async function listActions(storage: StorageKnex, auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
|
|
1640
3254
|
```
|
|
1641
3255
|
|
|
1642
|
-
See also: [AuthId](#interface-authid), [StorageKnex](#class-storageknex), [ValidListActionsArgs](#interface-validlistactionsargs)
|
|
3256
|
+
See also: [AuthId](./client.md#interface-authid), [StorageKnex](./storage.md#class-storageknex), [ValidListActionsArgs](./client.md#interface-validlistactionsargs)
|
|
1643
3257
|
|
|
1644
3258
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1645
3259
|
|
|
@@ -1650,7 +3264,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1650
3264
|
export async function listCertificates(storage: StorageProvider, auth: sdk.AuthId, vargs: sdk.ValidListCertificatesArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListCertificatesResult>
|
|
1651
3265
|
```
|
|
1652
3266
|
|
|
1653
|
-
See also: [AuthId](#interface-authid), [StorageProvider](#class-storageprovider), [ValidListCertificatesArgs](#interface-validlistcertificatesargs)
|
|
3267
|
+
See also: [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md#class-storageprovider), [ValidListCertificatesArgs](./client.md#interface-validlistcertificatesargs)
|
|
1654
3268
|
|
|
1655
3269
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1656
3270
|
|
|
@@ -1661,7 +3275,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1661
3275
|
export async function listOutputs(dsk: StorageKnex, auth: sdk.AuthId, vargs: sdk.ValidListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListOutputsResult>
|
|
1662
3276
|
```
|
|
1663
3277
|
|
|
1664
|
-
See also: [AuthId](#interface-authid), [StorageKnex](#class-storageknex), [ValidListOutputsArgs](#interface-validlistoutputsargs)
|
|
3278
|
+
See also: [AuthId](./client.md#interface-authid), [StorageKnex](./storage.md#class-storageknex), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs)
|
|
1665
3279
|
|
|
1666
3280
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1667
3281
|
|
|
@@ -1696,7 +3310,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1696
3310
|
export async function processAction(storage: StorageProvider, auth: sdk.AuthId, args: sdk.StorageProcessActionArgs): Promise<sdk.StorageProcessActionResults>
|
|
1697
3311
|
```
|
|
1698
3312
|
|
|
1699
|
-
See also: [AuthId](#interface-authid), [StorageProcessActionArgs](#interface-storageprocessactionargs), [StorageProcessActionResults](#interface-storageprocessactionresults), [StorageProvider](#class-storageprovider)
|
|
3313
|
+
See also: [AuthId](./client.md#interface-authid), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [StorageProvider](./storage.md#class-storageprovider)
|
|
1700
3314
|
|
|
1701
3315
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1702
3316
|
|
|
@@ -1707,7 +3321,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1707
3321
|
export async function purgeData(storage: StorageKnex, params: sdk.PurgeParams, trx?: sdk.TrxToken): Promise<sdk.PurgeResults>
|
|
1708
3322
|
```
|
|
1709
3323
|
|
|
1710
|
-
See also: [PurgeParams](#interface-purgeparams), [PurgeResults](#interface-purgeresults), [StorageKnex](#class-storageknex), [TrxToken](#interface-trxtoken)
|
|
3324
|
+
See also: [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageKnex](./storage.md#class-storageknex), [TrxToken](./client.md#interface-trxtoken)
|
|
1711
3325
|
|
|
1712
3326
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1713
3327
|
|
|
@@ -1723,7 +3337,7 @@ export async function reviewStatus(storage: StorageKnex, args: {
|
|
|
1723
3337
|
}>
|
|
1724
3338
|
```
|
|
1725
3339
|
|
|
1726
|
-
See also: [StorageKnex](#class-storageknex), [TrxToken](#interface-trxtoken)
|
|
3340
|
+
See also: [StorageKnex](./storage.md#class-storageknex), [TrxToken](./client.md#interface-trxtoken)
|
|
1727
3341
|
|
|
1728
3342
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1729
3343
|
|
|
@@ -1734,10 +3348,6 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1734
3348
|
export function transactionInputSize(scriptSize: number): number
|
|
1735
3349
|
```
|
|
1736
3350
|
|
|
1737
|
-
<details>
|
|
1738
|
-
|
|
1739
|
-
<summary>Function transactionInputSize Details</summary>
|
|
1740
|
-
|
|
1741
3351
|
Returns
|
|
1742
3352
|
|
|
1743
3353
|
serialized byte length a transaction input
|
|
@@ -1747,8 +3357,6 @@ Argument Details
|
|
|
1747
3357
|
+ **scriptSize**
|
|
1748
3358
|
+ byte length of input script
|
|
1749
3359
|
|
|
1750
|
-
</details>
|
|
1751
|
-
|
|
1752
3360
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1753
3361
|
|
|
1754
3362
|
---
|
|
@@ -1758,10 +3366,6 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1758
3366
|
export function transactionOutputSize(scriptSize: number): number
|
|
1759
3367
|
```
|
|
1760
3368
|
|
|
1761
|
-
<details>
|
|
1762
|
-
|
|
1763
|
-
<summary>Function transactionOutputSize Details</summary>
|
|
1764
|
-
|
|
1765
3369
|
Returns
|
|
1766
3370
|
|
|
1767
3371
|
serialized byte length a transaction output
|
|
@@ -1771,8 +3375,6 @@ Argument Details
|
|
|
1771
3375
|
+ **scriptSize**
|
|
1772
3376
|
+ byte length of output script
|
|
1773
3377
|
|
|
1774
|
-
</details>
|
|
1775
|
-
|
|
1776
3378
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1777
3379
|
|
|
1778
3380
|
---
|
|
@@ -1786,10 +3388,6 @@ and the size of each script.
|
|
|
1786
3388
|
export function transactionSize(inputs: number[], outputs: number[]): number
|
|
1787
3389
|
```
|
|
1788
3390
|
|
|
1789
|
-
<details>
|
|
1790
|
-
|
|
1791
|
-
<summary>Function transactionSize Details</summary>
|
|
1792
|
-
|
|
1793
3391
|
Returns
|
|
1794
3392
|
|
|
1795
3393
|
total transaction size in bytes
|
|
@@ -1801,8 +3399,6 @@ Argument Details
|
|
|
1801
3399
|
+ **outputs**
|
|
1802
3400
|
+ array of output script lengths, in bytes
|
|
1803
3401
|
|
|
1804
|
-
</details>
|
|
1805
|
-
|
|
1806
3402
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1807
3403
|
|
|
1808
3404
|
---
|
|
@@ -1812,7 +3408,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1812
3408
|
export function validateGenerateChangeSdkParams(params: GenerateChangeSdkParams)
|
|
1813
3409
|
```
|
|
1814
3410
|
|
|
1815
|
-
See also: [GenerateChangeSdkParams](#interface-generatechangesdkparams)
|
|
3411
|
+
See also: [GenerateChangeSdkParams](./storage.md#interface-generatechangesdkparams)
|
|
1816
3412
|
|
|
1817
3413
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1818
3414
|
|
|
@@ -1826,7 +3422,7 @@ export function validateGenerateChangeSdkResult(params: GenerateChangeSdkParams,
|
|
|
1826
3422
|
}
|
|
1827
3423
|
```
|
|
1828
3424
|
|
|
1829
|
-
See also: [GenerateChangeSdkParams](#interface-generatechangesdkparams), [GenerateChangeSdkResult](#interface-generatechangesdkresult)
|
|
3425
|
+
See also: [GenerateChangeSdkParams](./storage.md#interface-generatechangesdkparams), [GenerateChangeSdkResult](./storage.md#interface-generatechangesdkresult)
|
|
1830
3426
|
|
|
1831
3427
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1832
3428
|
|
|
@@ -1837,7 +3433,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1837
3433
|
export function validateStorageFeeModel(v?: sdk.StorageFeeModel): sdk.StorageFeeModel
|
|
1838
3434
|
```
|
|
1839
3435
|
|
|
1840
|
-
See also: [StorageFeeModel](#interface-storagefeemodel)
|
|
3436
|
+
See also: [StorageFeeModel](./client.md#interface-storagefeemodel)
|
|
1841
3437
|
|
|
1842
3438
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1843
3439
|
|
|
@@ -1854,7 +3450,7 @@ export function varUintSize(val: number): 1 | 3 | 5 | 9 {
|
|
|
1854
3450
|
}
|
|
1855
3451
|
```
|
|
1856
3452
|
|
|
1857
|
-
See also: [WERR_INVALID_PARAMETER](#class-werr_invalid_parameter)
|
|
3453
|
+
See also: [WERR_INVALID_PARAMETER](./client.md#class-werr_invalid_parameter)
|
|
1858
3454
|
|
|
1859
3455
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1860
3456
|
|
|
@@ -1864,6 +3460,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1864
3460
|
| |
|
|
1865
3461
|
| --- |
|
|
1866
3462
|
| [DBType](#type-dbtype) |
|
|
3463
|
+
| [EntityStorage](#type-entitystorage) |
|
|
1867
3464
|
| [PostReqsToNetworkDetailsStatus](#type-postreqstonetworkdetailsstatus) |
|
|
1868
3465
|
|
|
1869
3466
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -1878,6 +3475,17 @@ export type DBType = "SQLite" | "MySQL"
|
|
|
1878
3475
|
|
|
1879
3476
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1880
3477
|
|
|
3478
|
+
---
|
|
3479
|
+
##### Type: EntityStorage
|
|
3480
|
+
|
|
3481
|
+
```ts
|
|
3482
|
+
export type EntityStorage = StorageProvider
|
|
3483
|
+
```
|
|
3484
|
+
|
|
3485
|
+
See also: [StorageProvider](./storage.md#class-storageprovider)
|
|
3486
|
+
|
|
3487
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3488
|
+
|
|
1881
3489
|
---
|
|
1882
3490
|
##### Type: PostReqsToNetworkDetailsStatus
|
|
1883
3491
|
|
|
@@ -1890,5 +3498,71 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1890
3498
|
---
|
|
1891
3499
|
#### Variables
|
|
1892
3500
|
|
|
3501
|
+
| |
|
|
3502
|
+
| --- |
|
|
3503
|
+
| [outputColumnsWithoutLockingScript](#variable-outputcolumnswithoutlockingscript) |
|
|
3504
|
+
| [transactionColumnsWithoutRawTx](#variable-transactioncolumnswithoutrawtx) |
|
|
3505
|
+
|
|
3506
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3507
|
+
|
|
3508
|
+
---
|
|
3509
|
+
|
|
3510
|
+
##### Variable: outputColumnsWithoutLockingScript
|
|
3511
|
+
|
|
3512
|
+
```ts
|
|
3513
|
+
outputColumnsWithoutLockingScript = [
|
|
3514
|
+
"created_at",
|
|
3515
|
+
"updated_at",
|
|
3516
|
+
"outputId",
|
|
3517
|
+
"userId",
|
|
3518
|
+
"transactionId",
|
|
3519
|
+
"basketId",
|
|
3520
|
+
"spendable",
|
|
3521
|
+
"change",
|
|
3522
|
+
"vout",
|
|
3523
|
+
"satoshis",
|
|
3524
|
+
"providedBy",
|
|
3525
|
+
"purpose",
|
|
3526
|
+
"type",
|
|
3527
|
+
"outputDescription",
|
|
3528
|
+
"txid",
|
|
3529
|
+
"senderIdentityKey",
|
|
3530
|
+
"derivationPrefix",
|
|
3531
|
+
"derivationSuffix",
|
|
3532
|
+
"customInstructions",
|
|
3533
|
+
"spentBy",
|
|
3534
|
+
"sequenceNumber",
|
|
3535
|
+
"spendingDescription",
|
|
3536
|
+
"scriptLength",
|
|
3537
|
+
"scriptOffset"
|
|
3538
|
+
]
|
|
3539
|
+
```
|
|
3540
|
+
|
|
3541
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3542
|
+
|
|
3543
|
+
---
|
|
3544
|
+
##### Variable: transactionColumnsWithoutRawTx
|
|
3545
|
+
|
|
3546
|
+
```ts
|
|
3547
|
+
transactionColumnsWithoutRawTx = [
|
|
3548
|
+
"created_at",
|
|
3549
|
+
"updated_at",
|
|
3550
|
+
"transactionId",
|
|
3551
|
+
"userId",
|
|
3552
|
+
"provenTxId",
|
|
3553
|
+
"status",
|
|
3554
|
+
"reference",
|
|
3555
|
+
"isOutgoing",
|
|
3556
|
+
"satoshis",
|
|
3557
|
+
"version",
|
|
3558
|
+
"lockTime",
|
|
3559
|
+
"description",
|
|
3560
|
+
"txid"
|
|
3561
|
+
]
|
|
3562
|
+
```
|
|
3563
|
+
|
|
3564
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3565
|
+
|
|
3566
|
+
---
|
|
1893
3567
|
|
|
1894
3568
|
<!--#endregion ts2md-api-merged-here-->
|