@bsv/wallet-toolbox 1.1.7 → 1.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/client.md +3872 -1555
- package/docs/monitor.md +29 -27
- package/docs/services.md +22 -22
- package/docs/setup.md +23 -23
- package/docs/storage.md +2747 -438
- package/docs/wallet.md +3872 -1555
- package/out/src/monitor/tasks/TaskCheckForProofs.d.ts +4 -4
- package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskCheckForProofs.js +2 -2
- package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.d.ts +2 -2
- package/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.js +2 -2
- package/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -1
- package/out/src/sdk/StorageSyncReader.d.ts +30 -30
- package/out/src/sdk/StorageSyncReader.d.ts.map +1 -1
- package/out/src/sdk/StorageSyncReaderWriter.d.ts +60 -60
- package/out/src/sdk/StorageSyncReaderWriter.d.ts.map +1 -1
- package/out/src/sdk/WalletStorage.interfaces.d.ts +36 -36
- package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
- package/out/src/signer/methods/acquireDirectCertificate.d.ts.map +1 -1
- package/out/src/signer/methods/acquireDirectCertificate.js.map +1 -1
- package/out/src/storage/StorageKnex.d.ts +61 -61
- package/out/src/storage/StorageKnex.d.ts.map +1 -1
- package/out/src/storage/StorageKnex.js +13 -4
- package/out/src/storage/StorageKnex.js.map +1 -1
- package/out/src/storage/StorageProvider.d.ts +16 -15
- package/out/src/storage/StorageProvider.d.ts.map +1 -1
- package/out/src/storage/StorageProvider.js +8 -8
- package/out/src/storage/StorageProvider.js.map +1 -1
- package/out/src/storage/StorageReader.d.ts +21 -21
- package/out/src/storage/StorageReader.d.ts.map +1 -1
- package/out/src/storage/StorageReader.js.map +1 -1
- package/out/src/storage/StorageReaderWriter.d.ts +60 -60
- package/out/src/storage/StorageReaderWriter.d.ts.map +1 -1
- package/out/src/storage/StorageReaderWriter.js.map +1 -1
- package/out/src/storage/StorageSyncReader.d.ts +17 -17
- package/out/src/storage/StorageSyncReader.d.ts.map +1 -1
- package/out/src/storage/StorageSyncReader.js.map +1 -1
- package/out/src/storage/WalletStorageManager.d.ts +9 -9
- package/out/src/storage/WalletStorageManager.d.ts.map +1 -1
- package/out/src/storage/WalletStorageManager.js +2 -2
- package/out/src/storage/WalletStorageManager.js.map +1 -1
- package/out/src/storage/index.all.d.ts +2 -2
- package/out/src/storage/index.all.d.ts.map +1 -1
- package/out/src/storage/index.all.js +3 -3
- package/out/src/storage/index.all.js.map +1 -1
- package/out/src/storage/index.client.d.ts +2 -2
- package/out/src/storage/index.client.d.ts.map +1 -1
- package/out/src/storage/index.client.js +2 -25
- package/out/src/storage/index.client.js.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts +3 -3
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.js.map +1 -1
- package/out/src/storage/methods/createAction.d.ts.map +1 -1
- package/out/src/storage/methods/createAction.js +1 -1
- package/out/src/storage/methods/createAction.js.map +1 -1
- package/out/src/storage/methods/getBeefForTransaction.js +2 -2
- package/out/src/storage/methods/getBeefForTransaction.js.map +1 -1
- package/out/src/storage/methods/getSyncChunk.d.ts.map +1 -1
- package/out/src/storage/methods/getSyncChunk.js.map +1 -1
- package/out/src/storage/methods/internalizeAction.d.ts.map +1 -1
- package/out/src/storage/methods/internalizeAction.js +1 -1
- package/out/src/storage/methods/internalizeAction.js.map +1 -1
- package/out/src/storage/methods/listActions.js.map +1 -1
- package/out/src/storage/methods/listCertificates.d.ts.map +1 -1
- package/out/src/storage/methods/listCertificates.js.map +1 -1
- package/out/src/storage/methods/listOutputs.js.map +1 -1
- package/out/src/storage/methods/processAction.d.ts +4 -4
- package/out/src/storage/methods/processAction.d.ts.map +1 -1
- package/out/src/storage/methods/processAction.js +2 -2
- package/out/src/storage/methods/processAction.js.map +1 -1
- package/out/src/storage/methods/purgeData.d.ts.map +1 -1
- package/out/src/storage/methods/purgeData.js.map +1 -1
- package/out/src/storage/methods/reviewStatus.js.map +1 -1
- package/out/src/storage/remoting/StorageClient.d.ts +230 -15
- package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageClient.js +222 -7
- package/out/src/storage/remoting/StorageClient.js.map +1 -1
- package/out/src/storage/schema/entities/Certificate.d.ts +9 -9
- package/out/src/storage/schema/entities/Certificate.d.ts.map +1 -1
- package/out/src/storage/schema/entities/Certificate.js +5 -5
- package/out/src/storage/schema/entities/Certificate.js.map +1 -1
- package/out/src/storage/schema/entities/CertificateField.d.ts +9 -9
- package/out/src/storage/schema/entities/CertificateField.d.ts.map +1 -1
- package/out/src/storage/schema/entities/CertificateField.js +5 -5
- package/out/src/storage/schema/entities/CertificateField.js.map +1 -1
- package/out/src/storage/schema/entities/Commission.d.ts +9 -9
- package/out/src/storage/schema/entities/Commission.d.ts.map +1 -1
- package/out/src/storage/schema/entities/Commission.js +5 -5
- package/out/src/storage/schema/entities/Commission.js.map +1 -1
- package/out/src/storage/schema/entities/EntityBase.d.ts +1 -1
- package/out/src/storage/schema/entities/MergeEntity.d.ts +6 -7
- package/out/src/storage/schema/entities/MergeEntity.d.ts.map +1 -1
- package/out/src/storage/schema/entities/MergeEntity.js.map +1 -1
- package/out/src/storage/schema/entities/Output.d.ts +9 -9
- package/out/src/storage/schema/entities/Output.d.ts.map +1 -1
- package/out/src/storage/schema/entities/Output.js +5 -5
- package/out/src/storage/schema/entities/Output.js.map +1 -1
- package/out/src/storage/schema/entities/OutputBasket.d.ts +9 -9
- package/out/src/storage/schema/entities/OutputBasket.d.ts.map +1 -1
- package/out/src/storage/schema/entities/OutputBasket.js +5 -5
- package/out/src/storage/schema/entities/OutputBasket.js.map +1 -1
- package/out/src/storage/schema/entities/OutputTag.d.ts +9 -9
- package/out/src/storage/schema/entities/OutputTag.d.ts.map +1 -1
- package/out/src/storage/schema/entities/OutputTag.js +5 -5
- package/out/src/storage/schema/entities/OutputTag.js.map +1 -1
- package/out/src/storage/schema/entities/OutputTagMap.d.ts +9 -9
- package/out/src/storage/schema/entities/OutputTagMap.d.ts.map +1 -1
- package/out/src/storage/schema/entities/OutputTagMap.js +5 -5
- package/out/src/storage/schema/entities/OutputTagMap.js.map +1 -1
- package/out/src/storage/schema/entities/ProvenTx.d.ts +11 -11
- package/out/src/storage/schema/entities/ProvenTx.d.ts.map +1 -1
- package/out/src/storage/schema/entities/ProvenTx.js +11 -11
- package/out/src/storage/schema/entities/ProvenTx.js.map +1 -1
- package/out/src/storage/schema/entities/ProvenTxReq.d.ts +19 -19
- package/out/src/storage/schema/entities/ProvenTxReq.d.ts.map +1 -1
- package/out/src/storage/schema/entities/ProvenTxReq.js +13 -13
- package/out/src/storage/schema/entities/ProvenTxReq.js.map +1 -1
- package/out/src/storage/schema/entities/SyncState.d.ts +11 -11
- package/out/src/storage/schema/entities/SyncState.d.ts.map +1 -1
- package/out/src/storage/schema/entities/SyncState.js +27 -27
- package/out/src/storage/schema/entities/SyncState.js.map +1 -1
- package/out/src/storage/schema/entities/Transaction.d.ts +11 -11
- package/out/src/storage/schema/entities/Transaction.d.ts.map +1 -1
- package/out/src/storage/schema/entities/Transaction.js +6 -6
- package/out/src/storage/schema/entities/Transaction.js.map +1 -1
- package/out/src/storage/schema/entities/TxLabel.d.ts +9 -9
- package/out/src/storage/schema/entities/TxLabel.d.ts.map +1 -1
- package/out/src/storage/schema/entities/TxLabel.js +5 -5
- package/out/src/storage/schema/entities/TxLabel.js.map +1 -1
- package/out/src/storage/schema/entities/TxLabelMap.d.ts +9 -9
- package/out/src/storage/schema/entities/TxLabelMap.d.ts.map +1 -1
- package/out/src/storage/schema/entities/TxLabelMap.js +5 -5
- package/out/src/storage/schema/entities/TxLabelMap.js.map +1 -1
- package/out/src/storage/schema/entities/User.d.ts +9 -9
- package/out/src/storage/schema/entities/User.d.ts.map +1 -1
- package/out/src/storage/schema/entities/User.js +5 -5
- package/out/src/storage/schema/entities/User.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/CertificateFieldTests.test.js +20 -307
- package/out/src/storage/schema/entities/__tests/CertificateFieldTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/CertificateTests.test.js +17 -158
- package/out/src/storage/schema/entities/__tests/CertificateTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/CommissionTests.test.js +23 -309
- package/out/src/storage/schema/entities/__tests/CommissionTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/OutputBasketTests.test.js +19 -306
- package/out/src/storage/schema/entities/__tests/OutputBasketTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/OutputTagMapTests.test.js +19 -306
- package/out/src/storage/schema/entities/__tests/OutputTagMapTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/OutputTagTests.test.js +23 -237
- package/out/src/storage/schema/entities/__tests/OutputTagTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/OutputTests.test.js +20 -233
- package/out/src/storage/schema/entities/__tests/OutputTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/ProvenTxReqTests.test.js +27 -98
- package/out/src/storage/schema/entities/__tests/ProvenTxReqTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/ProvenTxTests.test.js +25 -241
- package/out/src/storage/schema/entities/__tests/ProvenTxTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/SyncStateTests.test.js +38 -112
- package/out/src/storage/schema/entities/__tests/SyncStateTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/TransactionTests.test.js +39 -323
- package/out/src/storage/schema/entities/__tests/TransactionTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/TxLabelMapTests.test.js +31 -169
- package/out/src/storage/schema/entities/__tests/TxLabelMapTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/TxLabelTests.test.js +16 -159
- package/out/src/storage/schema/entities/__tests/TxLabelTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/usersTests.test.js +21 -168
- package/out/src/storage/schema/entities/__tests/usersTests.test.js.map +1 -1
- package/out/src/storage/schema/tables/Certificate.d.ts +4 -4
- package/out/src/storage/schema/tables/Certificate.d.ts.map +1 -1
- package/out/src/storage/schema/tables/CertificateField.d.ts +1 -1
- package/out/src/storage/schema/tables/CertificateField.d.ts.map +1 -1
- package/out/src/storage/schema/tables/Commission.d.ts +1 -1
- package/out/src/storage/schema/tables/Commission.d.ts.map +1 -1
- package/out/src/storage/schema/tables/MonitorEvent.d.ts +1 -1
- package/out/src/storage/schema/tables/MonitorEvent.d.ts.map +1 -1
- package/out/src/storage/schema/tables/Output.d.ts +5 -5
- package/out/src/storage/schema/tables/Output.d.ts.map +1 -1
- package/out/src/storage/schema/tables/OutputBasket.d.ts +1 -1
- package/out/src/storage/schema/tables/OutputBasket.d.ts.map +1 -1
- package/out/src/storage/schema/tables/OutputTag.d.ts +1 -1
- package/out/src/storage/schema/tables/OutputTag.d.ts.map +1 -1
- package/out/src/storage/schema/tables/OutputTagMap.d.ts +1 -1
- package/out/src/storage/schema/tables/OutputTagMap.d.ts.map +1 -1
- package/out/src/storage/schema/tables/ProvenTx.d.ts +1 -1
- package/out/src/storage/schema/tables/ProvenTx.d.ts.map +1 -1
- package/out/src/storage/schema/tables/ProvenTxReq.d.ts +2 -2
- package/out/src/storage/schema/tables/ProvenTxReq.d.ts.map +1 -1
- package/out/src/storage/schema/tables/SyncState.d.ts +1 -1
- package/out/src/storage/schema/tables/SyncState.d.ts.map +1 -1
- package/out/src/storage/schema/tables/{Settings.d.ts → TableSettings.d.ts} +2 -2
- package/out/src/storage/schema/tables/TableSettings.d.ts.map +1 -0
- package/out/src/storage/schema/tables/{Settings.js → TableSettings.js} +1 -1
- package/out/src/storage/schema/tables/TableSettings.js.map +1 -0
- package/out/src/storage/schema/tables/Transaction.d.ts +1 -1
- package/out/src/storage/schema/tables/Transaction.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TxLabel.d.ts +1 -1
- package/out/src/storage/schema/tables/TxLabel.d.ts.map +1 -1
- package/out/src/storage/schema/tables/TxLabelMap.d.ts +1 -1
- package/out/src/storage/schema/tables/TxLabelMap.d.ts.map +1 -1
- package/out/src/storage/schema/tables/User.d.ts +1 -1
- package/out/src/storage/schema/tables/User.d.ts.map +1 -1
- package/out/src/storage/schema/tables/index.d.ts +1 -1
- package/out/src/storage/schema/tables/index.d.ts.map +1 -1
- package/out/src/storage/schema/tables/index.js +1 -1
- package/out/src/storage/schema/tables/index.js.map +1 -1
- package/out/src/storage/sync/StorageMySQLDojoReader.d.ts +17 -17
- package/out/src/storage/sync/StorageMySQLDojoReader.d.ts.map +1 -1
- package/out/src/storage/sync/StorageMySQLDojoReader.js +2 -2
- package/out/src/storage/sync/StorageMySQLDojoReader.js.map +1 -1
- package/out/test/Wallet/certificate/listCertificates.test.js.map +1 -1
- package/out/test/Wallet/live/walletLive.man.test.js +1 -1
- package/out/test/Wallet/live/walletLive.man.test.js.map +1 -1
- package/out/test/monitor/Monitor.test.js +7 -7
- package/out/test/monitor/Monitor.test.js.map +1 -1
- package/out/test/storage/StorageMySQLDojoReader.man.test.js +1 -1
- package/out/test/storage/StorageMySQLDojoReader.man.test.js.map +1 -1
- package/out/test/storage/insert.test.js.map +1 -1
- package/out/test/storage/update.test.js.map +1 -1
- package/out/test/storage/update2.test.js.map +1 -1
- package/out/test/utils/TestUtilsWalletStorage.d.ts +56 -56
- package/out/test/utils/TestUtilsWalletStorage.d.ts.map +1 -1
- package/out/test/utils/TestUtilsWalletStorage.js +11 -4
- package/out/test/utils/TestUtilsWalletStorage.js.map +1 -1
- package/out/test/wallet/action/createActionToGenerateBeefs.man.test.js.map +1 -1
- package/out/tsconfig.all.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/monitor/tasks/TaskCheckForProofs.ts +11 -10
- package/src/monitor/tasks/TaskSendWaiting.ts +5 -5
- package/src/sdk/StorageSyncReader.ts +48 -30
- package/src/sdk/StorageSyncReaderWriter.ts +77 -63
- package/src/sdk/WalletStorage.interfaces.ts +55 -36
- package/src/signer/methods/acquireDirectCertificate.ts +2 -2
- package/src/storage/StorageKnex.ts +137 -106
- package/src/storage/StorageProvider.ts +43 -30
- package/src/storage/StorageReader.ts +37 -21
- package/src/storage/StorageReaderWriter.ts +78 -65
- package/src/storage/StorageSyncReader.ts +35 -17
- package/src/storage/WalletStorageManager.ts +18 -12
- package/src/storage/index.all.ts +2 -2
- package/src/storage/index.client.ts +2 -2
- package/src/storage/methods/attemptToPostReqsToNetwork.ts +3 -3
- package/src/storage/methods/createAction.ts +29 -26
- package/src/storage/methods/getBeefForTransaction.ts +3 -3
- package/src/storage/methods/getSyncChunk.ts +28 -13
- package/src/storage/methods/internalizeAction.ts +19 -17
- package/src/storage/methods/listActions.ts +5 -5
- package/src/storage/methods/listCertificates.ts +2 -2
- package/src/storage/methods/listOutputs.ts +5 -5
- package/src/storage/methods/processAction.ts +21 -17
- package/src/storage/methods/purgeData.ts +17 -11
- package/src/storage/methods/reviewStatus.ts +4 -4
- package/src/storage/remoting/StorageClient.ts +250 -26
- package/src/storage/schema/entities/Certificate.ts +16 -17
- package/src/storage/schema/entities/CertificateField.ts +17 -18
- package/src/storage/schema/entities/Commission.ts +16 -20
- package/src/storage/schema/entities/EntityBase.ts +1 -1
- package/src/storage/schema/entities/MergeEntity.ts +7 -7
- package/src/storage/schema/entities/Output.ts +16 -20
- package/src/storage/schema/entities/OutputBasket.ts +16 -17
- package/src/storage/schema/entities/OutputTag.ts +16 -20
- package/src/storage/schema/entities/OutputTagMap.ts +17 -18
- package/src/storage/schema/entities/ProvenTx.ts +24 -28
- package/src/storage/schema/entities/ProvenTxReq.ts +42 -45
- package/src/storage/schema/entities/SyncState.ts +61 -38
- package/src/storage/schema/entities/Transaction.ts +23 -23
- package/src/storage/schema/entities/TxLabel.ts +16 -17
- package/src/storage/schema/entities/TxLabelMap.ts +16 -20
- package/src/storage/schema/entities/User.ts +15 -19
- package/src/storage/schema/entities/__tests/CertificateFieldTests.test.ts +39 -318
- package/src/storage/schema/entities/__tests/CertificateTests.test.ts +29 -169
- package/src/storage/schema/entities/__tests/CommissionTests.test.ts +47 -325
- package/src/storage/schema/entities/__tests/OutputBasketTests.test.ts +35 -316
- package/src/storage/schema/entities/__tests/OutputTagMapTests.test.ts +38 -318
- package/src/storage/schema/entities/__tests/OutputTagTests.test.ts +36 -249
- package/src/storage/schema/entities/__tests/OutputTests.test.ts +30 -244
- package/src/storage/schema/entities/__tests/ProvenTxReqTests.test.ts +35 -101
- package/src/storage/schema/entities/__tests/ProvenTxTests.test.ts +27 -243
- package/src/storage/schema/entities/__tests/SyncStateTests.test.ts +54 -122
- package/src/storage/schema/entities/__tests/TransactionTests.test.ts +53 -333
- package/src/storage/schema/entities/__tests/TxLabelMapTests.test.ts +44 -177
- package/src/storage/schema/entities/__tests/TxLabelTests.test.ts +19 -163
- package/src/storage/schema/entities/__tests/usersTests.test.ts +31 -179
- package/src/storage/schema/tables/Certificate.ts +4 -4
- package/src/storage/schema/tables/CertificateField.ts +1 -1
- package/src/storage/schema/tables/Commission.ts +1 -1
- package/src/storage/schema/tables/MonitorEvent.ts +1 -1
- package/src/storage/schema/tables/Output.ts +5 -5
- package/src/storage/schema/tables/OutputBasket.ts +1 -1
- package/src/storage/schema/tables/OutputTag.ts +1 -1
- package/src/storage/schema/tables/OutputTagMap.ts +1 -1
- package/src/storage/schema/tables/ProvenTx.ts +1 -1
- package/src/storage/schema/tables/ProvenTxReq.ts +2 -2
- package/src/storage/schema/tables/SyncState.ts +1 -1
- package/src/storage/schema/tables/{Settings.ts → TableSettings.ts} +3 -1
- package/src/storage/schema/tables/Transaction.ts +1 -1
- package/src/storage/schema/tables/TxLabel.ts +1 -1
- package/src/storage/schema/tables/TxLabelMap.ts +1 -1
- package/src/storage/schema/tables/User.ts +1 -1
- package/src/storage/schema/tables/index.ts +1 -1
- package/src/storage/sync/StorageMySQLDojoReader.ts +68 -50
- package/test/Wallet/certificate/listCertificates.test.ts +12 -8
- package/test/Wallet/live/walletLive.man.test.ts +6 -6
- package/test/monitor/Monitor.test.ts +8 -8
- package/test/storage/StorageMySQLDojoReader.man.test.ts +1 -1
- package/test/storage/insert.test.ts +2 -2
- package/test/storage/update.test.ts +30 -30
- package/test/storage/update2.test.ts +23 -24
- package/test/utils/TestUtilsWalletStorage.ts +103 -82
- package/test/wallet/action/createActionToGenerateBeefs.man.test.ts +1 -2
- package/ts2md.json +1 -1
- package/out/src/storage/index.db.d.ts +0 -1
- package/out/src/storage/index.db.d.ts.map +0 -1
- package/out/src/storage/index.db.js +0 -2
- package/out/src/storage/index.db.js.map +0 -1
- package/out/src/storage/schema/tables/Settings.d.ts.map +0 -1
- package/out/src/storage/schema/tables/Settings.js.map +0 -1
- package/src/storage/index.db.ts +0 -0
package/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,7 +166,7 @@ export interface GenerateChangeSdkParams {
|
|
|
115
166
|
}
|
|
116
167
|
```
|
|
117
168
|
|
|
118
|
-
See also: [GenerateChangeSdkInput](#interface-generatechangesdkinput), [GenerateChangeSdkOutput](#interface-generatechangesdkoutput), [StorageFeeModel](#interface-storagefeemodel)
|
|
169
|
+
See also: [GenerateChangeSdkInput](./storage.md#interface-generatechangesdkinput), [GenerateChangeSdkOutput](./storage.md#interface-generatechangesdkoutput), [StorageFeeModel](./client.md#interface-storagefeemodel)
|
|
119
170
|
|
|
120
171
|
###### Property changeFirstSatoshis
|
|
121
172
|
|
|
@@ -179,7 +230,7 @@ export interface GenerateChangeSdkResult {
|
|
|
179
230
|
}
|
|
180
231
|
```
|
|
181
232
|
|
|
182
|
-
See also: [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput), [GenerateChangeSdkChangeOutput](#interface-generatechangesdkchangeoutput)
|
|
233
|
+
See also: [GenerateChangeSdkChangeInput](./storage.md#interface-generatechangesdkchangeinput), [GenerateChangeSdkChangeOutput](./storage.md#interface-generatechangesdkchangeoutput)
|
|
183
234
|
|
|
184
235
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
185
236
|
|
|
@@ -192,7 +243,7 @@ export interface GenerateChangeSdkStorageChange extends GenerateChangeSdkChangeI
|
|
|
192
243
|
}
|
|
193
244
|
```
|
|
194
245
|
|
|
195
|
-
See also: [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput)
|
|
246
|
+
See also: [GenerateChangeSdkChangeInput](./storage.md#interface-generatechangesdkchangeinput)
|
|
196
247
|
|
|
197
248
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
198
249
|
|
|
@@ -202,13 +253,15 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
202
253
|
```ts
|
|
203
254
|
export interface GetReqsAndBeefDetail {
|
|
204
255
|
txid: string;
|
|
205
|
-
req?:
|
|
206
|
-
proven?:
|
|
256
|
+
req?: TableProvenTxReq;
|
|
257
|
+
proven?: TableProvenTx;
|
|
207
258
|
status: "readyToSend" | "alreadySent" | "error" | "unknown";
|
|
208
259
|
error?: string;
|
|
209
260
|
}
|
|
210
261
|
```
|
|
211
262
|
|
|
263
|
+
See also: [TableProvenTx](./storage.md#interface-tableproventx), [TableProvenTxReq](./storage.md#interface-tableproventxreq)
|
|
264
|
+
|
|
212
265
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
213
266
|
|
|
214
267
|
---
|
|
@@ -221,7 +274,7 @@ export interface GetReqsAndBeefResult {
|
|
|
221
274
|
}
|
|
222
275
|
```
|
|
223
276
|
|
|
224
|
-
See also: [GetReqsAndBeefDetail](#interface-getreqsandbeefdetail)
|
|
277
|
+
See also: [GetReqsAndBeefDetail](./storage.md#interface-getreqsandbeefdetail)
|
|
225
278
|
|
|
226
279
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
227
280
|
|
|
@@ -265,7 +318,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
265
318
|
```ts
|
|
266
319
|
export interface PostReqsToNetworkDetails {
|
|
267
320
|
txid: string;
|
|
268
|
-
req:
|
|
321
|
+
req: EntityProvenTxReq;
|
|
269
322
|
status: PostReqsToNetworkDetailsStatus;
|
|
270
323
|
pbrft: sdk.PostTxResultForTxid;
|
|
271
324
|
data?: string;
|
|
@@ -273,7 +326,7 @@ export interface PostReqsToNetworkDetails {
|
|
|
273
326
|
}
|
|
274
327
|
```
|
|
275
328
|
|
|
276
|
-
See also: [PostReqsToNetworkDetailsStatus](#type-postreqstonetworkdetailsstatus), [PostTxResultForTxid](#interface-posttxresultfortxid)
|
|
329
|
+
See also: [EntityProvenTxReq](./storage.md#class-entityproventxreq), [PostReqsToNetworkDetailsStatus](./storage.md#type-postreqstonetworkdetailsstatus), [PostTxResultForTxid](./client.md#interface-posttxresultfortxid)
|
|
277
330
|
|
|
278
331
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
279
332
|
|
|
@@ -290,294 +343,2459 @@ export interface PostReqsToNetworkResult {
|
|
|
290
343
|
}
|
|
291
344
|
```
|
|
292
345
|
|
|
293
|
-
See also: [PostBeefResult](#interface-postbeefresult), [PostReqsToNetworkDetails](#interface-postreqstonetworkdetails)
|
|
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)
|
|
1385
|
+
|
|
1386
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1387
|
+
|
|
1388
|
+
---
|
|
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>
|
|
1455
|
+
}
|
|
1456
|
+
```
|
|
1457
|
+
|
|
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)
|
|
1459
|
+
|
|
1460
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1461
|
+
|
|
1462
|
+
---
|
|
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>
|
|
1497
|
+
}
|
|
1498
|
+
```
|
|
1499
|
+
|
|
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)
|
|
1501
|
+
|
|
1502
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1503
|
+
|
|
1504
|
+
---
|
|
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>
|
|
1535
|
+
}
|
|
1536
|
+
```
|
|
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
|
+
|
|
1540
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1541
|
+
|
|
1542
|
+
---
|
|
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>
|
|
1570
|
+
}
|
|
1571
|
+
```
|
|
1572
|
+
|
|
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)
|
|
1574
|
+
|
|
1575
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1576
|
+
|
|
1577
|
+
---
|
|
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>
|
|
1622
|
+
}
|
|
1623
|
+
```
|
|
1624
|
+
|
|
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)
|
|
1626
|
+
|
|
1627
|
+
###### Property getProofAttemptsLimit
|
|
1628
|
+
|
|
1629
|
+
How high attempts can go before status is forced to invalid
|
|
1630
|
+
|
|
1631
|
+
```ts
|
|
1632
|
+
static getProofAttemptsLimit = 8
|
|
1633
|
+
```
|
|
1634
|
+
|
|
1635
|
+
###### Property getProofMinutes
|
|
1636
|
+
|
|
1637
|
+
How many hours we have to try for a poof
|
|
1638
|
+
|
|
1639
|
+
```ts
|
|
1640
|
+
static getProofMinutes = 60
|
|
1641
|
+
```
|
|
1642
|
+
|
|
1643
|
+
###### Method fromReq
|
|
1644
|
+
|
|
1645
|
+
Try to create a new ProvenTx from a ProvenTxReq and GetMerkleProofResultApi
|
|
1646
|
+
|
|
1647
|
+
Otherwise it returns undefined and updates req.status to either 'unknown', 'invalid', or 'unconfirmed'
|
|
1648
|
+
|
|
1649
|
+
```ts
|
|
1650
|
+
static async fromReq(req: EntityProvenTxReq, gmpResult: sdk.GetMerklePathResult, countsAsAttempt: boolean): Promise<EntityProvenTx | undefined>
|
|
1651
|
+
```
|
|
1652
|
+
See also: [EntityProvenTx](./storage.md#class-entityproventx), [EntityProvenTxReq](./storage.md#class-entityproventxreq), [GetMerklePathResult](./client.md#interface-getmerklepathresult)
|
|
1653
|
+
|
|
1654
|
+
###### Method fromTxid
|
|
1655
|
+
|
|
1656
|
+
Given a txid and optionally its rawTx, create a new ProvenTx object.
|
|
1657
|
+
|
|
1658
|
+
rawTx is fetched if not provided.
|
|
1659
|
+
|
|
1660
|
+
Only succeeds (proven is not undefined) if a proof is confirmed for rawTx,
|
|
1661
|
+
and hash of rawTx is confirmed to match txid
|
|
1662
|
+
|
|
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.
|
|
1665
|
+
|
|
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)
|
|
1670
|
+
|
|
1671
|
+
###### Method getMerklePath
|
|
1672
|
+
|
|
1673
|
+
```ts
|
|
1674
|
+
getMerklePath(): MerklePath
|
|
1675
|
+
```
|
|
1676
|
+
|
|
1677
|
+
Returns
|
|
1678
|
+
|
|
1679
|
+
desirialized `MerklePath` object, value is cached.
|
|
1680
|
+
|
|
1681
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1682
|
+
|
|
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
|
+
}
|
|
1755
|
+
```
|
|
1756
|
+
|
|
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)
|
|
1758
|
+
|
|
1759
|
+
###### Method equals
|
|
1760
|
+
|
|
1761
|
+
'convergent' equality must satisfy (A sync B) equals (B sync A)
|
|
1762
|
+
|
|
1763
|
+
```ts
|
|
1764
|
+
override equals(ei: TableProvenTxReq, syncMap?: SyncMap | undefined): boolean
|
|
1765
|
+
```
|
|
1766
|
+
See also: [SyncMap](./storage.md#interface-syncmap), [TableProvenTxReq](./storage.md#interface-tableproventxreq)
|
|
1767
|
+
|
|
1768
|
+
###### Method historySince
|
|
1769
|
+
|
|
1770
|
+
Returns history to only what followed since date.
|
|
1771
|
+
|
|
1772
|
+
```ts
|
|
1773
|
+
historySince(since: Date): ProvenTxReqHistory
|
|
1774
|
+
```
|
|
1775
|
+
See also: [ProvenTxReqHistory](./storage.md#interface-proventxreqhistory)
|
|
1776
|
+
|
|
1777
|
+
###### Method mergeExisting
|
|
1778
|
+
|
|
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)
|
|
1787
|
+
|
|
1788
|
+
On terminal failure: `doubleSpend` trumps `invalid` as it contains more data.
|
|
1789
|
+
|
|
1790
|
+
```ts
|
|
1791
|
+
override async mergeExisting(storage: EntityStorage, since: Date | undefined, ei: TableProvenTxReq, syncMap: SyncMap, trx?: sdk.TrxToken): Promise<boolean>
|
|
1792
|
+
```
|
|
1793
|
+
See also: [EntityStorage](./storage.md#type-entitystorage), [SyncMap](./storage.md#interface-syncmap), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TrxToken](./client.md#interface-trxtoken)
|
|
1794
|
+
|
|
1795
|
+
###### Method updateStorage
|
|
1796
|
+
|
|
1797
|
+
Updates database record with current state of this EntityUser
|
|
1798
|
+
|
|
1799
|
+
```ts
|
|
1800
|
+
async updateStorage(storage: EntityStorage, trx?: sdk.TrxToken)
|
|
1801
|
+
```
|
|
1802
|
+
See also: [EntityStorage](./storage.md#type-entitystorage), [TrxToken](./client.md#interface-trxtoken)
|
|
1803
|
+
|
|
1804
|
+
###### Method updateStorageDynamicProperties
|
|
1805
|
+
|
|
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
|
|
1815
|
+
|
|
1816
|
+
```ts
|
|
1817
|
+
async updateStorageDynamicProperties(storage: WalletStorageManager | StorageProvider, trx?: sdk.TrxToken)
|
|
1818
|
+
```
|
|
1819
|
+
See also: [StorageProvider](./storage.md#class-storageprovider), [TrxToken](./client.md#interface-trxtoken), [WalletStorageManager](./storage.md#class-walletstoragemanager)
|
|
1820
|
+
|
|
1821
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1822
|
+
|
|
1823
|
+
---
|
|
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
|
+
}>
|
|
1875
|
+
}
|
|
1876
|
+
```
|
|
1877
|
+
|
|
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)
|
|
1879
|
+
|
|
1880
|
+
###### Method mergeSyncMap
|
|
1881
|
+
|
|
1882
|
+
Merge additions to the syncMap
|
|
1883
|
+
|
|
1884
|
+
```ts
|
|
1885
|
+
mergeSyncMap(iSyncMap: SyncMap)
|
|
1886
|
+
```
|
|
1887
|
+
See also: [SyncMap](./storage.md#interface-syncmap)
|
|
1888
|
+
|
|
1889
|
+
###### Method updateStorage
|
|
1890
|
+
|
|
1891
|
+
Handles both insert and update based on id value: zero indicates insert.
|
|
1892
|
+
|
|
1893
|
+
```ts
|
|
1894
|
+
async updateStorage(storage: EntityStorage, notSyncMap?: boolean, trx?: sdk.TrxToken)
|
|
1895
|
+
```
|
|
1896
|
+
See also: [EntityStorage](./storage.md#type-entitystorage), [TrxToken](./client.md#interface-trxtoken)
|
|
1897
|
+
|
|
1898
|
+
Argument Details
|
|
1899
|
+
|
|
1900
|
+
+ **notSyncMap**
|
|
1901
|
+
+ if not new and true, excludes updating syncMap in storage.
|
|
1902
|
+
|
|
1903
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1904
|
+
|
|
1905
|
+
---
|
|
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
|
|
1964
|
+
|
|
1965
|
+
```ts
|
|
1966
|
+
getBsvTxIns(): TransactionInput[]
|
|
1967
|
+
```
|
|
1968
|
+
|
|
1969
|
+
Returns
|
|
1970
|
+
|
|
1971
|
+
array of
|
|
1972
|
+
|
|
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.
|
|
1978
|
+
|
|
1979
|
+
```ts
|
|
1980
|
+
async getInputs(storage: EntityStorage, trx?: sdk.TrxToken): Promise<TableOutput[]>
|
|
1981
|
+
```
|
|
1982
|
+
See also: [EntityStorage](./storage.md#type-entitystorage), [TableOutput](./storage.md#interface-tableoutput), [TrxToken](./client.md#interface-trxtoken)
|
|
1983
|
+
|
|
1984
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1985
|
+
|
|
1986
|
+
---
|
|
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>
|
|
2017
|
+
}
|
|
2018
|
+
```
|
|
2019
|
+
|
|
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)
|
|
2021
|
+
|
|
2022
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2023
|
+
|
|
2024
|
+
---
|
|
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>
|
|
2052
|
+
}
|
|
2053
|
+
```
|
|
2054
|
+
|
|
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)
|
|
2056
|
+
|
|
2057
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2058
|
+
|
|
2059
|
+
---
|
|
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
|
+
```
|
|
2090
|
+
|
|
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)
|
|
2092
|
+
|
|
2093
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2094
|
+
|
|
2095
|
+
---
|
|
2096
|
+
##### Class: KnexMigrations
|
|
2097
|
+
|
|
2098
|
+
```ts
|
|
2099
|
+
export class KnexMigrations implements MigrationSource<string> {
|
|
2100
|
+
migrations: Record<string, Migration> = {};
|
|
2101
|
+
constructor(public chain: sdk.Chain, public storageName: string, public storageIdentityKey: string, public maxOutputScriptLength: number)
|
|
2102
|
+
async getMigrations(): Promise<string[]>
|
|
2103
|
+
getMigrationName(migration: string)
|
|
2104
|
+
async getMigration(migration: string): Promise<Migration>
|
|
2105
|
+
async getLatestMigration(): Promise<string>
|
|
2106
|
+
static async latestMigration(): Promise<string>
|
|
2107
|
+
setupMigrations(chain: string, storageName: string, storageIdentityKey: string, maxOutputScriptLength: number): Record<string, Migration>
|
|
2108
|
+
static async dbtype(knex: Knex<any, any[]>): Promise<DBType> {
|
|
2109
|
+
try {
|
|
2110
|
+
const q = `SELECT
|
|
2111
|
+
CASE
|
|
2112
|
+
WHEN (SELECT VERSION() LIKE '%MariaDB%') = 1 THEN 'Unknown'
|
|
2113
|
+
WHEN (SELECT VERSION()) IS NOT NULL THEN 'MySQL'
|
|
2114
|
+
ELSE 'Unknown'
|
|
2115
|
+
END AS database_type;`;
|
|
2116
|
+
let r = await knex.raw(q);
|
|
2117
|
+
if (!r[0]["database_type"])
|
|
2118
|
+
r = r[0];
|
|
2119
|
+
if (r["rows"])
|
|
2120
|
+
r = r.rows;
|
|
2121
|
+
const dbtype: "SQLite" | "MySQL" | "Unknown" = r[0].database_type;
|
|
2122
|
+
if (dbtype === "Unknown")
|
|
2123
|
+
throw new sdk.WERR_NOT_IMPLEMENTED(`Attempting to create database on unsuported engine.`);
|
|
2124
|
+
return dbtype;
|
|
2125
|
+
}
|
|
2126
|
+
catch (eu: unknown) {
|
|
2127
|
+
const e = sdk.WalletError.fromUnknown(eu);
|
|
2128
|
+
if (e.code === "SQLITE_ERROR")
|
|
2129
|
+
return "SQLite";
|
|
2130
|
+
throw new sdk.WERR_NOT_IMPLEMENTED(`Attempting to create database on unsuported engine.`);
|
|
2131
|
+
}
|
|
2132
|
+
}
|
|
2133
|
+
}
|
|
2134
|
+
```
|
|
2135
|
+
|
|
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)
|
|
2137
|
+
|
|
2138
|
+
###### Constructor
|
|
2139
|
+
|
|
2140
|
+
```ts
|
|
2141
|
+
constructor(public chain: sdk.Chain, public storageName: string, public storageIdentityKey: string, public maxOutputScriptLength: number)
|
|
2142
|
+
```
|
|
2143
|
+
See also: [Chain](./client.md#type-chain)
|
|
2144
|
+
|
|
2145
|
+
Argument Details
|
|
2146
|
+
|
|
2147
|
+
+ **storageName**
|
|
2148
|
+
+ human readable name for this storage instance
|
|
2149
|
+
+ **maxOutputScriptLength**
|
|
2150
|
+
+ limit for scripts kept in outputs table, longer scripts will be pulled from rawTx
|
|
2151
|
+
|
|
2152
|
+
###### Method dbtype
|
|
2153
|
+
|
|
2154
|
+
```ts
|
|
2155
|
+
static async dbtype(knex: Knex<any, any[]>): Promise<DBType>
|
|
2156
|
+
```
|
|
2157
|
+
See also: [DBType](./storage.md#type-dbtype)
|
|
2158
|
+
|
|
2159
|
+
Returns
|
|
2160
|
+
|
|
2161
|
+
connected database engine variant
|
|
2162
|
+
|
|
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
|
|
2200
|
+
|
|
2201
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
2202
|
+
|
|
2203
|
+
---
|
|
2204
|
+
##### Class: StorageClient
|
|
2205
|
+
|
|
2206
|
+
`StorageClient` implements the `WalletStorageProvider` interface which allows it to
|
|
2207
|
+
serve as a BRC-100 wallet's active storage.
|
|
2208
|
+
|
|
2209
|
+
Internally, it uses JSON-RPC over HTTPS to make requests of a remote server.
|
|
2210
|
+
Typically this server uses the `StorageServer` class to implement the service.
|
|
2211
|
+
|
|
2212
|
+
The `AuthFetch` component is used to secure and authenticate the requests to the remote server.
|
|
2213
|
+
|
|
2214
|
+
`AuthFetch` is initialized with a BRC-100 wallet which establishes the identity of
|
|
2215
|
+
the party making requests of the remote service.
|
|
2216
|
+
|
|
2217
|
+
For details of the API implemented, follow the "See also" link for the `WalletStorageProvider` interface.
|
|
2218
|
+
|
|
2219
|
+
```ts
|
|
2220
|
+
export class StorageClient implements sdk.WalletStorageProvider {
|
|
2221
|
+
public settings?: TableSettings;
|
|
2222
|
+
constructor(wallet: WalletInterface, endpointUrl: string)
|
|
2223
|
+
isStorageProvider(): boolean
|
|
2224
|
+
isAvailable(): boolean
|
|
2225
|
+
getSettings(): TableSettings
|
|
2226
|
+
async makeAvailable(): Promise<TableSettings>
|
|
2227
|
+
async destroy(): Promise<void>
|
|
2228
|
+
async migrate(storageName: string, storageIdentityKey: string): Promise<string>
|
|
2229
|
+
getServices(): sdk.WalletServices
|
|
2230
|
+
setServices(v: sdk.WalletServices): void
|
|
2231
|
+
async internalizeAction(auth: sdk.AuthId, args: InternalizeActionArgs): Promise<InternalizeActionResult>
|
|
2232
|
+
async createAction(auth: sdk.AuthId, args: sdk.ValidCreateActionArgs): Promise<sdk.StorageCreateActionResult>
|
|
2233
|
+
async processAction(auth: sdk.AuthId, args: sdk.StorageProcessActionArgs): Promise<sdk.StorageProcessActionResults>
|
|
2234
|
+
async abortAction(auth: sdk.AuthId, args: AbortActionArgs): Promise<AbortActionResult>
|
|
2235
|
+
async findOrInsertUser(identityKey): Promise<{
|
|
2236
|
+
user: TableUser;
|
|
2237
|
+
isNew: boolean;
|
|
2238
|
+
}>
|
|
2239
|
+
async findOrInsertSyncStateAuth(auth: sdk.AuthId, storageIdentityKey: string, storageName: string): Promise<{
|
|
2240
|
+
syncState: TableSyncState;
|
|
2241
|
+
isNew: boolean;
|
|
2242
|
+
}>
|
|
2243
|
+
async insertCertificateAuth(auth: sdk.AuthId, certificate: TableCertificateX): Promise<number>
|
|
2244
|
+
async listActions(auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
|
|
2245
|
+
async listOutputs(auth: sdk.AuthId, vargs: sdk.ValidListOutputsArgs): Promise<ListOutputsResult>
|
|
2246
|
+
async listCertificates(auth: sdk.AuthId, vargs: sdk.ValidListCertificatesArgs): Promise<ListCertificatesResult>
|
|
2247
|
+
async findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>
|
|
2248
|
+
async findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
|
|
2249
|
+
async findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<TableOutput[]>
|
|
2250
|
+
findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>
|
|
2251
|
+
async relinquishCertificate(auth: sdk.AuthId, args: RelinquishCertificateArgs): Promise<number>
|
|
2252
|
+
async relinquishOutput(auth: sdk.AuthId, args: RelinquishOutputArgs): Promise<number>
|
|
2253
|
+
async processSyncChunk(args: sdk.RequestSyncChunkArgs, chunk: sdk.SyncChunk): Promise<sdk.ProcessSyncChunkResult>
|
|
2254
|
+
async getSyncChunk(args: sdk.RequestSyncChunkArgs): Promise<sdk.SyncChunk>
|
|
2255
|
+
async updateProvenTxReqWithNewProvenTx(args: sdk.UpdateProvenTxReqWithNewProvenTxArgs): Promise<sdk.UpdateProvenTxReqWithNewProvenTxResult>
|
|
2256
|
+
async setActive(auth: sdk.AuthId, newActiveStorageIdentityKey: string): Promise<number>
|
|
2257
|
+
}
|
|
2258
|
+
```
|
|
2259
|
+
|
|
2260
|
+
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), [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)
|
|
2261
|
+
|
|
2262
|
+
###### Method abortAction
|
|
2263
|
+
|
|
2264
|
+
Aborts an action by `reference` string.
|
|
2265
|
+
|
|
2266
|
+
```ts
|
|
2267
|
+
async abortAction(auth: sdk.AuthId, args: AbortActionArgs): Promise<AbortActionResult>
|
|
2268
|
+
```
|
|
2269
|
+
See also: [AuthId](./client.md#interface-authid)
|
|
2270
|
+
|
|
2271
|
+
Returns
|
|
2272
|
+
|
|
2273
|
+
`abortAction` result.
|
|
2274
|
+
|
|
2275
|
+
Argument Details
|
|
2276
|
+
|
|
2277
|
+
+ **auth**
|
|
2278
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2279
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2280
|
+
+ **args**
|
|
2281
|
+
+ original wallet `abortAction` args.
|
|
2282
|
+
|
|
2283
|
+
###### Method createAction
|
|
2284
|
+
|
|
2285
|
+
Storage level processing for wallet `createAction`.
|
|
2286
|
+
|
|
2287
|
+
```ts
|
|
2288
|
+
async createAction(auth: sdk.AuthId, args: sdk.ValidCreateActionArgs): Promise<sdk.StorageCreateActionResult>
|
|
2289
|
+
```
|
|
2290
|
+
See also: [AuthId](./client.md#interface-authid), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [ValidCreateActionArgs](./client.md#interface-validcreateactionargs)
|
|
2291
|
+
|
|
2292
|
+
Returns
|
|
2293
|
+
|
|
2294
|
+
`StorageCreateActionResults` supporting additional wallet processing to yield `createAction` results.
|
|
2295
|
+
|
|
2296
|
+
Argument Details
|
|
2297
|
+
|
|
2298
|
+
+ **auth**
|
|
2299
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2300
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2301
|
+
+ **args**
|
|
2302
|
+
+ Validated extension of original wallet `createAction` arguments.
|
|
2303
|
+
|
|
2304
|
+
###### Method destroy
|
|
2305
|
+
|
|
2306
|
+
Called to cleanup resources when no further use of this object will occur.
|
|
2307
|
+
|
|
2308
|
+
```ts
|
|
2309
|
+
async destroy(): Promise<void>
|
|
2310
|
+
```
|
|
2311
|
+
|
|
2312
|
+
###### Method findCertificatesAuth
|
|
2313
|
+
|
|
2314
|
+
Find user certificates, optionally with fields.
|
|
2315
|
+
|
|
2316
|
+
This certificate retrieval method supports internal wallet operations.
|
|
2317
|
+
Field values are stored and retrieved encrypted.
|
|
2318
|
+
|
|
2319
|
+
```ts
|
|
2320
|
+
async findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>
|
|
2321
|
+
```
|
|
2322
|
+
See also: [AuthId](./client.md#interface-authid), [FindCertificatesArgs](./client.md#interface-findcertificatesargs), [TableCertificateX](./storage.md#interface-tablecertificatex)
|
|
2323
|
+
|
|
2324
|
+
Returns
|
|
2325
|
+
|
|
2326
|
+
array of certificates matching args.
|
|
2327
|
+
|
|
2328
|
+
Argument Details
|
|
2329
|
+
|
|
2330
|
+
+ **auth**
|
|
2331
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2332
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2333
|
+
+ **args**
|
|
2334
|
+
+ `FindCertificatesArgs` determines which certificates to retrieve and whether to include fields.
|
|
2335
|
+
|
|
2336
|
+
###### Method findOrInsertSyncStateAuth
|
|
2337
|
+
|
|
2338
|
+
Used to both find and insert a `TableSyncState` record for the user to track wallet data replication across storage providers.
|
|
2339
|
+
|
|
2340
|
+
```ts
|
|
2341
|
+
async findOrInsertSyncStateAuth(auth: sdk.AuthId, storageIdentityKey: string, storageName: string): Promise<{
|
|
2342
|
+
syncState: TableSyncState;
|
|
2343
|
+
isNew: boolean;
|
|
2344
|
+
}>
|
|
2345
|
+
```
|
|
2346
|
+
See also: [AuthId](./client.md#interface-authid), [TableSyncState](./storage.md#interface-tablesyncstate)
|
|
2347
|
+
|
|
2348
|
+
Returns
|
|
2349
|
+
|
|
2350
|
+
`TableSyncState` and whether a new record was created.
|
|
2351
|
+
|
|
2352
|
+
Argument Details
|
|
2353
|
+
|
|
2354
|
+
+ **auth**
|
|
2355
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2356
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2357
|
+
+ **storageName**
|
|
2358
|
+
+ the name of the remote storage being sync'd
|
|
2359
|
+
+ **storageIdentityKey**
|
|
2360
|
+
+ the identity key of the remote storage being sync'd
|
|
2361
|
+
|
|
2362
|
+
###### Method findOrInsertUser
|
|
2363
|
+
|
|
2364
|
+
Used to both find and initialize a new user by identity key.
|
|
2365
|
+
It is up to the remote storage whether to allow creation of new users by this method.
|
|
2366
|
+
|
|
2367
|
+
```ts
|
|
2368
|
+
async findOrInsertUser(identityKey): Promise<{
|
|
2369
|
+
user: TableUser;
|
|
2370
|
+
isNew: boolean;
|
|
2371
|
+
}>
|
|
2372
|
+
```
|
|
2373
|
+
See also: [TableUser](./storage.md#interface-tableuser)
|
|
2374
|
+
|
|
2375
|
+
Returns
|
|
2376
|
+
|
|
2377
|
+
`TableUser` for the user and whether a new user was created.
|
|
2378
|
+
|
|
2379
|
+
Argument Details
|
|
2380
|
+
|
|
2381
|
+
+ **identityKey**
|
|
2382
|
+
+ of the user.
|
|
2383
|
+
|
|
2384
|
+
###### Method findOutputBasketsAuth
|
|
2385
|
+
|
|
2386
|
+
Find output baskets.
|
|
2387
|
+
|
|
2388
|
+
This retrieval method supports internal wallet operations.
|
|
2389
|
+
|
|
2390
|
+
```ts
|
|
2391
|
+
async findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
|
|
2392
|
+
```
|
|
2393
|
+
See also: [AuthId](./client.md#interface-authid), [FindOutputBasketsArgs](./client.md#interface-findoutputbasketsargs), [TableOutputBasket](./storage.md#interface-tableoutputbasket)
|
|
2394
|
+
|
|
2395
|
+
Returns
|
|
2396
|
+
|
|
2397
|
+
array of output baskets matching args.
|
|
2398
|
+
|
|
2399
|
+
Argument Details
|
|
2400
|
+
|
|
2401
|
+
+ **auth**
|
|
2402
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2403
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2404
|
+
+ **args**
|
|
2405
|
+
+ `FindOutputBasketsArgs` determines which baskets to retrieve.
|
|
2406
|
+
|
|
2407
|
+
###### Method findOutputsAuth
|
|
2408
|
+
|
|
2409
|
+
Find outputs.
|
|
2410
|
+
|
|
2411
|
+
This retrieval method supports internal wallet operations.
|
|
2412
|
+
|
|
2413
|
+
```ts
|
|
2414
|
+
async findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<TableOutput[]>
|
|
2415
|
+
```
|
|
2416
|
+
See also: [AuthId](./client.md#interface-authid), [FindOutputsArgs](./client.md#interface-findoutputsargs), [TableOutput](./storage.md#interface-tableoutput)
|
|
2417
|
+
|
|
2418
|
+
Returns
|
|
2419
|
+
|
|
2420
|
+
array of outputs matching args.
|
|
2421
|
+
|
|
2422
|
+
Argument Details
|
|
2423
|
+
|
|
2424
|
+
+ **auth**
|
|
2425
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2426
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2427
|
+
+ **args**
|
|
2428
|
+
+ `FindOutputsArgs` determines which outputs to retrieve.
|
|
2429
|
+
|
|
2430
|
+
###### Method findProvenTxReqs
|
|
2431
|
+
|
|
2432
|
+
Find requests for transaction proofs.
|
|
2433
|
+
|
|
2434
|
+
This retrieval method supports internal wallet operations.
|
|
2435
|
+
|
|
2436
|
+
```ts
|
|
2437
|
+
findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>
|
|
2438
|
+
```
|
|
2439
|
+
See also: [FindProvenTxReqsArgs](./client.md#interface-findproventxreqsargs), [TableProvenTxReq](./storage.md#interface-tableproventxreq)
|
|
2440
|
+
|
|
2441
|
+
Returns
|
|
2442
|
+
|
|
2443
|
+
array of proof requests matching args.
|
|
2444
|
+
|
|
2445
|
+
Argument Details
|
|
2446
|
+
|
|
2447
|
+
+ **auth**
|
|
2448
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2449
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2450
|
+
+ **args**
|
|
2451
|
+
+ `FindProvenTxReqsArgs` determines which proof requests to retrieve.
|
|
2452
|
+
|
|
2453
|
+
###### Method getServices
|
|
2454
|
+
|
|
2455
|
+
Remote storage does not offer `Services` to remote clients.
|
|
2456
|
+
|
|
2457
|
+
```ts
|
|
2458
|
+
getServices(): sdk.WalletServices
|
|
2459
|
+
```
|
|
2460
|
+
See also: [WalletServices](./client.md#interface-walletservices)
|
|
2461
|
+
|
|
2462
|
+
Throws
|
|
2463
|
+
|
|
2464
|
+
WERR_INVALID_OPERATION
|
|
2465
|
+
|
|
2466
|
+
###### Method getSettings
|
|
2467
|
+
|
|
2468
|
+
```ts
|
|
2469
|
+
getSettings(): TableSettings
|
|
2470
|
+
```
|
|
2471
|
+
See also: [TableSettings](./storage.md#interface-tablesettings)
|
|
2472
|
+
|
|
2473
|
+
Returns
|
|
2474
|
+
|
|
2475
|
+
remote storage `TableSettings` if they have been retreived by `makeAvailable`.
|
|
2476
|
+
|
|
2477
|
+
Throws
|
|
2478
|
+
|
|
2479
|
+
WERR_INVALID_OPERATION if `makeAvailable` has not yet been called.
|
|
2480
|
+
|
|
2481
|
+
###### Method getSyncChunk
|
|
2482
|
+
|
|
2483
|
+
Request a "chunk" of replication data for a specific user and storage provider.
|
|
2484
|
+
|
|
2485
|
+
The normal data flow is for the active storage to push backups as a sequence of data chunks to backup storage providers.
|
|
2486
|
+
Also supports recovery where non-active storage can attempt to merge available data prior to becoming active.
|
|
2487
|
+
|
|
2488
|
+
```ts
|
|
2489
|
+
async getSyncChunk(args: sdk.RequestSyncChunkArgs): Promise<sdk.SyncChunk>
|
|
2490
|
+
```
|
|
2491
|
+
See also: [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [SyncChunk](./client.md#interface-syncchunk)
|
|
2492
|
+
|
|
2493
|
+
Returns
|
|
2494
|
+
|
|
2495
|
+
the next "chunk" of replication data
|
|
2496
|
+
|
|
2497
|
+
Argument Details
|
|
2498
|
+
|
|
2499
|
+
+ **args**
|
|
2500
|
+
+ that identify the non-active storage which will receive replication data and constrains the replication process.
|
|
2501
|
+
|
|
2502
|
+
###### Method insertCertificateAuth
|
|
2503
|
+
|
|
2504
|
+
Inserts a new certificate with fields and keyring into remote storage.
|
|
2505
|
+
|
|
2506
|
+
```ts
|
|
2507
|
+
async insertCertificateAuth(auth: sdk.AuthId, certificate: TableCertificateX): Promise<number>
|
|
2508
|
+
```
|
|
2509
|
+
See also: [AuthId](./client.md#interface-authid), [TableCertificateX](./storage.md#interface-tablecertificatex)
|
|
2510
|
+
|
|
2511
|
+
Returns
|
|
2512
|
+
|
|
2513
|
+
record Id of the inserted `TableCertificate` record.
|
|
2514
|
+
|
|
2515
|
+
Argument Details
|
|
2516
|
+
|
|
2517
|
+
+ **auth**
|
|
2518
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2519
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2520
|
+
+ **certificate**
|
|
2521
|
+
+ the certificate to insert.
|
|
2522
|
+
|
|
2523
|
+
###### Method internalizeAction
|
|
2524
|
+
|
|
2525
|
+
Storage level processing for wallet `internalizeAction`.
|
|
2526
|
+
Updates internalized outputs in remote storage.
|
|
2527
|
+
Triggers proof validation of containing transaction.
|
|
2528
|
+
|
|
2529
|
+
```ts
|
|
2530
|
+
async internalizeAction(auth: sdk.AuthId, args: InternalizeActionArgs): Promise<InternalizeActionResult>
|
|
2531
|
+
```
|
|
2532
|
+
See also: [AuthId](./client.md#interface-authid)
|
|
2533
|
+
|
|
2534
|
+
Returns
|
|
294
2535
|
|
|
295
|
-
|
|
2536
|
+
`internalizeAction` results
|
|
296
2537
|
|
|
297
|
-
|
|
298
|
-
|
|
2538
|
+
Argument Details
|
|
2539
|
+
|
|
2540
|
+
+ **auth**
|
|
2541
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2542
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2543
|
+
+ **args**
|
|
2544
|
+
+ Original wallet `internalizeAction` arguments.
|
|
2545
|
+
|
|
2546
|
+
###### Method isAvailable
|
|
299
2547
|
|
|
300
2548
|
```ts
|
|
301
|
-
|
|
302
|
-
isMerge: boolean;
|
|
303
|
-
txid: string;
|
|
304
|
-
satoshis: number;
|
|
305
|
-
}
|
|
2549
|
+
isAvailable(): boolean
|
|
306
2550
|
```
|
|
307
2551
|
|
|
308
|
-
|
|
2552
|
+
Returns
|
|
309
2553
|
|
|
310
|
-
true
|
|
2554
|
+
true once storage `TableSettings` have been retreived from remote storage.
|
|
2555
|
+
|
|
2556
|
+
###### Method isStorageProvider
|
|
2557
|
+
|
|
2558
|
+
The `StorageClient` implements the `WalletStorageProvider` interface.
|
|
2559
|
+
It does not implement the lower level `StorageProvider` interface.
|
|
311
2560
|
|
|
312
2561
|
```ts
|
|
313
|
-
|
|
2562
|
+
isStorageProvider(): boolean
|
|
314
2563
|
```
|
|
315
2564
|
|
|
316
|
-
|
|
2565
|
+
Returns
|
|
317
2566
|
|
|
318
|
-
|
|
2567
|
+
false
|
|
2568
|
+
|
|
2569
|
+
###### Method listActions
|
|
2570
|
+
|
|
2571
|
+
Storage level processing for wallet `listActions`.
|
|
319
2572
|
|
|
320
2573
|
```ts
|
|
321
|
-
|
|
2574
|
+
async listActions(auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
|
|
322
2575
|
```
|
|
2576
|
+
See also: [AuthId](./client.md#interface-authid), [ValidListActionsArgs](./client.md#interface-validlistactionsargs)
|
|
323
2577
|
|
|
324
|
-
|
|
2578
|
+
Returns
|
|
325
2579
|
|
|
326
|
-
|
|
2580
|
+
`listActions` results.
|
|
327
2581
|
|
|
328
|
-
|
|
329
|
-
txid: string
|
|
330
|
-
```
|
|
2582
|
+
Argument Details
|
|
331
2583
|
|
|
332
|
-
|
|
2584
|
+
+ **auth**
|
|
2585
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2586
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2587
|
+
+ **args**
|
|
2588
|
+
+ Validated extension of original wallet `listActions` arguments.
|
|
333
2589
|
|
|
334
|
-
|
|
335
|
-
|
|
2590
|
+
###### Method listCertificates
|
|
2591
|
+
|
|
2592
|
+
Storage level processing for wallet `listCertificates`.
|
|
336
2593
|
|
|
337
2594
|
```ts
|
|
338
|
-
|
|
339
|
-
knex: Knex;
|
|
340
|
-
}
|
|
2595
|
+
async listCertificates(auth: sdk.AuthId, vargs: sdk.ValidListCertificatesArgs): Promise<ListCertificatesResult>
|
|
341
2596
|
```
|
|
2597
|
+
See also: [AuthId](./client.md#interface-authid), [ValidListCertificatesArgs](./client.md#interface-validlistcertificatesargs)
|
|
342
2598
|
|
|
343
|
-
|
|
2599
|
+
Returns
|
|
344
2600
|
|
|
345
|
-
|
|
2601
|
+
`listCertificates` results.
|
|
346
2602
|
|
|
347
|
-
|
|
2603
|
+
Argument Details
|
|
348
2604
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
2605
|
+
+ **auth**
|
|
2606
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2607
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2608
|
+
+ **args**
|
|
2609
|
+
+ Validated extension of original wallet `listCertificates` arguments.
|
|
352
2610
|
|
|
353
|
-
|
|
2611
|
+
###### Method listOutputs
|
|
354
2612
|
|
|
355
|
-
|
|
356
|
-
##### Interface: StorageProviderOptions
|
|
2613
|
+
Storage level processing for wallet `listOutputs`.
|
|
357
2614
|
|
|
358
2615
|
```ts
|
|
359
|
-
|
|
360
|
-
chain: sdk.Chain;
|
|
361
|
-
feeModel: sdk.StorageFeeModel;
|
|
362
|
-
commissionSatoshis: number;
|
|
363
|
-
commissionPubKeyHex?: PubKeyHex;
|
|
364
|
-
}
|
|
2616
|
+
async listOutputs(auth: sdk.AuthId, vargs: sdk.ValidListOutputsArgs): Promise<ListOutputsResult>
|
|
365
2617
|
```
|
|
2618
|
+
See also: [AuthId](./client.md#interface-authid), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs)
|
|
366
2619
|
|
|
367
|
-
|
|
2620
|
+
Returns
|
|
368
2621
|
|
|
369
|
-
|
|
2622
|
+
`listOutputs` results.
|
|
370
2623
|
|
|
371
|
-
|
|
372
|
-
The actual locking script for each commission will use a public key derived
|
|
373
|
-
from this key by information stored in the commissions table.
|
|
2624
|
+
Argument Details
|
|
374
2625
|
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
2626
|
+
+ **auth**
|
|
2627
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2628
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2629
|
+
+ **args**
|
|
2630
|
+
+ Validated extension of original wallet `listOutputs` arguments.
|
|
378
2631
|
|
|
379
|
-
######
|
|
2632
|
+
###### Method makeAvailable
|
|
380
2633
|
|
|
381
|
-
|
|
382
|
-
|
|
2634
|
+
Must be called prior to making use of storage.
|
|
2635
|
+
Retreives `TableSettings` from remote storage provider.
|
|
383
2636
|
|
|
384
2637
|
```ts
|
|
385
|
-
|
|
2638
|
+
async makeAvailable(): Promise<TableSettings>
|
|
386
2639
|
```
|
|
2640
|
+
See also: [TableSettings](./storage.md#interface-tablesettings)
|
|
387
2641
|
|
|
388
|
-
|
|
2642
|
+
Returns
|
|
389
2643
|
|
|
390
|
-
|
|
391
|
-
|
|
2644
|
+
remote storage `TableSettings`
|
|
2645
|
+
|
|
2646
|
+
###### Method migrate
|
|
2647
|
+
|
|
2648
|
+
Requests schema migration to latest.
|
|
2649
|
+
Typically remote storage will ignore this request.
|
|
392
2650
|
|
|
393
2651
|
```ts
|
|
394
|
-
|
|
395
|
-
chain: sdk.Chain;
|
|
396
|
-
}
|
|
2652
|
+
async migrate(storageName: string, storageIdentityKey: string): Promise<string>
|
|
397
2653
|
```
|
|
398
2654
|
|
|
399
|
-
|
|
2655
|
+
Returns
|
|
400
2656
|
|
|
401
|
-
|
|
2657
|
+
current schema migration identifier
|
|
402
2658
|
|
|
403
|
-
|
|
404
|
-
##### Interface: StorageReaderWriterOptions
|
|
2659
|
+
Argument Details
|
|
405
2660
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
2661
|
+
+ **storageName**
|
|
2662
|
+
+ Unique human readable name for remote storage if it does not yet exist.
|
|
2663
|
+
+ **storageIdentityKey**
|
|
2664
|
+
+ Unique identity key for remote storage if it does not yet exist.
|
|
410
2665
|
|
|
411
|
-
|
|
2666
|
+
###### Method processAction
|
|
412
2667
|
|
|
413
|
-
|
|
2668
|
+
Storage level processing for wallet `createAction` and `signAction`.
|
|
414
2669
|
|
|
415
|
-
|
|
416
|
-
##### Interface: WalletStorageServerOptions
|
|
2670
|
+
Handles remaining storage tasks once a fully signed transaction has been completed. This is common to both `createAction` and `signAction`.
|
|
417
2671
|
|
|
418
2672
|
```ts
|
|
419
|
-
|
|
420
|
-
port: number;
|
|
421
|
-
wallet: Wallet;
|
|
422
|
-
monetize: boolean;
|
|
423
|
-
calculateRequestPrice?: (req: Request) => number | Promise<number>;
|
|
424
|
-
}
|
|
2673
|
+
async processAction(auth: sdk.AuthId, args: sdk.StorageProcessActionArgs): Promise<sdk.StorageProcessActionResults>
|
|
425
2674
|
```
|
|
2675
|
+
See also: [AuthId](./client.md#interface-authid), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults)
|
|
426
2676
|
|
|
427
|
-
|
|
2677
|
+
Returns
|
|
428
2678
|
|
|
429
|
-
|
|
2679
|
+
`StorageProcessActionResults` supporting final wallet processing to yield `createAction` or `signAction` results.
|
|
430
2680
|
|
|
431
|
-
|
|
432
|
-
|
|
2681
|
+
Argument Details
|
|
2682
|
+
|
|
2683
|
+
+ **auth**
|
|
2684
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2685
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2686
|
+
+ **args**
|
|
2687
|
+
+ `StorageProcessActionArgs` convey completed signed transaction to storage.
|
|
2688
|
+
|
|
2689
|
+
###### Method processSyncChunk
|
|
2690
|
+
|
|
2691
|
+
Process a "chunk" of replication data for the user.
|
|
2692
|
+
|
|
2693
|
+
The normal data flow is for the active storage to push backups as a sequence of data chunks to backup storage providers.
|
|
433
2694
|
|
|
434
2695
|
```ts
|
|
435
|
-
|
|
436
|
-
vout: number;
|
|
437
|
-
providedBy: sdk.StorageProvidedBy;
|
|
438
|
-
purpose?: string;
|
|
439
|
-
derivationSuffix?: string;
|
|
440
|
-
keyOffset?: string;
|
|
441
|
-
}
|
|
2696
|
+
async processSyncChunk(args: sdk.RequestSyncChunkArgs, chunk: sdk.SyncChunk): Promise<sdk.ProcessSyncChunkResult>
|
|
442
2697
|
```
|
|
2698
|
+
See also: [ProcessSyncChunkResult](./client.md#interface-processsyncchunkresult), [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [SyncChunk](./client.md#interface-syncchunk)
|
|
443
2699
|
|
|
444
|
-
|
|
2700
|
+
Returns
|
|
445
2701
|
|
|
446
|
-
|
|
2702
|
+
whether processing is done, counts of inserts and udpates, and related progress tracking properties.
|
|
447
2703
|
|
|
448
|
-
|
|
449
|
-
#### Classes
|
|
2704
|
+
Argument Details
|
|
450
2705
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
| [StorageKnex](#class-storageknex) |
|
|
456
|
-
| [StorageProvider](#class-storageprovider) |
|
|
457
|
-
| [StorageReader](#class-storagereader) |
|
|
458
|
-
| [StorageReaderWriter](#class-storagereaderwriter) |
|
|
459
|
-
| [StorageServer](#class-storageserver) |
|
|
460
|
-
| [StorageSyncReader](#class-storagesyncreader) |
|
|
461
|
-
| [WalletStorageManager](#class-walletstoragemanager) |
|
|
2706
|
+
+ **args**
|
|
2707
|
+
+ a copy of the replication request args that initiated the sequence of data chunks.
|
|
2708
|
+
+ **chunk**
|
|
2709
|
+
+ the current data chunk to process.
|
|
462
2710
|
|
|
463
|
-
|
|
2711
|
+
###### Method relinquishCertificate
|
|
464
2712
|
|
|
465
|
-
|
|
2713
|
+
Relinquish a certificate.
|
|
466
2714
|
|
|
467
|
-
|
|
2715
|
+
For storage supporting replication records must be kept of deletions. Therefore certificates are marked as deleted
|
|
2716
|
+
when relinquished, and no longer returned by `listCertificates`, but are still retained by storage.
|
|
468
2717
|
|
|
469
2718
|
```ts
|
|
470
|
-
|
|
471
|
-
migrations: Record<string, Migration> = {};
|
|
472
|
-
constructor(public chain: sdk.Chain, public storageName: string, public storageIdentityKey: string, public maxOutputScriptLength: number)
|
|
473
|
-
async getMigrations(): Promise<string[]>
|
|
474
|
-
getMigrationName(migration: string)
|
|
475
|
-
async getMigration(migration: string): Promise<Migration>
|
|
476
|
-
async getLatestMigration(): Promise<string>
|
|
477
|
-
static async latestMigration(): Promise<string>
|
|
478
|
-
setupMigrations(chain: string, storageName: string, storageIdentityKey: string, maxOutputScriptLength: number): Record<string, Migration>
|
|
479
|
-
static async dbtype(knex: Knex<any, any[]>): Promise<DBType> {
|
|
480
|
-
try {
|
|
481
|
-
const q = `SELECT
|
|
482
|
-
CASE
|
|
483
|
-
WHEN (SELECT VERSION() LIKE '%MariaDB%') = 1 THEN 'Unknown'
|
|
484
|
-
WHEN (SELECT VERSION()) IS NOT NULL THEN 'MySQL'
|
|
485
|
-
ELSE 'Unknown'
|
|
486
|
-
END AS database_type;`;
|
|
487
|
-
let r = await knex.raw(q);
|
|
488
|
-
if (!r[0]["database_type"])
|
|
489
|
-
r = r[0];
|
|
490
|
-
if (r["rows"])
|
|
491
|
-
r = r.rows;
|
|
492
|
-
const dbtype: "SQLite" | "MySQL" | "Unknown" = r[0].database_type;
|
|
493
|
-
if (dbtype === "Unknown")
|
|
494
|
-
throw new sdk.WERR_NOT_IMPLEMENTED(`Attempting to create database on unsuported engine.`);
|
|
495
|
-
return dbtype;
|
|
496
|
-
}
|
|
497
|
-
catch (eu: unknown) {
|
|
498
|
-
const e = sdk.WalletError.fromUnknown(eu);
|
|
499
|
-
if (e.code === "SQLITE_ERROR")
|
|
500
|
-
return "SQLite";
|
|
501
|
-
throw new sdk.WERR_NOT_IMPLEMENTED(`Attempting to create database on unsuported engine.`);
|
|
502
|
-
}
|
|
503
|
-
}
|
|
504
|
-
}
|
|
2719
|
+
async relinquishCertificate(auth: sdk.AuthId, args: RelinquishCertificateArgs): Promise<number>
|
|
505
2720
|
```
|
|
2721
|
+
See also: [AuthId](./client.md#interface-authid)
|
|
506
2722
|
|
|
507
|
-
|
|
2723
|
+
Argument Details
|
|
508
2724
|
|
|
509
|
-
|
|
2725
|
+
+ **auth**
|
|
2726
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2727
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2728
|
+
+ **args**
|
|
2729
|
+
+ original wallet `relinquishCertificate` args.
|
|
2730
|
+
|
|
2731
|
+
###### Method relinquishOutput
|
|
2732
|
+
|
|
2733
|
+
Relinquish an output.
|
|
2734
|
+
|
|
2735
|
+
Relinquishing an output removes the output from whatever basket was tracking it.
|
|
510
2736
|
|
|
511
2737
|
```ts
|
|
512
|
-
|
|
2738
|
+
async relinquishOutput(auth: sdk.AuthId, args: RelinquishOutputArgs): Promise<number>
|
|
513
2739
|
```
|
|
514
|
-
See also: [
|
|
2740
|
+
See also: [AuthId](./client.md#interface-authid)
|
|
515
2741
|
|
|
516
2742
|
Argument Details
|
|
517
2743
|
|
|
518
|
-
+ **
|
|
519
|
-
+
|
|
520
|
-
|
|
521
|
-
|
|
2744
|
+
+ **auth**
|
|
2745
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2746
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2747
|
+
+ **args**
|
|
2748
|
+
+ original wallet `relinquishOutput` args.
|
|
522
2749
|
|
|
523
|
-
###### Method
|
|
2750
|
+
###### Method setActive
|
|
2751
|
+
|
|
2752
|
+
Ensures up-to-date wallet data replication to all configured backup storage providers,
|
|
2753
|
+
then promotes one of the configured backups to active,
|
|
2754
|
+
demoting the current active to new backup.
|
|
524
2755
|
|
|
525
2756
|
```ts
|
|
526
|
-
|
|
2757
|
+
async setActive(auth: sdk.AuthId, newActiveStorageIdentityKey: string): Promise<number>
|
|
527
2758
|
```
|
|
528
|
-
See also: [
|
|
2759
|
+
See also: [AuthId](./client.md#interface-authid)
|
|
529
2760
|
|
|
530
|
-
|
|
2761
|
+
Argument Details
|
|
531
2762
|
|
|
532
|
-
|
|
2763
|
+
+ **auth**
|
|
2764
|
+
+ Identifies client by identity key and the storage identity key of their currently active storage.
|
|
2765
|
+
This must match the `AuthFetch` identity securing the remote conneciton.
|
|
2766
|
+
+ **newActiveStorageIdentityKey**
|
|
2767
|
+
+ which must be a currently configured backup storage provider.
|
|
533
2768
|
|
|
534
|
-
|
|
2769
|
+
###### Method setServices
|
|
535
2770
|
|
|
536
|
-
|
|
537
|
-
##### Class: StorageClient
|
|
2771
|
+
Ignored. Remote storage cannot share `Services` with remote clients.
|
|
538
2772
|
|
|
539
2773
|
```ts
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
async abortAction(auth: sdk.AuthId, args: AbortActionArgs): Promise<AbortActionResult>
|
|
555
|
-
async findOrInsertUser(identityKey): Promise<{
|
|
556
|
-
user: table.User;
|
|
557
|
-
isNew: boolean;
|
|
558
|
-
}>
|
|
559
|
-
async findOrInsertSyncStateAuth(auth: sdk.AuthId, storageIdentityKey: string, storageName: string): Promise<{
|
|
560
|
-
syncState: table.SyncState;
|
|
561
|
-
isNew: boolean;
|
|
562
|
-
}>
|
|
563
|
-
async insertCertificateAuth(auth: sdk.AuthId, certificate: table.CertificateX): Promise<number>
|
|
564
|
-
async listActions(auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
|
|
565
|
-
async listOutputs(auth: sdk.AuthId, vargs: sdk.ValidListOutputsArgs): Promise<ListOutputsResult>
|
|
566
|
-
async listCertificates(auth: sdk.AuthId, vargs: sdk.ValidListCertificatesArgs): Promise<ListCertificatesResult>
|
|
567
|
-
async findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<table.Certificate[]>
|
|
568
|
-
async findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<table.OutputBasket[]>
|
|
569
|
-
async findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<table.Output[]>
|
|
570
|
-
findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<table.ProvenTxReq[]>
|
|
571
|
-
async relinquishCertificate(auth: sdk.AuthId, args: RelinquishCertificateArgs): Promise<number>
|
|
572
|
-
async relinquishOutput(auth: sdk.AuthId, args: RelinquishOutputArgs): Promise<number>
|
|
573
|
-
async processSyncChunk(args: sdk.RequestSyncChunkArgs, chunk: sdk.SyncChunk): Promise<sdk.ProcessSyncChunkResult>
|
|
574
|
-
async getSyncChunk(args: sdk.RequestSyncChunkArgs): Promise<sdk.SyncChunk>
|
|
575
|
-
async updateProvenTxReqWithNewProvenTx(args: sdk.UpdateProvenTxReqWithNewProvenTxArgs): Promise<sdk.UpdateProvenTxReqWithNewProvenTxResult>
|
|
576
|
-
async setActive(auth: sdk.AuthId, newActiveStorageIdentityKey: string): Promise<number>
|
|
577
|
-
}
|
|
2774
|
+
setServices(v: sdk.WalletServices): void
|
|
2775
|
+
```
|
|
2776
|
+
See also: [WalletServices](./client.md#interface-walletservices)
|
|
2777
|
+
|
|
2778
|
+
###### Method updateProvenTxReqWithNewProvenTx
|
|
2779
|
+
|
|
2780
|
+
Handles the data received when a new transaction proof is found in response to an outstanding request for proof data:
|
|
2781
|
+
|
|
2782
|
+
- Creates a new `TableProvenTx` record.
|
|
2783
|
+
- Notifies all user transaction records of the new status.
|
|
2784
|
+
- Updates the proof request record to 'completed' status which enables delayed deletion.
|
|
2785
|
+
|
|
2786
|
+
```ts
|
|
2787
|
+
async updateProvenTxReqWithNewProvenTx(args: sdk.UpdateProvenTxReqWithNewProvenTxArgs): Promise<sdk.UpdateProvenTxReqWithNewProvenTxResult>
|
|
578
2788
|
```
|
|
2789
|
+
See also: [UpdateProvenTxReqWithNewProvenTxArgs](./client.md#interface-updateproventxreqwithnewproventxargs), [UpdateProvenTxReqWithNewProvenTxResult](./client.md#interface-updateproventxreqwithnewproventxresult)
|
|
2790
|
+
|
|
2791
|
+
Returns
|
|
579
2792
|
|
|
580
|
-
|
|
2793
|
+
results of updates
|
|
2794
|
+
|
|
2795
|
+
Argument Details
|
|
2796
|
+
|
|
2797
|
+
+ **args**
|
|
2798
|
+
+ proof request and new transaction proof data
|
|
581
2799
|
|
|
582
2800
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
583
2801
|
|
|
@@ -588,51 +2806,51 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
588
2806
|
export class StorageKnex extends StorageProvider implements sdk.WalletStorageProvider {
|
|
589
2807
|
knex: Knex;
|
|
590
2808
|
constructor(options: StorageKnexOptions)
|
|
591
|
-
async readSettings(): Promise<
|
|
2809
|
+
async readSettings(): Promise<TableSettings>
|
|
592
2810
|
override async getProvenOrRawTx(txid: string, trx?: sdk.TrxToken): Promise<sdk.ProvenOrRawTx>
|
|
593
2811
|
dbTypeSubstring(source: string, fromOffset: number, forLength?: number)
|
|
594
2812
|
override async getRawTxOfKnownValidTransaction(txid?: string, offset?: number, length?: number, trx?: sdk.TrxToken): Promise<number[] | undefined>
|
|
595
2813
|
getProvenTxsForUserQuery(args: sdk.FindForUserSincePagedArgs): Knex.QueryBuilder
|
|
596
|
-
override async getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
2814
|
+
override async getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTx[]>
|
|
597
2815
|
getProvenTxReqsForUserQuery(args: sdk.FindForUserSincePagedArgs): Knex.QueryBuilder
|
|
598
|
-
override async getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
2816
|
+
override async getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTxReq[]>
|
|
599
2817
|
getTxLabelMapsForUserQuery(args: sdk.FindForUserSincePagedArgs): Knex.QueryBuilder
|
|
600
|
-
override async getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
2818
|
+
override async getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableTxLabelMap[]>
|
|
601
2819
|
getOutputTagMapsForUserQuery(args: sdk.FindForUserSincePagedArgs): Knex.QueryBuilder
|
|
602
|
-
override async getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
2820
|
+
override async getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableOutputTagMap[]>
|
|
603
2821
|
override async listActions(auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
|
|
604
2822
|
override async listOutputs(auth: sdk.AuthId, vargs: sdk.ValidListOutputsArgs): Promise<ListOutputsResult>
|
|
605
|
-
override async insertProvenTx(tx:
|
|
606
|
-
override async insertProvenTxReq(tx:
|
|
607
|
-
override async insertUser(user:
|
|
608
|
-
override async insertCertificateAuth(auth: sdk.AuthId, certificate:
|
|
609
|
-
override async insertCertificate(certificate:
|
|
610
|
-
override async insertCertificateField(certificateField:
|
|
611
|
-
override async insertOutputBasket(basket:
|
|
612
|
-
override async insertTransaction(tx:
|
|
613
|
-
override async insertCommission(commission:
|
|
614
|
-
override async insertOutput(output:
|
|
615
|
-
override async insertOutputTag(tag:
|
|
616
|
-
override async insertOutputTagMap(tagMap:
|
|
617
|
-
override async insertTxLabel(label:
|
|
618
|
-
override async insertTxLabelMap(labelMap:
|
|
619
|
-
override async insertMonitorEvent(event:
|
|
620
|
-
override async insertSyncState(syncState:
|
|
621
|
-
override async updateCertificateField(certificateId: number, fieldName: string, update: Partial<
|
|
622
|
-
override async updateCertificate(id: number, update: Partial<
|
|
623
|
-
override async updateCommission(id: number, update: Partial<
|
|
624
|
-
override async updateOutputBasket(id: number, update: Partial<
|
|
625
|
-
override async updateOutput(id: number, update: Partial<
|
|
626
|
-
override async updateOutputTagMap(outputId: number, tagId: number, update: Partial<
|
|
627
|
-
override async updateOutputTag(id: number, update: Partial<
|
|
628
|
-
override async updateProvenTxReq(id: number | number[], update: Partial<
|
|
629
|
-
override async updateProvenTx(id: number, update: Partial<
|
|
630
|
-
override async updateSyncState(id: number, update: Partial<
|
|
631
|
-
override async updateTransaction(id: number | number[], update: Partial<
|
|
632
|
-
override async updateTxLabelMap(transactionId: number, txLabelId: number, update: Partial<
|
|
633
|
-
override async updateTxLabel(id: number, update: Partial<
|
|
634
|
-
override async updateUser(id: number, update: Partial<
|
|
635
|
-
override async updateMonitorEvent(id: number, update: Partial<
|
|
2823
|
+
override async insertProvenTx(tx: TableProvenTx, trx?: sdk.TrxToken): Promise<number>
|
|
2824
|
+
override async insertProvenTxReq(tx: TableProvenTxReq, trx?: sdk.TrxToken): Promise<number>
|
|
2825
|
+
override async insertUser(user: TableUser, trx?: sdk.TrxToken): Promise<number>
|
|
2826
|
+
override async insertCertificateAuth(auth: sdk.AuthId, certificate: TableCertificateX): Promise<number>
|
|
2827
|
+
override async insertCertificate(certificate: TableCertificateX, trx?: sdk.TrxToken): Promise<number>
|
|
2828
|
+
override async insertCertificateField(certificateField: TableCertificateField, trx?: sdk.TrxToken): Promise<void>
|
|
2829
|
+
override async insertOutputBasket(basket: TableOutputBasket, trx?: sdk.TrxToken): Promise<number>
|
|
2830
|
+
override async insertTransaction(tx: TableTransaction, trx?: sdk.TrxToken): Promise<number>
|
|
2831
|
+
override async insertCommission(commission: TableCommission, trx?: sdk.TrxToken): Promise<number>
|
|
2832
|
+
override async insertOutput(output: TableOutput, trx?: sdk.TrxToken): Promise<number>
|
|
2833
|
+
override async insertOutputTag(tag: TableOutputTag, trx?: sdk.TrxToken): Promise<number>
|
|
2834
|
+
override async insertOutputTagMap(tagMap: TableOutputTagMap, trx?: sdk.TrxToken): Promise<void>
|
|
2835
|
+
override async insertTxLabel(label: TableTxLabel, trx?: sdk.TrxToken): Promise<number>
|
|
2836
|
+
override async insertTxLabelMap(labelMap: TableTxLabelMap, trx?: sdk.TrxToken): Promise<void>
|
|
2837
|
+
override async insertMonitorEvent(event: TableMonitorEvent, trx?: sdk.TrxToken): Promise<number>
|
|
2838
|
+
override async insertSyncState(syncState: TableSyncState, trx?: sdk.TrxToken): Promise<number>
|
|
2839
|
+
override async updateCertificateField(certificateId: number, fieldName: string, update: Partial<TableCertificateField>, trx?: sdk.TrxToken): Promise<number>
|
|
2840
|
+
override async updateCertificate(id: number, update: Partial<TableCertificate>, trx?: sdk.TrxToken): Promise<number>
|
|
2841
|
+
override async updateCommission(id: number, update: Partial<TableCommission>, trx?: sdk.TrxToken): Promise<number>
|
|
2842
|
+
override async updateOutputBasket(id: number, update: Partial<TableOutputBasket>, trx?: sdk.TrxToken): Promise<number>
|
|
2843
|
+
override async updateOutput(id: number, update: Partial<TableOutput>, trx?: sdk.TrxToken): Promise<number>
|
|
2844
|
+
override async updateOutputTagMap(outputId: number, tagId: number, update: Partial<TableOutputTagMap>, trx?: sdk.TrxToken): Promise<number>
|
|
2845
|
+
override async updateOutputTag(id: number, update: Partial<TableOutputTag>, trx?: sdk.TrxToken): Promise<number>
|
|
2846
|
+
override async updateProvenTxReq(id: number | number[], update: Partial<TableProvenTxReq>, trx?: sdk.TrxToken): Promise<number>
|
|
2847
|
+
override async updateProvenTx(id: number, update: Partial<TableProvenTx>, trx?: sdk.TrxToken): Promise<number>
|
|
2848
|
+
override async updateSyncState(id: number, update: Partial<TableSyncState>, trx?: sdk.TrxToken): Promise<number>
|
|
2849
|
+
override async updateTransaction(id: number | number[], update: Partial<TableTransaction>, trx?: sdk.TrxToken): Promise<number>
|
|
2850
|
+
override async updateTxLabelMap(transactionId: number, txLabelId: number, update: Partial<TableTxLabelMap>, trx?: sdk.TrxToken): Promise<number>
|
|
2851
|
+
override async updateTxLabel(id: number, update: Partial<TableTxLabel>, trx?: sdk.TrxToken): Promise<number>
|
|
2852
|
+
override async updateUser(id: number, update: Partial<TableUser>, trx?: sdk.TrxToken): Promise<number>
|
|
2853
|
+
override async updateMonitorEvent(id: number, update: Partial<TableMonitorEvent>, trx?: sdk.TrxToken): Promise<number>
|
|
636
2854
|
setupQuery<T extends object>(table: string, args: sdk.FindPartialSincePagedArgs<T>): Knex.QueryBuilder
|
|
637
2855
|
findCertificateFieldsQuery(args: sdk.FindCertificateFieldsArgs): Knex.QueryBuilder
|
|
638
2856
|
findCertificatesQuery(args: sdk.FindCertificatesArgs): Knex.QueryBuilder
|
|
@@ -649,24 +2867,24 @@ export class StorageKnex extends StorageProvider implements sdk.WalletStoragePro
|
|
|
649
2867
|
findTxLabelsQuery(args: sdk.FindTxLabelsArgs): Knex.QueryBuilder
|
|
650
2868
|
findUsersQuery(args: sdk.FindUsersArgs): Knex.QueryBuilder
|
|
651
2869
|
findMonitorEventsQuery(args: sdk.FindMonitorEventsArgs): Knex.QueryBuilder
|
|
652
|
-
override async findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<
|
|
653
|
-
override async findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<
|
|
654
|
-
override async findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<
|
|
655
|
-
override async findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<
|
|
656
|
-
override async findCertificates(args: sdk.FindCertificatesArgs): Promise<
|
|
657
|
-
override async findCommissions(args: sdk.FindCommissionsArgs): Promise<
|
|
658
|
-
override async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<
|
|
659
|
-
override async findOutputs(args: sdk.FindOutputsArgs): Promise<
|
|
660
|
-
override async findOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<
|
|
661
|
-
override async findOutputTags(args: sdk.FindOutputTagsArgs): Promise<
|
|
662
|
-
override async findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<
|
|
663
|
-
override async findProvenTxs(args: sdk.FindProvenTxsArgs): Promise<
|
|
664
|
-
override async findSyncStates(args: sdk.FindSyncStatesArgs): Promise<
|
|
665
|
-
override async findTransactions(args: sdk.FindTransactionsArgs): Promise<
|
|
666
|
-
override async findTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<
|
|
667
|
-
override async findTxLabels(args: sdk.FindTxLabelsArgs): Promise<
|
|
668
|
-
override async findUsers(args: sdk.FindUsersArgs): Promise<
|
|
669
|
-
override async findMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<
|
|
2870
|
+
override async findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>
|
|
2871
|
+
override async findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
|
|
2872
|
+
override async findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<TableOutput[]>
|
|
2873
|
+
override async findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<TableCertificateField[]>
|
|
2874
|
+
override async findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>
|
|
2875
|
+
override async findCommissions(args: sdk.FindCommissionsArgs): Promise<TableCommission[]>
|
|
2876
|
+
override async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
|
|
2877
|
+
override async findOutputs(args: sdk.FindOutputsArgs): Promise<TableOutput[]>
|
|
2878
|
+
override async findOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<TableOutputTagMap[]>
|
|
2879
|
+
override async findOutputTags(args: sdk.FindOutputTagsArgs): Promise<TableOutputTag[]>
|
|
2880
|
+
override async findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>
|
|
2881
|
+
override async findProvenTxs(args: sdk.FindProvenTxsArgs): Promise<TableProvenTx[]>
|
|
2882
|
+
override async findSyncStates(args: sdk.FindSyncStatesArgs): Promise<TableSyncState[]>
|
|
2883
|
+
override async findTransactions(args: sdk.FindTransactionsArgs): Promise<TableTransaction[]>
|
|
2884
|
+
override async findTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<TableTxLabelMap[]>
|
|
2885
|
+
override async findTxLabels(args: sdk.FindTxLabelsArgs): Promise<TableTxLabel[]>
|
|
2886
|
+
override async findUsers(args: sdk.FindUsersArgs): Promise<TableUser[]>
|
|
2887
|
+
override async findMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<TableMonitorEvent[]>
|
|
670
2888
|
async getCount<T extends object>(q: Knex.QueryBuilder<T, T[]>): Promise<number>
|
|
671
2889
|
override async countCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<number>
|
|
672
2890
|
override async countCertificates(args: sdk.FindCertificatesArgs): Promise<number>
|
|
@@ -688,15 +2906,15 @@ export class StorageKnex extends StorageProvider implements sdk.WalletStoragePro
|
|
|
688
2906
|
override async dropAllData(): Promise<void>
|
|
689
2907
|
override async transaction<T>(scope: (trx: sdk.TrxToken) => Promise<T>, trx?: sdk.TrxToken): Promise<T>
|
|
690
2908
|
toDb(trx?: sdk.TrxToken)
|
|
691
|
-
async validateRawTransaction(t:
|
|
692
|
-
async validateOutputScript(o:
|
|
2909
|
+
async validateRawTransaction(t: TableTransaction, trx?: sdk.TrxToken): Promise<void>
|
|
2910
|
+
async validateOutputScript(o: TableOutput, trx?: sdk.TrxToken): Promise<void>
|
|
693
2911
|
_verifiedReadyForDatabaseAccess: boolean = false;
|
|
694
2912
|
async verifyReadyForDatabaseAccess(trx?: sdk.TrxToken): Promise<DBType>
|
|
695
2913
|
validatePartialForUpdate<T extends sdk.EntityTimeStamp>(update: Partial<T>, dateFields?: string[], booleanFields?: string[]): Partial<T>
|
|
696
2914
|
async validateEntityForInsert<T extends sdk.EntityTimeStamp>(entity: T, trx?: sdk.TrxToken, dateFields?: string[], booleanFields?: string[]): Promise<any>
|
|
697
|
-
override async getLabelsForTransactionId(transactionId?: number, trx?: sdk.TrxToken): Promise<
|
|
698
|
-
async extendOutput(o:
|
|
699
|
-
override async getTagsForOutputId(outputId: number, trx?: sdk.TrxToken): Promise<
|
|
2915
|
+
override async getLabelsForTransactionId(transactionId?: number, trx?: sdk.TrxToken): Promise<TableTxLabel[]>
|
|
2916
|
+
async extendOutput(o: TableOutput, includeBasket = false, includeTags = false, trx?: sdk.TrxToken): Promise<TableOutputX>
|
|
2917
|
+
override async getTagsForOutputId(outputId: number, trx?: sdk.TrxToken): Promise<TableOutputTag[]>
|
|
700
2918
|
override async purgeData(params: sdk.PurgeParams, trx?: sdk.TrxToken): Promise<sdk.PurgeResults>
|
|
701
2919
|
override async reviewStatus(args: {
|
|
702
2920
|
agedLimit: Date;
|
|
@@ -705,12 +2923,12 @@ export class StorageKnex extends StorageProvider implements sdk.WalletStoragePro
|
|
|
705
2923
|
log: string;
|
|
706
2924
|
}>
|
|
707
2925
|
async countChangeInputs(userId: number, basketId: number, excludeSending: boolean): Promise<number>
|
|
708
|
-
async allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<
|
|
2926
|
+
async allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<TableOutput | undefined> {
|
|
709
2927
|
const status: sdk.TransactionStatus[] = ["completed", "unproven"];
|
|
710
2928
|
if (!excludeSending)
|
|
711
2929
|
status.push("sending");
|
|
712
2930
|
const statusText = status.map(s => `'${s}'`).join(",");
|
|
713
|
-
const r:
|
|
2931
|
+
const r: TableOutput | undefined = await this.knex.transaction(async (trx) => {
|
|
714
2932
|
const txStatusCondition = `AND (SELECT status FROM transactions WHERE outputs.transactionId = transactions.transactionId) in (${statusText})`;
|
|
715
2933
|
let outputId: number | undefined;
|
|
716
2934
|
const setOutputId = async (rawQuery: string): Promise<void> => {
|
|
@@ -791,7 +3009,7 @@ export class StorageKnex extends StorageProvider implements sdk.WalletStoragePro
|
|
|
791
3009
|
}
|
|
792
3010
|
```
|
|
793
3011
|
|
|
794
|
-
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)
|
|
3012
|
+
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)
|
|
795
3013
|
|
|
796
3014
|
###### Method allocateChangeInput
|
|
797
3015
|
|
|
@@ -800,8 +3018,9 @@ Finds closest matching available change output to use as input for new transacti
|
|
|
800
3018
|
Transactionally allocate the output such that
|
|
801
3019
|
|
|
802
3020
|
```ts
|
|
803
|
-
async allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<
|
|
3021
|
+
async allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<TableOutput | undefined>
|
|
804
3022
|
```
|
|
3023
|
+
See also: [TableOutput](./storage.md#interface-tableoutput)
|
|
805
3024
|
|
|
806
3025
|
###### Method countChangeInputs
|
|
807
3026
|
|
|
@@ -821,7 +3040,7 @@ or a Knex.Transaction as appropriate.
|
|
|
821
3040
|
```ts
|
|
822
3041
|
toDb(trx?: sdk.TrxToken)
|
|
823
3042
|
```
|
|
824
|
-
See also: [TrxToken](#interface-trxtoken)
|
|
3043
|
+
See also: [TrxToken](./client.md#interface-trxtoken)
|
|
825
3044
|
|
|
826
3045
|
###### Method validateEntities
|
|
827
3046
|
|
|
@@ -831,7 +3050,7 @@ Use to process all arrays of records with time stamps retreived from database.
|
|
|
831
3050
|
```ts
|
|
832
3051
|
validateEntities<T extends sdk.EntityTimeStamp>(entities: T[], dateFields?: string[], booleanFields?: string[]): T[]
|
|
833
3052
|
```
|
|
834
|
-
See also: [EntityTimeStamp](#interface-entitytimestamp)
|
|
3053
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
835
3054
|
|
|
836
3055
|
Returns
|
|
837
3056
|
|
|
@@ -845,7 +3064,7 @@ Use to process all individual records with time stamps retreived from database.
|
|
|
845
3064
|
```ts
|
|
846
3065
|
validateEntity<T extends sdk.EntityTimeStamp>(entity: T, dateFields?: string[], booleanFields?: string[]): T
|
|
847
3066
|
```
|
|
848
|
-
See also: [EntityTimeStamp](#interface-entitytimestamp)
|
|
3067
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
849
3068
|
|
|
850
3069
|
###### Method validateEntityForInsert
|
|
851
3070
|
|
|
@@ -855,7 +3074,7 @@ Use to process new entities being inserted into the database.
|
|
|
855
3074
|
```ts
|
|
856
3075
|
async validateEntityForInsert<T extends sdk.EntityTimeStamp>(entity: T, trx?: sdk.TrxToken, dateFields?: string[], booleanFields?: string[]): Promise<any>
|
|
857
3076
|
```
|
|
858
|
-
See also: [EntityTimeStamp](#interface-entitytimestamp), [TrxToken](#interface-trxtoken)
|
|
3077
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp), [TrxToken](./client.md#interface-trxtoken)
|
|
859
3078
|
|
|
860
3079
|
###### Method validatePartialForUpdate
|
|
861
3080
|
|
|
@@ -865,7 +3084,7 @@ Use to process the update template for entities being updated.
|
|
|
865
3084
|
```ts
|
|
866
3085
|
validatePartialForUpdate<T extends sdk.EntityTimeStamp>(update: Partial<T>, dateFields?: string[], booleanFields?: string[]): Partial<T>
|
|
867
3086
|
```
|
|
868
|
-
See also: [EntityTimeStamp](#interface-entitytimestamp)
|
|
3087
|
+
See also: [EntityTimeStamp](./client.md#interface-entitytimestamp)
|
|
869
3088
|
|
|
870
3089
|
###### Method verifyReadyForDatabaseAccess
|
|
871
3090
|
|
|
@@ -877,7 +3096,7 @@ Make sure database is ready for access:
|
|
|
877
3096
|
```ts
|
|
878
3097
|
async verifyReadyForDatabaseAccess(trx?: sdk.TrxToken): Promise<DBType>
|
|
879
3098
|
```
|
|
880
|
-
See also: [DBType](#type-dbtype), [TrxToken](#interface-trxtoken)
|
|
3099
|
+
See also: [DBType](./storage.md#type-dbtype), [TrxToken](./client.md#interface-trxtoken)
|
|
881
3100
|
|
|
882
3101
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
883
3102
|
|
|
@@ -902,49 +3121,49 @@ export abstract class StorageProvider extends StorageReaderWriter implements sdk
|
|
|
902
3121
|
log: string;
|
|
903
3122
|
}>;
|
|
904
3123
|
abstract purgeData(params: sdk.PurgeParams, trx?: sdk.TrxToken): Promise<sdk.PurgeResults>;
|
|
905
|
-
abstract allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<
|
|
3124
|
+
abstract allocateChangeInput(userId: number, basketId: number, targetSatoshis: number, exactSatoshis: number | undefined, excludeSending: boolean, transactionId: number): Promise<TableOutput | undefined>;
|
|
906
3125
|
abstract getProvenOrRawTx(txid: string, trx?: sdk.TrxToken): Promise<sdk.ProvenOrRawTx>;
|
|
907
3126
|
abstract getRawTxOfKnownValidTransaction(txid?: string, offset?: number, length?: number, trx?: sdk.TrxToken): Promise<number[] | undefined>;
|
|
908
|
-
abstract getLabelsForTransactionId(transactionId?: number, trx?: sdk.TrxToken): Promise<
|
|
909
|
-
abstract getTagsForOutputId(outputId: number, trx?: sdk.TrxToken): Promise<
|
|
3127
|
+
abstract getLabelsForTransactionId(transactionId?: number, trx?: sdk.TrxToken): Promise<TableTxLabel[]>;
|
|
3128
|
+
abstract getTagsForOutputId(outputId: number, trx?: sdk.TrxToken): Promise<TableOutputTag[]>;
|
|
910
3129
|
abstract listActions(auth: sdk.AuthId, args: sdk.ValidListActionsArgs): Promise<ListActionsResult>;
|
|
911
3130
|
abstract listOutputs(auth: sdk.AuthId, args: sdk.ValidListOutputsArgs): Promise<ListOutputsResult>;
|
|
912
3131
|
abstract countChangeInputs(userId: number, basketId: number, excludeSending: boolean): Promise<number>;
|
|
913
|
-
abstract findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<
|
|
914
|
-
abstract findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<
|
|
915
|
-
abstract findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<
|
|
916
|
-
abstract insertCertificateAuth(auth: sdk.AuthId, certificate:
|
|
3132
|
+
abstract findCertificatesAuth(auth: sdk.AuthId, args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>;
|
|
3133
|
+
abstract findOutputBasketsAuth(auth: sdk.AuthId, args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>;
|
|
3134
|
+
abstract findOutputsAuth(auth: sdk.AuthId, args: sdk.FindOutputsArgs): Promise<TableOutput[]>;
|
|
3135
|
+
abstract insertCertificateAuth(auth: sdk.AuthId, certificate: TableCertificateX): Promise<number>;
|
|
917
3136
|
override isStorageProvider(): boolean
|
|
918
3137
|
setServices(v: sdk.WalletServices)
|
|
919
3138
|
getServices(): sdk.WalletServices
|
|
920
|
-
async abortAction(auth: sdk.AuthId, args: Partial<
|
|
3139
|
+
async abortAction(auth: sdk.AuthId, args: Partial<TableTransaction>): Promise<AbortActionResult>
|
|
921
3140
|
async internalizeAction(auth: sdk.AuthId, args: InternalizeActionArgs): Promise<InternalizeActionResult>
|
|
922
3141
|
async getReqsAndBeefToShareWithWorld(txids: string[], knownTxids: string[], trx?: sdk.TrxToken): Promise<GetReqsAndBeefResult>
|
|
923
|
-
async mergeReqToBeefToShareExternally(req:
|
|
924
|
-
async getProvenOrReq(txid: string, newReq?:
|
|
3142
|
+
async mergeReqToBeefToShareExternally(req: TableProvenTxReq, mergeToBeef: Beef, knownTxids: string[], trx?: sdk.TrxToken): Promise<void>
|
|
3143
|
+
async getProvenOrReq(txid: string, newReq?: TableProvenTxReq, trx?: sdk.TrxToken): Promise<sdk.StorageProvenOrReq>
|
|
925
3144
|
async updateTransactionsStatus(transactionIds: number[], status: sdk.TransactionStatus): Promise<void>
|
|
926
3145
|
async updateTransactionStatus(status: sdk.TransactionStatus, transactionId?: number, userId?: number, reference?: string, trx?: sdk.TrxToken): Promise<void>
|
|
927
3146
|
async createAction(auth: sdk.AuthId, args: sdk.ValidCreateActionArgs): Promise<sdk.StorageCreateActionResult>
|
|
928
3147
|
async processAction(auth: sdk.AuthId, args: sdk.StorageProcessActionArgs): Promise<sdk.StorageProcessActionResults>
|
|
929
|
-
async attemptToPostReqsToNetwork(reqs:
|
|
3148
|
+
async attemptToPostReqsToNetwork(reqs: EntityProvenTxReq[], trx?: sdk.TrxToken): Promise<PostReqsToNetworkResult>
|
|
930
3149
|
async listCertificates(auth: sdk.AuthId, args: sdk.ValidListCertificatesArgs): Promise<ListCertificatesResult>
|
|
931
3150
|
async verifyKnownValidTransaction(txid: string, trx?: sdk.TrxToken): Promise<boolean>
|
|
932
3151
|
async getValidBeefForKnownTxid(txid: string, mergeToBeef?: Beef, trustSelf?: TrustSelf, knownTxids?: string[], trx?: sdk.TrxToken): Promise<Beef>
|
|
933
3152
|
async getValidBeefForTxid(txid: string, mergeToBeef?: Beef, trustSelf?: TrustSelf, knownTxids?: string[], trx?: sdk.TrxToken): Promise<Beef | undefined>
|
|
934
3153
|
async getBeefForTransaction(txid: string, options: sdk.StorageGetBeefOptions): Promise<Beef>
|
|
935
|
-
async findMonitorEventById(id: number, trx?: sdk.TrxToken): Promise<
|
|
3154
|
+
async findMonitorEventById(id: number, trx?: sdk.TrxToken): Promise<TableMonitorEvent | undefined>
|
|
936
3155
|
async relinquishCertificate(auth: sdk.AuthId, args: RelinquishCertificateArgs): Promise<number>
|
|
937
3156
|
async relinquishOutput(auth: sdk.AuthId, args: RelinquishOutputArgs): Promise<number>
|
|
938
3157
|
async processSyncChunk(args: sdk.RequestSyncChunkArgs, chunk: sdk.SyncChunk): Promise<sdk.ProcessSyncChunkResult>
|
|
939
3158
|
async updateProvenTxReqWithNewProvenTx(args: sdk.UpdateProvenTxReqWithNewProvenTxArgs): Promise<sdk.UpdateProvenTxReqWithNewProvenTxResult>
|
|
940
3159
|
async confirmSpendableOutputs(): Promise<{
|
|
941
|
-
invalidSpendableOutputs:
|
|
3160
|
+
invalidSpendableOutputs: TableOutput[];
|
|
942
3161
|
}>
|
|
943
|
-
async updateProvenTxReqDynamics(id: number, update: Partial<
|
|
3162
|
+
async updateProvenTxReqDynamics(id: number, update: Partial<TableProvenTxReqDynamics>, trx?: sdk.TrxToken): Promise<number>
|
|
944
3163
|
}
|
|
945
3164
|
```
|
|
946
3165
|
|
|
947
|
-
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)
|
|
3166
|
+
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), [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)
|
|
948
3167
|
|
|
949
3168
|
###### Method confirmSpendableOutputs
|
|
950
3169
|
|
|
@@ -954,9 +3173,10 @@ still in the mempool of at least one service provider.
|
|
|
954
3173
|
|
|
955
3174
|
```ts
|
|
956
3175
|
async confirmSpendableOutputs(): Promise<{
|
|
957
|
-
invalidSpendableOutputs:
|
|
3176
|
+
invalidSpendableOutputs: TableOutput[];
|
|
958
3177
|
}>
|
|
959
3178
|
```
|
|
3179
|
+
See also: [TableOutput](./storage.md#interface-tableoutput)
|
|
960
3180
|
|
|
961
3181
|
Returns
|
|
962
3182
|
|
|
@@ -973,9 +3193,9 @@ This is safe "findOrInsert" operation using retry if unique index constraint
|
|
|
973
3193
|
is violated by a race condition insert.
|
|
974
3194
|
|
|
975
3195
|
```ts
|
|
976
|
-
async getProvenOrReq(txid: string, newReq?:
|
|
3196
|
+
async getProvenOrReq(txid: string, newReq?: TableProvenTxReq, trx?: sdk.TrxToken): Promise<sdk.StorageProvenOrReq>
|
|
977
3197
|
```
|
|
978
|
-
See also: [StorageProvenOrReq](#interface-storageprovenorreq), [TrxToken](#interface-trxtoken)
|
|
3198
|
+
See also: [StorageProvenOrReq](./client.md#interface-storageprovenorreq), [TableProvenTxReq](./storage.md#interface-tableproventxreq), [TrxToken](./client.md#interface-trxtoken)
|
|
979
3199
|
|
|
980
3200
|
###### Method getReqsAndBeefToShareWithWorld
|
|
981
3201
|
|
|
@@ -986,7 +3206,7 @@ For the txids with reqs and status still ready to send construct a single merged
|
|
|
986
3206
|
```ts
|
|
987
3207
|
async getReqsAndBeefToShareWithWorld(txids: string[], knownTxids: string[], trx?: sdk.TrxToken): Promise<GetReqsAndBeefResult>
|
|
988
3208
|
```
|
|
989
|
-
See also: [GetReqsAndBeefResult](#interface-getreqsandbeefresult), [TrxToken](#interface-trxtoken)
|
|
3209
|
+
See also: [GetReqsAndBeefResult](./storage.md#interface-getreqsandbeefresult), [TrxToken](./client.md#interface-trxtoken)
|
|
990
3210
|
|
|
991
3211
|
###### Method updateProvenTxReqWithNewProvenTx
|
|
992
3212
|
|
|
@@ -1005,7 +3225,7 @@ Alterations of "typically" to handle:
|
|
|
1005
3225
|
```ts
|
|
1006
3226
|
async updateProvenTxReqWithNewProvenTx(args: sdk.UpdateProvenTxReqWithNewProvenTxArgs): Promise<sdk.UpdateProvenTxReqWithNewProvenTxResult>
|
|
1007
3227
|
```
|
|
1008
|
-
See also: [UpdateProvenTxReqWithNewProvenTxArgs](#interface-updateproventxreqwithnewproventxargs), [UpdateProvenTxReqWithNewProvenTxResult](#interface-updateproventxreqwithnewproventxresult)
|
|
3228
|
+
See also: [UpdateProvenTxReqWithNewProvenTxArgs](./client.md#interface-updateproventxreqwithnewproventxargs), [UpdateProvenTxReqWithNewProvenTxResult](./client.md#interface-updateproventxreqwithnewproventxresult)
|
|
1009
3229
|
|
|
1010
3230
|
###### Method updateTransactionStatus
|
|
1011
3231
|
|
|
@@ -1016,7 +3236,7 @@ For 'status' of 'failed', attempts to make outputs previously allocated as input
|
|
|
1016
3236
|
```ts
|
|
1017
3237
|
async updateTransactionStatus(status: sdk.TransactionStatus, transactionId?: number, userId?: number, reference?: string, trx?: sdk.TrxToken): Promise<void>
|
|
1018
3238
|
```
|
|
1019
|
-
See also: [TransactionStatus](#type-transactionstatus), [TrxToken](#interface-trxtoken)
|
|
3239
|
+
See also: [TransactionStatus](./client.md#type-transactionstatus), [TrxToken](./client.md#interface-trxtoken)
|
|
1020
3240
|
|
|
1021
3241
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1022
3242
|
|
|
@@ -1037,28 +3257,28 @@ As such there are no user specific authenticated access checks implied in the im
|
|
|
1037
3257
|
```ts
|
|
1038
3258
|
export abstract class StorageReader implements sdk.StorageSyncReader {
|
|
1039
3259
|
chain: sdk.Chain;
|
|
1040
|
-
_settings?:
|
|
3260
|
+
_settings?: TableSettings;
|
|
1041
3261
|
whenLastAccess?: Date;
|
|
1042
3262
|
get dbtype(): DBType | undefined
|
|
1043
3263
|
constructor(options: StorageReaderOptions)
|
|
1044
3264
|
isAvailable(): boolean
|
|
1045
|
-
async makeAvailable(): Promise<
|
|
1046
|
-
getSettings():
|
|
3265
|
+
async makeAvailable(): Promise<TableSettings>
|
|
3266
|
+
getSettings(): TableSettings
|
|
1047
3267
|
isStorageProvider(): boolean
|
|
1048
3268
|
abstract destroy(): Promise<void>;
|
|
1049
3269
|
abstract transaction<T>(scope: (trx: sdk.TrxToken) => Promise<T>, trx?: sdk.TrxToken): Promise<T>;
|
|
1050
|
-
abstract readSettings(trx?: sdk.TrxToken): Promise<
|
|
1051
|
-
abstract findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<
|
|
1052
|
-
abstract findCertificates(args: sdk.FindCertificatesArgs): Promise<
|
|
1053
|
-
abstract findCommissions(args: sdk.FindCommissionsArgs): Promise<
|
|
1054
|
-
abstract findMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<
|
|
1055
|
-
abstract findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<
|
|
1056
|
-
abstract findOutputs(args: sdk.FindOutputsArgs): Promise<
|
|
1057
|
-
abstract findOutputTags(args: sdk.FindOutputTagsArgs): Promise<
|
|
1058
|
-
abstract findSyncStates(args: sdk.FindSyncStatesArgs): Promise<
|
|
1059
|
-
abstract findTransactions(args: sdk.FindTransactionsArgs): Promise<
|
|
1060
|
-
abstract findTxLabels(args: sdk.FindTxLabelsArgs): Promise<
|
|
1061
|
-
abstract findUsers(args: sdk.FindUsersArgs): Promise<
|
|
3270
|
+
abstract readSettings(trx?: sdk.TrxToken): Promise<TableSettings>;
|
|
3271
|
+
abstract findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<TableCertificateField[]>;
|
|
3272
|
+
abstract findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>;
|
|
3273
|
+
abstract findCommissions(args: sdk.FindCommissionsArgs): Promise<TableCommission[]>;
|
|
3274
|
+
abstract findMonitorEvents(args: sdk.FindMonitorEventsArgs): Promise<TableMonitorEvent[]>;
|
|
3275
|
+
abstract findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>;
|
|
3276
|
+
abstract findOutputs(args: sdk.FindOutputsArgs): Promise<TableOutput[]>;
|
|
3277
|
+
abstract findOutputTags(args: sdk.FindOutputTagsArgs): Promise<TableOutputTag[]>;
|
|
3278
|
+
abstract findSyncStates(args: sdk.FindSyncStatesArgs): Promise<TableSyncState[]>;
|
|
3279
|
+
abstract findTransactions(args: sdk.FindTransactionsArgs): Promise<TableTransaction[]>;
|
|
3280
|
+
abstract findTxLabels(args: sdk.FindTxLabelsArgs): Promise<TableTxLabel[]>;
|
|
3281
|
+
abstract findUsers(args: sdk.FindUsersArgs): Promise<TableUser[]>;
|
|
1062
3282
|
abstract countCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<number>;
|
|
1063
3283
|
abstract countCertificates(args: sdk.FindCertificatesArgs): Promise<number>;
|
|
1064
3284
|
abstract countCommissions(args: sdk.FindCommissionsArgs): Promise<number>;
|
|
@@ -1070,11 +3290,11 @@ export abstract class StorageReader implements sdk.StorageSyncReader {
|
|
|
1070
3290
|
abstract countTransactions(args: sdk.FindTransactionsArgs): Promise<number>;
|
|
1071
3291
|
abstract countTxLabels(args: sdk.FindTxLabelsArgs): Promise<number>;
|
|
1072
3292
|
abstract countUsers(args: sdk.FindUsersArgs): Promise<number>;
|
|
1073
|
-
abstract getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1074
|
-
abstract getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1075
|
-
abstract getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1076
|
-
abstract getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1077
|
-
async findUserByIdentityKey(key: string): Promise<
|
|
3293
|
+
abstract getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTx[]>;
|
|
3294
|
+
abstract getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTxReq[]>;
|
|
3295
|
+
abstract getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableTxLabelMap[]>;
|
|
3296
|
+
abstract getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableOutputTagMap[]>;
|
|
3297
|
+
async findUserByIdentityKey(key: string): Promise<TableUser | undefined>
|
|
1078
3298
|
async getSyncChunk(args: sdk.RequestSyncChunkArgs): Promise<sdk.SyncChunk>
|
|
1079
3299
|
validateEntityDate(date: Date | string | number): Date | string
|
|
1080
3300
|
validateOptionalEntityDate(date: Date | string | number | null | undefined, useNowAsDefault?: boolean): Date | string | undefined
|
|
@@ -1084,7 +3304,7 @@ export abstract class StorageReader implements sdk.StorageSyncReader {
|
|
|
1084
3304
|
}
|
|
1085
3305
|
```
|
|
1086
3306
|
|
|
1087
|
-
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)
|
|
3307
|
+
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), [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), [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)
|
|
1088
3308
|
|
|
1089
3309
|
###### Method validateEntityDate
|
|
1090
3310
|
|
|
@@ -1115,87 +3335,87 @@ export abstract class StorageReaderWriter extends StorageReader {
|
|
|
1115
3335
|
constructor(options: StorageReaderWriterOptions)
|
|
1116
3336
|
abstract dropAllData(): Promise<void>;
|
|
1117
3337
|
abstract migrate(storageName: string, storageIdentityKey: string): Promise<string>;
|
|
1118
|
-
abstract findOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<
|
|
1119
|
-
abstract findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<
|
|
1120
|
-
abstract findProvenTxs(args: sdk.FindProvenTxsArgs): Promise<
|
|
1121
|
-
abstract findTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<
|
|
3338
|
+
abstract findOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<TableOutputTagMap[]>;
|
|
3339
|
+
abstract findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>;
|
|
3340
|
+
abstract findProvenTxs(args: sdk.FindProvenTxsArgs): Promise<TableProvenTx[]>;
|
|
3341
|
+
abstract findTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<TableTxLabelMap[]>;
|
|
1122
3342
|
abstract countOutputTagMaps(args: sdk.FindOutputTagMapsArgs): Promise<number>;
|
|
1123
3343
|
abstract countProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<number>;
|
|
1124
3344
|
abstract countProvenTxs(args: sdk.FindProvenTxsArgs): Promise<number>;
|
|
1125
3345
|
abstract countTxLabelMaps(args: sdk.FindTxLabelMapsArgs): Promise<number>;
|
|
1126
|
-
abstract insertCertificate(certificate:
|
|
1127
|
-
abstract insertCertificateField(certificateField:
|
|
1128
|
-
abstract insertCommission(commission:
|
|
1129
|
-
abstract insertMonitorEvent(event:
|
|
1130
|
-
abstract insertOutput(output:
|
|
1131
|
-
abstract insertOutputBasket(basket:
|
|
1132
|
-
abstract insertOutputTag(tag:
|
|
1133
|
-
abstract insertOutputTagMap(tagMap:
|
|
1134
|
-
abstract insertProvenTx(tx:
|
|
1135
|
-
abstract insertProvenTxReq(tx:
|
|
1136
|
-
abstract insertSyncState(syncState:
|
|
1137
|
-
abstract insertTransaction(tx:
|
|
1138
|
-
abstract insertTxLabel(label:
|
|
1139
|
-
abstract insertTxLabelMap(labelMap:
|
|
1140
|
-
abstract insertUser(user:
|
|
1141
|
-
abstract updateCertificate(id: number, update: Partial<
|
|
1142
|
-
abstract updateCertificateField(certificateId: number, fieldName: string, update: Partial<
|
|
1143
|
-
abstract updateCommission(id: number, update: Partial<
|
|
1144
|
-
abstract updateMonitorEvent(id: number, update: Partial<
|
|
1145
|
-
abstract updateOutput(id: number, update: Partial<
|
|
1146
|
-
abstract updateOutputBasket(id: number, update: Partial<
|
|
1147
|
-
abstract updateOutputTag(id: number, update: Partial<
|
|
1148
|
-
abstract updateOutputTagMap(outputId: number, tagId: number, update: Partial<
|
|
1149
|
-
abstract updateProvenTx(id: number, update: Partial<
|
|
1150
|
-
abstract updateProvenTxReq(id: number | number[], update: Partial<
|
|
1151
|
-
abstract updateSyncState(id: number, update: Partial<
|
|
1152
|
-
abstract updateTransaction(id: number | number[], update: Partial<
|
|
1153
|
-
abstract updateTxLabel(id: number, update: Partial<
|
|
1154
|
-
abstract updateTxLabelMap(transactionId: number, txLabelId: number, update: Partial<
|
|
1155
|
-
abstract updateUser(id: number, update: Partial<
|
|
3346
|
+
abstract insertCertificate(certificate: TableCertificate, trx?: sdk.TrxToken): Promise<number>;
|
|
3347
|
+
abstract insertCertificateField(certificateField: TableCertificateField, trx?: sdk.TrxToken): Promise<void>;
|
|
3348
|
+
abstract insertCommission(commission: TableCommission, trx?: sdk.TrxToken): Promise<number>;
|
|
3349
|
+
abstract insertMonitorEvent(event: TableMonitorEvent, trx?: sdk.TrxToken): Promise<number>;
|
|
3350
|
+
abstract insertOutput(output: TableOutput, trx?: sdk.TrxToken): Promise<number>;
|
|
3351
|
+
abstract insertOutputBasket(basket: TableOutputBasket, trx?: sdk.TrxToken): Promise<number>;
|
|
3352
|
+
abstract insertOutputTag(tag: TableOutputTag, trx?: sdk.TrxToken): Promise<number>;
|
|
3353
|
+
abstract insertOutputTagMap(tagMap: TableOutputTagMap, trx?: sdk.TrxToken): Promise<void>;
|
|
3354
|
+
abstract insertProvenTx(tx: TableProvenTx, trx?: sdk.TrxToken): Promise<number>;
|
|
3355
|
+
abstract insertProvenTxReq(tx: TableProvenTxReq, trx?: sdk.TrxToken): Promise<number>;
|
|
3356
|
+
abstract insertSyncState(syncState: TableSyncState, trx?: sdk.TrxToken): Promise<number>;
|
|
3357
|
+
abstract insertTransaction(tx: TableTransaction, trx?: sdk.TrxToken): Promise<number>;
|
|
3358
|
+
abstract insertTxLabel(label: TableTxLabel, trx?: sdk.TrxToken): Promise<number>;
|
|
3359
|
+
abstract insertTxLabelMap(labelMap: TableTxLabelMap, trx?: sdk.TrxToken): Promise<void>;
|
|
3360
|
+
abstract insertUser(user: TableUser, trx?: sdk.TrxToken): Promise<number>;
|
|
3361
|
+
abstract updateCertificate(id: number, update: Partial<TableCertificate>, trx?: sdk.TrxToken): Promise<number>;
|
|
3362
|
+
abstract updateCertificateField(certificateId: number, fieldName: string, update: Partial<TableCertificateField>, trx?: sdk.TrxToken): Promise<number>;
|
|
3363
|
+
abstract updateCommission(id: number, update: Partial<TableCommission>, trx?: sdk.TrxToken): Promise<number>;
|
|
3364
|
+
abstract updateMonitorEvent(id: number, update: Partial<TableMonitorEvent>, trx?: sdk.TrxToken): Promise<number>;
|
|
3365
|
+
abstract updateOutput(id: number, update: Partial<TableOutput>, trx?: sdk.TrxToken): Promise<number>;
|
|
3366
|
+
abstract updateOutputBasket(id: number, update: Partial<TableOutputBasket>, trx?: sdk.TrxToken): Promise<number>;
|
|
3367
|
+
abstract updateOutputTag(id: number, update: Partial<TableOutputTag>, trx?: sdk.TrxToken): Promise<number>;
|
|
3368
|
+
abstract updateOutputTagMap(outputId: number, tagId: number, update: Partial<TableOutputTagMap>, trx?: sdk.TrxToken): Promise<number>;
|
|
3369
|
+
abstract updateProvenTx(id: number, update: Partial<TableProvenTx>, trx?: sdk.TrxToken): Promise<number>;
|
|
3370
|
+
abstract updateProvenTxReq(id: number | number[], update: Partial<TableProvenTxReq>, trx?: sdk.TrxToken): Promise<number>;
|
|
3371
|
+
abstract updateSyncState(id: number, update: Partial<TableSyncState>, trx?: sdk.TrxToken): Promise<number>;
|
|
3372
|
+
abstract updateTransaction(id: number | number[], update: Partial<TableTransaction>, trx?: sdk.TrxToken): Promise<number>;
|
|
3373
|
+
abstract updateTxLabel(id: number, update: Partial<TableTxLabel>, trx?: sdk.TrxToken): Promise<number>;
|
|
3374
|
+
abstract updateTxLabelMap(transactionId: number, txLabelId: number, update: Partial<TableTxLabelMap>, trx?: sdk.TrxToken): Promise<number>;
|
|
3375
|
+
abstract updateUser(id: number, update: Partial<TableUser>, trx?: sdk.TrxToken): Promise<number>;
|
|
1156
3376
|
async setActive(auth: sdk.AuthId, newActiveStorageIdentityKey: string): Promise<number>
|
|
1157
|
-
async findCertificateById(id: number, trx?: sdk.TrxToken): Promise<
|
|
1158
|
-
async findCommissionById(id: number, trx?: sdk.TrxToken): Promise<
|
|
1159
|
-
async findOutputById(id: number, trx?: sdk.TrxToken, noScript?: boolean): Promise<
|
|
1160
|
-
async findOutputBasketById(id: number, trx?: sdk.TrxToken): Promise<
|
|
1161
|
-
async findProvenTxById(id: number, trx?: sdk.TrxToken | undefined): Promise<
|
|
1162
|
-
async findProvenTxReqById(id: number, trx?: sdk.TrxToken | undefined): Promise<
|
|
1163
|
-
async findSyncStateById(id: number, trx?: sdk.TrxToken): Promise<
|
|
1164
|
-
async findTransactionById(id: number, trx?: sdk.TrxToken, noRawTx?: boolean): Promise<
|
|
1165
|
-
async findTxLabelById(id: number, trx?: sdk.TrxToken): Promise<
|
|
1166
|
-
async findOutputTagById(id: number, trx?: sdk.TrxToken): Promise<
|
|
1167
|
-
async findUserById(id: number, trx?: sdk.TrxToken): Promise<
|
|
3377
|
+
async findCertificateById(id: number, trx?: sdk.TrxToken): Promise<TableCertificate | undefined>
|
|
3378
|
+
async findCommissionById(id: number, trx?: sdk.TrxToken): Promise<TableCommission | undefined>
|
|
3379
|
+
async findOutputById(id: number, trx?: sdk.TrxToken, noScript?: boolean): Promise<TableOutput | undefined>
|
|
3380
|
+
async findOutputBasketById(id: number, trx?: sdk.TrxToken): Promise<TableOutputBasket | undefined>
|
|
3381
|
+
async findProvenTxById(id: number, trx?: sdk.TrxToken | undefined): Promise<TableProvenTx | undefined>
|
|
3382
|
+
async findProvenTxReqById(id: number, trx?: sdk.TrxToken | undefined): Promise<TableProvenTxReq | undefined>
|
|
3383
|
+
async findSyncStateById(id: number, trx?: sdk.TrxToken): Promise<TableSyncState | undefined>
|
|
3384
|
+
async findTransactionById(id: number, trx?: sdk.TrxToken, noRawTx?: boolean): Promise<TableTransaction | undefined>
|
|
3385
|
+
async findTxLabelById(id: number, trx?: sdk.TrxToken): Promise<TableTxLabel | undefined>
|
|
3386
|
+
async findOutputTagById(id: number, trx?: sdk.TrxToken): Promise<TableOutputTag | undefined>
|
|
3387
|
+
async findUserById(id: number, trx?: sdk.TrxToken): Promise<TableUser | undefined>
|
|
1168
3388
|
async findOrInsertUser(identityKey: string, trx?: sdk.TrxToken): Promise<{
|
|
1169
|
-
user:
|
|
3389
|
+
user: TableUser;
|
|
1170
3390
|
isNew: boolean;
|
|
1171
3391
|
}>
|
|
1172
|
-
async findOrInsertTransaction(newTx:
|
|
1173
|
-
tx:
|
|
3392
|
+
async findOrInsertTransaction(newTx: TableTransaction, trx?: sdk.TrxToken): Promise<{
|
|
3393
|
+
tx: TableTransaction;
|
|
1174
3394
|
isNew: boolean;
|
|
1175
3395
|
}>
|
|
1176
|
-
async findOrInsertOutputBasket(userId: number, name: string, trx?: sdk.TrxToken): Promise<
|
|
1177
|
-
async findOrInsertTxLabel(userId: number, label: string, trx?: sdk.TrxToken): Promise<
|
|
1178
|
-
async findOrInsertTxLabelMap(transactionId: number, txLabelId: number, trx?: sdk.TrxToken): Promise<
|
|
1179
|
-
async findOrInsertOutputTag(userId: number, tag: string, trx?: sdk.TrxToken): Promise<
|
|
1180
|
-
async findOrInsertOutputTagMap(outputId: number, outputTagId: number, trx?: sdk.TrxToken): Promise<
|
|
3396
|
+
async findOrInsertOutputBasket(userId: number, name: string, trx?: sdk.TrxToken): Promise<TableOutputBasket>
|
|
3397
|
+
async findOrInsertTxLabel(userId: number, label: string, trx?: sdk.TrxToken): Promise<TableTxLabel>
|
|
3398
|
+
async findOrInsertTxLabelMap(transactionId: number, txLabelId: number, trx?: sdk.TrxToken): Promise<TableTxLabelMap>
|
|
3399
|
+
async findOrInsertOutputTag(userId: number, tag: string, trx?: sdk.TrxToken): Promise<TableOutputTag>
|
|
3400
|
+
async findOrInsertOutputTagMap(outputId: number, outputTagId: number, trx?: sdk.TrxToken): Promise<TableOutputTagMap>
|
|
1181
3401
|
async findOrInsertSyncStateAuth(auth: sdk.AuthId, storageIdentityKey: string, storageName: string): Promise<{
|
|
1182
|
-
syncState:
|
|
3402
|
+
syncState: TableSyncState;
|
|
1183
3403
|
isNew: boolean;
|
|
1184
3404
|
}>
|
|
1185
|
-
async findOrInsertProvenTxReq(newReq:
|
|
1186
|
-
req:
|
|
3405
|
+
async findOrInsertProvenTxReq(newReq: TableProvenTxReq, trx?: sdk.TrxToken): Promise<{
|
|
3406
|
+
req: TableProvenTxReq;
|
|
1187
3407
|
isNew: boolean;
|
|
1188
3408
|
}>
|
|
1189
|
-
async findOrInsertProvenTx(newProven:
|
|
1190
|
-
proven:
|
|
3409
|
+
async findOrInsertProvenTx(newProven: TableProvenTx, trx?: sdk.TrxToken): Promise<{
|
|
3410
|
+
proven: TableProvenTx;
|
|
1191
3411
|
isNew: boolean;
|
|
1192
3412
|
}>
|
|
1193
3413
|
abstract processSyncChunk(args: sdk.RequestSyncChunkArgs, chunk: sdk.SyncChunk): Promise<sdk.ProcessSyncChunkResult>;
|
|
1194
|
-
async tagOutput(partial: Partial<
|
|
3414
|
+
async tagOutput(partial: Partial<TableOutput>, tag: string, trx?: sdk.TrxToken): Promise<void>
|
|
1195
3415
|
}
|
|
1196
3416
|
```
|
|
1197
3417
|
|
|
1198
|
-
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)
|
|
3418
|
+
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)
|
|
1199
3419
|
|
|
1200
3420
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1201
3421
|
|
|
@@ -1209,7 +3429,7 @@ export class StorageServer {
|
|
|
1209
3429
|
}
|
|
1210
3430
|
```
|
|
1211
3431
|
|
|
1212
|
-
See also: [StorageProvider](#class-storageprovider), [WalletStorageServerOptions](#interface-walletstorageserveroptions)
|
|
3432
|
+
See also: [StorageProvider](./storage.md#class-storageprovider), [WalletStorageServerOptions](./storage.md#interface-walletstorageserveroptions)
|
|
1213
3433
|
|
|
1214
3434
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1215
3435
|
|
|
@@ -1225,28 +3445,28 @@ and the `StorageBaseReader` to be protected.
|
|
|
1225
3445
|
export class StorageSyncReader implements sdk.StorageSyncReader {
|
|
1226
3446
|
constructor(public auth: sdk.AuthId, public storage: StorageReader)
|
|
1227
3447
|
isAvailable(): boolean
|
|
1228
|
-
async makeAvailable(): Promise<
|
|
3448
|
+
async makeAvailable(): Promise<TableSettings>
|
|
1229
3449
|
destroy(): Promise<void>
|
|
1230
|
-
getSettings():
|
|
3450
|
+
getSettings(): TableSettings
|
|
1231
3451
|
async getSyncChunk(args: sdk.RequestSyncChunkArgs): Promise<sdk.SyncChunk>
|
|
1232
|
-
async findUserByIdentityKey(key: string): Promise<
|
|
1233
|
-
async findSyncStates(args: sdk.FindSyncStatesArgs): Promise<
|
|
1234
|
-
async findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<
|
|
1235
|
-
async findCertificates(args: sdk.FindCertificatesArgs): Promise<
|
|
1236
|
-
async findCommissions(args: sdk.FindCommissionsArgs): Promise<
|
|
1237
|
-
async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<
|
|
1238
|
-
async findOutputs(args: sdk.FindOutputsArgs): Promise<
|
|
1239
|
-
async findOutputTags(args: sdk.FindOutputTagsArgs): Promise<
|
|
1240
|
-
async findTransactions(args: sdk.FindTransactionsArgs): Promise<
|
|
1241
|
-
async findTxLabels(args: sdk.FindTxLabelsArgs): Promise<
|
|
1242
|
-
async getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1243
|
-
async getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1244
|
-
async getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
1245
|
-
async getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<
|
|
3452
|
+
async findUserByIdentityKey(key: string): Promise<TableUser | undefined>
|
|
3453
|
+
async findSyncStates(args: sdk.FindSyncStatesArgs): Promise<TableSyncState[]>
|
|
3454
|
+
async findCertificateFields(args: sdk.FindCertificateFieldsArgs): Promise<TableCertificateField[]>
|
|
3455
|
+
async findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>
|
|
3456
|
+
async findCommissions(args: sdk.FindCommissionsArgs): Promise<TableCommission[]>
|
|
3457
|
+
async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
|
|
3458
|
+
async findOutputs(args: sdk.FindOutputsArgs): Promise<TableOutput[]>
|
|
3459
|
+
async findOutputTags(args: sdk.FindOutputTagsArgs): Promise<TableOutputTag[]>
|
|
3460
|
+
async findTransactions(args: sdk.FindTransactionsArgs): Promise<TableTransaction[]>
|
|
3461
|
+
async findTxLabels(args: sdk.FindTxLabelsArgs): Promise<TableTxLabel[]>
|
|
3462
|
+
async getProvenTxsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTx[]>
|
|
3463
|
+
async getProvenTxReqsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableProvenTxReq[]>
|
|
3464
|
+
async getTxLabelMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableTxLabelMap[]>
|
|
3465
|
+
async getOutputTagMapsForUser(args: sdk.FindForUserSincePagedArgs): Promise<TableOutputTagMap[]>
|
|
1246
3466
|
}
|
|
1247
3467
|
```
|
|
1248
3468
|
|
|
1249
|
-
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)
|
|
3469
|
+
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), [TableCertificateField](./storage.md#interface-tablecertificatefield), [TableCertificateX](./storage.md#interface-tablecertificatex), [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)
|
|
1250
3470
|
|
|
1251
3471
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1252
3472
|
|
|
@@ -1296,12 +3516,12 @@ export class WalletStorageManager implements sdk.WalletStorage {
|
|
|
1296
3516
|
async addWalletStorageProvider(provider: sdk.WalletStorageProvider): Promise<void>
|
|
1297
3517
|
setServices(v: sdk.WalletServices)
|
|
1298
3518
|
getServices(): sdk.WalletServices
|
|
1299
|
-
getSettings():
|
|
1300
|
-
async makeAvailable(): Promise<
|
|
3519
|
+
getSettings(): TableSettings
|
|
3520
|
+
async makeAvailable(): Promise<TableSettings>
|
|
1301
3521
|
async migrate(storageName: string, storageIdentityKey: string): Promise<string>
|
|
1302
3522
|
async destroy(): Promise<void>
|
|
1303
3523
|
async findOrInsertUser(identityKey: string): Promise<{
|
|
1304
|
-
user:
|
|
3524
|
+
user: TableUser;
|
|
1305
3525
|
isNew: boolean;
|
|
1306
3526
|
}>
|
|
1307
3527
|
async abortAction(args: AbortActionArgs): Promise<AbortActionResult>
|
|
@@ -1310,14 +3530,14 @@ export class WalletStorageManager implements sdk.WalletStorage {
|
|
|
1310
3530
|
async relinquishCertificate(args: RelinquishCertificateArgs): Promise<number>
|
|
1311
3531
|
async relinquishOutput(args: RelinquishOutputArgs): Promise<number>
|
|
1312
3532
|
async processAction(args: sdk.StorageProcessActionArgs): Promise<sdk.StorageProcessActionResults>
|
|
1313
|
-
async insertCertificate(certificate:
|
|
3533
|
+
async insertCertificate(certificate: TableCertificate): Promise<number>
|
|
1314
3534
|
async listActions(vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
|
|
1315
3535
|
async listCertificates(args: sdk.ValidListCertificatesArgs): Promise<ListCertificatesResult>
|
|
1316
3536
|
async listOutputs(vargs: sdk.ValidListOutputsArgs): Promise<ListOutputsResult>
|
|
1317
|
-
async findCertificates(args: sdk.FindCertificatesArgs): Promise<
|
|
1318
|
-
async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<
|
|
1319
|
-
async findOutputs(args: sdk.FindOutputsArgs): Promise<
|
|
1320
|
-
async findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<
|
|
3537
|
+
async findCertificates(args: sdk.FindCertificatesArgs): Promise<TableCertificateX[]>
|
|
3538
|
+
async findOutputBaskets(args: sdk.FindOutputBasketsArgs): Promise<TableOutputBasket[]>
|
|
3539
|
+
async findOutputs(args: sdk.FindOutputsArgs): Promise<TableOutput[]>
|
|
3540
|
+
async findProvenTxReqs(args: sdk.FindProvenTxReqsArgs): Promise<TableProvenTxReq[]>
|
|
1321
3541
|
async syncFromReader(identityKey: string, reader: StorageSyncReader): Promise<void>
|
|
1322
3542
|
async updateBackups(activeSync?: sdk.WalletStorageSync)
|
|
1323
3543
|
async syncToWriter(auth: sdk.AuthId, writer: sdk.WalletStorageProvider, activeSync?: sdk.WalletStorageSync): Promise<{
|
|
@@ -1328,7 +3548,7 @@ export class WalletStorageManager implements sdk.WalletStorage {
|
|
|
1328
3548
|
}
|
|
1329
3549
|
```
|
|
1330
3550
|
|
|
1331
|
-
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)
|
|
3551
|
+
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), [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), [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)
|
|
1332
3552
|
|
|
1333
3553
|
###### Property _isSingleWriter
|
|
1334
3554
|
|
|
@@ -1372,7 +3592,7 @@ true if the active `WalletStorageProvider` also implements `StorageProvider`
|
|
|
1372
3592
|
```ts
|
|
1373
3593
|
async runAsSync<R>(sync: (active: sdk.WalletStorageSync) => Promise<R>, activeSync?: sdk.WalletStorageSync): Promise<R>
|
|
1374
3594
|
```
|
|
1375
|
-
See also: [WalletStorageSync](#interface-walletstoragesync)
|
|
3595
|
+
See also: [WalletStorageSync](./client.md#interface-walletstoragesync)
|
|
1376
3596
|
|
|
1377
3597
|
Argument Details
|
|
1378
3598
|
|
|
@@ -1401,9 +3621,10 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1401
3621
|
|
|
1402
3622
|
| | |
|
|
1403
3623
|
| --- | --- |
|
|
1404
|
-
| [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [
|
|
1405
|
-
| [createAction](#function-createaction) | [
|
|
1406
|
-
| [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [
|
|
3624
|
+
| [attemptToPostReqsToNetwork](#function-attempttopostreqstonetwork) | [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) |
|
|
3625
|
+
| [createAction](#function-createaction) | [offsetPubKey](#function-offsetpubkey) |
|
|
3626
|
+
| [createStorageServiceChargeScript](#function-createstorageservicechargescript) | [processAction](#function-processaction) |
|
|
3627
|
+
| [createSyncMap](#function-createsyncmap) | [purgeData](#function-purgedata) |
|
|
1407
3628
|
| [generateChangeSdk](#function-generatechangesdk) | [reviewStatus](#function-reviewstatus) |
|
|
1408
3629
|
| [generateChangeSdkMakeStorage](#function-generatechangesdkmakestorage) | [transactionInputSize](#function-transactioninputsize) |
|
|
1409
3630
|
| [getBeefForTransaction](#function-getbeeffortransaction) | [transactionOutputSize](#function-transactionoutputsize) |
|
|
@@ -1412,7 +3633,6 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1412
3633
|
| [listActions](#function-listactions) | [validateGenerateChangeSdkResult](#function-validategeneratechangesdkresult) |
|
|
1413
3634
|
| [listCertificates](#function-listcertificates) | [validateStorageFeeModel](#function-validatestoragefeemodel) |
|
|
1414
3635
|
| [listOutputs](#function-listoutputs) | [varUintSize](#function-varuintsize) |
|
|
1415
|
-
| [lockScriptWithKeyOffsetFromPubKey](#function-lockscriptwithkeyoffsetfrompubkey) | |
|
|
1416
3636
|
|
|
1417
3637
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1418
3638
|
|
|
@@ -1424,10 +3644,10 @@ Attempt to post one or more `ProvenTxReq` with status 'unsent'
|
|
|
1424
3644
|
to the bitcoin network.
|
|
1425
3645
|
|
|
1426
3646
|
```ts
|
|
1427
|
-
export async function attemptToPostReqsToNetwork(storage: StorageProvider, reqs:
|
|
3647
|
+
export async function attemptToPostReqsToNetwork(storage: StorageProvider, reqs: EntityProvenTxReq[], trx?: sdk.TrxToken): Promise<PostReqsToNetworkResult>
|
|
1428
3648
|
```
|
|
1429
3649
|
|
|
1430
|
-
See also: [PostReqsToNetworkResult](#interface-postreqstonetworkresult), [StorageProvider](#class-storageprovider), [TrxToken](#interface-trxtoken)
|
|
3650
|
+
See also: [EntityProvenTxReq](./storage.md#class-entityproventxreq), [PostReqsToNetworkResult](./storage.md#interface-postreqstonetworkresult), [StorageProvider](./storage.md#class-storageprovider), [TrxToken](./client.md#interface-trxtoken)
|
|
1431
3651
|
|
|
1432
3652
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1433
3653
|
|
|
@@ -1438,7 +3658,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1438
3658
|
export async function createAction(storage: StorageProvider, auth: sdk.AuthId, vargs: sdk.ValidCreateActionArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<sdk.StorageCreateActionResult>
|
|
1439
3659
|
```
|
|
1440
3660
|
|
|
1441
|
-
See also: [AuthId](#interface-authid), [StorageCreateActionResult](#interface-storagecreateactionresult), [StorageProvider](#class-storageprovider), [ValidCreateActionArgs](#interface-validcreateactionargs)
|
|
3661
|
+
See also: [AuthId](./client.md#interface-authid), [StorageCreateActionResult](./client.md#interface-storagecreateactionresult), [StorageProvider](./storage.md#class-storageprovider), [ValidCreateActionArgs](./client.md#interface-validcreateactionargs)
|
|
1442
3662
|
|
|
1443
3663
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1444
3664
|
|
|
@@ -1454,6 +3674,17 @@ export function createStorageServiceChargeScript(pubKeyHex: PubKeyHex): {
|
|
|
1454
3674
|
|
|
1455
3675
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1456
3676
|
|
|
3677
|
+
---
|
|
3678
|
+
##### Function: createSyncMap
|
|
3679
|
+
|
|
3680
|
+
```ts
|
|
3681
|
+
export function createSyncMap(): SyncMap
|
|
3682
|
+
```
|
|
3683
|
+
|
|
3684
|
+
See also: [SyncMap](./storage.md#interface-syncmap)
|
|
3685
|
+
|
|
3686
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
3687
|
+
|
|
1457
3688
|
---
|
|
1458
3689
|
##### Function: generateChangeSdk
|
|
1459
3690
|
|
|
@@ -1467,7 +3698,7 @@ Confirms for each availbleChange output that it remains available as they are al
|
|
|
1467
3698
|
export async function generateChangeSdk(params: GenerateChangeSdkParams, allocateChangeInput: (targetSatoshis: number, exactSatoshis?: number) => Promise<GenerateChangeSdkChangeInput | undefined>, releaseChangeInput: (outputId: number) => Promise<void>): Promise<GenerateChangeSdkResult>
|
|
1468
3699
|
```
|
|
1469
3700
|
|
|
1470
|
-
See also: [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput), [GenerateChangeSdkParams](#interface-generatechangesdkparams), [GenerateChangeSdkResult](#interface-generatechangesdkresult)
|
|
3701
|
+
See also: [GenerateChangeSdkChangeInput](./storage.md#interface-generatechangesdkchangeinput), [GenerateChangeSdkParams](./storage.md#interface-generatechangesdkparams), [GenerateChangeSdkResult](./storage.md#interface-generatechangesdkresult)
|
|
1471
3702
|
|
|
1472
3703
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1473
3704
|
|
|
@@ -1482,7 +3713,7 @@ export function generateChangeSdkMakeStorage(availableChange: GenerateChangeSdkC
|
|
|
1482
3713
|
}
|
|
1483
3714
|
```
|
|
1484
3715
|
|
|
1485
|
-
See also: [GenerateChangeSdkChangeInput](#interface-generatechangesdkchangeinput)
|
|
3716
|
+
See also: [GenerateChangeSdkChangeInput](./storage.md#interface-generatechangesdkchangeinput)
|
|
1486
3717
|
|
|
1487
3718
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1488
3719
|
|
|
@@ -1506,7 +3737,7 @@ If `knownTxids` is defined, any 'txid' required by the `Beef` that appears in th
|
|
|
1506
3737
|
export async function getBeefForTransaction(storage: StorageProvider, txid: string, options: sdk.StorageGetBeefOptions): Promise<Beef>
|
|
1507
3738
|
```
|
|
1508
3739
|
|
|
1509
|
-
See also: [StorageGetBeefOptions](#interface-storagegetbeefoptions), [StorageProvider](#class-storageprovider)
|
|
3740
|
+
See also: [StorageGetBeefOptions](./client.md#interface-storagegetbeefoptions), [StorageProvider](./storage.md#class-storageprovider)
|
|
1510
3741
|
|
|
1511
3742
|
Argument Details
|
|
1512
3743
|
|
|
@@ -1526,7 +3757,7 @@ Gets the next sync chunk of updated data from un-remoted storage (could be using
|
|
|
1526
3757
|
export async function getSyncChunk(storage: StorageReader, args: sdk.RequestSyncChunkArgs): Promise<sdk.SyncChunk>
|
|
1527
3758
|
```
|
|
1528
3759
|
|
|
1529
|
-
See also: [RequestSyncChunkArgs](#interface-requestsyncchunkargs), [StorageReader](#class-storagereader), [SyncChunk](#interface-syncchunk)
|
|
3760
|
+
See also: [RequestSyncChunkArgs](./client.md#interface-requestsyncchunkargs), [StorageReader](./storage.md#class-storagereader), [SyncChunk](./client.md#interface-syncchunk)
|
|
1530
3761
|
|
|
1531
3762
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1532
3763
|
|
|
@@ -1562,7 +3793,7 @@ When the transaction already exists, the description is updated. The isOutgoing
|
|
|
1562
3793
|
export async function internalizeAction(storage: StorageProvider, auth: sdk.AuthId, args: InternalizeActionArgs): Promise<InternalizeActionResult>
|
|
1563
3794
|
```
|
|
1564
3795
|
|
|
1565
|
-
See also: [AuthId](#interface-authid), [StorageProvider](#class-storageprovider)
|
|
3796
|
+
See also: [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md#class-storageprovider)
|
|
1566
3797
|
|
|
1567
3798
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1568
3799
|
|
|
@@ -1573,7 +3804,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1573
3804
|
export async function listActions(storage: StorageKnex, auth: sdk.AuthId, vargs: sdk.ValidListActionsArgs): Promise<ListActionsResult>
|
|
1574
3805
|
```
|
|
1575
3806
|
|
|
1576
|
-
See also: [AuthId](#interface-authid), [StorageKnex](#class-storageknex), [ValidListActionsArgs](#interface-validlistactionsargs)
|
|
3807
|
+
See also: [AuthId](./client.md#interface-authid), [StorageKnex](./storage.md#class-storageknex), [ValidListActionsArgs](./client.md#interface-validlistactionsargs)
|
|
1577
3808
|
|
|
1578
3809
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1579
3810
|
|
|
@@ -1584,7 +3815,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1584
3815
|
export async function listCertificates(storage: StorageProvider, auth: sdk.AuthId, vargs: sdk.ValidListCertificatesArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListCertificatesResult>
|
|
1585
3816
|
```
|
|
1586
3817
|
|
|
1587
|
-
See also: [AuthId](#interface-authid), [StorageProvider](#class-storageprovider), [ValidListCertificatesArgs](#interface-validlistcertificatesargs)
|
|
3818
|
+
See also: [AuthId](./client.md#interface-authid), [StorageProvider](./storage.md#class-storageprovider), [ValidListCertificatesArgs](./client.md#interface-validlistcertificatesargs)
|
|
1588
3819
|
|
|
1589
3820
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1590
3821
|
|
|
@@ -1595,7 +3826,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1595
3826
|
export async function listOutputs(dsk: StorageKnex, auth: sdk.AuthId, vargs: sdk.ValidListOutputsArgs, originator?: OriginatorDomainNameStringUnder250Bytes): Promise<ListOutputsResult>
|
|
1596
3827
|
```
|
|
1597
3828
|
|
|
1598
|
-
See also: [AuthId](#interface-authid), [StorageKnex](#class-storageknex), [ValidListOutputsArgs](#interface-validlistoutputsargs)
|
|
3829
|
+
See also: [AuthId](./client.md#interface-authid), [StorageKnex](./storage.md#class-storageknex), [ValidListOutputsArgs](./client.md#interface-validlistoutputsargs)
|
|
1599
3830
|
|
|
1600
3831
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1601
3832
|
|
|
@@ -1630,7 +3861,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1630
3861
|
export async function processAction(storage: StorageProvider, auth: sdk.AuthId, args: sdk.StorageProcessActionArgs): Promise<sdk.StorageProcessActionResults>
|
|
1631
3862
|
```
|
|
1632
3863
|
|
|
1633
|
-
See also: [AuthId](#interface-authid), [StorageProcessActionArgs](#interface-storageprocessactionargs), [StorageProcessActionResults](#interface-storageprocessactionresults), [StorageProvider](#class-storageprovider)
|
|
3864
|
+
See also: [AuthId](./client.md#interface-authid), [StorageProcessActionArgs](./client.md#interface-storageprocessactionargs), [StorageProcessActionResults](./client.md#interface-storageprocessactionresults), [StorageProvider](./storage.md#class-storageprovider)
|
|
1634
3865
|
|
|
1635
3866
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1636
3867
|
|
|
@@ -1641,7 +3872,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1641
3872
|
export async function purgeData(storage: StorageKnex, params: sdk.PurgeParams, trx?: sdk.TrxToken): Promise<sdk.PurgeResults>
|
|
1642
3873
|
```
|
|
1643
3874
|
|
|
1644
|
-
See also: [PurgeParams](#interface-purgeparams), [PurgeResults](#interface-purgeresults), [StorageKnex](#class-storageknex), [TrxToken](#interface-trxtoken)
|
|
3875
|
+
See also: [PurgeParams](./client.md#interface-purgeparams), [PurgeResults](./client.md#interface-purgeresults), [StorageKnex](./storage.md#class-storageknex), [TrxToken](./client.md#interface-trxtoken)
|
|
1645
3876
|
|
|
1646
3877
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1647
3878
|
|
|
@@ -1657,7 +3888,7 @@ export async function reviewStatus(storage: StorageKnex, args: {
|
|
|
1657
3888
|
}>
|
|
1658
3889
|
```
|
|
1659
3890
|
|
|
1660
|
-
See also: [StorageKnex](#class-storageknex), [TrxToken](#interface-trxtoken)
|
|
3891
|
+
See also: [StorageKnex](./storage.md#class-storageknex), [TrxToken](./client.md#interface-trxtoken)
|
|
1661
3892
|
|
|
1662
3893
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1663
3894
|
|
|
@@ -1728,7 +3959,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1728
3959
|
export function validateGenerateChangeSdkParams(params: GenerateChangeSdkParams)
|
|
1729
3960
|
```
|
|
1730
3961
|
|
|
1731
|
-
See also: [GenerateChangeSdkParams](#interface-generatechangesdkparams)
|
|
3962
|
+
See also: [GenerateChangeSdkParams](./storage.md#interface-generatechangesdkparams)
|
|
1732
3963
|
|
|
1733
3964
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1734
3965
|
|
|
@@ -1742,7 +3973,7 @@ export function validateGenerateChangeSdkResult(params: GenerateChangeSdkParams,
|
|
|
1742
3973
|
}
|
|
1743
3974
|
```
|
|
1744
3975
|
|
|
1745
|
-
See also: [GenerateChangeSdkParams](#interface-generatechangesdkparams), [GenerateChangeSdkResult](#interface-generatechangesdkresult)
|
|
3976
|
+
See also: [GenerateChangeSdkParams](./storage.md#interface-generatechangesdkparams), [GenerateChangeSdkResult](./storage.md#interface-generatechangesdkresult)
|
|
1746
3977
|
|
|
1747
3978
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1748
3979
|
|
|
@@ -1753,7 +3984,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1753
3984
|
export function validateStorageFeeModel(v?: sdk.StorageFeeModel): sdk.StorageFeeModel
|
|
1754
3985
|
```
|
|
1755
3986
|
|
|
1756
|
-
See also: [StorageFeeModel](#interface-storagefeemodel)
|
|
3987
|
+
See also: [StorageFeeModel](./client.md#interface-storagefeemodel)
|
|
1757
3988
|
|
|
1758
3989
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1759
3990
|
|
|
@@ -1770,7 +4001,7 @@ export function varUintSize(val: number): 1 | 3 | 5 | 9 {
|
|
|
1770
4001
|
}
|
|
1771
4002
|
```
|
|
1772
4003
|
|
|
1773
|
-
See also: [WERR_INVALID_PARAMETER](#class-werr_invalid_parameter)
|
|
4004
|
+
See also: [WERR_INVALID_PARAMETER](./client.md#class-werr_invalid_parameter)
|
|
1774
4005
|
|
|
1775
4006
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1776
4007
|
|
|
@@ -1780,6 +4011,7 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1780
4011
|
| |
|
|
1781
4012
|
| --- |
|
|
1782
4013
|
| [DBType](#type-dbtype) |
|
|
4014
|
+
| [EntityStorage](#type-entitystorage) |
|
|
1783
4015
|
| [PostReqsToNetworkDetailsStatus](#type-postreqstonetworkdetailsstatus) |
|
|
1784
4016
|
|
|
1785
4017
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
@@ -1794,6 +4026,17 @@ export type DBType = "SQLite" | "MySQL"
|
|
|
1794
4026
|
|
|
1795
4027
|
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
1796
4028
|
|
|
4029
|
+
---
|
|
4030
|
+
##### Type: EntityStorage
|
|
4031
|
+
|
|
4032
|
+
```ts
|
|
4033
|
+
export type EntityStorage = StorageProvider
|
|
4034
|
+
```
|
|
4035
|
+
|
|
4036
|
+
See also: [StorageProvider](./storage.md#class-storageprovider)
|
|
4037
|
+
|
|
4038
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4039
|
+
|
|
1797
4040
|
---
|
|
1798
4041
|
##### Type: PostReqsToNetworkDetailsStatus
|
|
1799
4042
|
|
|
@@ -1806,5 +4049,71 @@ Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](
|
|
|
1806
4049
|
---
|
|
1807
4050
|
#### Variables
|
|
1808
4051
|
|
|
4052
|
+
| |
|
|
4053
|
+
| --- |
|
|
4054
|
+
| [outputColumnsWithoutLockingScript](#variable-outputcolumnswithoutlockingscript) |
|
|
4055
|
+
| [transactionColumnsWithoutRawTx](#variable-transactioncolumnswithoutrawtx) |
|
|
4056
|
+
|
|
4057
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4058
|
+
|
|
4059
|
+
---
|
|
4060
|
+
|
|
4061
|
+
##### Variable: outputColumnsWithoutLockingScript
|
|
4062
|
+
|
|
4063
|
+
```ts
|
|
4064
|
+
outputColumnsWithoutLockingScript = [
|
|
4065
|
+
"created_at",
|
|
4066
|
+
"updated_at",
|
|
4067
|
+
"outputId",
|
|
4068
|
+
"userId",
|
|
4069
|
+
"transactionId",
|
|
4070
|
+
"basketId",
|
|
4071
|
+
"spendable",
|
|
4072
|
+
"change",
|
|
4073
|
+
"vout",
|
|
4074
|
+
"satoshis",
|
|
4075
|
+
"providedBy",
|
|
4076
|
+
"purpose",
|
|
4077
|
+
"type",
|
|
4078
|
+
"outputDescription",
|
|
4079
|
+
"txid",
|
|
4080
|
+
"senderIdentityKey",
|
|
4081
|
+
"derivationPrefix",
|
|
4082
|
+
"derivationSuffix",
|
|
4083
|
+
"customInstructions",
|
|
4084
|
+
"spentBy",
|
|
4085
|
+
"sequenceNumber",
|
|
4086
|
+
"spendingDescription",
|
|
4087
|
+
"scriptLength",
|
|
4088
|
+
"scriptOffset"
|
|
4089
|
+
]
|
|
4090
|
+
```
|
|
4091
|
+
|
|
4092
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4093
|
+
|
|
4094
|
+
---
|
|
4095
|
+
##### Variable: transactionColumnsWithoutRawTx
|
|
4096
|
+
|
|
4097
|
+
```ts
|
|
4098
|
+
transactionColumnsWithoutRawTx = [
|
|
4099
|
+
"created_at",
|
|
4100
|
+
"updated_at",
|
|
4101
|
+
"transactionId",
|
|
4102
|
+
"userId",
|
|
4103
|
+
"provenTxId",
|
|
4104
|
+
"status",
|
|
4105
|
+
"reference",
|
|
4106
|
+
"isOutgoing",
|
|
4107
|
+
"satoshis",
|
|
4108
|
+
"version",
|
|
4109
|
+
"lockTime",
|
|
4110
|
+
"description",
|
|
4111
|
+
"txid"
|
|
4112
|
+
]
|
|
4113
|
+
```
|
|
4114
|
+
|
|
4115
|
+
Links: [API](#api), [Interfaces](#interfaces), [Classes](#classes), [Functions](#functions), [Types](#types), [Variables](#variables)
|
|
4116
|
+
|
|
4117
|
+
---
|
|
1809
4118
|
|
|
1810
4119
|
<!--#endregion ts2md-api-merged-here-->
|