react-native-zcash 0.6.10 → 0.6.11
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/CHANGELOG.md +4 -0
- package/android/src/main/assets/co.electriccoin.zcash/checkpoint/mainnet/2460000.json +8 -0
- package/ios/ZCashLightClientKit/Block/CompactBlockProcessor.swift +937 -425
- package/ios/ZCashLightClientKit/Block/Download/BlockDownloader.swift +17 -31
- package/ios/ZCashLightClientKit/Block/Download/BlockDownloaderService.swift +2 -2
- package/ios/ZCashLightClientKit/Block/Enhance/BlockEnhancer.swift +15 -46
- package/ios/ZCashLightClientKit/Block/FetchUnspentTxOutputs/UTXOFetcher.swift +15 -4
- package/ios/ZCashLightClientKit/Block/FilesystemStorage/FSCompactBlockRepository.swift +4 -4
- package/ios/ZCashLightClientKit/Block/Scan/BlockScanner.swift +35 -10
- package/ios/ZCashLightClientKit/Block/Utils/InternalSyncProgress.swift +200 -0
- package/ios/ZCashLightClientKit/Block/Validate/BlockValidator.swift +51 -0
- package/ios/ZCashLightClientKit/ClosureSynchronizer.swift +2 -1
- package/ios/ZCashLightClientKit/CombineSynchronizer.swift +5 -2
- package/ios/ZCashLightClientKit/Constants/ZcashSDK.swift +26 -13
- package/ios/ZCashLightClientKit/DAO/BlockDao.swift +112 -0
- package/ios/ZCashLightClientKit/DAO/TransactionDao.swift +42 -40
- package/ios/ZCashLightClientKit/DAO/UnspentTransactionOutputDao.swift +4 -13
- package/ios/ZCashLightClientKit/Entity/AccountEntity.swift +0 -9
- package/ios/ZCashLightClientKit/Entity/BlockProgress.swift +24 -0
- package/ios/ZCashLightClientKit/Entity/TransactionEntity.swift +10 -7
- package/ios/ZCashLightClientKit/Error/Sourcery/generateErrorCode.sh +1 -1
- package/ios/ZCashLightClientKit/Error/ZcashError.swift +12 -121
- package/ios/ZCashLightClientKit/Error/ZcashErrorCode.swift +5 -43
- package/ios/ZCashLightClientKit/Error/ZcashErrorCodeDefinition.swift +6 -72
- package/ios/ZCashLightClientKit/Initializer.swift +26 -47
- package/ios/ZCashLightClientKit/Metrics/SDKMetrics.swift +12 -0
- package/ios/ZCashLightClientKit/Model/Checkpoint.swift +0 -12
- package/ios/ZCashLightClientKit/Modules/Service/GRPC/LightWalletGRPCService.swift +0 -15
- package/ios/ZCashLightClientKit/Modules/Service/GRPC/ProtoBuf/compact_formats.pb.swift +46 -150
- package/ios/ZCashLightClientKit/Modules/Service/GRPC/ProtoBuf/proto/compact_formats.proto +16 -30
- package/ios/ZCashLightClientKit/Modules/Service/GRPC/ProtoBuf/proto/service.proto +6 -32
- package/ios/ZCashLightClientKit/Modules/Service/GRPC/ProtoBuf/service.grpc.swift +22 -259
- package/ios/ZCashLightClientKit/Modules/Service/GRPC/ProtoBuf/service.pb.swift +7 -193
- package/ios/ZCashLightClientKit/Modules/Service/LightWalletService.swift +0 -8
- package/ios/ZCashLightClientKit/Providers/LatestBlocksDataProvider.swift +28 -18
- package/ios/ZCashLightClientKit/Repository/CompactBlockRepository.swift +1 -1
- package/ios/ZCashLightClientKit/Repository/TransactionRepository.swift +6 -2
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2460000.json +8 -0
- package/ios/ZCashLightClientKit/Rust/ZcashRustBackend.swift +158 -293
- package/ios/ZCashLightClientKit/Rust/ZcashRustBackendWelding.swift +64 -58
- package/ios/ZCashLightClientKit/Rust/zcashlc.h +513 -619
- package/ios/ZCashLightClientKit/Synchronizer/ClosureSDKSynchronizer.swift +8 -2
- package/ios/ZCashLightClientKit/Synchronizer/CombineSDKSynchronizer.swift +15 -3
- package/ios/ZCashLightClientKit/Synchronizer/Dependencies.swift +30 -11
- package/ios/ZCashLightClientKit/Synchronizer/SDKSynchronizer.swift +50 -41
- package/ios/ZCashLightClientKit/Synchronizer.swift +65 -51
- package/ios/ZCashLightClientKit/Transaction/TransactionEncoder.swift +2 -2
- package/ios/ZCashLightClientKit/Transaction/WalletTransactionEncoder.swift +7 -7
- package/ios/ZCashLightClientKit/Utils/OSLogger.swift +3 -3
- package/ios/libzcashlc.xcframework/Info.plist +0 -4
- package/ios/libzcashlc.xcframework/ios-arm64/libzcashlc.a +0 -0
- package/ios/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.a +0 -0
- package/package.json +1 -1
- package/ios/ZCashLightClientKit/Block/Actions/Action.swift +0 -98
- package/ios/ZCashLightClientKit/Block/Actions/ClearAlreadyScannedBlocksAction.swift +0 -35
- package/ios/ZCashLightClientKit/Block/Actions/ClearCacheAction.swift +0 -30
- package/ios/ZCashLightClientKit/Block/Actions/DownloadAction.swift +0 -67
- package/ios/ZCashLightClientKit/Block/Actions/EnhanceAction.swift +0 -97
- package/ios/ZCashLightClientKit/Block/Actions/FetchUTXOsAction.swift +0 -33
- package/ios/ZCashLightClientKit/Block/Actions/MigrateLegacyCacheDBAction.swift +0 -70
- package/ios/ZCashLightClientKit/Block/Actions/ProcessSuggestedScanRangesAction.swift +0 -60
- package/ios/ZCashLightClientKit/Block/Actions/RewindAction.swift +0 -48
- package/ios/ZCashLightClientKit/Block/Actions/SaplingParamsAction.swift +0 -33
- package/ios/ZCashLightClientKit/Block/Actions/ScanAction.swift +0 -95
- package/ios/ZCashLightClientKit/Block/Actions/UpdateChainTipAction.swift +0 -55
- package/ios/ZCashLightClientKit/Block/Actions/UpdateSubtreeRootsAction.swift +0 -58
- package/ios/ZCashLightClientKit/Block/Actions/ValidateServerAction.swift +0 -60
- package/ios/ZCashLightClientKit/Block/Utils/CompactBlockProgress.swift +0 -24
- package/ios/ZCashLightClientKit/Block/Utils/SyncControlData.swift +0 -25
- package/ios/ZCashLightClientKit/Extensions/Bool+ToData.swift +0 -15
- package/ios/ZCashLightClientKit/Extensions/Data+ToOtherTypes.swift +0 -18
- package/ios/ZCashLightClientKit/Extensions/Int+ToData.swift +0 -15
- package/ios/ZCashLightClientKit/Model/ScanProgress.swift +0 -29
- package/ios/ZCashLightClientKit/Model/ScanRange.swift +0 -31
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2092500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2095000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2097500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2102500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2105000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2107500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2112500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2115000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2117500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2122500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2125000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2127500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2132500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2135000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2137500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2142500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2145000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2147500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2152500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2155000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2157500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2162500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2165000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2167500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2172500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2175000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2177500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2182500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2185000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2187500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2192500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2195000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2197500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2202500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2205000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2207500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2212500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2215000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2217500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2222500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2225000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2227500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2232500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2235000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2237500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2242500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2245000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2247500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2252500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2255000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2257500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2262500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2265000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2267500.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2350000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2360000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2370000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2380000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2390000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2400000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2410000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2420000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2430000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2440000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2450000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2460000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2470000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2480000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2490000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2500000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2510000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2520000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2530000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2540000.json +0 -8
- package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2550000.json +0 -8
- package/ios/ZCashLightClientKit/Utils/ZcashFileManager.swift +0 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated using Sourcery 2.0.
|
|
1
|
+
// Generated using Sourcery 2.0.2 — https://github.com/krzysztofzablocki/Sourcery
|
|
2
2
|
// DO NOT EDIT
|
|
3
3
|
|
|
4
4
|
/*
|
|
@@ -11,9 +11,8 @@ error originates. And it can help with debugging.
|
|
|
11
11
|
import Foundation
|
|
12
12
|
|
|
13
13
|
public enum ZcashError: Equatable, Error {
|
|
14
|
-
/// Some error happened that is not handled as `ZcashError`.
|
|
15
|
-
///
|
|
16
|
-
/// If this is the case, use `toZcashError()` extension of Error. This helper avoids to end up with Optional handling.
|
|
14
|
+
/// Some error happened that is not handled as `ZcashError`.
|
|
15
|
+
/// Use case is to map `any Error`(in the apps for example) to this one so it can be assured only `ZcashError` is floating through apps.
|
|
17
16
|
/// ZUNKWN0001
|
|
18
17
|
case unknown(_ error: Error)
|
|
19
18
|
/// Updating of paths in `Initilizer` according to alias failed.
|
|
@@ -22,15 +21,6 @@ public enum ZcashError: Equatable, Error {
|
|
|
22
21
|
/// Alias used to create this instance of the `SDKSynchronizer` is already used by other instance.
|
|
23
22
|
/// ZINIT0002
|
|
24
23
|
case initializerAliasAlreadyInUse(_ alias: ZcashSynchronizerAlias)
|
|
25
|
-
/// Object on disk at `generalStorageURL` path exists. But it file not directory.
|
|
26
|
-
/// ZINIT0003
|
|
27
|
-
case initializerGeneralStorageExistsButIsFile(_ generalStorageURL: URL)
|
|
28
|
-
/// Can't create directory at `generalStorageURL` path.
|
|
29
|
-
/// ZINIT0004
|
|
30
|
-
case initializerGeneralStorageCantCreate(_ generalStorageURL: URL, _ error: Error)
|
|
31
|
-
/// Can't set `isExcludedFromBackup` flag to `generalStorageURL`.
|
|
32
|
-
/// ZINIT0005
|
|
33
|
-
case initializerCantSetNoBackupFlagToGeneralStorageURL(_ generalStorageURL: URL, _ error: Error)
|
|
34
24
|
/// Unknown GRPC Service error
|
|
35
25
|
/// ZSRVC0001
|
|
36
26
|
case serviceUnknownError(_ error: Error)
|
|
@@ -58,9 +48,6 @@ public enum ZcashError: Equatable, Error {
|
|
|
58
48
|
/// LightWalletService.blockStream failed.
|
|
59
49
|
/// ZSRVC0000
|
|
60
50
|
case serviceBlockStreamFailed(_ error: LightWalletServiceError)
|
|
61
|
-
/// LightWalletService.getSubtreeRoots failed.
|
|
62
|
-
/// ZSRVC0009
|
|
63
|
-
case serviceSubtreeRootsStreamFailed(_ error: LightWalletServiceError)
|
|
64
51
|
/// SimpleConnectionProvider init of Connection failed.
|
|
65
52
|
/// ZSCPC0001
|
|
66
53
|
case simpleConnectionProvider(_ error: Error)
|
|
@@ -97,18 +84,10 @@ public enum ZcashError: Equatable, Error {
|
|
|
97
84
|
/// - `sqliteError` is error produced by SQLite library.
|
|
98
85
|
/// ZBDAO0004
|
|
99
86
|
case blockDAOLatestBlock(_ sqliteError: Error)
|
|
100
|
-
/// Fetched
|
|
87
|
+
/// Fetched latesxt block information from DB but can't decode them.
|
|
101
88
|
/// - `error` is decoding error.
|
|
102
89
|
/// ZBDAO0005
|
|
103
90
|
case blockDAOLatestBlockCantDecode(_ error: Error)
|
|
104
|
-
/// SQLite query failed when fetching the first unenhanced block from the database.
|
|
105
|
-
/// - `sqliteError` is error produced by SQLite library.
|
|
106
|
-
/// ZBDAO0006
|
|
107
|
-
case blockDAOFirstUnenhancedHeight(_ sqliteError: Error)
|
|
108
|
-
/// Fetched unenhanced block information from DB but can't decode them.
|
|
109
|
-
/// - `error` is decoding error.
|
|
110
|
-
/// ZBDAO0007
|
|
111
|
-
case blockDAOFirstUnenhancedCantDecode(_ error: Error)
|
|
112
91
|
/// Error from rust layer when calling ZcashRustBackend.createAccount
|
|
113
92
|
/// - `rustError` contains error generated by the rust layer.
|
|
114
93
|
/// ZRUST0001
|
|
@@ -223,6 +202,10 @@ public enum ZcashError: Equatable, Error {
|
|
|
223
202
|
/// - `rustError` contains error generated by the rust layer.
|
|
224
203
|
/// ZRUST0030
|
|
225
204
|
case rustValidateCombinedChainValidationFailed(_ rustError: String)
|
|
205
|
+
/// Error from rust layer which means that combined chain isn't valid.
|
|
206
|
+
/// - `upperBound` is the height of the highest invalid block (on the assumption that the highest block in the cache database is correct).
|
|
207
|
+
/// ZRUST0031
|
|
208
|
+
case rustValidateCombinedChainInvalidChain(_ upperBound: Int32)
|
|
226
209
|
/// Error from rust layer when calling ZcashRustBackend.rewindToHeight
|
|
227
210
|
/// - `rustError` contains error generated by the rust layer.
|
|
228
211
|
/// ZRUST0032
|
|
@@ -275,48 +258,6 @@ public enum ZcashError: Equatable, Error {
|
|
|
275
258
|
/// Transparent receiver generated by rust layer is invalid when calling ZcashRustBackend.getTransparentReceiver
|
|
276
259
|
/// ZRUST0045
|
|
277
260
|
case rustGetTransparentReceiverInvalidReceiver
|
|
278
|
-
/// Unable to allocate memory required to write blocks when calling ZcashRustBackend.putSaplingSubtreeRoots
|
|
279
|
-
/// sourcery: code="ZRUST0046"
|
|
280
|
-
/// ZRUST0046
|
|
281
|
-
case rustPutSaplingSubtreeRootsAllocationProblem
|
|
282
|
-
/// Error from rust layer when calling ZcashRustBackend.putSaplingSubtreeRoots
|
|
283
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
284
|
-
/// sourcery: code="ZRUST0047"
|
|
285
|
-
/// ZRUST0047
|
|
286
|
-
case rustPutSaplingSubtreeRoots(_ rustError: String)
|
|
287
|
-
/// Error from rust layer when calling ZcashRustBackend.updateChainTip
|
|
288
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
289
|
-
/// sourcery: code="ZRUST0048"
|
|
290
|
-
/// ZRUST0048
|
|
291
|
-
case rustUpdateChainTip(_ rustError: String)
|
|
292
|
-
/// Error from rust layer when calling ZcashRustBackend.suggestScanRanges
|
|
293
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
294
|
-
/// sourcery: code="ZRUST0049"
|
|
295
|
-
/// ZRUST0049
|
|
296
|
-
case rustSuggestScanRanges(_ rustError: String)
|
|
297
|
-
/// Invalid transaction ID length when calling ZcashRustBackend.getMemo. txId must be 32 bytes.
|
|
298
|
-
/// ZRUST0050
|
|
299
|
-
case rustGetMemoInvalidTxIdLength
|
|
300
|
-
/// Error from rust layer when calling ZcashRustBackend.getScanProgress
|
|
301
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
302
|
-
/// ZRUST0051
|
|
303
|
-
case rustGetScanProgress(_ rustError: String)
|
|
304
|
-
/// Error from rust layer when calling ZcashRustBackend.fullyScannedHeight
|
|
305
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
306
|
-
/// ZRUST0052
|
|
307
|
-
case rustFullyScannedHeight(_ rustError: String)
|
|
308
|
-
/// Error from rust layer when calling ZcashRustBackend.maxScannedHeight
|
|
309
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
310
|
-
/// ZRUST0053
|
|
311
|
-
case rustMaxScannedHeight(_ rustError: String)
|
|
312
|
-
/// Error from rust layer when calling ZcashRustBackend.latestCachedBlockHeight
|
|
313
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
314
|
-
/// ZRUST0054
|
|
315
|
-
case rustLatestCachedBlockHeight(_ rustError: String)
|
|
316
|
-
/// Rust layer's call ZcashRustBackend.getScanProgress returned values that after computation are outside of allowed range 0-100%.
|
|
317
|
-
/// - `progress` value reported
|
|
318
|
-
/// ZRUST0055
|
|
319
|
-
case rustScanProgressOutOfRange(_ progress: String)
|
|
320
261
|
/// SQLite query failed when fetching all accounts from the database.
|
|
321
262
|
/// - `sqliteError` is error produced by SQLite library.
|
|
322
263
|
/// ZADAO0001
|
|
@@ -550,18 +491,6 @@ public enum ZcashError: Equatable, Error {
|
|
|
550
491
|
/// Consensus BranchIDs don't match this is probably an API or programming error.
|
|
551
492
|
/// ZCBPEO0017
|
|
552
493
|
case compactBlockProcessorConsensusBranchID
|
|
553
|
-
/// Rewind of DownloadBlockAction failed as no action is possible to unwrapp.
|
|
554
|
-
/// ZCBPEO0018
|
|
555
|
-
case compactBlockProcessorDownloadBlockActionRewind
|
|
556
|
-
/// Put sapling subtree roots to the DB failed.
|
|
557
|
-
/// ZCBPEO0019
|
|
558
|
-
case compactBlockProcessorPutSaplingSubtreeRoots(_ error: Error)
|
|
559
|
-
/// Getting the `lastScannedHeight` failed but it's supposed to always provide some value.
|
|
560
|
-
/// ZCBPEO0020
|
|
561
|
-
case compactBlockProcessorLastScannedHeight
|
|
562
|
-
/// Getting the `supportedSyncAlgorithm` failed but it's supposed to always provide some value.
|
|
563
|
-
/// ZCBPEO0021
|
|
564
|
-
case compactBlockProcessorSupportedSyncAlgorithm
|
|
565
494
|
/// The synchronizer is unprepared.
|
|
566
495
|
/// ZSYNCO0001
|
|
567
496
|
case synchronizerNotPrepared
|
|
@@ -583,12 +512,9 @@ public enum ZcashError: Equatable, Error {
|
|
|
583
512
|
|
|
584
513
|
public var message: String {
|
|
585
514
|
switch self {
|
|
586
|
-
case .unknown: return "Some error happened that is not handled as `ZcashError`.
|
|
515
|
+
case .unknown: return "Some error happened that is not handled as `ZcashError`."
|
|
587
516
|
case .initializerCantUpdateURLWithAlias: return "Updating of paths in `Initilizer` according to alias failed."
|
|
588
517
|
case .initializerAliasAlreadyInUse: return "Alias used to create this instance of the `SDKSynchronizer` is already used by other instance."
|
|
589
|
-
case .initializerGeneralStorageExistsButIsFile: return "Object on disk at `generalStorageURL` path exists. But it file not directory."
|
|
590
|
-
case .initializerGeneralStorageCantCreate: return "Can't create directory at `generalStorageURL` path."
|
|
591
|
-
case .initializerCantSetNoBackupFlagToGeneralStorageURL: return "Can't set `isExcludedFromBackup` flag to `generalStorageURL`."
|
|
592
518
|
case .serviceUnknownError: return "Unknown GRPC Service error"
|
|
593
519
|
case .serviceGetInfoFailed: return "LightWalletService.getInfo failed."
|
|
594
520
|
case .serviceLatestBlockFailed: return "LightWalletService.latestBlock failed."
|
|
@@ -598,7 +524,6 @@ public enum ZcashError: Equatable, Error {
|
|
|
598
524
|
case .serviceFetchTransactionFailed: return "LightWalletService.fetchTransaction failed."
|
|
599
525
|
case .serviceFetchUTXOsFailed: return "LightWalletService.fetchUTXOs failed."
|
|
600
526
|
case .serviceBlockStreamFailed: return "LightWalletService.blockStream failed."
|
|
601
|
-
case .serviceSubtreeRootsStreamFailed: return "LightWalletService.getSubtreeRoots failed."
|
|
602
527
|
case .simpleConnectionProvider: return "SimpleConnectionProvider init of Connection failed."
|
|
603
528
|
case .saplingParamsInvalidSpendParams: return "Downloaded file with sapling spending parameters isn't valid."
|
|
604
529
|
case .saplingParamsInvalidOutputParams: return "Downloaded file with sapling output parameters isn't valid."
|
|
@@ -608,9 +533,7 @@ public enum ZcashError: Equatable, Error {
|
|
|
608
533
|
case .blockDAOCantDecode: return "Fetched block information from DB but can't decode them."
|
|
609
534
|
case .blockDAOLatestBlockHeight: return "SQLite query failed when fetching height of the latest block from the database."
|
|
610
535
|
case .blockDAOLatestBlock: return "SQLite query failed when fetching the latest block from the database."
|
|
611
|
-
case .blockDAOLatestBlockCantDecode: return "Fetched
|
|
612
|
-
case .blockDAOFirstUnenhancedHeight: return "SQLite query failed when fetching the first unenhanced block from the database."
|
|
613
|
-
case .blockDAOFirstUnenhancedCantDecode: return "Fetched unenhanced block information from DB but can't decode them."
|
|
536
|
+
case .blockDAOLatestBlockCantDecode: return "Fetched latesxt block information from DB but can't decode them."
|
|
614
537
|
case .rustCreateAccount: return "Error from rust layer when calling ZcashRustBackend.createAccount"
|
|
615
538
|
case .rustCreateToAddress: return "Error from rust layer when calling ZcashRustBackend.createToAddress"
|
|
616
539
|
case .rustDecryptAndStoreTransaction: return "Error from rust layer when calling ZcashRustBackend.decryptAndStoreTransaction"
|
|
@@ -641,6 +564,7 @@ public enum ZcashError: Equatable, Error {
|
|
|
641
564
|
case .rustListTransparentReceiversInvalidAddress: return "Transparent receiver generated by rust layer is invalid when calling ZcashRustBackend.listTransparentReceivers"
|
|
642
565
|
case .rustPutUnspentTransparentOutput: return "Error from rust layer when calling ZcashRustBackend.putUnspentTransparentOutput"
|
|
643
566
|
case .rustValidateCombinedChainValidationFailed: return "Error unrelated to chain validity from rust layer when calling ZcashRustBackend.validateCombinedChain"
|
|
567
|
+
case .rustValidateCombinedChainInvalidChain: return "Error from rust layer which means that combined chain isn't valid."
|
|
644
568
|
case .rustRewindToHeight: return "Error from rust layer when calling ZcashRustBackend.rewindToHeight"
|
|
645
569
|
case .rustRewindCacheToHeight: return "Error from rust layer when calling ZcashRustBackend.rewindCacheToHeight"
|
|
646
570
|
case .rustScanBlocks: return "Error from rust layer when calling ZcashRustBackend.scanBlocks"
|
|
@@ -655,16 +579,6 @@ public enum ZcashError: Equatable, Error {
|
|
|
655
579
|
case .rustGetSaplingReceiverInvalidReceiver: return "Sapling receiver generated by rust layer is invalid when calling ZcashRustBackend.getSaplingReceiver"
|
|
656
580
|
case .rustGetTransparentReceiverInvalidAddress: return "Error from rust layer when calling ZcashRustBackend.getTransparentReceiver"
|
|
657
581
|
case .rustGetTransparentReceiverInvalidReceiver: return "Transparent receiver generated by rust layer is invalid when calling ZcashRustBackend.getTransparentReceiver"
|
|
658
|
-
case .rustPutSaplingSubtreeRootsAllocationProblem: return "Unable to allocate memory required to write blocks when calling ZcashRustBackend.putSaplingSubtreeRoots"
|
|
659
|
-
case .rustPutSaplingSubtreeRoots: return "Error from rust layer when calling ZcashRustBackend.putSaplingSubtreeRoots"
|
|
660
|
-
case .rustUpdateChainTip: return "Error from rust layer when calling ZcashRustBackend.updateChainTip"
|
|
661
|
-
case .rustSuggestScanRanges: return "Error from rust layer when calling ZcashRustBackend.suggestScanRanges"
|
|
662
|
-
case .rustGetMemoInvalidTxIdLength: return "Invalid transaction ID length when calling ZcashRustBackend.getMemo. txId must be 32 bytes."
|
|
663
|
-
case .rustGetScanProgress: return "Error from rust layer when calling ZcashRustBackend.getScanProgress"
|
|
664
|
-
case .rustFullyScannedHeight: return "Error from rust layer when calling ZcashRustBackend.fullyScannedHeight"
|
|
665
|
-
case .rustMaxScannedHeight: return "Error from rust layer when calling ZcashRustBackend.maxScannedHeight"
|
|
666
|
-
case .rustLatestCachedBlockHeight: return "Error from rust layer when calling ZcashRustBackend.latestCachedBlockHeight"
|
|
667
|
-
case .rustScanProgressOutOfRange: return "Rust layer's call ZcashRustBackend.getScanProgress returned values that after computation are outside of allowed range 0-100%."
|
|
668
582
|
case .accountDAOGetAll: return "SQLite query failed when fetching all accounts from the database."
|
|
669
583
|
case .accountDAOGetAllCantDecode: return "Fetched accounts from SQLite but can't decode them."
|
|
670
584
|
case .accountDAOFindBy: return "SQLite query failed when seaching for accounts in the database."
|
|
@@ -739,10 +653,6 @@ public enum ZcashError: Equatable, Error {
|
|
|
739
653
|
case .compactBlockProcessorCacheDbMigrationFailedToDeleteLegacyDb: return "Deletion of readable file at the provided URL failed."
|
|
740
654
|
case .compactBlockProcessorChainName: return "Chain name does not match. Expected either 'test' or 'main'. This is probably an API or programming error."
|
|
741
655
|
case .compactBlockProcessorConsensusBranchID: return "Consensus BranchIDs don't match this is probably an API or programming error."
|
|
742
|
-
case .compactBlockProcessorDownloadBlockActionRewind: return "Rewind of DownloadBlockAction failed as no action is possible to unwrapp."
|
|
743
|
-
case .compactBlockProcessorPutSaplingSubtreeRoots: return "Put sapling subtree roots to the DB failed."
|
|
744
|
-
case .compactBlockProcessorLastScannedHeight: return "Getting the `lastScannedHeight` failed but it's supposed to always provide some value."
|
|
745
|
-
case .compactBlockProcessorSupportedSyncAlgorithm: return "Getting the `supportedSyncAlgorithm` failed but it's supposed to always provide some value."
|
|
746
656
|
case .synchronizerNotPrepared: return "The synchronizer is unprepared."
|
|
747
657
|
case .synchronizerSendMemoToTransparentAddress: return "Memos can't be sent to transparent addresses."
|
|
748
658
|
case .synchronizerShieldFundsInsuficientTransparentFunds: return "There is not enough transparent funds to cover fee for the shielding."
|
|
@@ -757,9 +667,6 @@ public enum ZcashError: Equatable, Error {
|
|
|
757
667
|
case .unknown: return .unknown
|
|
758
668
|
case .initializerCantUpdateURLWithAlias: return .initializerCantUpdateURLWithAlias
|
|
759
669
|
case .initializerAliasAlreadyInUse: return .initializerAliasAlreadyInUse
|
|
760
|
-
case .initializerGeneralStorageExistsButIsFile: return .initializerGeneralStorageExistsButIsFile
|
|
761
|
-
case .initializerGeneralStorageCantCreate: return .initializerGeneralStorageCantCreate
|
|
762
|
-
case .initializerCantSetNoBackupFlagToGeneralStorageURL: return .initializerCantSetNoBackupFlagToGeneralStorageURL
|
|
763
670
|
case .serviceUnknownError: return .serviceUnknownError
|
|
764
671
|
case .serviceGetInfoFailed: return .serviceGetInfoFailed
|
|
765
672
|
case .serviceLatestBlockFailed: return .serviceLatestBlockFailed
|
|
@@ -769,7 +676,6 @@ public enum ZcashError: Equatable, Error {
|
|
|
769
676
|
case .serviceFetchTransactionFailed: return .serviceFetchTransactionFailed
|
|
770
677
|
case .serviceFetchUTXOsFailed: return .serviceFetchUTXOsFailed
|
|
771
678
|
case .serviceBlockStreamFailed: return .serviceBlockStreamFailed
|
|
772
|
-
case .serviceSubtreeRootsStreamFailed: return .serviceSubtreeRootsStreamFailed
|
|
773
679
|
case .simpleConnectionProvider: return .simpleConnectionProvider
|
|
774
680
|
case .saplingParamsInvalidSpendParams: return .saplingParamsInvalidSpendParams
|
|
775
681
|
case .saplingParamsInvalidOutputParams: return .saplingParamsInvalidOutputParams
|
|
@@ -780,8 +686,6 @@ public enum ZcashError: Equatable, Error {
|
|
|
780
686
|
case .blockDAOLatestBlockHeight: return .blockDAOLatestBlockHeight
|
|
781
687
|
case .blockDAOLatestBlock: return .blockDAOLatestBlock
|
|
782
688
|
case .blockDAOLatestBlockCantDecode: return .blockDAOLatestBlockCantDecode
|
|
783
|
-
case .blockDAOFirstUnenhancedHeight: return .blockDAOFirstUnenhancedHeight
|
|
784
|
-
case .blockDAOFirstUnenhancedCantDecode: return .blockDAOFirstUnenhancedCantDecode
|
|
785
689
|
case .rustCreateAccount: return .rustCreateAccount
|
|
786
690
|
case .rustCreateToAddress: return .rustCreateToAddress
|
|
787
691
|
case .rustDecryptAndStoreTransaction: return .rustDecryptAndStoreTransaction
|
|
@@ -812,6 +716,7 @@ public enum ZcashError: Equatable, Error {
|
|
|
812
716
|
case .rustListTransparentReceiversInvalidAddress: return .rustListTransparentReceiversInvalidAddress
|
|
813
717
|
case .rustPutUnspentTransparentOutput: return .rustPutUnspentTransparentOutput
|
|
814
718
|
case .rustValidateCombinedChainValidationFailed: return .rustValidateCombinedChainValidationFailed
|
|
719
|
+
case .rustValidateCombinedChainInvalidChain: return .rustValidateCombinedChainInvalidChain
|
|
815
720
|
case .rustRewindToHeight: return .rustRewindToHeight
|
|
816
721
|
case .rustRewindCacheToHeight: return .rustRewindCacheToHeight
|
|
817
722
|
case .rustScanBlocks: return .rustScanBlocks
|
|
@@ -826,16 +731,6 @@ public enum ZcashError: Equatable, Error {
|
|
|
826
731
|
case .rustGetSaplingReceiverInvalidReceiver: return .rustGetSaplingReceiverInvalidReceiver
|
|
827
732
|
case .rustGetTransparentReceiverInvalidAddress: return .rustGetTransparentReceiverInvalidAddress
|
|
828
733
|
case .rustGetTransparentReceiverInvalidReceiver: return .rustGetTransparentReceiverInvalidReceiver
|
|
829
|
-
case .rustPutSaplingSubtreeRootsAllocationProblem: return .rustPutSaplingSubtreeRootsAllocationProblem
|
|
830
|
-
case .rustPutSaplingSubtreeRoots: return .rustPutSaplingSubtreeRoots
|
|
831
|
-
case .rustUpdateChainTip: return .rustUpdateChainTip
|
|
832
|
-
case .rustSuggestScanRanges: return .rustSuggestScanRanges
|
|
833
|
-
case .rustGetMemoInvalidTxIdLength: return .rustGetMemoInvalidTxIdLength
|
|
834
|
-
case .rustGetScanProgress: return .rustGetScanProgress
|
|
835
|
-
case .rustFullyScannedHeight: return .rustFullyScannedHeight
|
|
836
|
-
case .rustMaxScannedHeight: return .rustMaxScannedHeight
|
|
837
|
-
case .rustLatestCachedBlockHeight: return .rustLatestCachedBlockHeight
|
|
838
|
-
case .rustScanProgressOutOfRange: return .rustScanProgressOutOfRange
|
|
839
734
|
case .accountDAOGetAll: return .accountDAOGetAll
|
|
840
735
|
case .accountDAOGetAllCantDecode: return .accountDAOGetAllCantDecode
|
|
841
736
|
case .accountDAOFindBy: return .accountDAOFindBy
|
|
@@ -910,10 +805,6 @@ public enum ZcashError: Equatable, Error {
|
|
|
910
805
|
case .compactBlockProcessorCacheDbMigrationFailedToDeleteLegacyDb: return .compactBlockProcessorCacheDbMigrationFailedToDeleteLegacyDb
|
|
911
806
|
case .compactBlockProcessorChainName: return .compactBlockProcessorChainName
|
|
912
807
|
case .compactBlockProcessorConsensusBranchID: return .compactBlockProcessorConsensusBranchID
|
|
913
|
-
case .compactBlockProcessorDownloadBlockActionRewind: return .compactBlockProcessorDownloadBlockActionRewind
|
|
914
|
-
case .compactBlockProcessorPutSaplingSubtreeRoots: return .compactBlockProcessorPutSaplingSubtreeRoots
|
|
915
|
-
case .compactBlockProcessorLastScannedHeight: return .compactBlockProcessorLastScannedHeight
|
|
916
|
-
case .compactBlockProcessorSupportedSyncAlgorithm: return .compactBlockProcessorSupportedSyncAlgorithm
|
|
917
808
|
case .synchronizerNotPrepared: return .synchronizerNotPrepared
|
|
918
809
|
case .synchronizerSendMemoToTransparentAddress: return .synchronizerSendMemoToTransparentAddress
|
|
919
810
|
case .synchronizerShieldFundsInsuficientTransparentFunds: return .synchronizerShieldFundsInsuficientTransparentFunds
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated using Sourcery 2.0.
|
|
1
|
+
// Generated using Sourcery 2.0.2 — https://github.com/krzysztofzablocki/Sourcery
|
|
2
2
|
// DO NOT EDIT
|
|
3
3
|
|
|
4
4
|
/*
|
|
@@ -9,18 +9,12 @@ error originates. And it can help with debugging.
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
public enum ZcashErrorCode: String {
|
|
12
|
-
/// Some error happened that is not handled as `ZcashError`.
|
|
12
|
+
/// Some error happened that is not handled as `ZcashError`.
|
|
13
13
|
case unknown = "ZUNKWN0001"
|
|
14
14
|
/// Updating of paths in `Initilizer` according to alias failed.
|
|
15
15
|
case initializerCantUpdateURLWithAlias = "ZINIT0001"
|
|
16
16
|
/// Alias used to create this instance of the `SDKSynchronizer` is already used by other instance.
|
|
17
17
|
case initializerAliasAlreadyInUse = "ZINIT0002"
|
|
18
|
-
/// Object on disk at `generalStorageURL` path exists. But it file not directory.
|
|
19
|
-
case initializerGeneralStorageExistsButIsFile = "ZINIT0003"
|
|
20
|
-
/// Can't create directory at `generalStorageURL` path.
|
|
21
|
-
case initializerGeneralStorageCantCreate = "ZINIT0004"
|
|
22
|
-
/// Can't set `isExcludedFromBackup` flag to `generalStorageURL`.
|
|
23
|
-
case initializerCantSetNoBackupFlagToGeneralStorageURL = "ZINIT0005"
|
|
24
18
|
/// Unknown GRPC Service error
|
|
25
19
|
case serviceUnknownError = "ZSRVC0001"
|
|
26
20
|
/// LightWalletService.getInfo failed.
|
|
@@ -39,8 +33,6 @@ public enum ZcashErrorCode: String {
|
|
|
39
33
|
case serviceFetchUTXOsFailed = "ZSRVC0008"
|
|
40
34
|
/// LightWalletService.blockStream failed.
|
|
41
35
|
case serviceBlockStreamFailed = "ZSRVC0000"
|
|
42
|
-
/// LightWalletService.getSubtreeRoots failed.
|
|
43
|
-
case serviceSubtreeRootsStreamFailed = "ZSRVC0009"
|
|
44
36
|
/// SimpleConnectionProvider init of Connection failed.
|
|
45
37
|
case simpleConnectionProvider = "ZSCPC0001"
|
|
46
38
|
/// Downloaded file with sapling spending parameters isn't valid.
|
|
@@ -59,12 +51,8 @@ public enum ZcashErrorCode: String {
|
|
|
59
51
|
case blockDAOLatestBlockHeight = "ZBDAO0003"
|
|
60
52
|
/// SQLite query failed when fetching the latest block from the database.
|
|
61
53
|
case blockDAOLatestBlock = "ZBDAO0004"
|
|
62
|
-
/// Fetched
|
|
54
|
+
/// Fetched latesxt block information from DB but can't decode them.
|
|
63
55
|
case blockDAOLatestBlockCantDecode = "ZBDAO0005"
|
|
64
|
-
/// SQLite query failed when fetching the first unenhanced block from the database.
|
|
65
|
-
case blockDAOFirstUnenhancedHeight = "ZBDAO0006"
|
|
66
|
-
/// Fetched unenhanced block information from DB but can't decode them.
|
|
67
|
-
case blockDAOFirstUnenhancedCantDecode = "ZBDAO0007"
|
|
68
56
|
/// Error from rust layer when calling ZcashRustBackend.createAccount
|
|
69
57
|
case rustCreateAccount = "ZRUST0001"
|
|
70
58
|
/// Error from rust layer when calling ZcashRustBackend.createToAddress
|
|
@@ -125,6 +113,8 @@ public enum ZcashErrorCode: String {
|
|
|
125
113
|
case rustPutUnspentTransparentOutput = "ZRUST0029"
|
|
126
114
|
/// Error unrelated to chain validity from rust layer when calling ZcashRustBackend.validateCombinedChain
|
|
127
115
|
case rustValidateCombinedChainValidationFailed = "ZRUST0030"
|
|
116
|
+
/// Error from rust layer which means that combined chain isn't valid.
|
|
117
|
+
case rustValidateCombinedChainInvalidChain = "ZRUST0031"
|
|
128
118
|
/// Error from rust layer when calling ZcashRustBackend.rewindToHeight
|
|
129
119
|
case rustRewindToHeight = "ZRUST0032"
|
|
130
120
|
/// Error from rust layer when calling ZcashRustBackend.rewindCacheToHeight
|
|
@@ -153,26 +143,6 @@ public enum ZcashErrorCode: String {
|
|
|
153
143
|
case rustGetTransparentReceiverInvalidAddress = "ZRUST0044"
|
|
154
144
|
/// Transparent receiver generated by rust layer is invalid when calling ZcashRustBackend.getTransparentReceiver
|
|
155
145
|
case rustGetTransparentReceiverInvalidReceiver = "ZRUST0045"
|
|
156
|
-
/// Unable to allocate memory required to write blocks when calling ZcashRustBackend.putSaplingSubtreeRoots
|
|
157
|
-
case rustPutSaplingSubtreeRootsAllocationProblem = "ZRUST0046"
|
|
158
|
-
/// Error from rust layer when calling ZcashRustBackend.putSaplingSubtreeRoots
|
|
159
|
-
case rustPutSaplingSubtreeRoots = "ZRUST0047"
|
|
160
|
-
/// Error from rust layer when calling ZcashRustBackend.updateChainTip
|
|
161
|
-
case rustUpdateChainTip = "ZRUST0048"
|
|
162
|
-
/// Error from rust layer when calling ZcashRustBackend.suggestScanRanges
|
|
163
|
-
case rustSuggestScanRanges = "ZRUST0049"
|
|
164
|
-
/// Invalid transaction ID length when calling ZcashRustBackend.getMemo. txId must be 32 bytes.
|
|
165
|
-
case rustGetMemoInvalidTxIdLength = "ZRUST0050"
|
|
166
|
-
/// Error from rust layer when calling ZcashRustBackend.getScanProgress
|
|
167
|
-
case rustGetScanProgress = "ZRUST0051"
|
|
168
|
-
/// Error from rust layer when calling ZcashRustBackend.fullyScannedHeight
|
|
169
|
-
case rustFullyScannedHeight = "ZRUST0052"
|
|
170
|
-
/// Error from rust layer when calling ZcashRustBackend.maxScannedHeight
|
|
171
|
-
case rustMaxScannedHeight = "ZRUST0053"
|
|
172
|
-
/// Error from rust layer when calling ZcashRustBackend.latestCachedBlockHeight
|
|
173
|
-
case rustLatestCachedBlockHeight = "ZRUST0054"
|
|
174
|
-
/// Rust layer's call ZcashRustBackend.getScanProgress returned values that after computation are outside of allowed range 0-100%.
|
|
175
|
-
case rustScanProgressOutOfRange = "ZRUST0055"
|
|
176
146
|
/// SQLite query failed when fetching all accounts from the database.
|
|
177
147
|
case accountDAOGetAll = "ZADAO0001"
|
|
178
148
|
/// Fetched accounts from SQLite but can't decode them.
|
|
@@ -321,14 +291,6 @@ public enum ZcashErrorCode: String {
|
|
|
321
291
|
case compactBlockProcessorChainName = "ZCBPEO0016"
|
|
322
292
|
/// Consensus BranchIDs don't match this is probably an API or programming error.
|
|
323
293
|
case compactBlockProcessorConsensusBranchID = "ZCBPEO0017"
|
|
324
|
-
/// Rewind of DownloadBlockAction failed as no action is possible to unwrapp.
|
|
325
|
-
case compactBlockProcessorDownloadBlockActionRewind = "ZCBPEO0018"
|
|
326
|
-
/// Put sapling subtree roots to the DB failed.
|
|
327
|
-
case compactBlockProcessorPutSaplingSubtreeRoots = "ZCBPEO0019"
|
|
328
|
-
/// Getting the `lastScannedHeight` failed but it's supposed to always provide some value.
|
|
329
|
-
case compactBlockProcessorLastScannedHeight = "ZCBPEO0020"
|
|
330
|
-
/// Getting the `supportedSyncAlgorithm` failed but it's supposed to always provide some value.
|
|
331
|
-
case compactBlockProcessorSupportedSyncAlgorithm = "ZCBPEO0021"
|
|
332
294
|
/// The synchronizer is unprepared.
|
|
333
295
|
case synchronizerNotPrepared = "ZSYNCO0001"
|
|
334
296
|
/// Memos can't be sent to transparent addresses.
|
|
@@ -38,15 +38,6 @@ enum ZcashErrorDefinition {
|
|
|
38
38
|
/// Alias used to create this instance of the `SDKSynchronizer` is already used by other instance.
|
|
39
39
|
// sourcery: code="ZINIT0002"
|
|
40
40
|
case initializerAliasAlreadyInUse(_ alias: ZcashSynchronizerAlias)
|
|
41
|
-
/// Object on disk at `generalStorageURL` path exists. But it file not directory.
|
|
42
|
-
// sourcery: code="ZINIT0003"
|
|
43
|
-
case initializerGeneralStorageExistsButIsFile(_ generalStorageURL: URL)
|
|
44
|
-
/// Can't create directory at `generalStorageURL` path.
|
|
45
|
-
// sourcery: code="ZINIT0004"
|
|
46
|
-
case initializerGeneralStorageCantCreate(_ generalStorageURL: URL, _ error: Error)
|
|
47
|
-
/// Can't set `isExcludedFromBackup` flag to `generalStorageURL`.
|
|
48
|
-
// sourcery: code="ZINIT0005"
|
|
49
|
-
case initializerCantSetNoBackupFlagToGeneralStorageURL(_ generalStorageURL: URL, _ error: Error)
|
|
50
41
|
|
|
51
42
|
// MARK: - LightWalletService
|
|
52
43
|
|
|
@@ -77,9 +68,6 @@ enum ZcashErrorDefinition {
|
|
|
77
68
|
/// LightWalletService.blockStream failed.
|
|
78
69
|
// sourcery: code="ZSRVC0000"
|
|
79
70
|
case serviceBlockStreamFailed(_ error: LightWalletServiceError)
|
|
80
|
-
/// LightWalletService.getSubtreeRoots failed.
|
|
81
|
-
// sourcery: code="ZSRVC0009"
|
|
82
|
-
case serviceSubtreeRootsStreamFailed(_ error: LightWalletServiceError)
|
|
83
71
|
|
|
84
72
|
// MARK: SQLite connection
|
|
85
73
|
|
|
@@ -125,18 +113,10 @@ enum ZcashErrorDefinition {
|
|
|
125
113
|
/// - `sqliteError` is error produced by SQLite library.
|
|
126
114
|
// sourcery: code="ZBDAO0004"
|
|
127
115
|
case blockDAOLatestBlock(_ sqliteError: Error)
|
|
128
|
-
/// Fetched
|
|
116
|
+
/// Fetched latesxt block information from DB but can't decode them.
|
|
129
117
|
/// - `error` is decoding error.
|
|
130
118
|
// sourcery: code="ZBDAO0005"
|
|
131
119
|
case blockDAOLatestBlockCantDecode(_ error: Error)
|
|
132
|
-
/// SQLite query failed when fetching the first unenhanced block from the database.
|
|
133
|
-
/// - `sqliteError` is error produced by SQLite library.
|
|
134
|
-
// sourcery: code="ZBDAO0006"
|
|
135
|
-
case blockDAOFirstUnenhancedHeight(_ sqliteError: Error)
|
|
136
|
-
/// Fetched unenhanced block information from DB but can't decode them.
|
|
137
|
-
/// - `error` is decoding error.
|
|
138
|
-
// sourcery: code="ZBDAO0007"
|
|
139
|
-
case blockDAOFirstUnenhancedCantDecode(_ error: Error)
|
|
140
120
|
|
|
141
121
|
// MARK: - Rust
|
|
142
122
|
|
|
@@ -254,6 +234,10 @@ enum ZcashErrorDefinition {
|
|
|
254
234
|
/// - `rustError` contains error generated by the rust layer.
|
|
255
235
|
// sourcery: code="ZRUST0030"
|
|
256
236
|
case rustValidateCombinedChainValidationFailed(_ rustError: String)
|
|
237
|
+
/// Error from rust layer which means that combined chain isn't valid.
|
|
238
|
+
/// - `upperBound` is the height of the highest invalid block (on the assumption that the highest block in the cache database is correct).
|
|
239
|
+
// sourcery: code="ZRUST0031"
|
|
240
|
+
case rustValidateCombinedChainInvalidChain(_ upperBound: Int32)
|
|
257
241
|
/// Error from rust layer when calling ZcashRustBackend.rewindToHeight
|
|
258
242
|
/// - `rustError` contains error generated by the rust layer.
|
|
259
243
|
// sourcery: code="ZRUST0032"
|
|
@@ -306,44 +290,6 @@ enum ZcashErrorDefinition {
|
|
|
306
290
|
/// Transparent receiver generated by rust layer is invalid when calling ZcashRustBackend.getTransparentReceiver
|
|
307
291
|
// sourcery: code="ZRUST0045"
|
|
308
292
|
case rustGetTransparentReceiverInvalidReceiver
|
|
309
|
-
/// Unable to allocate memory required to write blocks when calling ZcashRustBackend.putSaplingSubtreeRoots
|
|
310
|
-
/// sourcery: code="ZRUST0046"
|
|
311
|
-
case rustPutSaplingSubtreeRootsAllocationProblem
|
|
312
|
-
/// Error from rust layer when calling ZcashRustBackend.putSaplingSubtreeRoots
|
|
313
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
314
|
-
/// sourcery: code="ZRUST0047"
|
|
315
|
-
case rustPutSaplingSubtreeRoots(_ rustError: String)
|
|
316
|
-
/// Error from rust layer when calling ZcashRustBackend.updateChainTip
|
|
317
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
318
|
-
/// sourcery: code="ZRUST0048"
|
|
319
|
-
case rustUpdateChainTip(_ rustError: String)
|
|
320
|
-
/// Error from rust layer when calling ZcashRustBackend.suggestScanRanges
|
|
321
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
322
|
-
/// sourcery: code="ZRUST0049"
|
|
323
|
-
case rustSuggestScanRanges(_ rustError: String)
|
|
324
|
-
/// Invalid transaction ID length when calling ZcashRustBackend.getMemo. txId must be 32 bytes.
|
|
325
|
-
// sourcery: code="ZRUST0050"
|
|
326
|
-
case rustGetMemoInvalidTxIdLength
|
|
327
|
-
/// Error from rust layer when calling ZcashRustBackend.getScanProgress
|
|
328
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
329
|
-
// sourcery: code="ZRUST0051"
|
|
330
|
-
case rustGetScanProgress(_ rustError: String)
|
|
331
|
-
/// Error from rust layer when calling ZcashRustBackend.fullyScannedHeight
|
|
332
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
333
|
-
// sourcery: code="ZRUST0052"
|
|
334
|
-
case rustFullyScannedHeight(_ rustError: String)
|
|
335
|
-
/// Error from rust layer when calling ZcashRustBackend.maxScannedHeight
|
|
336
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
337
|
-
// sourcery: code="ZRUST0053"
|
|
338
|
-
case rustMaxScannedHeight(_ rustError: String)
|
|
339
|
-
/// Error from rust layer when calling ZcashRustBackend.latestCachedBlockHeight
|
|
340
|
-
/// - `rustError` contains error generated by the rust layer.
|
|
341
|
-
// sourcery: code="ZRUST0054"
|
|
342
|
-
case rustLatestCachedBlockHeight(_ rustError: String)
|
|
343
|
-
/// Rust layer's call ZcashRustBackend.getScanProgress returned values that after computation are outside of allowed range 0-100%.
|
|
344
|
-
/// - `progress` value reported
|
|
345
|
-
// sourcery: code="ZRUST0055"
|
|
346
|
-
case rustScanProgressOutOfRange(_ progress: String)
|
|
347
293
|
|
|
348
294
|
// MARK: - Account DAO
|
|
349
295
|
|
|
@@ -626,19 +572,7 @@ enum ZcashErrorDefinition {
|
|
|
626
572
|
/// Consensus BranchIDs don't match this is probably an API or programming error.
|
|
627
573
|
// sourcery: code="ZCBPEO0017"
|
|
628
574
|
case compactBlockProcessorConsensusBranchID
|
|
629
|
-
|
|
630
|
-
// sourcery: code="ZCBPEO0018"
|
|
631
|
-
case compactBlockProcessorDownloadBlockActionRewind
|
|
632
|
-
/// Put sapling subtree roots to the DB failed.
|
|
633
|
-
// sourcery: code="ZCBPEO0019"
|
|
634
|
-
case compactBlockProcessorPutSaplingSubtreeRoots(_ error: Error)
|
|
635
|
-
/// Getting the `lastScannedHeight` failed but it's supposed to always provide some value.
|
|
636
|
-
// sourcery: code="ZCBPEO0020"
|
|
637
|
-
case compactBlockProcessorLastScannedHeight
|
|
638
|
-
/// Getting the `supportedSyncAlgorithm` failed but it's supposed to always provide some value.
|
|
639
|
-
// sourcery: code="ZCBPEO0021"
|
|
640
|
-
case compactBlockProcessorSupportedSyncAlgorithm
|
|
641
|
-
|
|
575
|
+
|
|
642
576
|
// MARK: - SDKSynchronizer
|
|
643
577
|
|
|
644
578
|
/// The synchronizer is unprepared.
|