react-native-zcash 0.5.0 → 0.6.0

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.
Files changed (156) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +6 -3
  3. package/android/build.gradle +5 -4
  4. package/android/src/main/assets/co.electriccoin.zcash/checkpoint/mainnet/2240000.json +8 -0
  5. package/android/src/main/assets/co.electriccoin.zcash/checkpoint/mainnet/2250000.json +8 -0
  6. package/android/src/main/java/app/edge/rnzcash/RNZcashModule.kt +94 -121
  7. package/ios/RNZcash.m +1 -12
  8. package/ios/RNZcash.swift +119 -152
  9. package/ios/ZCashLightClientKit/Block/Actions/Action.swift +98 -0
  10. package/ios/ZCashLightClientKit/Block/Actions/ClearAlreadyScannedBlocksAction.swift +35 -0
  11. package/ios/ZCashLightClientKit/Block/Actions/ClearCacheAction.swift +30 -0
  12. package/ios/ZCashLightClientKit/Block/Actions/DownloadAction.swift +67 -0
  13. package/ios/ZCashLightClientKit/Block/Actions/EnhanceAction.swift +97 -0
  14. package/ios/ZCashLightClientKit/Block/Actions/FetchUTXOsAction.swift +33 -0
  15. package/ios/ZCashLightClientKit/Block/Actions/MigrateLegacyCacheDBAction.swift +70 -0
  16. package/ios/ZCashLightClientKit/Block/Actions/ProcessSuggestedScanRangesAction.swift +59 -0
  17. package/ios/ZCashLightClientKit/Block/Actions/RewindAction.swift +48 -0
  18. package/ios/ZCashLightClientKit/Block/Actions/SaplingParamsAction.swift +33 -0
  19. package/ios/ZCashLightClientKit/Block/Actions/ScanAction.swift +95 -0
  20. package/ios/ZCashLightClientKit/Block/Actions/UpdateChainTipAction.swift +55 -0
  21. package/ios/ZCashLightClientKit/Block/Actions/UpdateSubtreeRootsAction.swift +58 -0
  22. package/ios/ZCashLightClientKit/Block/Actions/ValidateServerAction.swift +60 -0
  23. package/ios/ZCashLightClientKit/Block/CompactBlockProcessor.swift +421 -937
  24. package/ios/ZCashLightClientKit/Block/Download/BlockDownloader.swift +31 -17
  25. package/ios/ZCashLightClientKit/Block/Download/BlockDownloaderService.swift +2 -2
  26. package/ios/ZCashLightClientKit/Block/Enhance/BlockEnhancer.swift +46 -15
  27. package/ios/ZCashLightClientKit/Block/FetchUnspentTxOutputs/UTXOFetcher.swift +4 -15
  28. package/ios/ZCashLightClientKit/Block/FilesystemStorage/FSCompactBlockRepository.swift +4 -4
  29. package/ios/ZCashLightClientKit/Block/Scan/BlockScanner.swift +10 -35
  30. package/ios/ZCashLightClientKit/Block/Utils/CompactBlockProgress.swift +24 -0
  31. package/ios/ZCashLightClientKit/Block/Utils/SyncControlData.swift +25 -0
  32. package/ios/ZCashLightClientKit/ClosureSynchronizer.swift +1 -2
  33. package/ios/ZCashLightClientKit/CombineSynchronizer.swift +2 -5
  34. package/ios/ZCashLightClientKit/Constants/ZcashSDK.swift +7 -25
  35. package/ios/ZCashLightClientKit/DAO/TransactionDao.swift +40 -42
  36. package/ios/ZCashLightClientKit/DAO/UnspentTransactionOutputDao.swift +13 -4
  37. package/ios/ZCashLightClientKit/Entity/AccountEntity.swift +9 -0
  38. package/ios/ZCashLightClientKit/Entity/TransactionEntity.swift +7 -10
  39. package/ios/ZCashLightClientKit/Error/Sourcery/generateErrorCode.sh +1 -1
  40. package/ios/ZCashLightClientKit/Error/ZcashError.swift +121 -12
  41. package/ios/ZCashLightClientKit/Error/ZcashErrorCode.swift +43 -5
  42. package/ios/ZCashLightClientKit/Error/ZcashErrorCodeDefinition.swift +72 -6
  43. package/ios/ZCashLightClientKit/Extensions/Bool+ToData.swift +15 -0
  44. package/ios/ZCashLightClientKit/Extensions/Data+ToOtherTypes.swift +18 -0
  45. package/ios/ZCashLightClientKit/Extensions/Int+ToData.swift +15 -0
  46. package/ios/ZCashLightClientKit/Initializer.swift +47 -26
  47. package/ios/ZCashLightClientKit/Metrics/SDKMetrics.swift +0 -12
  48. package/ios/ZCashLightClientKit/Model/Checkpoint.swift +12 -0
  49. package/ios/ZCashLightClientKit/Model/ScanProgress.swift +29 -0
  50. package/ios/ZCashLightClientKit/Model/ScanRange.swift +31 -0
  51. package/ios/ZCashLightClientKit/Modules/Service/GRPC/LightWalletGRPCService.swift +15 -0
  52. package/ios/ZCashLightClientKit/Modules/Service/GRPC/ProtoBuf/compact_formats.pb.swift +150 -46
  53. package/ios/ZCashLightClientKit/Modules/Service/GRPC/ProtoBuf/proto/compact_formats.proto +30 -16
  54. package/ios/ZCashLightClientKit/Modules/Service/GRPC/ProtoBuf/proto/service.proto +32 -6
  55. package/ios/ZCashLightClientKit/Modules/Service/GRPC/ProtoBuf/service.grpc.swift +259 -22
  56. package/ios/ZCashLightClientKit/Modules/Service/GRPC/ProtoBuf/service.pb.swift +193 -7
  57. package/ios/ZCashLightClientKit/Modules/Service/LightWalletService.swift +8 -0
  58. package/ios/ZCashLightClientKit/Providers/LatestBlocksDataProvider.swift +18 -28
  59. package/ios/ZCashLightClientKit/Repository/CompactBlockRepository.swift +1 -1
  60. package/ios/ZCashLightClientKit/Repository/TransactionRepository.swift +2 -6
  61. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2092500.json +8 -0
  62. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2095000.json +8 -0
  63. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2097500.json +8 -0
  64. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2102500.json +8 -0
  65. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2105000.json +8 -0
  66. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2107500.json +8 -0
  67. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2112500.json +8 -0
  68. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2115000.json +8 -0
  69. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2117500.json +8 -0
  70. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2122500.json +8 -0
  71. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2125000.json +8 -0
  72. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2127500.json +8 -0
  73. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2132500.json +8 -0
  74. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2135000.json +8 -0
  75. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2137500.json +8 -0
  76. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2142500.json +8 -0
  77. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2145000.json +8 -0
  78. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2147500.json +8 -0
  79. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2152500.json +8 -0
  80. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2155000.json +8 -0
  81. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2157500.json +8 -0
  82. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2162500.json +8 -0
  83. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2165000.json +8 -0
  84. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2167500.json +8 -0
  85. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2172500.json +8 -0
  86. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2175000.json +8 -0
  87. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2177500.json +8 -0
  88. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2182500.json +8 -0
  89. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2185000.json +8 -0
  90. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2187500.json +8 -0
  91. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2192500.json +8 -0
  92. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2195000.json +8 -0
  93. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2197500.json +8 -0
  94. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2202500.json +8 -0
  95. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2205000.json +8 -0
  96. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2207500.json +8 -0
  97. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2212500.json +8 -0
  98. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2215000.json +8 -0
  99. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2217500.json +8 -0
  100. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2222500.json +8 -0
  101. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2225000.json +8 -0
  102. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2227500.json +8 -0
  103. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2230000.json +8 -0
  104. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2232500.json +8 -0
  105. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2235000.json +8 -0
  106. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2237500.json +8 -0
  107. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2240000.json +8 -0
  108. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2242500.json +8 -0
  109. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2245000.json +8 -0
  110. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2247500.json +8 -0
  111. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2250000.json +8 -0
  112. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2350000.json +8 -0
  113. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2360000.json +8 -0
  114. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2370000.json +8 -0
  115. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2380000.json +8 -0
  116. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2390000.json +8 -0
  117. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2400000.json +8 -0
  118. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2410000.json +8 -0
  119. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2420000.json +8 -0
  120. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2430000.json +8 -0
  121. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2440000.json +8 -0
  122. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2450000.json +8 -0
  123. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2460000.json +8 -0
  124. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2470000.json +8 -0
  125. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2480000.json +8 -0
  126. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2490000.json +8 -0
  127. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2500000.json +8 -0
  128. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2510000.json +8 -0
  129. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2520000.json +8 -0
  130. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/2530000.json +8 -0
  131. package/ios/ZCashLightClientKit/Rust/ZcashRustBackend.swift +293 -158
  132. package/ios/ZCashLightClientKit/Rust/ZcashRustBackendWelding.swift +58 -64
  133. package/ios/ZCashLightClientKit/Rust/zcashlc.h +618 -512
  134. package/ios/ZCashLightClientKit/Synchronizer/ClosureSDKSynchronizer.swift +2 -8
  135. package/ios/ZCashLightClientKit/Synchronizer/CombineSDKSynchronizer.swift +3 -15
  136. package/ios/ZCashLightClientKit/Synchronizer/Dependencies.swift +11 -30
  137. package/ios/ZCashLightClientKit/Synchronizer/SDKSynchronizer.swift +41 -50
  138. package/ios/ZCashLightClientKit/Synchronizer.swift +51 -65
  139. package/ios/ZCashLightClientKit/Transaction/TransactionEncoder.swift +2 -2
  140. package/ios/ZCashLightClientKit/Transaction/WalletTransactionEncoder.swift +7 -7
  141. package/ios/ZCashLightClientKit/Utils/OSLogger.swift +3 -3
  142. package/ios/ZCashLightClientKit/Utils/ZcashFileManager.swift +16 -0
  143. package/ios/libzcashlc.xcframework/Info.plist +9 -5
  144. package/ios/libzcashlc.xcframework/ios-arm64/libzcashlc.a +0 -0
  145. package/ios/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.a +0 -0
  146. package/lib/rnzcash.rn.js +8 -30
  147. package/lib/rnzcash.rn.js.map +1 -1
  148. package/lib/src/react-native.d.ts +2 -4
  149. package/lib/src/types.d.ts +14 -14
  150. package/package.json +1 -1
  151. package/src/react-native.ts +11 -20
  152. package/src/types.ts +20 -23
  153. package/ios/ZCashLightClientKit/Block/Utils/InternalSyncProgress.swift +0 -200
  154. package/ios/ZCashLightClientKit/Block/Validate/BlockValidator.swift +0 -51
  155. package/ios/ZCashLightClientKit/DAO/BlockDao.swift +0 -112
  156. package/ios/ZCashLightClientKit/Entity/BlockProgress.swift +0 -24
@@ -1,25 +1,10 @@
1
1
  //
2
2
  // DO NOT EDIT.
3
+ // swift-format-ignore-file
3
4
  //
4
5
  // Generated by the protocol buffer compiler.
5
6
  // Source: service.proto
6
7
  //
7
-
8
- //
9
- // Copyright 2018, gRPC Authors All rights reserved.
10
- //
11
- // Licensed under the Apache License, Version 2.0 (the "License");
12
- // you may not use this file except in compliance with the License.
13
- // You may obtain a copy of the License at
14
- //
15
- // http://www.apache.org/licenses/LICENSE-2.0
16
- //
17
- // Unless required by applicable law or agreed to in writing, software
18
- // distributed under the License is distributed on an "AS IS" BASIS,
19
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
- // See the License for the specific language governing permissions and
21
- // limitations under the License.
22
- //
23
8
  import GRPC
24
9
  import NIO
25
10
  import NIOConcurrencyHelpers
@@ -41,12 +26,23 @@ internal protocol CompactTxStreamerClientProtocol: GRPCClient {
41
26
  callOptions: CallOptions?
42
27
  ) -> UnaryCall<BlockID, CompactBlock>
43
28
 
29
+ func getBlockNullifiers(
30
+ _ request: BlockID,
31
+ callOptions: CallOptions?
32
+ ) -> UnaryCall<BlockID, CompactBlock>
33
+
44
34
  func getBlockRange(
45
35
  _ request: BlockRange,
46
36
  callOptions: CallOptions?,
47
37
  handler: @escaping (CompactBlock) -> Void
48
38
  ) -> ServerStreamingCall<BlockRange, CompactBlock>
49
39
 
40
+ func getBlockRangeNullifiers(
41
+ _ request: BlockRange,
42
+ callOptions: CallOptions?,
43
+ handler: @escaping (CompactBlock) -> Void
44
+ ) -> ServerStreamingCall<BlockRange, CompactBlock>
45
+
50
46
  func getTransaction(
51
47
  _ request: TxFilter,
52
48
  callOptions: CallOptions?
@@ -89,6 +85,17 @@ internal protocol CompactTxStreamerClientProtocol: GRPCClient {
89
85
  callOptions: CallOptions?
90
86
  ) -> UnaryCall<BlockID, TreeState>
91
87
 
88
+ func getLatestTreeState(
89
+ _ request: Empty,
90
+ callOptions: CallOptions?
91
+ ) -> UnaryCall<Empty, TreeState>
92
+
93
+ func getSubtreeRoots(
94
+ _ request: GetSubtreeRootsArg,
95
+ callOptions: CallOptions?,
96
+ handler: @escaping (SubtreeRoot) -> Void
97
+ ) -> ServerStreamingCall<GetSubtreeRootsArg, SubtreeRoot>
98
+
92
99
  func getAddressUtxos(
93
100
  _ request: GetAddressUtxosArg,
94
101
  callOptions: CallOptions?
@@ -152,6 +159,24 @@ extension CompactTxStreamerClientProtocol {
152
159
  )
153
160
  }
154
161
 
162
+ /// Same as GetBlock except actions contain only nullifiers
163
+ ///
164
+ /// - Parameters:
165
+ /// - request: Request to send to GetBlockNullifiers.
166
+ /// - callOptions: Call options.
167
+ /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
168
+ internal func getBlockNullifiers(
169
+ _ request: BlockID,
170
+ callOptions: CallOptions? = nil
171
+ ) -> UnaryCall<BlockID, CompactBlock> {
172
+ return self.makeUnaryCall(
173
+ path: CompactTxStreamerClientMetadata.Methods.getBlockNullifiers.path,
174
+ request: request,
175
+ callOptions: callOptions ?? self.defaultCallOptions,
176
+ interceptors: self.interceptors?.makeGetBlockNullifiersInterceptors() ?? []
177
+ )
178
+ }
179
+
155
180
  /// Return a list of consecutive compact blocks
156
181
  ///
157
182
  /// - Parameters:
@@ -173,6 +198,27 @@ extension CompactTxStreamerClientProtocol {
173
198
  )
174
199
  }
175
200
 
201
+ /// Same as GetBlockRange except actions contain only nullifiers
202
+ ///
203
+ /// - Parameters:
204
+ /// - request: Request to send to GetBlockRangeNullifiers.
205
+ /// - callOptions: Call options.
206
+ /// - handler: A closure called when each response is received from the server.
207
+ /// - Returns: A `ServerStreamingCall` with futures for the metadata and status.
208
+ internal func getBlockRangeNullifiers(
209
+ _ request: BlockRange,
210
+ callOptions: CallOptions? = nil,
211
+ handler: @escaping (CompactBlock) -> Void
212
+ ) -> ServerStreamingCall<BlockRange, CompactBlock> {
213
+ return self.makeServerStreamingCall(
214
+ path: CompactTxStreamerClientMetadata.Methods.getBlockRangeNullifiers.path,
215
+ request: request,
216
+ callOptions: callOptions ?? self.defaultCallOptions,
217
+ interceptors: self.interceptors?.makeGetBlockRangeNullifiersInterceptors() ?? [],
218
+ handler: handler
219
+ )
220
+ }
221
+
176
222
  /// Return the requested full (not compact) transaction (as from zcashd)
177
223
  ///
178
224
  /// - Parameters:
@@ -338,6 +384,46 @@ extension CompactTxStreamerClientProtocol {
338
384
  )
339
385
  }
340
386
 
387
+ /// Unary call to GetLatestTreeState
388
+ ///
389
+ /// - Parameters:
390
+ /// - request: Request to send to GetLatestTreeState.
391
+ /// - callOptions: Call options.
392
+ /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
393
+ internal func getLatestTreeState(
394
+ _ request: Empty,
395
+ callOptions: CallOptions? = nil
396
+ ) -> UnaryCall<Empty, TreeState> {
397
+ return self.makeUnaryCall(
398
+ path: CompactTxStreamerClientMetadata.Methods.getLatestTreeState.path,
399
+ request: request,
400
+ callOptions: callOptions ?? self.defaultCallOptions,
401
+ interceptors: self.interceptors?.makeGetLatestTreeStateInterceptors() ?? []
402
+ )
403
+ }
404
+
405
+ /// Returns a stream of information about roots of subtrees of the Sapling and Orchard
406
+ /// note commitment trees.
407
+ ///
408
+ /// - Parameters:
409
+ /// - request: Request to send to GetSubtreeRoots.
410
+ /// - callOptions: Call options.
411
+ /// - handler: A closure called when each response is received from the server.
412
+ /// - Returns: A `ServerStreamingCall` with futures for the metadata and status.
413
+ internal func getSubtreeRoots(
414
+ _ request: GetSubtreeRootsArg,
415
+ callOptions: CallOptions? = nil,
416
+ handler: @escaping (SubtreeRoot) -> Void
417
+ ) -> ServerStreamingCall<GetSubtreeRootsArg, SubtreeRoot> {
418
+ return self.makeServerStreamingCall(
419
+ path: CompactTxStreamerClientMetadata.Methods.getSubtreeRoots.path,
420
+ request: request,
421
+ callOptions: callOptions ?? self.defaultCallOptions,
422
+ interceptors: self.interceptors?.makeGetSubtreeRootsInterceptors() ?? [],
423
+ handler: handler
424
+ )
425
+ }
426
+
341
427
  /// Unary call to GetAddressUtxos
342
428
  ///
343
429
  /// - Parameters:
@@ -414,10 +500,8 @@ extension CompactTxStreamerClientProtocol {
414
500
  }
415
501
  }
416
502
 
417
- #if compiler(>=5.6)
418
503
  @available(*, deprecated)
419
504
  extension CompactTxStreamerClient: @unchecked Sendable {}
420
- #endif // compiler(>=5.6)
421
505
 
422
506
  @available(*, deprecated, renamed: "CompactTxStreamerNIOClient")
423
507
  internal final class CompactTxStreamerClient: CompactTxStreamerClientProtocol {
@@ -473,7 +557,6 @@ internal struct CompactTxStreamerNIOClient: CompactTxStreamerClientProtocol {
473
557
  }
474
558
  }
475
559
 
476
- #if compiler(>=5.6)
477
560
  @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
478
561
  internal protocol CompactTxStreamerAsyncClientProtocol: GRPCClient {
479
562
  static var serviceDescriptor: GRPCServiceDescriptor { get }
@@ -489,11 +572,21 @@ internal protocol CompactTxStreamerAsyncClientProtocol: GRPCClient {
489
572
  callOptions: CallOptions?
490
573
  ) -> GRPCAsyncUnaryCall<BlockID, CompactBlock>
491
574
 
575
+ func makeGetBlockNullifiersCall(
576
+ _ request: BlockID,
577
+ callOptions: CallOptions?
578
+ ) -> GRPCAsyncUnaryCall<BlockID, CompactBlock>
579
+
492
580
  func makeGetBlockRangeCall(
493
581
  _ request: BlockRange,
494
582
  callOptions: CallOptions?
495
583
  ) -> GRPCAsyncServerStreamingCall<BlockRange, CompactBlock>
496
584
 
585
+ func makeGetBlockRangeNullifiersCall(
586
+ _ request: BlockRange,
587
+ callOptions: CallOptions?
588
+ ) -> GRPCAsyncServerStreamingCall<BlockRange, CompactBlock>
589
+
497
590
  func makeGetTransactionCall(
498
591
  _ request: TxFilter,
499
592
  callOptions: CallOptions?
@@ -533,6 +626,16 @@ internal protocol CompactTxStreamerAsyncClientProtocol: GRPCClient {
533
626
  callOptions: CallOptions?
534
627
  ) -> GRPCAsyncUnaryCall<BlockID, TreeState>
535
628
 
629
+ func makeGetLatestTreeStateCall(
630
+ _ request: Empty,
631
+ callOptions: CallOptions?
632
+ ) -> GRPCAsyncUnaryCall<Empty, TreeState>
633
+
634
+ func makeGetSubtreeRootsCall(
635
+ _ request: GetSubtreeRootsArg,
636
+ callOptions: CallOptions?
637
+ ) -> GRPCAsyncServerStreamingCall<GetSubtreeRootsArg, SubtreeRoot>
638
+
536
639
  func makeGetAddressUtxosCall(
537
640
  _ request: GetAddressUtxosArg,
538
641
  callOptions: CallOptions?
@@ -588,6 +691,18 @@ extension CompactTxStreamerAsyncClientProtocol {
588
691
  )
589
692
  }
590
693
 
694
+ internal func makeGetBlockNullifiersCall(
695
+ _ request: BlockID,
696
+ callOptions: CallOptions? = nil
697
+ ) -> GRPCAsyncUnaryCall<BlockID, CompactBlock> {
698
+ return self.makeAsyncUnaryCall(
699
+ path: CompactTxStreamerClientMetadata.Methods.getBlockNullifiers.path,
700
+ request: request,
701
+ callOptions: callOptions ?? self.defaultCallOptions,
702
+ interceptors: self.interceptors?.makeGetBlockNullifiersInterceptors() ?? []
703
+ )
704
+ }
705
+
591
706
  internal func makeGetBlockRangeCall(
592
707
  _ request: BlockRange,
593
708
  callOptions: CallOptions? = nil
@@ -600,6 +715,18 @@ extension CompactTxStreamerAsyncClientProtocol {
600
715
  )
601
716
  }
602
717
 
718
+ internal func makeGetBlockRangeNullifiersCall(
719
+ _ request: BlockRange,
720
+ callOptions: CallOptions? = nil
721
+ ) -> GRPCAsyncServerStreamingCall<BlockRange, CompactBlock> {
722
+ return self.makeAsyncServerStreamingCall(
723
+ path: CompactTxStreamerClientMetadata.Methods.getBlockRangeNullifiers.path,
724
+ request: request,
725
+ callOptions: callOptions ?? self.defaultCallOptions,
726
+ interceptors: self.interceptors?.makeGetBlockRangeNullifiersInterceptors() ?? []
727
+ )
728
+ }
729
+
603
730
  internal func makeGetTransactionCall(
604
731
  _ request: TxFilter,
605
732
  callOptions: CallOptions? = nil
@@ -694,6 +821,30 @@ extension CompactTxStreamerAsyncClientProtocol {
694
821
  )
695
822
  }
696
823
 
824
+ internal func makeGetLatestTreeStateCall(
825
+ _ request: Empty,
826
+ callOptions: CallOptions? = nil
827
+ ) -> GRPCAsyncUnaryCall<Empty, TreeState> {
828
+ return self.makeAsyncUnaryCall(
829
+ path: CompactTxStreamerClientMetadata.Methods.getLatestTreeState.path,
830
+ request: request,
831
+ callOptions: callOptions ?? self.defaultCallOptions,
832
+ interceptors: self.interceptors?.makeGetLatestTreeStateInterceptors() ?? []
833
+ )
834
+ }
835
+
836
+ internal func makeGetSubtreeRootsCall(
837
+ _ request: GetSubtreeRootsArg,
838
+ callOptions: CallOptions? = nil
839
+ ) -> GRPCAsyncServerStreamingCall<GetSubtreeRootsArg, SubtreeRoot> {
840
+ return self.makeAsyncServerStreamingCall(
841
+ path: CompactTxStreamerClientMetadata.Methods.getSubtreeRoots.path,
842
+ request: request,
843
+ callOptions: callOptions ?? self.defaultCallOptions,
844
+ interceptors: self.interceptors?.makeGetSubtreeRootsInterceptors() ?? []
845
+ )
846
+ }
847
+
697
848
  internal func makeGetAddressUtxosCall(
698
849
  _ request: GetAddressUtxosArg,
699
850
  callOptions: CallOptions? = nil
@@ -769,6 +920,18 @@ extension CompactTxStreamerAsyncClientProtocol {
769
920
  )
770
921
  }
771
922
 
923
+ internal func getBlockNullifiers(
924
+ _ request: BlockID,
925
+ callOptions: CallOptions? = nil
926
+ ) async throws -> CompactBlock {
927
+ return try await self.performAsyncUnaryCall(
928
+ path: CompactTxStreamerClientMetadata.Methods.getBlockNullifiers.path,
929
+ request: request,
930
+ callOptions: callOptions ?? self.defaultCallOptions,
931
+ interceptors: self.interceptors?.makeGetBlockNullifiersInterceptors() ?? []
932
+ )
933
+ }
934
+
772
935
  internal func getBlockRange(
773
936
  _ request: BlockRange,
774
937
  callOptions: CallOptions? = nil
@@ -781,6 +944,18 @@ extension CompactTxStreamerAsyncClientProtocol {
781
944
  )
782
945
  }
783
946
 
947
+ internal func getBlockRangeNullifiers(
948
+ _ request: BlockRange,
949
+ callOptions: CallOptions? = nil
950
+ ) -> GRPCAsyncResponseStream<CompactBlock> {
951
+ return self.performAsyncServerStreamingCall(
952
+ path: CompactTxStreamerClientMetadata.Methods.getBlockRangeNullifiers.path,
953
+ request: request,
954
+ callOptions: callOptions ?? self.defaultCallOptions,
955
+ interceptors: self.interceptors?.makeGetBlockRangeNullifiersInterceptors() ?? []
956
+ )
957
+ }
958
+
784
959
  internal func getTransaction(
785
960
  _ request: TxFilter,
786
961
  callOptions: CallOptions? = nil
@@ -889,6 +1064,30 @@ extension CompactTxStreamerAsyncClientProtocol {
889
1064
  )
890
1065
  }
891
1066
 
1067
+ internal func getLatestTreeState(
1068
+ _ request: Empty,
1069
+ callOptions: CallOptions? = nil
1070
+ ) async throws -> TreeState {
1071
+ return try await self.performAsyncUnaryCall(
1072
+ path: CompactTxStreamerClientMetadata.Methods.getLatestTreeState.path,
1073
+ request: request,
1074
+ callOptions: callOptions ?? self.defaultCallOptions,
1075
+ interceptors: self.interceptors?.makeGetLatestTreeStateInterceptors() ?? []
1076
+ )
1077
+ }
1078
+
1079
+ internal func getSubtreeRoots(
1080
+ _ request: GetSubtreeRootsArg,
1081
+ callOptions: CallOptions? = nil
1082
+ ) -> GRPCAsyncResponseStream<SubtreeRoot> {
1083
+ return self.performAsyncServerStreamingCall(
1084
+ path: CompactTxStreamerClientMetadata.Methods.getSubtreeRoots.path,
1085
+ request: request,
1086
+ callOptions: callOptions ?? self.defaultCallOptions,
1087
+ interceptors: self.interceptors?.makeGetSubtreeRootsInterceptors() ?? []
1088
+ )
1089
+ }
1090
+
892
1091
  internal func getAddressUtxos(
893
1092
  _ request: GetAddressUtxosArg,
894
1093
  callOptions: CallOptions? = nil
@@ -955,9 +1154,7 @@ internal struct CompactTxStreamerAsyncClient: CompactTxStreamerAsyncClientProtoc
955
1154
  }
956
1155
  }
957
1156
 
958
- #endif // compiler(>=5.6)
959
-
960
- internal protocol CompactTxStreamerClientInterceptorFactoryProtocol: GRPCSendable {
1157
+ internal protocol CompactTxStreamerClientInterceptorFactoryProtocol: Sendable {
961
1158
 
962
1159
  /// - Returns: Interceptors to use when invoking 'getLatestBlock'.
963
1160
  func makeGetLatestBlockInterceptors() -> [ClientInterceptor<ChainSpec, BlockID>]
@@ -965,9 +1162,15 @@ internal protocol CompactTxStreamerClientInterceptorFactoryProtocol: GRPCSendabl
965
1162
  /// - Returns: Interceptors to use when invoking 'getBlock'.
966
1163
  func makeGetBlockInterceptors() -> [ClientInterceptor<BlockID, CompactBlock>]
967
1164
 
1165
+ /// - Returns: Interceptors to use when invoking 'getBlockNullifiers'.
1166
+ func makeGetBlockNullifiersInterceptors() -> [ClientInterceptor<BlockID, CompactBlock>]
1167
+
968
1168
  /// - Returns: Interceptors to use when invoking 'getBlockRange'.
969
1169
  func makeGetBlockRangeInterceptors() -> [ClientInterceptor<BlockRange, CompactBlock>]
970
1170
 
1171
+ /// - Returns: Interceptors to use when invoking 'getBlockRangeNullifiers'.
1172
+ func makeGetBlockRangeNullifiersInterceptors() -> [ClientInterceptor<BlockRange, CompactBlock>]
1173
+
971
1174
  /// - Returns: Interceptors to use when invoking 'getTransaction'.
972
1175
  func makeGetTransactionInterceptors() -> [ClientInterceptor<TxFilter, RawTransaction>]
973
1176
 
@@ -992,6 +1195,12 @@ internal protocol CompactTxStreamerClientInterceptorFactoryProtocol: GRPCSendabl
992
1195
  /// - Returns: Interceptors to use when invoking 'getTreeState'.
993
1196
  func makeGetTreeStateInterceptors() -> [ClientInterceptor<BlockID, TreeState>]
994
1197
 
1198
+ /// - Returns: Interceptors to use when invoking 'getLatestTreeState'.
1199
+ func makeGetLatestTreeStateInterceptors() -> [ClientInterceptor<Empty, TreeState>]
1200
+
1201
+ /// - Returns: Interceptors to use when invoking 'getSubtreeRoots'.
1202
+ func makeGetSubtreeRootsInterceptors() -> [ClientInterceptor<GetSubtreeRootsArg, SubtreeRoot>]
1203
+
995
1204
  /// - Returns: Interceptors to use when invoking 'getAddressUtxos'.
996
1205
  func makeGetAddressUtxosInterceptors() -> [ClientInterceptor<GetAddressUtxosArg, GetAddressUtxosReplyList>]
997
1206
 
@@ -1012,7 +1221,9 @@ internal enum CompactTxStreamerClientMetadata {
1012
1221
  methods: [
1013
1222
  CompactTxStreamerClientMetadata.Methods.getLatestBlock,
1014
1223
  CompactTxStreamerClientMetadata.Methods.getBlock,
1224
+ CompactTxStreamerClientMetadata.Methods.getBlockNullifiers,
1015
1225
  CompactTxStreamerClientMetadata.Methods.getBlockRange,
1226
+ CompactTxStreamerClientMetadata.Methods.getBlockRangeNullifiers,
1016
1227
  CompactTxStreamerClientMetadata.Methods.getTransaction,
1017
1228
  CompactTxStreamerClientMetadata.Methods.sendTransaction,
1018
1229
  CompactTxStreamerClientMetadata.Methods.getTaddressTxids,
@@ -1021,6 +1232,8 @@ internal enum CompactTxStreamerClientMetadata {
1021
1232
  CompactTxStreamerClientMetadata.Methods.getMempoolTx,
1022
1233
  CompactTxStreamerClientMetadata.Methods.getMempoolStream,
1023
1234
  CompactTxStreamerClientMetadata.Methods.getTreeState,
1235
+ CompactTxStreamerClientMetadata.Methods.getLatestTreeState,
1236
+ CompactTxStreamerClientMetadata.Methods.getSubtreeRoots,
1024
1237
  CompactTxStreamerClientMetadata.Methods.getAddressUtxos,
1025
1238
  CompactTxStreamerClientMetadata.Methods.getAddressUtxosStream,
1026
1239
  CompactTxStreamerClientMetadata.Methods.getLightdInfo,
@@ -1041,12 +1254,24 @@ internal enum CompactTxStreamerClientMetadata {
1041
1254
  type: GRPCCallType.unary
1042
1255
  )
1043
1256
 
1257
+ internal static let getBlockNullifiers = GRPCMethodDescriptor(
1258
+ name: "GetBlockNullifiers",
1259
+ path: "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockNullifiers",
1260
+ type: GRPCCallType.unary
1261
+ )
1262
+
1044
1263
  internal static let getBlockRange = GRPCMethodDescriptor(
1045
1264
  name: "GetBlockRange",
1046
1265
  path: "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockRange",
1047
1266
  type: GRPCCallType.serverStreaming
1048
1267
  )
1049
1268
 
1269
+ internal static let getBlockRangeNullifiers = GRPCMethodDescriptor(
1270
+ name: "GetBlockRangeNullifiers",
1271
+ path: "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetBlockRangeNullifiers",
1272
+ type: GRPCCallType.serverStreaming
1273
+ )
1274
+
1050
1275
  internal static let getTransaction = GRPCMethodDescriptor(
1051
1276
  name: "GetTransaction",
1052
1277
  path: "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetTransaction",
@@ -1095,6 +1320,18 @@ internal enum CompactTxStreamerClientMetadata {
1095
1320
  type: GRPCCallType.unary
1096
1321
  )
1097
1322
 
1323
+ internal static let getLatestTreeState = GRPCMethodDescriptor(
1324
+ name: "GetLatestTreeState",
1325
+ path: "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetLatestTreeState",
1326
+ type: GRPCCallType.unary
1327
+ )
1328
+
1329
+ internal static let getSubtreeRoots = GRPCMethodDescriptor(
1330
+ name: "GetSubtreeRoots",
1331
+ path: "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetSubtreeRoots",
1332
+ type: GRPCCallType.serverStreaming
1333
+ )
1334
+
1098
1335
  internal static let getAddressUtxos = GRPCMethodDescriptor(
1099
1336
  name: "GetAddressUtxos",
1100
1337
  path: "/cash.z.wallet.sdk.rpc.CompactTxStreamer/GetAddressUtxos",