@bsv/wallet-toolbox 1.1.60 → 1.1.62
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/.prettierrc +1 -1
- package/docs/client.md +39 -5
- package/docs/services.md +1 -0
- package/docs/setup.md +9 -26
- package/docs/storage.md +35 -0
- package/docs/wallet.md +39 -5
- package/out/src/Setup.d.ts.map +1 -1
- package/out/src/Setup.js +6 -16
- package/out/src/Setup.js.map +1 -1
- package/out/src/Wallet.d.ts.map +1 -1
- package/out/src/Wallet.js +4 -11
- package/out/src/Wallet.js.map +1 -1
- package/out/src/monitor/Monitor.d.ts.map +1 -1
- package/out/src/monitor/Monitor.js.map +1 -1
- package/out/src/monitor/MonitorDaemon.d.ts.map +1 -1
- package/out/src/monitor/MonitorDaemon.js +1 -3
- package/out/src/monitor/MonitorDaemon.js.map +1 -1
- package/out/src/monitor/tasks/TaskCheckForProofs.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskCheckForProofs.js +2 -10
- package/out/src/monitor/tasks/TaskCheckForProofs.js.map +1 -1
- package/out/src/monitor/tasks/TaskClock.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskClock.js +1 -1
- package/out/src/monitor/tasks/TaskClock.js.map +1 -1
- package/out/src/monitor/tasks/TaskFailAbandoned.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskFailAbandoned.js.map +1 -1
- package/out/src/monitor/tasks/TaskNewHeader.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskNewHeader.js +1 -2
- package/out/src/monitor/tasks/TaskNewHeader.js.map +1 -1
- package/out/src/monitor/tasks/TaskPurge.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskPurge.js +1 -2
- package/out/src/monitor/tasks/TaskPurge.js.map +1 -1
- package/out/src/monitor/tasks/TaskReviewStatus.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskReviewStatus.js +1 -2
- package/out/src/monitor/tasks/TaskReviewStatus.js.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.d.ts.map +1 -1
- package/out/src/monitor/tasks/TaskSendWaiting.js.map +1 -1
- package/out/src/sdk/CertOps.d.ts.map +1 -1
- package/out/src/sdk/CertOps.js +4 -12
- package/out/src/sdk/CertOps.js.map +1 -1
- package/out/src/sdk/PrivilegedKeyManager.d.ts.map +1 -1
- package/out/src/sdk/PrivilegedKeyManager.js.map +1 -1
- package/out/src/sdk/WERR_errors.d.ts.map +1 -1
- package/out/src/sdk/WERR_errors.js.map +1 -1
- package/out/src/sdk/WalletError.d.ts.map +1 -1
- package/out/src/sdk/WalletError.js +1 -4
- package/out/src/sdk/WalletError.js.map +1 -1
- package/out/src/sdk/WalletServices.interfaces.d.ts +2 -0
- package/out/src/sdk/WalletServices.interfaces.d.ts.map +1 -1
- package/out/src/sdk/WalletStorage.interfaces.d.ts.map +1 -1
- package/out/src/sdk/__test/CertificateLifeCycle.test.js +1 -3
- package/out/src/sdk/__test/CertificateLifeCycle.test.js.map +1 -1
- package/out/src/sdk/__test/PrivilegedKeyManager.test.js +13 -26
- package/out/src/sdk/__test/PrivilegedKeyManager.test.js.map +1 -1
- package/out/src/sdk/types.d.ts.map +1 -1
- package/out/src/sdk/types.js +2 -10
- package/out/src/sdk/types.js.map +1 -1
- package/out/src/sdk/validationHelpers.d.ts.map +1 -1
- package/out/src/sdk/validationHelpers.js +5 -12
- package/out/src/sdk/validationHelpers.js.map +1 -1
- package/out/src/services/Services.d.ts +1 -0
- package/out/src/services/Services.d.ts.map +1 -1
- package/out/src/services/Services.js +29 -38
- package/out/src/services/Services.js.map +1 -1
- package/out/src/services/__tests/ARC.test.js +9 -0
- package/out/src/services/__tests/ARC.test.js.map +1 -1
- package/out/src/services/__tests/bitrails.test.js.map +1 -1
- package/out/src/services/__tests/getMerklePath.test.js.map +1 -1
- package/out/src/services/__tests/getRawTx.test.js.map +1 -1
- package/out/src/services/__tests/verifyBeef.test.js +2 -1
- package/out/src/services/__tests/verifyBeef.test.js.map +1 -1
- package/out/src/services/chaintracker/ChaintracksChainTracker.d.ts.map +1 -1
- package/out/src/services/chaintracker/ChaintracksChainTracker.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/BlockHeaderApi.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/BlockHeaderApi.js.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.d.ts.map +1 -1
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js +1 -3
- package/out/src/services/chaintracker/chaintracks/ChaintracksServiceClient.js.map +1 -1
- package/out/src/services/createDefaultWalletServicesOptions.d.ts.map +1 -1
- package/out/src/services/createDefaultWalletServicesOptions.js.map +1 -1
- package/out/src/services/providers/ARC.d.ts.map +1 -1
- package/out/src/services/providers/ARC.js +2 -3
- package/out/src/services/providers/ARC.js.map +1 -1
- package/out/src/services/providers/Bitails.d.ts.map +1 -1
- package/out/src/services/providers/Bitails.js +62 -134
- package/out/src/services/providers/Bitails.js.map +1 -1
- package/out/src/services/providers/SdkWhatsOnChain.d.ts.map +1 -1
- package/out/src/services/providers/SdkWhatsOnChain.js.map +1 -1
- package/out/src/services/providers/WhatsOnChain.d.ts.map +1 -1
- package/out/src/services/providers/WhatsOnChain.js +6 -21
- package/out/src/services/providers/WhatsOnChain.js.map +1 -1
- package/out/src/services/providers/__tests/WhatsOnChain.test.js +1 -2
- package/out/src/services/providers/__tests/WhatsOnChain.test.js.map +1 -1
- package/out/src/services/providers/echangeRates.d.ts.map +1 -1
- package/out/src/services/providers/echangeRates.js.map +1 -1
- package/out/src/signer/WalletSigner.d.ts.map +1 -1
- package/out/src/signer/WalletSigner.js.map +1 -1
- package/out/src/signer/methods/acquireDirectCertificate.d.ts.map +1 -1
- package/out/src/signer/methods/acquireDirectCertificate.js +1 -3
- package/out/src/signer/methods/acquireDirectCertificate.js.map +1 -1
- package/out/src/signer/methods/buildSignableTransaction.d.ts.map +1 -1
- package/out/src/signer/methods/buildSignableTransaction.js +3 -11
- package/out/src/signer/methods/buildSignableTransaction.js.map +1 -1
- package/out/src/signer/methods/createAction.d.ts.map +1 -1
- package/out/src/signer/methods/createAction.js +3 -10
- package/out/src/signer/methods/createAction.js.map +1 -1
- package/out/src/signer/methods/internalizeAction.d.ts.map +1 -1
- package/out/src/signer/methods/internalizeAction.js.map +1 -1
- package/out/src/signer/methods/proveCertificate.d.ts.map +1 -1
- package/out/src/signer/methods/proveCertificate.js.map +1 -1
- package/out/src/signer/methods/signAction.d.ts.map +1 -1
- package/out/src/signer/methods/signAction.js +2 -7
- package/out/src/signer/methods/signAction.js.map +1 -1
- package/out/src/storage/StorageKnex.d.ts.map +1 -1
- package/out/src/storage/StorageKnex.js +15 -44
- package/out/src/storage/StorageKnex.js.map +1 -1
- package/out/src/storage/StorageProvider.d.ts.map +1 -1
- package/out/src/storage/StorageProvider.js +9 -34
- package/out/src/storage/StorageProvider.js.map +1 -1
- 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.map +1 -1
- package/out/src/storage/StorageReaderWriter.js.map +1 -1
- 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.map +1 -1
- package/out/src/storage/WalletStorageManager.js +5 -10
- package/out/src/storage/WalletStorageManager.js.map +1 -1
- package/out/src/storage/__test/WalletStorageManager.test.js +2 -8
- package/out/src/storage/__test/WalletStorageManager.test.js.map +1 -1
- package/out/src/storage/methods/__test/GenerateChange/generateChangeSdk.test.js +10 -30
- package/out/src/storage/methods/__test/GenerateChange/generateChangeSdk.test.js.map +1 -1
- package/out/src/storage/methods/__test/GenerateChange/randomValsUsed1.d.ts.map +1 -1
- package/out/src/storage/methods/__test/GenerateChange/randomValsUsed1.js +17 -28
- package/out/src/storage/methods/__test/GenerateChange/randomValsUsed1.js.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.d.ts.map +1 -1
- package/out/src/storage/methods/attemptToPostReqsToNetwork.js +6 -20
- 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 +4 -9
- package/out/src/storage/methods/createAction.js.map +1 -1
- package/out/src/storage/methods/generateChange.d.ts.map +1 -1
- package/out/src/storage/methods/generateChange.js +7 -18
- package/out/src/storage/methods/generateChange.js.map +1 -1
- package/out/src/storage/methods/getBeefForTransaction.d.ts.map +1 -1
- package/out/src/storage/methods/getBeefForTransaction.js +1 -3
- 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 +2 -9
- package/out/src/storage/methods/internalizeAction.js.map +1 -1
- package/out/src/storage/methods/listActions.d.ts.map +1 -1
- package/out/src/storage/methods/listActions.js +3 -15
- 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.d.ts.map +1 -1
- package/out/src/storage/methods/listOutputs.js +5 -12
- package/out/src/storage/methods/listOutputs.js.map +1 -1
- package/out/src/storage/methods/processAction.d.ts.map +1 -1
- package/out/src/storage/methods/processAction.js +4 -10
- 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 +8 -32
- package/out/src/storage/methods/purgeData.js.map +1 -1
- package/out/src/storage/methods/reviewStatus.d.ts.map +1 -1
- package/out/src/storage/methods/reviewStatus.js +1 -3
- package/out/src/storage/methods/reviewStatus.js.map +1 -1
- package/out/src/storage/remoting/StorageClient.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageClient.js +15 -41
- package/out/src/storage/remoting/StorageClient.js.map +1 -1
- package/out/src/storage/remoting/StorageServer.d.ts.map +1 -1
- package/out/src/storage/remoting/StorageServer.js +2 -5
- package/out/src/storage/remoting/StorageServer.js.map +1 -1
- package/out/src/storage/schema/KnexMigrations.d.ts.map +1 -1
- package/out/src/storage/schema/KnexMigrations.js +24 -130
- package/out/src/storage/schema/KnexMigrations.js.map +1 -1
- package/out/src/storage/schema/entities/Certificate.d.ts.map +1 -1
- package/out/src/storage/schema/entities/Certificate.js +1 -1
- package/out/src/storage/schema/entities/Certificate.js.map +1 -1
- package/out/src/storage/schema/entities/CertificateField.d.ts.map +1 -1
- package/out/src/storage/schema/entities/CertificateField.js +2 -5
- package/out/src/storage/schema/entities/CertificateField.js.map +1 -1
- package/out/src/storage/schema/entities/Commission.d.ts.map +1 -1
- package/out/src/storage/schema/entities/Commission.js +2 -5
- package/out/src/storage/schema/entities/Commission.js.map +1 -1
- package/out/src/storage/schema/entities/EntityBase.d.ts.map +1 -1
- package/out/src/storage/schema/entities/EntityBase.js.map +1 -1
- package/out/src/storage/schema/entities/MergeEntity.d.ts.map +1 -1
- package/out/src/storage/schema/entities/MergeEntity.js +14 -9
- package/out/src/storage/schema/entities/MergeEntity.js.map +1 -1
- package/out/src/storage/schema/entities/Output.d.ts.map +1 -1
- package/out/src/storage/schema/entities/Output.js +8 -25
- package/out/src/storage/schema/entities/Output.js.map +1 -1
- package/out/src/storage/schema/entities/OutputBasket.d.ts.map +1 -1
- package/out/src/storage/schema/entities/OutputBasket.js +1 -1
- package/out/src/storage/schema/entities/OutputBasket.js.map +1 -1
- package/out/src/storage/schema/entities/OutputTag.d.ts.map +1 -1
- package/out/src/storage/schema/entities/OutputTag.js +1 -1
- package/out/src/storage/schema/entities/OutputTag.js.map +1 -1
- package/out/src/storage/schema/entities/OutputTagMap.d.ts.map +1 -1
- package/out/src/storage/schema/entities/OutputTagMap.js +3 -7
- package/out/src/storage/schema/entities/OutputTagMap.js.map +1 -1
- package/out/src/storage/schema/entities/ProvenTx.d.ts.map +1 -1
- package/out/src/storage/schema/entities/ProvenTx.js +10 -20
- package/out/src/storage/schema/entities/ProvenTx.js.map +1 -1
- package/out/src/storage/schema/entities/ProvenTxReq.d.ts.map +1 -1
- package/out/src/storage/schema/entities/ProvenTxReq.js +8 -18
- package/out/src/storage/schema/entities/ProvenTxReq.js.map +1 -1
- package/out/src/storage/schema/entities/SyncState.d.ts +1 -0
- package/out/src/storage/schema/entities/SyncState.d.ts.map +1 -1
- package/out/src/storage/schema/entities/SyncState.js +41 -6
- package/out/src/storage/schema/entities/SyncState.js.map +1 -1
- package/out/src/storage/schema/entities/Transaction.d.ts.map +1 -1
- package/out/src/storage/schema/entities/Transaction.js +4 -13
- package/out/src/storage/schema/entities/Transaction.js.map +1 -1
- package/out/src/storage/schema/entities/TxLabel.d.ts.map +1 -1
- package/out/src/storage/schema/entities/TxLabel.js +1 -1
- package/out/src/storage/schema/entities/TxLabel.js.map +1 -1
- package/out/src/storage/schema/entities/TxLabelMap.d.ts.map +1 -1
- package/out/src/storage/schema/entities/TxLabelMap.js +3 -9
- package/out/src/storage/schema/entities/TxLabelMap.js.map +1 -1
- package/out/src/storage/schema/entities/User.d.ts.map +1 -1
- package/out/src/storage/schema/entities/User.js +3 -5
- package/out/src/storage/schema/entities/User.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/CertificateFieldTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/CertificateTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/CommissionTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/OutputBasketTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/OutputTagMapTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/OutputTagTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/OutputTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/ProvenTxReqTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/ProvenTxTests.test.js +1 -2
- package/out/src/storage/schema/entities/__tests/ProvenTxTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/SyncStateTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/TransactionTests.test.js +2 -2
- package/out/src/storage/schema/entities/__tests/TransactionTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/TxLabelMapTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/TxLabelTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/stampLogTests.test.js.map +1 -1
- package/out/src/storage/schema/entities/__tests/usersTests.test.js.map +1 -1
- package/out/src/storage/schema/tables/TableSettings.d.ts.map +1 -1
- package/out/src/storage/sync/StorageMySQLDojoReader.d.ts.map +1 -1
- package/out/src/storage/sync/StorageMySQLDojoReader.js +1 -3
- package/out/src/storage/sync/StorageMySQLDojoReader.js.map +1 -1
- package/out/src/utility/ScriptTemplateBRC29.d.ts.map +1 -1
- package/out/src/utility/ScriptTemplateBRC29.js +1 -2
- package/out/src/utility/ScriptTemplateBRC29.js.map +1 -1
- package/out/src/utility/stampLog.d.ts.map +1 -1
- package/out/src/utility/stampLog.js.map +1 -1
- package/out/src/utility/tscProofToMerklePath.d.ts.map +1 -1
- package/out/src/utility/tscProofToMerklePath.js.map +1 -1
- package/out/src/utility/utilityHelpers.buffer.d.ts.map +1 -1
- package/out/src/utility/utilityHelpers.buffer.js.map +1 -1
- package/out/src/utility/utilityHelpers.d.ts.map +1 -1
- package/out/src/utility/utilityHelpers.js +1 -3
- package/out/src/utility/utilityHelpers.js.map +1 -1
- package/out/test/Wallet/StorageClient/storageClient.man.test.js.map +1 -1
- package/out/test/Wallet/action/internalizeAction.a.test.js.map +1 -1
- package/out/test/Wallet/certificate/acquireCertificate.test.js.map +1 -1
- package/out/test/Wallet/certificate/listCertificates.test.js.map +1 -1
- package/out/test/Wallet/get/getHeaderForHeight.test.js +2 -6
- package/out/test/Wallet/get/getHeaderForHeight.test.js.map +1 -1
- package/out/test/Wallet/get/getHeight.test.js.map +1 -1
- package/out/test/Wallet/get/getKnownTxids.test.js.map +1 -1
- package/out/test/Wallet/get/getNetwork.test.js.map +1 -1
- package/out/test/Wallet/get/getVersion.test.js.map +1 -1
- package/out/test/Wallet/live/walletLive.man.test.d.ts.map +1 -1
- package/out/test/Wallet/live/walletLive.man.test.js +3 -9
- package/out/test/Wallet/live/walletLive.man.test.js.map +1 -1
- package/out/test/Wallet/local/localWallet.man.test.d.ts.map +1 -1
- package/out/test/Wallet/local/localWallet.man.test.js +39 -31
- package/out/test/Wallet/local/localWallet.man.test.js.map +1 -1
- package/out/test/Wallet/specOps/specOps.man.test.js +1 -4
- package/out/test/Wallet/specOps/specOps.man.test.js.map +1 -1
- package/out/test/Wallet/support/janitor.man.test.js.map +1 -1
- package/out/test/Wallet/sync/Wallet.updateWalletLegacyTestData.man.test.js.map +1 -1
- package/out/test/Wallet/sync/setActive.test.js +73 -50
- package/out/test/Wallet/sync/setActive.test.js.map +1 -1
- package/out/test/checkDB.d.ts.map +1 -1
- package/out/test/checkDB.js.map +1 -1
- package/out/test/examples/backup.man.test.d.ts.map +1 -1
- package/out/test/examples/backup.man.test.js.map +1 -1
- package/out/test/examples/pushdrop.test.d.ts.map +1 -1
- package/out/test/examples/pushdrop.test.js +5 -4
- package/out/test/examples/pushdrop.test.js.map +1 -1
- package/out/test/monitor/Monitor.test.js.map +1 -1
- package/out/test/services/Services.test.js.map +1 -1
- package/out/test/storage/KnexMigrations.test.js.map +1 -1
- package/out/test/storage/StorageMySQLDojoReader.man.test.js +1 -3
- package/out/test/storage/StorageMySQLDojoReader.man.test.js.map +1 -1
- package/out/test/storage/count.test.js.map +1 -1
- package/out/test/storage/find.test.js +5 -10
- package/out/test/storage/find.test.js.map +1 -1
- package/out/test/storage/findLegacy.test.js.map +1 -1
- package/out/test/storage/insert.test.js.map +1 -1
- package/out/test/storage/update.test.js +7 -19
- package/out/test/storage/update.test.js.map +1 -1
- package/out/test/storage/update2.test.js +22 -24
- package/out/test/storage/update2.test.js.map +1 -1
- package/out/test/utils/TestUtilsWalletStorage.d.ts +3 -1
- package/out/test/utils/TestUtilsWalletStorage.d.ts.map +1 -1
- package/out/test/utils/TestUtilsWalletStorage.js +52 -76
- package/out/test/utils/TestUtilsWalletStorage.js.map +1 -1
- package/out/test/wallet/action/abortAction.test.js.map +1 -1
- package/out/test/wallet/action/createAction.test.js +1 -2
- package/out/test/wallet/action/createAction.test.js.map +1 -1
- package/out/test/wallet/action/createAction2.test.d.ts.map +1 -1
- package/out/test/wallet/action/createAction2.test.js +6 -16
- package/out/test/wallet/action/createAction2.test.js.map +1 -1
- package/out/test/wallet/action/createActionToGenerateBeefs.man.test.js.map +1 -1
- package/out/test/wallet/action/internalizeAction.test.js.map +1 -1
- package/out/test/wallet/action/relinquishOutput.test.js.map +1 -1
- package/out/test/wallet/list/listActions.test.js.map +1 -1
- package/out/test/wallet/list/listActions2.test.js.map +1 -1
- package/out/test/wallet/list/listCertificates.test.js +2 -6
- package/out/test/wallet/list/listCertificates.test.js.map +1 -1
- package/out/test/wallet/list/listOutputs.test.js +2 -10
- package/out/test/wallet/list/listOutputs.test.js.map +1 -1
- package/out/test/wallet/sync/Wallet.sync.test.js +4 -6
- package/out/test/wallet/sync/Wallet.sync.test.js.map +1 -1
- package/out/tsconfig.all.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/Setup.ts +15 -52
- package/src/Wallet.ts +58 -161
- package/src/monitor/Monitor.ts +7 -22
- package/src/monitor/MonitorDaemon.ts +6 -23
- package/src/monitor/tasks/TaskCheckForProofs.ts +4 -23
- package/src/monitor/tasks/TaskClock.ts +1 -3
- package/src/monitor/tasks/TaskFailAbandoned.ts +1 -3
- package/src/monitor/tasks/TaskNewHeader.ts +1 -4
- package/src/monitor/tasks/TaskPurge.ts +1 -2
- package/src/monitor/tasks/TaskReviewStatus.ts +1 -3
- package/src/monitor/tasks/TaskSendWaiting.ts +3 -10
- package/src/sdk/CertOps.ts +31 -103
- package/src/sdk/PrivilegedKeyManager.ts +18 -48
- package/src/sdk/WERR_errors.ts +6 -25
- package/src/sdk/WalletError.ts +5 -21
- package/src/sdk/WalletServices.interfaces.ts +11 -33
- package/src/sdk/WalletStorage.interfaces.ts +25 -91
- package/src/sdk/__test/CertificateLifeCycle.test.ts +9 -27
- package/src/sdk/__test/PrivilegedKeyManager.test.ts +29 -66
- package/src/sdk/types.ts +6 -26
- package/src/sdk/validationHelpers.ts +111 -402
- package/src/services/Services.ts +51 -114
- package/src/services/__tests/ARC.test.ts +14 -1
- package/src/services/__tests/bitrails.test.ts +4 -15
- package/src/services/__tests/getMerklePath.test.ts +1 -2
- package/src/services/__tests/getRawTx.test.ts +1 -3
- package/src/services/__tests/verifyBeef.test.ts +2 -1
- package/src/services/chaintracker/ChaintracksChainTracker.ts +3 -13
- package/src/services/chaintracker/chaintracks/BlockHeaderApi.ts +4 -12
- package/src/services/chaintracker/chaintracks/ChaintracksServiceClient.ts +9 -27
- package/src/services/createDefaultWalletServicesOptions.ts +2 -5
- package/src/services/processingErrors/arcSuccessError.json +76 -0
- package/src/services/providers/ARC.ts +6 -25
- package/src/services/providers/Bitails.ts +61 -159
- package/src/services/providers/SdkWhatsOnChain.ts +4 -17
- package/src/services/providers/WhatsOnChain.ts +31 -100
- package/src/services/providers/__tests/WhatsOnChain.test.ts +5 -15
- package/src/services/providers/echangeRates.ts +7 -22
- package/src/signer/WalletSigner.ts +1 -5
- package/src/signer/methods/acquireDirectCertificate.ts +1 -4
- package/src/signer/methods/buildSignableTransaction.ts +5 -20
- package/src/signer/methods/createAction.ts +15 -54
- package/src/signer/methods/internalizeAction.ts +10 -39
- package/src/signer/methods/proveCertificate.ts +2 -5
- package/src/signer/methods/signAction.ts +9 -39
- package/src/storage/StorageKnex.ts +166 -499
- package/src/storage/StorageProvider.ts +75 -291
- package/src/storage/StorageReader.ts +20 -65
- package/src/storage/StorageReaderWriter.ts +67 -264
- package/src/storage/StorageSyncReader.ts +2 -5
- package/src/storage/WalletStorageManager.ts +33 -108
- package/src/storage/__test/WalletStorageManager.test.ts +6 -23
- package/src/storage/methods/__test/GenerateChange/generateChangeSdk.test.ts +53 -171
- package/src/storage/methods/__test/GenerateChange/randomValsUsed1.ts +17 -28
- package/src/storage/methods/attemptToPostReqsToNetwork.ts +9 -37
- package/src/storage/methods/createAction.ts +45 -181
- package/src/storage/methods/generateChange.ts +33 -114
- package/src/storage/methods/getBeefForTransaction.ts +7 -37
- package/src/storage/methods/getSyncChunk.ts +18 -69
- package/src/storage/methods/internalizeAction.ts +18 -70
- package/src/storage/methods/listActions.ts +6 -23
- package/src/storage/methods/listCertificates.ts +5 -14
- package/src/storage/methods/listOutputs.ts +15 -69
- package/src/storage/methods/processAction.ts +29 -104
- package/src/storage/methods/purgeData.ts +11 -45
- package/src/storage/methods/reviewStatus.ts +3 -9
- package/src/storage/remoting/StorageClient.ts +43 -146
- package/src/storage/remoting/StorageServer.ts +21 -59
- package/src/storage/schema/KnexMigrations.ts +34 -165
- package/src/storage/schema/entities/Certificate.ts +3 -14
- package/src/storage/schema/entities/CertificateField.ts +6 -28
- package/src/storage/schema/entities/Commission.ts +6 -23
- package/src/storage/schema/entities/EntityBase.ts +1 -6
- package/src/storage/schema/entities/MergeEntity.ts +14 -21
- package/src/storage/schema/entities/Output.ts +10 -39
- package/src/storage/schema/entities/OutputBasket.ts +4 -16
- package/src/storage/schema/entities/OutputTag.ts +4 -17
- package/src/storage/schema/entities/OutputTagMap.ts +7 -30
- package/src/storage/schema/entities/ProvenTx.ts +16 -57
- package/src/storage/schema/entities/ProvenTxReq.ts +29 -93
- package/src/storage/schema/entities/SyncState.ts +64 -116
- package/src/storage/schema/entities/Transaction.ts +10 -35
- package/src/storage/schema/entities/TxLabel.ts +4 -17
- package/src/storage/schema/entities/TxLabelMap.ts +6 -28
- package/src/storage/schema/entities/User.ts +8 -31
- package/src/storage/schema/entities/__tests/CertificateFieldTests.test.ts +23 -54
- package/src/storage/schema/entities/__tests/CertificateTests.test.ts +26 -59
- package/src/storage/schema/entities/__tests/CommissionTests.test.ts +2 -11
- package/src/storage/schema/entities/__tests/OutputBasketTests.test.ts +2 -10
- package/src/storage/schema/entities/__tests/OutputTagMapTests.test.ts +2 -10
- package/src/storage/schema/entities/__tests/OutputTagTests.test.ts +1 -4
- package/src/storage/schema/entities/__tests/OutputTests.test.ts +3 -14
- package/src/storage/schema/entities/__tests/ProvenTxReqTests.test.ts +4 -16
- package/src/storage/schema/entities/__tests/ProvenTxTests.test.ts +5 -18
- package/src/storage/schema/entities/__tests/SyncStateTests.test.ts +5 -26
- package/src/storage/schema/entities/__tests/TransactionTests.test.ts +12 -48
- package/src/storage/schema/entities/__tests/TxLabelMapTests.test.ts +4 -22
- package/src/storage/schema/entities/__tests/TxLabelTests.test.ts +2 -10
- package/src/storage/schema/entities/__tests/stampLogTests.test.ts +3 -10
- package/src/storage/schema/entities/__tests/usersTests.test.ts +4 -7
- package/src/storage/schema/tables/TableSettings.ts +1 -3
- package/src/storage/sync/StorageMySQLDojoReader.ts +47 -148
- package/src/utility/ScriptTemplateBRC29.ts +2 -11
- package/src/utility/stampLog.ts +2 -6
- package/src/utility/tscProofToMerklePath.ts +1 -4
- package/src/utility/utilityHelpers.buffer.ts +3 -12
- package/src/utility/utilityHelpers.ts +14 -49
- package/test/Wallet/StorageClient/storageClient.man.test.ts +2 -8
- package/test/Wallet/action/internalizeAction.a.test.ts +8 -23
- package/test/Wallet/certificate/acquireCertificate.test.ts +10 -24
- package/test/Wallet/certificate/listCertificates.test.ts +8 -18
- package/test/Wallet/get/getHeaderForHeight.test.ts +4 -15
- package/test/Wallet/get/getHeight.test.ts +2 -6
- package/test/Wallet/get/getKnownTxids.test.ts +1 -5
- package/test/Wallet/get/getNetwork.test.ts +1 -2
- package/test/Wallet/get/getVersion.test.ts +1 -2
- package/test/Wallet/live/walletLive.man.test.ts +14 -41
- package/test/Wallet/local/localWallet.man.test.ts +45 -102
- package/test/Wallet/specOps/specOps.man.test.ts +4 -13
- package/test/Wallet/support/janitor.man.test.ts +2 -7
- package/test/Wallet/sync/Wallet.updateWalletLegacyTestData.man.test.ts +11 -34
- package/test/Wallet/sync/setActive.test.ts +75 -61
- package/test/checkDB.ts +2 -8
- package/test/examples/backup.man.test.ts +2 -9
- package/test/examples/pushdrop.test.ts +7 -20
- package/test/monitor/Monitor.test.ts +33 -87
- package/test/services/Services.test.ts +8 -19
- package/test/storage/KnexMigrations.test.ts +3 -18
- package/test/storage/StorageMySQLDojoReader.man.test.ts +4 -15
- package/test/storage/count.test.ts +7 -24
- package/test/storage/find.test.ts +7 -29
- package/test/storage/findLegacy.test.ts +2 -5
- package/test/storage/insert.test.ts +3 -19
- package/test/storage/update.test.ts +47 -179
- package/test/storage/update2.test.ts +54 -176
- package/test/utils/TestUtilsWalletStorage.ts +139 -372
- package/test/wallet/action/abortAction.test.ts +4 -12
- package/test/wallet/action/createAction.test.ts +4 -14
- package/test/wallet/action/createAction2.test.ts +74 -208
- package/test/wallet/action/createActionToGenerateBeefs.man.test.ts +8 -11
- package/test/wallet/action/internalizeAction.test.ts +20 -72
- package/test/wallet/action/relinquishOutput.test.ts +3 -9
- package/test/wallet/list/listActions.test.ts +2 -9
- package/test/wallet/list/listActions2.test.ts +8 -34
- package/test/wallet/list/listCertificates.test.ts +5 -16
- package/test/wallet/list/listOutputs.test.ts +15 -54
- package/test/wallet/sync/Wallet.sync.test.ts +18 -49
|
@@ -22,18 +22,11 @@ describe('generateChange tests', () => {
|
|
|
22
22
|
{ satoshis: 2, lockingScriptLength: 25 }
|
|
23
23
|
]
|
|
24
24
|
}
|
|
25
|
-
const availableChange: GenerateChangeSdkChangeInput[] = [
|
|
26
|
-
...defAvailableChange()
|
|
27
|
-
]
|
|
25
|
+
const availableChange: GenerateChangeSdkChangeInput[] = [...defAvailableChange()]
|
|
28
26
|
|
|
29
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
30
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
27
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
31
28
|
|
|
32
|
-
const r = await generateChangeSdk(
|
|
33
|
-
params,
|
|
34
|
-
allocateChangeInput,
|
|
35
|
-
releaseChangeInput
|
|
36
|
-
)
|
|
29
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
37
30
|
expect(JSON.stringify(r)).toBe(
|
|
38
31
|
'{"allocatedChangeInputs":[{"satoshis":6323,"outputId":15005,"spendable":false}],"changeOutputs":[{"satoshis":1608,"lockingScriptLength":25}],"size":1739330,"fee":3479,"satsPerKb":2}'
|
|
39
32
|
)
|
|
@@ -48,19 +41,12 @@ describe('generateChange tests', () => {
|
|
|
48
41
|
{ satoshis: 2, lockingScriptLength: 25 }
|
|
49
42
|
]
|
|
50
43
|
}
|
|
51
|
-
const availableChange: GenerateChangeSdkChangeInput[] = [
|
|
52
|
-
...defAvailableChange()
|
|
53
|
-
]
|
|
44
|
+
const availableChange: GenerateChangeSdkChangeInput[] = [...defAvailableChange()]
|
|
54
45
|
availableChange[5].satoshis = 4715
|
|
55
46
|
|
|
56
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
57
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
47
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
58
48
|
|
|
59
|
-
const r = await generateChangeSdk(
|
|
60
|
-
params,
|
|
61
|
-
allocateChangeInput,
|
|
62
|
-
releaseChangeInput
|
|
63
|
-
)
|
|
49
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
64
50
|
expect(JSON.stringify(r)).toBe(
|
|
65
51
|
'{"allocatedChangeInputs":[{"satoshis":4715,"outputId":15027,"spendable":false}],"changeOutputs":[],"size":1739296,"fee":3479,"satsPerKb":2}'
|
|
66
52
|
)
|
|
@@ -75,19 +61,12 @@ describe('generateChange tests', () => {
|
|
|
75
61
|
{ satoshis: 200, lockingScriptLength: 25 }
|
|
76
62
|
]
|
|
77
63
|
}
|
|
78
|
-
const availableChange: GenerateChangeSdkChangeInput[] = [
|
|
79
|
-
...defAvailableChange()
|
|
80
|
-
]
|
|
64
|
+
const availableChange: GenerateChangeSdkChangeInput[] = [...defAvailableChange()]
|
|
81
65
|
availableChange[5].satoshis = 4715
|
|
82
66
|
|
|
83
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
84
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
67
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
85
68
|
|
|
86
|
-
const r = await generateChangeSdk(
|
|
87
|
-
params,
|
|
88
|
-
allocateChangeInput,
|
|
89
|
-
releaseChangeInput
|
|
90
|
-
)
|
|
69
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
91
70
|
expect(JSON.stringify(r)).toBe(
|
|
92
71
|
'{"allocatedChangeInputs":[{"satoshis":1575097,"outputId":15101,"spendable":false}],"changeOutputs":[{"satoshis":908230,"lockingScriptLength":25}],"size":432,"fee":1,"satsPerKb":2}'
|
|
93
72
|
)
|
|
@@ -115,14 +94,9 @@ describe('generateChange tests', () => {
|
|
|
115
94
|
{ satoshis: 1000, outputId: 14178 }
|
|
116
95
|
]
|
|
117
96
|
|
|
118
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
119
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
97
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
120
98
|
|
|
121
|
-
const r = await generateChangeSdk(
|
|
122
|
-
params,
|
|
123
|
-
allocateChangeInput,
|
|
124
|
-
releaseChangeInput
|
|
125
|
-
)
|
|
99
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
126
100
|
expect(JSON.stringify(r)).toBe(
|
|
127
101
|
'{"allocatedChangeInputs":[{"satoshis":535280,"outputId":14146,"spendable":false},{"satoshis":160865,"outputId":14142,"spendable":false}],"changeOutputs":[{"satoshis":29277,"lockingScriptLength":25}],"size":580,"fee":2,"satsPerKb":2}'
|
|
128
102
|
)
|
|
@@ -138,18 +112,11 @@ describe('generateChange tests', () => {
|
|
|
138
112
|
],
|
|
139
113
|
targetNetCount: 4
|
|
140
114
|
}
|
|
141
|
-
const availableChange: GenerateChangeSdkChangeInput[] = [
|
|
142
|
-
...defAvailableChange()
|
|
143
|
-
]
|
|
115
|
+
const availableChange: GenerateChangeSdkChangeInput[] = [...defAvailableChange()]
|
|
144
116
|
|
|
145
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
146
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
117
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
147
118
|
|
|
148
|
-
const r = await generateChangeSdk(
|
|
149
|
-
params,
|
|
150
|
-
allocateChangeInput,
|
|
151
|
-
releaseChangeInput
|
|
152
|
-
)
|
|
119
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
153
120
|
expect(JSON.stringify(r)).toBe(
|
|
154
121
|
'{"allocatedChangeInputs":[{"satoshis":10735,"outputId":15106,"spendable":false}],"changeOutputs":[{"satoshis":1237,"lockingScriptLength":25},{"satoshis":1334,"lockingScriptLength":25},{"satoshis":1369,"lockingScriptLength":25},{"satoshis":1008,"lockingScriptLength":25},{"satoshis":1072,"lockingScriptLength":25}],"size":1739466,"fee":3479,"satsPerKb":2}'
|
|
155
122
|
)
|
|
@@ -165,11 +132,9 @@ describe('generateChange tests', () => {
|
|
|
165
132
|
],
|
|
166
133
|
targetNetCount: 4
|
|
167
134
|
}
|
|
168
|
-
const availableChange: GenerateChangeSdkChangeInput[] =
|
|
169
|
-
defAvailableChange().slice(1, 4)
|
|
135
|
+
const availableChange: GenerateChangeSdkChangeInput[] = defAvailableChange().slice(1, 4)
|
|
170
136
|
|
|
171
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
172
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
137
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
173
138
|
|
|
174
139
|
expectToThrowWERR(sdk.WERR_INSUFFICIENT_FUNDS, () =>
|
|
175
140
|
generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
@@ -187,8 +152,7 @@ describe('generateChange tests', () => {
|
|
|
187
152
|
}
|
|
188
153
|
const availableChange: GenerateChangeSdkChangeInput[] = []
|
|
189
154
|
|
|
190
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
191
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
155
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
192
156
|
|
|
193
157
|
expectToThrowWERR(sdk.WERR_INSUFFICIENT_FUNDS, () =>
|
|
194
158
|
generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
@@ -204,17 +168,11 @@ describe('generateChange tests', () => {
|
|
|
204
168
|
],
|
|
205
169
|
targetNetCount: 4
|
|
206
170
|
}
|
|
207
|
-
const availableChange: GenerateChangeSdkChangeInput[] =
|
|
208
|
-
defAvailableChange().slice(1, 4)
|
|
171
|
+
const availableChange: GenerateChangeSdkChangeInput[] = defAvailableChange().slice(1, 4)
|
|
209
172
|
|
|
210
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
211
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
173
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
212
174
|
|
|
213
|
-
const r = await generateChangeSdk(
|
|
214
|
-
params,
|
|
215
|
-
allocateChangeInput,
|
|
216
|
-
releaseChangeInput
|
|
217
|
-
)
|
|
175
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
218
176
|
expect(JSON.stringify(r)).toBe(
|
|
219
177
|
'{"allocatedChangeInputs":[{"satoshis":1004,"outputId":15011,"spendable":false},{"satoshis":1000,"outputId":15017,"spendable":false},{"satoshis":1000,"outputId":15013,"spendable":false}],"changeOutputs":[{"satoshis":688,"lockingScriptLength":25},{"satoshis":1000,"lockingScriptLength":25}],"size":39658,"fee":80,"satsPerKb":2}'
|
|
220
178
|
)
|
|
@@ -231,17 +189,11 @@ describe('generateChange tests', () => {
|
|
|
231
189
|
feeModel: { value: 5, model: 'sat/kb' },
|
|
232
190
|
targetNetCount: 4
|
|
233
191
|
}
|
|
234
|
-
const availableChange: GenerateChangeSdkChangeInput[] =
|
|
235
|
-
defAvailableChange().slice(1, 4)
|
|
192
|
+
const availableChange: GenerateChangeSdkChangeInput[] = defAvailableChange().slice(1, 4)
|
|
236
193
|
|
|
237
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
238
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
194
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
239
195
|
|
|
240
|
-
const r = await generateChangeSdk(
|
|
241
|
-
params,
|
|
242
|
-
allocateChangeInput,
|
|
243
|
-
releaseChangeInput
|
|
244
|
-
)
|
|
196
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
245
197
|
expect(JSON.stringify(r)).toBe(
|
|
246
198
|
'{"allocatedChangeInputs":[{"satoshis":1004,"outputId":15011,"spendable":false},{"satoshis":1000,"outputId":15017,"spendable":false},{"satoshis":1000,"outputId":15013,"spendable":false}],"changeOutputs":[{"satoshis":569,"lockingScriptLength":25},{"satoshis":1000,"lockingScriptLength":25}],"size":39658,"fee":199,"satsPerKb":5}'
|
|
247
199
|
)
|
|
@@ -258,17 +210,11 @@ describe('generateChange tests', () => {
|
|
|
258
210
|
feeModel: { value: 1, model: 'sat/kb' },
|
|
259
211
|
targetNetCount: 4
|
|
260
212
|
}
|
|
261
|
-
const availableChange: GenerateChangeSdkChangeInput[] =
|
|
262
|
-
defAvailableChange().slice(1, 4)
|
|
213
|
+
const availableChange: GenerateChangeSdkChangeInput[] = defAvailableChange().slice(1, 4)
|
|
263
214
|
|
|
264
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
265
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
215
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
266
216
|
|
|
267
|
-
const r = await generateChangeSdk(
|
|
268
|
-
params,
|
|
269
|
-
allocateChangeInput,
|
|
270
|
-
releaseChangeInput
|
|
271
|
-
)
|
|
217
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
272
218
|
expect(JSON.stringify(r)).toBe(
|
|
273
219
|
'{"allocatedChangeInputs":[{"satoshis":1004,"outputId":15011,"spendable":false},{"satoshis":1000,"outputId":15017,"spendable":false},{"satoshis":1000,"outputId":15013,"spendable":false}],"changeOutputs":[{"satoshis":728,"lockingScriptLength":25},{"satoshis":1000,"lockingScriptLength":25}],"size":39658,"fee":40,"satsPerKb":1}'
|
|
274
220
|
)
|
|
@@ -285,18 +231,11 @@ describe('generateChange tests', () => {
|
|
|
285
231
|
],
|
|
286
232
|
targetNetCount: 4
|
|
287
233
|
}
|
|
288
|
-
const availableChange: GenerateChangeSdkChangeInput[] = [
|
|
289
|
-
...defAvailableChange()
|
|
290
|
-
]
|
|
234
|
+
const availableChange: GenerateChangeSdkChangeInput[] = [...defAvailableChange()]
|
|
291
235
|
|
|
292
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
293
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
236
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
294
237
|
|
|
295
|
-
const r = await generateChangeSdk(
|
|
296
|
-
params,
|
|
297
|
-
allocateChangeInput,
|
|
298
|
-
releaseChangeInput
|
|
299
|
-
)
|
|
238
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
300
239
|
expect(JSON.stringify(r)).toBe(
|
|
301
240
|
'{"allocatedChangeInputs":[{"satoshis":10735,"outputId":15106,"spendable":false}],"changeOutputs":[{"satoshis":1526,"lockingScriptLength":25},{"satoshis":1738,"lockingScriptLength":25},{"satoshis":1816,"lockingScriptLength":25},{"satoshis":1016,"lockingScriptLength":25},{"satoshis":1157,"lockingScriptLength":25}],"size":1739549,"fee":3480,"satsPerKb":2}'
|
|
302
241
|
)
|
|
@@ -313,18 +252,11 @@ describe('generateChange tests', () => {
|
|
|
313
252
|
],
|
|
314
253
|
targetNetCount: 4
|
|
315
254
|
}
|
|
316
|
-
const availableChange: GenerateChangeSdkChangeInput[] = [
|
|
317
|
-
...defAvailableChange()
|
|
318
|
-
]
|
|
255
|
+
const availableChange: GenerateChangeSdkChangeInput[] = [...defAvailableChange()]
|
|
319
256
|
|
|
320
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
321
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
257
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
322
258
|
|
|
323
|
-
const r = await generateChangeSdk(
|
|
324
|
-
params,
|
|
325
|
-
allocateChangeInput,
|
|
326
|
-
releaseChangeInput
|
|
327
|
-
)
|
|
259
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
328
260
|
expect(JSON.stringify(r)).toBe(
|
|
329
261
|
'{"allocatedChangeInputs":[{"satoshis":10735,"outputId":15106,"spendable":false}],"changeOutputs":[{"satoshis":1526,"lockingScriptLength":25},{"satoshis":1738,"lockingScriptLength":25},{"satoshis":1816,"lockingScriptLength":25},{"satoshis":1016,"lockingScriptLength":25},{"satoshis":1157,"lockingScriptLength":25}],"size":1739749,"fee":3480,"satsPerKb":2}'
|
|
330
262
|
)
|
|
@@ -336,18 +268,11 @@ describe('generateChange tests', () => {
|
|
|
336
268
|
...defParams,
|
|
337
269
|
fixedInputs: [{ satoshis: 1001, unlockingScriptLength: 73 }]
|
|
338
270
|
}
|
|
339
|
-
const availableChange: GenerateChangeSdkChangeInput[] = [
|
|
340
|
-
...defAvailableChange()
|
|
341
|
-
]
|
|
271
|
+
const availableChange: GenerateChangeSdkChangeInput[] = [...defAvailableChange()]
|
|
342
272
|
|
|
343
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
344
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
273
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
345
274
|
|
|
346
|
-
const r = await generateChangeSdk(
|
|
347
|
-
params,
|
|
348
|
-
allocateChangeInput,
|
|
349
|
-
releaseChangeInput
|
|
350
|
-
)
|
|
275
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
351
276
|
expect(JSON.stringify(r)).toBe(
|
|
352
277
|
'{"allocatedChangeInputs":[],"changeOutputs":[{"satoshis":1000,"lockingScriptLength":25}],"size":158,"fee":1,"satsPerKb":2}'
|
|
353
278
|
)
|
|
@@ -361,18 +286,11 @@ describe('generateChange tests', () => {
|
|
|
361
286
|
fixedOutputs: [],
|
|
362
287
|
targetNetCount: 4
|
|
363
288
|
}
|
|
364
|
-
const availableChange: GenerateChangeSdkChangeInput[] = [
|
|
365
|
-
...defAvailableChange()
|
|
366
|
-
]
|
|
289
|
+
const availableChange: GenerateChangeSdkChangeInput[] = [...defAvailableChange()]
|
|
367
290
|
|
|
368
|
-
const { allocateChangeInput, releaseChangeInput, getLog } =
|
|
369
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
291
|
+
const { allocateChangeInput, releaseChangeInput, getLog } = generateChangeSdkMakeStorage(availableChange)
|
|
370
292
|
|
|
371
|
-
const r = await generateChangeSdk(
|
|
372
|
-
params,
|
|
373
|
-
allocateChangeInput,
|
|
374
|
-
releaseChangeInput
|
|
375
|
-
)
|
|
293
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
376
294
|
//console.log(getLog())
|
|
377
295
|
expect(JSON.stringify(r)).toBe(
|
|
378
296
|
'{"allocatedChangeInputs":[{"satoshis":6323,"outputId":15005,"spendable":false}],"changeOutputs":[{"satoshis":1597,"lockingScriptLength":25},{"satoshis":1837,"lockingScriptLength":25},{"satoshis":1925,"lockingScriptLength":25},{"satoshis":1019,"lockingScriptLength":25},{"satoshis":1178,"lockingScriptLength":25}],"size":411,"fee":1,"satsPerKb":2}'
|
|
@@ -387,18 +305,11 @@ describe('generateChange tests', () => {
|
|
|
387
305
|
fixedOutputs: [],
|
|
388
306
|
targetNetCount: 4
|
|
389
307
|
}
|
|
390
|
-
const availableChange: GenerateChangeSdkChangeInput[] = [
|
|
391
|
-
...defAvailableChange()
|
|
392
|
-
]
|
|
308
|
+
const availableChange: GenerateChangeSdkChangeInput[] = [...defAvailableChange()]
|
|
393
309
|
|
|
394
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
395
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
310
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
396
311
|
|
|
397
|
-
const r = await generateChangeSdk(
|
|
398
|
-
params,
|
|
399
|
-
allocateChangeInput,
|
|
400
|
-
releaseChangeInput
|
|
401
|
-
)
|
|
312
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
402
313
|
expect(JSON.stringify(r)).toBe(
|
|
403
314
|
'{"allocatedChangeInputs":[{"satoshis":6323,"outputId":15005,"spendable":false}],"changeOutputs":[{"satoshis":1309,"lockingScriptLength":25},{"satoshis":1433,"lockingScriptLength":25},{"satoshis":1478,"lockingScriptLength":25},{"satoshis":1009,"lockingScriptLength":25},{"satoshis":1093,"lockingScriptLength":25}],"size":328,"fee":1,"satsPerKb":2}'
|
|
404
315
|
)
|
|
@@ -427,14 +338,9 @@ describe('generateChange tests', () => {
|
|
|
427
338
|
{ satoshis: 1073, outputId: 16026 }
|
|
428
339
|
]
|
|
429
340
|
|
|
430
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
431
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
341
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
432
342
|
|
|
433
|
-
const r = await generateChangeSdk(
|
|
434
|
-
params,
|
|
435
|
-
allocateChangeInput,
|
|
436
|
-
releaseChangeInput
|
|
437
|
-
)
|
|
343
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
438
344
|
expect(JSON.stringify(r)).toBe(
|
|
439
345
|
'{"allocatedChangeInputs":[{"satoshis":474866,"outputId":15332,"spendable":false}],"changeOutputs":[{"satoshis":165863,"lockingScriptLength":25}],"size":433,"fee":1,"satsPerKb":2}'
|
|
440
346
|
)
|
|
@@ -1031,18 +937,11 @@ describe('generateChange tests', () => {
|
|
|
1031
937
|
}
|
|
1032
938
|
]) {
|
|
1033
939
|
const params: GenerateChangeSdkParams = { ...d.p }
|
|
1034
|
-
const availableChange: GenerateChangeSdkChangeInput[] = [
|
|
1035
|
-
...d.availableChange
|
|
1036
|
-
]
|
|
940
|
+
const availableChange: GenerateChangeSdkChangeInput[] = [...d.availableChange]
|
|
1037
941
|
|
|
1038
|
-
const { allocateChangeInput, releaseChangeInput } =
|
|
1039
|
-
generateChangeSdkMakeStorage(availableChange)
|
|
942
|
+
const { allocateChangeInput, releaseChangeInput } = generateChangeSdkMakeStorage(availableChange)
|
|
1040
943
|
|
|
1041
|
-
const r = await generateChangeSdk(
|
|
1042
|
-
params,
|
|
1043
|
-
allocateChangeInput,
|
|
1044
|
-
releaseChangeInput
|
|
1045
|
-
)
|
|
944
|
+
const r = await generateChangeSdk(params, allocateChangeInput, releaseChangeInput)
|
|
1046
945
|
expect(JSON.stringify(r)).toBe(er)
|
|
1047
946
|
expectTransactionSize(params, r)
|
|
1048
947
|
}
|
|
@@ -1050,10 +949,7 @@ describe('generateChange tests', () => {
|
|
|
1050
949
|
})
|
|
1051
950
|
|
|
1052
951
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1053
|
-
async function expectToThrowWERR<R>(
|
|
1054
|
-
expectedClass: new (...args: any[]) => any,
|
|
1055
|
-
fn: () => Promise<R>
|
|
1056
|
-
): Promise<void> {
|
|
952
|
+
async function expectToThrowWERR<R>(expectedClass: new (...args: any[]) => any, fn: () => Promise<R>): Promise<void> {
|
|
1057
953
|
try {
|
|
1058
954
|
await fn()
|
|
1059
955
|
} catch (eu: unknown) {
|
|
@@ -1065,25 +961,18 @@ async function expectToThrowWERR<R>(
|
|
|
1065
961
|
throw new Error(`${expectedClass.name} was not thrown`)
|
|
1066
962
|
}
|
|
1067
963
|
|
|
1068
|
-
function makeTransaction(
|
|
1069
|
-
params: GenerateChangeSdkParams,
|
|
1070
|
-
results: GenerateChangeSdkResult
|
|
1071
|
-
): BsvTransaction {
|
|
964
|
+
function makeTransaction(params: GenerateChangeSdkParams, results: GenerateChangeSdkResult): BsvTransaction {
|
|
1072
965
|
const tx = new BsvTransaction()
|
|
1073
966
|
for (const i of params.fixedInputs) {
|
|
1074
967
|
tx.inputs.push({
|
|
1075
|
-
unlockingScript: Script.fromBinary(
|
|
1076
|
-
Array(i.unlockingScriptLength).fill(0)
|
|
1077
|
-
),
|
|
968
|
+
unlockingScript: Script.fromBinary(Array(i.unlockingScriptLength).fill(0)),
|
|
1078
969
|
sourceOutputIndex: 0,
|
|
1079
970
|
sourceTXID: '00'.repeat(32)
|
|
1080
971
|
})
|
|
1081
972
|
}
|
|
1082
973
|
for (const i of results.allocatedChangeInputs) {
|
|
1083
974
|
tx.inputs.push({
|
|
1084
|
-
unlockingScript: Script.fromBinary(
|
|
1085
|
-
Array(params.changeUnlockingScriptLength).fill(0)
|
|
1086
|
-
),
|
|
975
|
+
unlockingScript: Script.fromBinary(Array(params.changeUnlockingScriptLength).fill(0)),
|
|
1087
976
|
sourceOutputIndex: 0,
|
|
1088
977
|
sourceTXID: '00'.repeat(32)
|
|
1089
978
|
})
|
|
@@ -1103,16 +992,10 @@ function makeTransaction(
|
|
|
1103
992
|
return tx
|
|
1104
993
|
}
|
|
1105
994
|
|
|
1106
|
-
function expectTransactionSize(
|
|
1107
|
-
params: GenerateChangeSdkParams,
|
|
1108
|
-
results: GenerateChangeSdkResult
|
|
1109
|
-
) {
|
|
995
|
+
function expectTransactionSize(params: GenerateChangeSdkParams, results: GenerateChangeSdkResult) {
|
|
1110
996
|
const tx = makeTransaction(params, results)
|
|
1111
997
|
const size = tx.toBinary().length
|
|
1112
|
-
if (size !== results.size)
|
|
1113
|
-
throw new sdk.WERR_INTERNAL(
|
|
1114
|
-
`expectTransaction actual ${size} expected ${results.size}`
|
|
1115
|
-
)
|
|
998
|
+
if (size !== results.size) throw new sdk.WERR_INTERNAL(`expectTransaction actual ${size} expected ${results.size}`)
|
|
1116
999
|
}
|
|
1117
1000
|
|
|
1118
1001
|
const defParams: GenerateChangeSdkParams = {
|
|
@@ -1139,5 +1022,4 @@ const _defAvailableChange: GenerateChangeSdkChangeInput[] = [
|
|
|
1139
1022
|
{ satoshis: 3377, outputId: 15104 },
|
|
1140
1023
|
{ satoshis: 10735, outputId: 15106 }
|
|
1141
1024
|
]
|
|
1142
|
-
const defAvailableChange = (): GenerateChangeSdkChangeInput[] =>
|
|
1143
|
-
JSON.parse(JSON.stringify(_defAvailableChange))
|
|
1025
|
+
const defAvailableChange = (): GenerateChangeSdkChangeInput[] => JSON.parse(JSON.stringify(_defAvailableChange))
|
|
@@ -1,31 +1,20 @@
|
|
|
1
1
|
export const randomValsUsed1 = [
|
|
2
|
-
0.3145996888882596, 0.45719282963580565, 0.8555247776688835,
|
|
3
|
-
0.
|
|
4
|
-
0.
|
|
5
|
-
0.
|
|
6
|
-
0.
|
|
7
|
-
0.
|
|
8
|
-
0.
|
|
9
|
-
0.
|
|
10
|
-
0.
|
|
11
|
-
0.
|
|
12
|
-
0.
|
|
13
|
-
0.
|
|
14
|
-
0.
|
|
15
|
-
0.
|
|
16
|
-
0.
|
|
17
|
-
0.
|
|
18
|
-
0.
|
|
19
|
-
0.9959411956291628, 0.42200495673071803, 0.9174433944732405,
|
|
20
|
-
0.7758897322425307, 0.3453529493770806, 0.15520421082199776,
|
|
21
|
-
0.4883039767344435, 0.45987000169072356, 0.9146194455087437,
|
|
22
|
-
0.33743694585941686, 0.2725130478399085, 0.7058681732538112,
|
|
23
|
-
0.18975119489481007, 0.46483529505143717, 0.5650362982181798,
|
|
24
|
-
0.48841275156927955, 0.8012266835493618, 0.2952784976832741,
|
|
25
|
-
0.9823977685364349, 0.45683871241931007, 0.6008021097728846,
|
|
26
|
-
0.1405802039681765, 0.6968599380515865, 0.3016840411555928,
|
|
27
|
-
0.8652691542976458, 0.5733994909626297, 0.288364714649364,
|
|
28
|
-
0.28178697025295385, 0.02893432926139794, 0.6179746775758665,
|
|
29
|
-
0.35219485471542944, 0.97651703347549, 0.04012334579632282,
|
|
2
|
+
0.3145996888882596, 0.45719282963580565, 0.8555247776688835, 0.2649974738591665, 0.7381622959747749,
|
|
3
|
+
0.1945477495382142, 0.5032123391994598, 0.02861436749749835, 0.7999598138479351, 0.8979243255586506,
|
|
4
|
+
0.9034507043487272, 0.4280218402928029, 0.6358932443326806, 0.30173236243173585, 0.3598078135029954,
|
|
5
|
+
0.9870248947111777, 0.2675337664781172, 0.6050300757408575, 0.7391162382709817, 0.8727502788995358,
|
|
6
|
+
0.36799576712472737, 0.6604956576157504, 0.1702104642469362, 0.7797698104303106, 0.08655953134554961,
|
|
7
|
+
0.2847318171161146, 0.07534328732698126, 0.9009525464087105, 0.5264602243751411, 0.866180150709631,
|
|
8
|
+
0.5813059581773354, 0.3348084822567492, 0.5668720381665056, 0.03296403051210928, 0.8225656781470101,
|
|
9
|
+
0.5321943190815006, 0.7708306957508375, 0.13417838069050525, 0.7763632653423949, 0.08160553045351926,
|
|
10
|
+
0.45497831351884677, 0.13467302343886756, 0.21261951092011078, 0.04372527326966513, 0.7939708066933404,
|
|
11
|
+
0.31542646439897015, 0.23821328607534542, 0.29505981550698746, 0.436696157907251, 0.8692456197556584,
|
|
12
|
+
0.6851392295747836, 0.4203746637055583, 0.9959411956291628, 0.42200495673071803, 0.9174433944732405,
|
|
13
|
+
0.7758897322425307, 0.3453529493770806, 0.15520421082199776, 0.4883039767344435, 0.45987000169072356,
|
|
14
|
+
0.9146194455087437, 0.33743694585941686, 0.2725130478399085, 0.7058681732538112, 0.18975119489481007,
|
|
15
|
+
0.46483529505143717, 0.5650362982181798, 0.48841275156927955, 0.8012266835493618, 0.2952784976832741,
|
|
16
|
+
0.9823977685364349, 0.45683871241931007, 0.6008021097728846, 0.1405802039681765, 0.6968599380515865,
|
|
17
|
+
0.3016840411555928, 0.8652691542976458, 0.5733994909626297, 0.288364714649364, 0.28178697025295385,
|
|
18
|
+
0.02893432926139794, 0.6179746775758665, 0.35219485471542944, 0.97651703347549, 0.04012334579632282,
|
|
30
19
|
0.3582381346512069, 0.5756199598871186, 0.11453606927098825
|
|
31
20
|
]
|
|
@@ -48,11 +48,7 @@ export async function attemptToPostReqsToNetwork(
|
|
|
48
48
|
}
|
|
49
49
|
if (rb.attempts > 10) {
|
|
50
50
|
badReq = true
|
|
51
|
-
rb.addHistoryNote({
|
|
52
|
-
what: 'postToNetworkError',
|
|
53
|
-
error: 'too many attempts',
|
|
54
|
-
attempts: rb.attempts
|
|
55
|
-
})
|
|
51
|
+
rb.addHistoryNote({ what: 'postToNetworkError', error: 'too many attempts', attempts: rb.attempts })
|
|
56
52
|
}
|
|
57
53
|
|
|
58
54
|
// Accumulate batch beefs.
|
|
@@ -61,15 +57,9 @@ export async function attemptToPostReqsToNetwork(
|
|
|
61
57
|
await storage.mergeReqToBeefToShareExternally(rb.api, r.beef, [], trx)
|
|
62
58
|
} catch (eu: unknown) {
|
|
63
59
|
const e = sdk.WalletError.fromUnknown(eu)
|
|
64
|
-
if (
|
|
65
|
-
e.code === 'WERR_INVALID_PARAMETER' &&
|
|
66
|
-
(e as sdk.WERR_INVALID_PARAMETER).parameter === 'txid'
|
|
67
|
-
) {
|
|
60
|
+
if (e.code === 'WERR_INVALID_PARAMETER' && (e as sdk.WERR_INVALID_PARAMETER).parameter === 'txid') {
|
|
68
61
|
badReq = true
|
|
69
|
-
rb.addHistoryNote({
|
|
70
|
-
what: 'postToNetworkError',
|
|
71
|
-
error: 'depends on unknown txid'
|
|
72
|
-
})
|
|
62
|
+
rb.addHistoryNote({ what: 'postToNetworkError', error: 'depends on unknown txid' })
|
|
73
63
|
}
|
|
74
64
|
}
|
|
75
65
|
}
|
|
@@ -101,7 +91,7 @@ export async function attemptToPostReqsToNetwork(
|
|
|
101
91
|
if (r) notes.push(...(r.notes || []))
|
|
102
92
|
}
|
|
103
93
|
for (const n of notes) {
|
|
104
|
-
req.addHistoryNote(n
|
|
94
|
+
req.addHistoryNote(n)
|
|
105
95
|
}
|
|
106
96
|
await req.updateStorageDynamicProperties(storage)
|
|
107
97
|
await req.refreshFromStorage(storage)
|
|
@@ -114,10 +104,7 @@ export async function attemptToPostReqsToNetwork(
|
|
|
114
104
|
} else {
|
|
115
105
|
for (const d of r.details) {
|
|
116
106
|
const pbrft = r.pbr.txidResults.find(t => t.txid === d.txid)
|
|
117
|
-
if (!pbrft)
|
|
118
|
-
throw new sdk.WERR_INTERNAL(
|
|
119
|
-
`postBeef service failed to return result for txid ${d.txid}`
|
|
120
|
-
)
|
|
107
|
+
if (!pbrft) throw new sdk.WERR_INTERNAL(`postBeef service failed to return result for txid ${d.txid}`)
|
|
121
108
|
d.pbrft = pbrft
|
|
122
109
|
if (r.pbr.data) d.data = JSON.stringify(r.pbr.data)
|
|
123
110
|
if (r.pbr.error) d.error = r.pbr.error.code
|
|
@@ -127,12 +114,7 @@ export async function attemptToPostReqsToNetwork(
|
|
|
127
114
|
// If any txid result fails, the aggregate result is error.
|
|
128
115
|
r.status = 'error'
|
|
129
116
|
d.req.attempts++
|
|
130
|
-
d.req.addHistoryNote({
|
|
131
|
-
what: 'postToNetwork',
|
|
132
|
-
name: r.pbr.name,
|
|
133
|
-
status: d.status,
|
|
134
|
-
error: d.error
|
|
135
|
-
})
|
|
117
|
+
d.req.addHistoryNote({ what: 'postToNetwork', name: r.pbr.name, status: d.status, error: d.error })
|
|
136
118
|
}
|
|
137
119
|
}
|
|
138
120
|
|
|
@@ -142,11 +124,7 @@ export async function attemptToPostReqsToNetwork(
|
|
|
142
124
|
// For each req, three outcomes are handled:
|
|
143
125
|
// 1. success: req status from unprocessed(!isDelayed)/sending(isDelayed) to unmined, tx from sending to unproven
|
|
144
126
|
if (d.status === 'success') {
|
|
145
|
-
if (
|
|
146
|
-
['nosend', 'unprocessed', 'sending', 'unsent'].indexOf(d.req.status) >
|
|
147
|
-
-1
|
|
148
|
-
)
|
|
149
|
-
newReqStatus = 'unmined'
|
|
127
|
+
if (['nosend', 'unprocessed', 'sending', 'unsent'].indexOf(d.req.status) > -1) newReqStatus = 'unmined'
|
|
150
128
|
newTxStatus = 'unproven' // but only if sending
|
|
151
129
|
}
|
|
152
130
|
// 2. doubleSpend: req status to doubleSpend, tx to failed
|
|
@@ -168,10 +146,7 @@ export async function attemptToPostReqsToNetwork(
|
|
|
168
146
|
await d.req.updateStorageDynamicProperties(storage)
|
|
169
147
|
if (newTxStatus) {
|
|
170
148
|
const ids = d.req.notify.transactionIds
|
|
171
|
-
if (!ids || ids.length < 1)
|
|
172
|
-
throw new sdk.WERR_INTERNAL(
|
|
173
|
-
`req must have at least one transactionId to notify`
|
|
174
|
-
)
|
|
149
|
+
if (!ids || ids.length < 1) throw new sdk.WERR_INTERNAL(`req must have at least one transactionId to notify`)
|
|
175
150
|
for (const id of ids) {
|
|
176
151
|
await storage.updateTransactionStatus(newTxStatus, id)
|
|
177
152
|
}
|
|
@@ -183,10 +158,7 @@ export async function attemptToPostReqsToNetwork(
|
|
|
183
158
|
return r
|
|
184
159
|
}
|
|
185
160
|
|
|
186
|
-
export type PostReqsToNetworkDetailsStatus =
|
|
187
|
-
| 'success'
|
|
188
|
-
| 'doubleSpend'
|
|
189
|
-
| 'unknown'
|
|
161
|
+
export type PostReqsToNetworkDetailsStatus = 'success' | 'doubleSpend' | 'unknown'
|
|
190
162
|
|
|
191
163
|
export interface PostReqsToNetworkDetails {
|
|
192
164
|
txid: string
|