react-native-zcash 0.9.13 → 0.10.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 (275) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/android/build.gradle +6 -6
  3. package/android/src/main/assets/co.electriccoin.zcash/checkpoint/mainnet/3130000.json +8 -0
  4. package/android/src/main/java/app/edge/rnzcash/RNZcashModule.kt +126 -69
  5. package/ios/RNZcash.m +0 -5
  6. package/ios/RNZcash.swift +153 -104
  7. package/ios/ZCashLightClientKit/Account/Account.swift +48 -0
  8. package/ios/ZCashLightClientKit/Account/AccountMetadataKey.swift +96 -0
  9. package/ios/ZCashLightClientKit/Block/Actions/ScanAction.swift +23 -4
  10. package/ios/ZCashLightClientKit/Block/Actions/UpdateChainTipAction.swift +6 -2
  11. package/ios/ZCashLightClientKit/Block/Actions/UpdateSubtreeRootsAction.swift +4 -2
  12. package/ios/ZCashLightClientKit/Block/Actions/ValidateServerAction.swift +4 -1
  13. package/ios/ZCashLightClientKit/Block/CompactBlockProcessor.swift +83 -16
  14. package/ios/ZCashLightClientKit/Block/Download/BlockDownloader.swift +4 -2
  15. package/ios/ZCashLightClientKit/Block/Download/BlockDownloaderService.swift +22 -19
  16. package/ios/ZCashLightClientKit/Block/Enhance/BlockEnhancer.swift +50 -19
  17. package/ios/ZCashLightClientKit/Block/FetchUnspentTxOutputs/UTXOFetcher.swift +5 -3
  18. package/ios/ZCashLightClientKit/Block/SaplingParameters/SaplingParametersHandler.swift +22 -5
  19. package/ios/ZCashLightClientKit/Block/Scan/BlockScanner.swift +2 -1
  20. package/ios/ZCashLightClientKit/Block/Utils/CompactBlockProgress.swift +5 -3
  21. package/ios/ZCashLightClientKit/Checkpoint/BundleCheckpointSource.swift +88 -0
  22. package/ios/ZCashLightClientKit/Checkpoint/CheckpointSource.swift +4 -0
  23. package/ios/ZCashLightClientKit/ClosureSynchronizer.swift +52 -21
  24. package/ios/ZCashLightClientKit/CombineSynchronizer.swift +49 -27
  25. package/ios/ZCashLightClientKit/Constants/ZcashSDK.swift +8 -2
  26. package/ios/ZCashLightClientKit/DAO/BlockDao.swift +65 -0
  27. package/ios/ZCashLightClientKit/DAO/TransactionDao.swift +86 -1
  28. package/ios/ZCashLightClientKit/Entity/AccountEntity.swift +4 -4
  29. package/ios/ZCashLightClientKit/Entity/Pczt.swift +10 -0
  30. package/ios/ZCashLightClientKit/Entity/SentNoteEntity.swift +2 -2
  31. package/ios/ZCashLightClientKit/Entity/TransactionEntity.swift +40 -16
  32. package/ios/ZCashLightClientKit/Error/Sourcery/generateErrorCode.sh +1 -1
  33. package/ios/ZCashLightClientKit/Error/ZcashError.swift +182 -14
  34. package/ios/ZCashLightClientKit/Error/ZcashErrorCode.swift +63 -5
  35. package/ios/ZCashLightClientKit/Error/ZcashErrorCodeDefinition.swift +122 -12
  36. package/ios/ZCashLightClientKit/Initializer.swift +49 -14
  37. package/ios/ZCashLightClientKit/Metrics/SDKMetrics.swift +15 -6
  38. package/ios/ZCashLightClientKit/Model/SingleUseTransparentAddress.swift +29 -0
  39. package/ios/ZCashLightClientKit/Model/TransactionDataRequest.swift +83 -2
  40. package/ios/ZCashLightClientKit/Model/WalletSummary.swift +21 -4
  41. package/ios/ZCashLightClientKit/Model/WalletTypes.swift +38 -8
  42. package/ios/ZCashLightClientKit/Modules/Service/GRPC/LightWalletGRPCService.swift +177 -45
  43. package/ios/ZCashLightClientKit/Modules/Service/LightWalletService.swift +63 -16
  44. package/ios/ZCashLightClientKit/Modules/Service/Tor/LightWalletGRPCServiceOverTor.swift +273 -0
  45. package/ios/ZCashLightClientKit/Providers/LatestBlocksDataProvider.swift +5 -2
  46. package/ios/ZCashLightClientKit/Repository/TransactionRepository.swift +2 -0
  47. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2675000.json +8 -0
  48. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2677500.json +8 -0
  49. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2682500.json +8 -0
  50. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2685000.json +8 -0
  51. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2687500.json +8 -0
  52. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2692500.json +8 -0
  53. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2695000.json +8 -0
  54. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2697500.json +8 -0
  55. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2702500.json +8 -0
  56. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2705000.json +8 -0
  57. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2707500.json +8 -0
  58. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2712500.json +8 -0
  59. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2715000.json +8 -0
  60. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2717500.json +8 -0
  61. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2722500.json +8 -0
  62. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2725000.json +8 -0
  63. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2727500.json +8 -0
  64. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2732500.json +8 -0
  65. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2735000.json +8 -0
  66. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2737500.json +8 -0
  67. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2742500.json +8 -0
  68. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2745000.json +8 -0
  69. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2747500.json +8 -0
  70. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2752500.json +8 -0
  71. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2755000.json +8 -0
  72. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2757500.json +8 -0
  73. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2762500.json +8 -0
  74. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2765000.json +8 -0
  75. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2767500.json +8 -0
  76. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2772500.json +8 -0
  77. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2775000.json +8 -0
  78. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2777500.json +8 -0
  79. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2782500.json +8 -0
  80. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2785000.json +8 -0
  81. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2787500.json +8 -0
  82. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2792500.json +8 -0
  83. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2795000.json +8 -0
  84. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2797500.json +8 -0
  85. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2802500.json +8 -0
  86. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2805000.json +8 -0
  87. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2807500.json +8 -0
  88. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2812500.json +8 -0
  89. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2815000.json +8 -0
  90. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2817500.json +8 -0
  91. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2822500.json +8 -0
  92. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2825000.json +8 -0
  93. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2827500.json +8 -0
  94. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2832500.json +8 -0
  95. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2835000.json +8 -0
  96. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2837500.json +8 -0
  97. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2842500.json +8 -0
  98. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2845000.json +8 -0
  99. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2847500.json +8 -0
  100. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2852500.json +8 -0
  101. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2855000.json +8 -0
  102. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2857500.json +8 -0
  103. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2862500.json +8 -0
  104. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2865000.json +8 -0
  105. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2867500.json +8 -0
  106. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2872500.json +8 -0
  107. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2875000.json +8 -0
  108. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2877500.json +8 -0
  109. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2882500.json +8 -0
  110. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2885000.json +8 -0
  111. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2887500.json +8 -0
  112. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2892500.json +8 -0
  113. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2895000.json +8 -0
  114. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2897500.json +8 -0
  115. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2902500.json +8 -0
  116. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2905000.json +8 -0
  117. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2907500.json +8 -0
  118. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2912500.json +8 -0
  119. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2915000.json +8 -0
  120. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2917500.json +8 -0
  121. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2922500.json +8 -0
  122. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2925000.json +8 -0
  123. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2927500.json +8 -0
  124. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2932500.json +8 -0
  125. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2935000.json +8 -0
  126. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2937500.json +8 -0
  127. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2942500.json +8 -0
  128. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2945000.json +8 -0
  129. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2947500.json +8 -0
  130. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2952500.json +8 -0
  131. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2955000.json +8 -0
  132. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2957500.json +8 -0
  133. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2962500.json +8 -0
  134. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2965000.json +8 -0
  135. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2967500.json +8 -0
  136. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2972500.json +8 -0
  137. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2975000.json +8 -0
  138. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2977500.json +8 -0
  139. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2982500.json +8 -0
  140. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2985000.json +8 -0
  141. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2987500.json +8 -0
  142. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2992500.json +8 -0
  143. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2995000.json +8 -0
  144. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/2997500.json +8 -0
  145. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3002500.json +8 -0
  146. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3005000.json +8 -0
  147. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3007500.json +8 -0
  148. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3012500.json +8 -0
  149. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3015000.json +8 -0
  150. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3017500.json +8 -0
  151. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3022500.json +8 -0
  152. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3025000.json +8 -0
  153. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3027500.json +8 -0
  154. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3032500.json +8 -0
  155. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3035000.json +8 -0
  156. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3037500.json +8 -0
  157. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3042500.json +8 -0
  158. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3045000.json +8 -0
  159. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3047500.json +8 -0
  160. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3052500.json +8 -0
  161. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3055000.json +8 -0
  162. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3057500.json +8 -0
  163. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3062500.json +8 -0
  164. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3065000.json +8 -0
  165. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3067500.json +8 -0
  166. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3072500.json +8 -0
  167. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3075000.json +8 -0
  168. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3077500.json +8 -0
  169. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3082500.json +8 -0
  170. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3085000.json +8 -0
  171. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3087500.json +8 -0
  172. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3092500.json +8 -0
  173. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3095000.json +8 -0
  174. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3097500.json +8 -0
  175. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3102500.json +8 -0
  176. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3105000.json +8 -0
  177. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3107500.json +8 -0
  178. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3112500.json +8 -0
  179. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3115000.json +8 -0
  180. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3117500.json +8 -0
  181. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3122500.json +8 -0
  182. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3125000.json +8 -0
  183. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3127500.json +8 -0
  184. package/ios/ZCashLightClientKit/Resources/checkpoints/mainnet/3130000.json +8 -0
  185. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3010000.json +8 -0
  186. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3020000.json +8 -0
  187. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3030000.json +8 -0
  188. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3040000.json +8 -0
  189. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3050000.json +8 -0
  190. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3060000.json +8 -0
  191. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3070000.json +8 -0
  192. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3080000.json +8 -0
  193. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3090000.json +8 -0
  194. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3100000.json +8 -0
  195. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3110000.json +8 -0
  196. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3120000.json +8 -0
  197. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3130000.json +8 -0
  198. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3140000.json +8 -0
  199. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3150000.json +8 -0
  200. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3160000.json +8 -0
  201. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3170000.json +8 -0
  202. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3180000.json +8 -0
  203. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3190000.json +8 -0
  204. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3200000.json +8 -0
  205. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3210000.json +8 -0
  206. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3220000.json +8 -0
  207. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3230000.json +8 -0
  208. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3240000.json +8 -0
  209. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3250000.json +8 -0
  210. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3260000.json +8 -0
  211. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3270000.json +8 -0
  212. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3280000.json +8 -0
  213. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3290000.json +8 -0
  214. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3300000.json +8 -0
  215. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3310000.json +8 -0
  216. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3320000.json +8 -0
  217. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3330000.json +8 -0
  218. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3340000.json +8 -0
  219. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3350000.json +8 -0
  220. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3360000.json +8 -0
  221. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3370000.json +8 -0
  222. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3380000.json +8 -0
  223. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3390000.json +8 -0
  224. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3400000.json +8 -0
  225. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3410000.json +8 -0
  226. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3420000.json +8 -0
  227. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3430000.json +8 -0
  228. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3440000.json +8 -0
  229. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3450000.json +8 -0
  230. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3460000.json +8 -0
  231. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3470000.json +8 -0
  232. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3480000.json +8 -0
  233. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3490000.json +8 -0
  234. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3500000.json +8 -0
  235. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3510000.json +8 -0
  236. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3520000.json +8 -0
  237. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3530000.json +8 -0
  238. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3540000.json +8 -0
  239. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3550000.json +8 -0
  240. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3560000.json +8 -0
  241. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3570000.json +8 -0
  242. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3580000.json +8 -0
  243. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3590000.json +8 -0
  244. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3600000.json +8 -0
  245. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3610000.json +8 -0
  246. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3620000.json +8 -0
  247. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3630000.json +8 -0
  248. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3640000.json +8 -0
  249. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3650000.json +8 -0
  250. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3660000.json +8 -0
  251. package/ios/ZCashLightClientKit/Resources/checkpoints/testnet/3670000.json +8 -0
  252. package/ios/ZCashLightClientKit/Rust/ZcashKeyDerivationBackend.swift +89 -10
  253. package/ios/ZCashLightClientKit/Rust/ZcashKeyDerivationBackendWelding.swift +39 -3
  254. package/ios/ZCashLightClientKit/Rust/ZcashRustBackend.swift +532 -74
  255. package/ios/ZCashLightClientKit/Rust/ZcashRustBackendWelding.swift +97 -14
  256. package/ios/ZCashLightClientKit/Synchronizer/ClosureSDKSynchronizer.swift +104 -28
  257. package/ios/ZCashLightClientKit/Synchronizer/CombineSDKSynchronizer.swift +105 -31
  258. package/ios/ZCashLightClientKit/Synchronizer/Dependencies.swift +36 -9
  259. package/ios/ZCashLightClientKit/Synchronizer/SDKSynchronizer.swift +401 -175
  260. package/ios/ZCashLightClientKit/Synchronizer.swift +192 -69
  261. package/ios/ZCashLightClientKit/Tool/DerivationTool.swift +69 -12
  262. package/ios/ZCashLightClientKit/Tor/TorClient.swift +502 -11
  263. package/ios/ZCashLightClientKit/Transaction/TransactionEncoder.swift +10 -6
  264. package/ios/ZCashLightClientKit/Transaction/WalletTransactionEncoder.swift +24 -9
  265. package/ios/ZCashLightClientKit/Utils/SDKFlags.swift +71 -0
  266. package/ios/libzcashlc.xcframework/Info.plist +5 -5
  267. package/ios/libzcashlc.xcframework/ios-arm64/libzcashlc.a +0 -0
  268. package/ios/libzcashlc.xcframework/ios-arm64_x86_64-simulator/libzcashlc.a +0 -0
  269. package/ios/zcashlc.h +1640 -378
  270. package/lib/rnzcash.rn.js.map +1 -1
  271. package/lib/src/react-native.d.ts +2 -2
  272. package/lib/src/types.d.ts +2 -0
  273. package/package.json +1 -1
  274. package/src/react-native.ts +2 -3
  275. package/src/types.ts +2 -0
@@ -9,17 +9,16 @@ import Foundation
9
9
  import SQLite
10
10
 
11
11
  public enum ZcashTransaction {
12
- public struct Overview {
12
+ public struct Overview: Equatable, Identifiable {
13
13
  /// Represents the transaction state based on current height of the chain,
14
14
  /// mined height and expiry height of a transaction.
15
15
  public enum State {
16
16
  /// transaction has a `minedHeight` that's greater or equal than
17
17
  /// `ZcashSDK.defaultStaleTolerance` confirmations.
18
18
  case confirmed
19
- /// transaction has no `minedHeight` but current known height is less than
20
- /// `expiryHeight`.
19
+ /// transaction has no `minedHeight` but current known height is less than `expiryHeight`.
21
20
  case pending
22
- /// transaction has no
21
+ /// transaction has no `minedHeight` and current known height is greater or equal than `expiryHeight`.
23
22
  case expired
24
23
 
25
24
  init(
@@ -43,9 +42,11 @@ public enum ZcashTransaction {
43
42
  }
44
43
  }
45
44
  }
45
+
46
+ public var id: Data { rawID }
46
47
 
47
- public let accountId: Int
48
- public let blockTime: TimeInterval?
48
+ public let accountUUID: AccountUUID
49
+ public var blockTime: TimeInterval?
49
50
  public let expiryHeight: BlockHeight?
50
51
  public let fee: Zatoshi?
51
52
  public let index: Int?
@@ -60,10 +61,13 @@ public enum ZcashTransaction {
60
61
  public let sentNoteCount: Int
61
62
  public let value: Zatoshi
62
63
  public let isExpiredUmined: Bool?
64
+ public let totalSpent: Zatoshi?
65
+ public let totalReceived: Zatoshi?
66
+ public var state: State?
63
67
  }
64
68
 
65
- public struct Output {
66
- public enum Pool {
69
+ public struct Output: Equatable, Identifiable {
70
+ public enum Pool: Equatable {
67
71
  case transaparent
68
72
  case sapling
69
73
  case orchard
@@ -82,10 +86,12 @@ public enum ZcashTransaction {
82
86
  }
83
87
  }
84
88
 
89
+ public var id: Data { rawID }
90
+
85
91
  public let rawID: Data
86
92
  public let pool: Pool
87
93
  public let index: Int
88
- public let fromAccount: Int?
94
+ public let fromAccount: AccountUUID?
89
95
  public let recipient: TransactionRecipient
90
96
  public let value: Zatoshi
91
97
  public let isChange: Bool
@@ -93,7 +99,7 @@ public enum ZcashTransaction {
93
99
  }
94
100
 
95
101
  /// Used when fetching blocks from the lightwalletd
96
- struct Fetched {
102
+ struct Fetched: Equatable {
97
103
  public let rawID: Data
98
104
  public let minedHeight: UInt32?
99
105
  public let raw: Data
@@ -105,8 +111,8 @@ extension ZcashTransaction.Output {
105
111
  static let rawID = SQLite.Expression<Blob>("txid")
106
112
  static let pool = SQLite.Expression<Int>("output_pool")
107
113
  static let index = SQLite.Expression<Int>("output_index")
108
- static let toAccount = SQLite.Expression<Int?>("to_account_id")
109
- static let fromAccount = SQLite.Expression<Int?>("from_account_id")
114
+ static let toAccount = SQLite.Expression<Blob?>("to_account_uuid")
115
+ static let fromAccount = SQLite.Expression<Blob?>("from_account_uuid")
110
116
  static let toAddress = SQLite.Expression<String?>("to_address")
111
117
  static let value = SQLite.Expression<Int64>("value")
112
118
  static let isChange = SQLite.Expression<Bool>("is_change")
@@ -118,7 +124,11 @@ extension ZcashTransaction.Output {
118
124
  rawID = Data(blob: try row.get(Column.rawID))
119
125
  pool = .init(rawValue: try row.get(Column.pool))
120
126
  index = try row.get(Column.index)
121
- fromAccount = try row.get(Column.fromAccount)
127
+ if let accountId = try row.get(Column.fromAccount) {
128
+ fromAccount = AccountUUID(id: [UInt8](Data(blob: accountId)))
129
+ } else {
130
+ fromAccount = nil
131
+ }
122
132
  value = Zatoshi(try row.get(Column.value))
123
133
  isChange = try row.get(Column.isChange)
124
134
 
@@ -128,7 +138,7 @@ extension ZcashTransaction.Output {
128
138
  {
129
139
  recipient = TransactionRecipient.address(try Recipient(outputRecipient, network: metadata.networkType))
130
140
  } else if let toAccount = try row.get(Column.toAccount) {
131
- recipient = .internalAccount(UInt32(toAccount))
141
+ recipient = .internalAccount(AccountUUID(id: [UInt8](Data(blob: toAccount))))
132
142
  } else {
133
143
  throw ZcashError.zcashTransactionOutputInconsistentRecipient
134
144
  }
@@ -146,7 +156,7 @@ extension ZcashTransaction.Output {
146
156
 
147
157
  extension ZcashTransaction.Overview {
148
158
  enum Column {
149
- static let accountId = SQLite.Expression<Int>("account_id")
159
+ static let accountUUID = SQLite.Expression<Blob>("account_uuid")
150
160
  static let minedHeight = SQLite.Expression<BlockHeight?>("mined_height")
151
161
  static let index = SQLite.Expression<Int?>("tx_index")
152
162
  static let rawID = SQLite.Expression<Blob>("txid")
@@ -161,11 +171,13 @@ extension ZcashTransaction.Overview {
161
171
  static let memoCount = SQLite.Expression<Int>("memo_count")
162
172
  static let blockTime = SQLite.Expression<Int64?>("block_time")
163
173
  static let expiredUnmined = SQLite.Expression<Bool?>("expired_unmined")
174
+ static let totalSpent = SQLite.Expression<Int64?>("total_spent")
175
+ static let totalReceived = SQLite.Expression<Int64?>("total_received")
164
176
  }
165
177
 
166
178
  init(row: Row) throws {
167
179
  do {
168
- self.accountId = try row.get(Column.accountId)
180
+ self.accountUUID = AccountUUID(id: [UInt8](Data(blob: try row.get(Column.accountUUID))))
169
181
  self.expiryHeight = try row.get(Column.expiryHeight)
170
182
  self.index = try row.get(Column.index)
171
183
  self.hasChange = try row.get(Column.hasChange)
@@ -190,6 +202,18 @@ extension ZcashTransaction.Overview {
190
202
  self.fee = nil
191
203
  }
192
204
 
205
+ if let totalSpent = try row.get(Column.totalSpent) {
206
+ self.totalSpent = Zatoshi(totalSpent)
207
+ } else {
208
+ self.totalSpent = nil
209
+ }
210
+
211
+ if let totalReceived = try row.get(Column.totalReceived) {
212
+ self.totalReceived = Zatoshi(totalReceived)
213
+ } else {
214
+ self.totalReceived = nil
215
+ }
216
+
193
217
  if let raw = try row.get(Column.raw) {
194
218
  self.raw = Data(blob: raw)
195
219
  } else {
@@ -3,7 +3,7 @@
3
3
  scriptDir=${0:a:h}
4
4
  cd "${scriptDir}"
5
5
 
6
- sourcery_version=2.2.5
6
+ sourcery_version=2.3.0
7
7
 
8
8
  if which sourcery >/dev/null; then
9
9
  if [[ $(sourcery --version) != $sourcery_version ]]; then
@@ -1,4 +1,4 @@
1
- // Generated using Sourcery 2.2.5 — https://github.com/krzysztofzablocki/Sourcery
1
+ // Generated using Sourcery 2.3.0 — https://github.com/krzysztofzablocki/Sourcery
2
2
  // DO NOT EDIT
3
3
 
4
4
  /*
@@ -64,6 +64,24 @@ public enum ZcashError: Equatable, Error {
64
64
  /// LightWalletService.getTaddressTxids failed.
65
65
  /// ZSRVC0010
66
66
  case serviceGetTaddressTxidsFailed(_ error: LightWalletServiceError)
67
+ /// LightWalletService.getMempoolStream failed.
68
+ /// ZSRVC0011
69
+ case serviceGetMempoolStreamFailed(_ error: LightWalletServiceError)
70
+ /// Endpoint is not provided
71
+ /// ZTSRV0001
72
+ case torServiceMissingEndpoint
73
+ /// Tor client fails to resolve ServiceMode
74
+ /// ZTSRV0002
75
+ case torServiceUnresolvedMode
76
+ /// GRPC Service is called with a Tor mode instead of direct one
77
+ /// ZTSRV0003
78
+ case grpcServiceCalledWithTorMode
79
+ /// TorClient is nil
80
+ /// ZTSRV0004
81
+ case torClientUnavailable
82
+ /// TorClient is called but SDKFlags are set as Tor disabled
83
+ /// ZTSRV0005
84
+ case torNotEnabled
67
85
  /// SimpleConnectionProvider init of Connection failed.
68
86
  /// ZSCPC0001
69
87
  case simpleConnectionProvider(_ error: Error)
@@ -147,15 +165,11 @@ public enum ZcashError: Equatable, Error {
147
165
  /// Unified address generated by rust layer is invalid when calling ZcashRustBackend.getNextAvailableAddress
148
166
  /// ZRUST0009
149
167
  case rustGetNextAvailableAddressInvalidAddress
150
- /// account parameter is lower than 0 when calling ZcashRustBackend.getTransparentBalance
151
- /// - `account` is account passed to ZcashRustBackend.getTransparentBalance.
152
- /// ZRUST0010
153
- case rustGetTransparentBalanceNegativeAccount(_ account: Int)
154
168
  /// Error from rust layer when calling ZcashRustBackend.getTransparentBalance
155
169
  /// - `account` is account passed to ZcashRustBackend.getTransparentBalance.
156
170
  /// - `rustError` contains error generated by the rust layer.
157
171
  /// ZRUST0011
158
- case rustGetTransparentBalance(_ account: Int, _ rustError: String)
172
+ case rustGetTransparentBalance(_ accountUUID: AccountUUID, _ rustError: String)
159
173
  /// Error from rust layer when calling ZcashRustBackend.getVerifiedBalance
160
174
  /// - `account` is account passed to ZcashRustBackend.getVerifiedBalance.
161
175
  /// - `rustError` contains error generated by the rust layer.
@@ -169,7 +183,7 @@ public enum ZcashError: Equatable, Error {
169
183
  /// - `account` is account passed to ZcashRustBackend.getVerifiedTransparentBalance.
170
184
  /// - `rustError` contains error generated by the rust layer.
171
185
  /// ZRUST0014
172
- case rustGetVerifiedTransparentBalance(_ account: Int, _ rustError: String)
186
+ case rustGetVerifiedTransparentBalance(_ accountUUID: AccountUUID, _ rustError: String)
173
187
  /// Error from rust layer when calling ZcashRustBackend.initDataDb
174
188
  /// - `rustError` contains error generated by the rust layer.
175
189
  /// ZRUST0015
@@ -360,6 +374,105 @@ public enum ZcashError: Equatable, Error {
360
374
  /// sourcery: code="ZRUST0064"
361
375
  /// ZRUST0064
362
376
  case rustTransactionDataRequests(_ rustError: String)
377
+ /// Error from rust layer when calling ZcashRustBackend.deriveArbitraryWalletKey
378
+ /// - `rustError` contains error generated by the rust layer.
379
+ /// ZRUST0065
380
+ case rustDeriveArbitraryWalletKey(_ rustError: String)
381
+ /// Error from rust layer when calling ZcashRustBackend.deriveArbitraryAccountKey
382
+ /// - `rustError` contains error generated by the rust layer.
383
+ /// ZRUST0066
384
+ case rustDeriveArbitraryAccountKey(_ rustError: String)
385
+ /// Error from rust layer when calling ZcashRustBackend.importAccountUfvk
386
+ /// - `rustError` contains error generated by the rust layer.
387
+ /// ZRUST0067
388
+ case rustImportAccountUfvk(_ rustError: String)
389
+ /// Error from rust layer when calling ZcashRustBackend.deriveAddressFromUfvk
390
+ /// - `rustError` contains error generated by the rust layer.
391
+ /// ZRUST0068
392
+ case rustDeriveAddressFromUfvk(_ rustError: String)
393
+ /// Error from rust layer when calling ZcashRustBackend.createPCZTFromProposal
394
+ /// - `rustError` contains error generated by the rust layer.
395
+ /// ZRUST0069
396
+ case rustCreatePCZTFromProposal(_ rustError: String)
397
+ /// Error from rust layer when calling ZcashRustBackend.addProofsToPCZT
398
+ /// - `rustError` contains error generated by the rust layer.
399
+ /// ZRUST0070
400
+ case rustAddProofsToPCZT(_ rustError: String)
401
+ /// Error from rust layer when calling ZcashRustBackend.extractAndStoreTxFromPCZT
402
+ /// - `rustError` contains error generated by the rust layer.
403
+ /// ZRUST0071
404
+ case rustExtractAndStoreTxFromPCZT(_ rustError: String)
405
+ /// Error from rust layer when calling ZcashRustBackend.getAccount
406
+ /// - `rustError` contains error generated by the rust layer.
407
+ /// ZRUST0072
408
+ case rustUUIDAccountNotFound(_ rustError: String)
409
+ /// Error from rust layer when calling ZcashRustBackend.extractAndStoreTxFromPCZT
410
+ /// - `rustError` contains error generated by the rust layer.
411
+ /// ZRUST0073
412
+ case rustTxidPtrIncorrectLength(_ rustError: String)
413
+ /// Error from rust layer when calling ZcashRustBackend.redactPCZTForSigner
414
+ /// - `rustError` contains error generated by the rust layer.
415
+ /// ZRUST0074
416
+ case rustRedactPCZTForSigner(_ rustError: String)
417
+ /// Error from rust layer when calling AccountMetadatKey.init with a seed.
418
+ /// - `rustError` contains error generated by the rust layer.
419
+ /// ZRUST0075
420
+ case rustDeriveAccountMetadataKey(_ rustError: String)
421
+ /// Error from rust layer when calling AccountMetadatKey.derivePrivateUseMetadataKey
422
+ /// - `rustError` contains error generated by the rust layer.
423
+ /// ZRUST0076
424
+ case rustDerivePrivateUseMetadataKey(_ rustError: String)
425
+ /// Error from rust layer when calling TorClient.isolatedClient
426
+ /// - `rustError` contains error generated by the rust layer.
427
+ /// ZRUST0077
428
+ case rustTorIsolatedClient(_ rustError: String)
429
+ /// Error from rust layer when calling TorClient.connectToLightwalletd
430
+ /// - `rustError` contains error generated by the rust layer.
431
+ /// ZRUST0078
432
+ case rustTorConnectToLightwalletd(_ rustError: String)
433
+ /// Error from rust layer when calling TorLwdConn.fetchTransaction
434
+ /// - `rustError` contains error generated by the rust layer.
435
+ /// ZRUST0079
436
+ case rustTorLwdFetchTransaction(_ rustError: String)
437
+ /// Error from rust layer when calling TorLwdConn.submit
438
+ /// - `rustError` contains error generated by the rust layer.
439
+ /// ZRUST0080
440
+ case rustTorLwdSubmit(_ rustError: String)
441
+ /// Error from rust layer when calling TorLwdConn.getInfo
442
+ /// - `rustError` contains error generated by the rust layer.
443
+ /// ZRUST0081
444
+ case rustTorLwdGetInfo(_ rustError: String)
445
+ /// Error from rust layer when calling TorLwdConn.latestBlockHeight
446
+ /// - `rustError` contains error generated by the rust layer.
447
+ /// ZRUST0082
448
+ case rustTorLwdLatestBlockHeight(_ rustError: String)
449
+ /// Error from rust layer when calling TorLwdConn.getTreeState
450
+ /// - `rustError` contains error generated by the rust layer.
451
+ /// ZRUST0083
452
+ case rustTorLwdGetTreeState(_ rustError: String)
453
+ /// Error from rust layer when calling TorClient.httpRequest
454
+ /// - `rustError` contains error generated by the rust layer.
455
+ /// ZRUST0084
456
+ case rustTorHttpRequest(_ rustError: String)
457
+ /// Error from rust layer when calling ZcashRustBackend.getSingleUseTransparentAddress
458
+ /// - `rustError` contains error generated by the rust layer.
459
+ /// ZRUST0085
460
+ case rustGetSingleUseTransparentAddress(_ rustError: String)
461
+ /// Single use transparent address generated by rust layer is invalid when calling ZcashRustBackend.getSingleUseTransparentAddress
462
+ /// ZRUST0086
463
+ case rustGetSingleUseTransparentAddressInvalidAddress
464
+ /// Error from rust layer when calling ZcashRustBackend.checkSingleUseTransparentAddresses
465
+ /// - `rustError` contains error generated by the rust layer.
466
+ /// ZRUST0087
467
+ case rustCheckSingleUseTransparentAddresses(_ rustError: String)
468
+ /// Error from rust layer when calling ZcashRustBackend.updateTransparentAddressTransactions
469
+ /// - `rustError` contains error generated by the rust layer.
470
+ /// ZRUST0088
471
+ case rustUpdateTransparentAddressTransactions(_ rustError: String)
472
+ /// Error from rust layer when calling ZcashRustBackend.fetchUTXOsByAddress
473
+ /// - `rustError` contains error generated by the rust layer.
474
+ /// ZRUST0089
475
+ case rustFetchUTXOsByAddress(_ rustError: String)
363
476
  /// SQLite query failed when fetching all accounts from the database.
364
477
  /// - `sqliteError` is error produced by SQLite library.
365
478
  /// ZADAO0001
@@ -479,9 +592,6 @@ public enum ZcashError: Equatable, Error {
479
592
  /// Failed to decode `Checkpoint` object.
480
593
  /// ZCHKP0002
481
594
  case checkpointDecode(_ error: Error)
482
- /// Invalid account when trying to derive spending key
483
- /// ZDRVT0001
484
- case derivationToolSpendingKeyInvalidAccount
485
595
  /// Creation of the table for unspent transaction output failed.
486
596
  /// - `sqliteError` is error produced by SQLite library.
487
597
  /// ZUTOD0001
@@ -655,6 +765,12 @@ public enum ZcashError: Equatable, Error {
655
765
  case .serviceBlockStreamFailed: return "LightWalletService.blockStream failed."
656
766
  case .serviceSubtreeRootsStreamFailed: return "LightWalletService.getSubtreeRoots failed."
657
767
  case .serviceGetTaddressTxidsFailed: return "LightWalletService.getTaddressTxids failed."
768
+ case .serviceGetMempoolStreamFailed: return "LightWalletService.getMempoolStream failed."
769
+ case .torServiceMissingEndpoint: return "Endpoint is not provided"
770
+ case .torServiceUnresolvedMode: return "Tor client fails to resolve ServiceMode"
771
+ case .grpcServiceCalledWithTorMode: return "GRPC Service is called with a Tor mode instead of direct one"
772
+ case .torClientUnavailable: return "TorClient is nil"
773
+ case .torNotEnabled: return "TorClient is called but SDKFlags are set as Tor disabled"
658
774
  case .simpleConnectionProvider: return "SimpleConnectionProvider init of Connection failed."
659
775
  case .saplingParamsInvalidSpendParams: return "Downloaded file with sapling spending parameters isn't valid."
660
776
  case .saplingParamsInvalidOutputParams: return "Downloaded file with sapling output parameters isn't valid."
@@ -676,7 +792,6 @@ public enum ZcashError: Equatable, Error {
676
792
  case .rustGetNearestRewindHeight: return "Error from rust layer when calling ZcashRustBackend.getNearestRewindHeight"
677
793
  case .rustGetNextAvailableAddress: return "Error from rust layer when calling ZcashRustBackend.getNextAvailableAddress"
678
794
  case .rustGetNextAvailableAddressInvalidAddress: return "Unified address generated by rust layer is invalid when calling ZcashRustBackend.getNextAvailableAddress"
679
- case .rustGetTransparentBalanceNegativeAccount: return "account parameter is lower than 0 when calling ZcashRustBackend.getTransparentBalance"
680
795
  case .rustGetTransparentBalance: return "Error from rust layer when calling ZcashRustBackend.getTransparentBalance"
681
796
  case .rustGetVerifiedBalance: return "Error from rust layer when calling ZcashRustBackend.getVerifiedBalance"
682
797
  case .rustGetVerifiedTransparentBalanceNegativeAccount: return "account parameter is lower than 0 when calling ZcashRustBackend.getVerifiedTransparentBalance"
@@ -730,6 +845,31 @@ public enum ZcashError: Equatable, Error {
730
845
  case .rustTorClientInit: return "Error from rust layer when calling TorClient.init"
731
846
  case .rustTorClientGet: return "Error from rust layer when calling TorClient.get"
732
847
  case .rustTransactionDataRequests: return "Error from rust layer when calling ZcashRustBackend.transactionDataRequests"
848
+ case .rustDeriveArbitraryWalletKey: return "Error from rust layer when calling ZcashRustBackend.deriveArbitraryWalletKey"
849
+ case .rustDeriveArbitraryAccountKey: return "Error from rust layer when calling ZcashRustBackend.deriveArbitraryAccountKey"
850
+ case .rustImportAccountUfvk: return "Error from rust layer when calling ZcashRustBackend.importAccountUfvk"
851
+ case .rustDeriveAddressFromUfvk: return "Error from rust layer when calling ZcashRustBackend.deriveAddressFromUfvk"
852
+ case .rustCreatePCZTFromProposal: return "Error from rust layer when calling ZcashRustBackend.createPCZTFromProposal"
853
+ case .rustAddProofsToPCZT: return "Error from rust layer when calling ZcashRustBackend.addProofsToPCZT"
854
+ case .rustExtractAndStoreTxFromPCZT: return "Error from rust layer when calling ZcashRustBackend.extractAndStoreTxFromPCZT"
855
+ case .rustUUIDAccountNotFound: return "Error from rust layer when calling ZcashRustBackend.getAccount"
856
+ case .rustTxidPtrIncorrectLength: return "Error from rust layer when calling ZcashRustBackend.extractAndStoreTxFromPCZT"
857
+ case .rustRedactPCZTForSigner: return "Error from rust layer when calling ZcashRustBackend.redactPCZTForSigner"
858
+ case .rustDeriveAccountMetadataKey: return "Error from rust layer when calling AccountMetadatKey.init with a seed."
859
+ case .rustDerivePrivateUseMetadataKey: return "Error from rust layer when calling AccountMetadatKey.derivePrivateUseMetadataKey"
860
+ case .rustTorIsolatedClient: return "Error from rust layer when calling TorClient.isolatedClient"
861
+ case .rustTorConnectToLightwalletd: return "Error from rust layer when calling TorClient.connectToLightwalletd"
862
+ case .rustTorLwdFetchTransaction: return "Error from rust layer when calling TorLwdConn.fetchTransaction"
863
+ case .rustTorLwdSubmit: return "Error from rust layer when calling TorLwdConn.submit"
864
+ case .rustTorLwdGetInfo: return "Error from rust layer when calling TorLwdConn.getInfo"
865
+ case .rustTorLwdLatestBlockHeight: return "Error from rust layer when calling TorLwdConn.latestBlockHeight"
866
+ case .rustTorLwdGetTreeState: return "Error from rust layer when calling TorLwdConn.getTreeState"
867
+ case .rustTorHttpRequest: return "Error from rust layer when calling TorClient.httpRequest"
868
+ case .rustGetSingleUseTransparentAddress: return "Error from rust layer when calling ZcashRustBackend.getSingleUseTransparentAddress"
869
+ case .rustGetSingleUseTransparentAddressInvalidAddress: return "Single use transparent address generated by rust layer is invalid when calling ZcashRustBackend.getSingleUseTransparentAddress"
870
+ case .rustCheckSingleUseTransparentAddresses: return "Error from rust layer when calling ZcashRustBackend.checkSingleUseTransparentAddresses"
871
+ case .rustUpdateTransparentAddressTransactions: return "Error from rust layer when calling ZcashRustBackend.updateTransparentAddressTransactions"
872
+ case .rustFetchUTXOsByAddress: return "Error from rust layer when calling ZcashRustBackend.fetchUTXOsByAddress"
733
873
  case .accountDAOGetAll: return "SQLite query failed when fetching all accounts from the database."
734
874
  case .accountDAOGetAllCantDecode: return "Fetched accounts from SQLite but can't decode them."
735
875
  case .accountDAOFindBy: return "SQLite query failed when seaching for accounts in the database."
@@ -768,7 +908,6 @@ public enum ZcashError: Equatable, Error {
768
908
  case .memoBytesInvalidUTF8: return "Invalid UTF-8 Bytes where detected when attempting to convert MemoBytes to Memo."
769
909
  case .checkpointCantLoadFromDisk: return "Failed to load JSON with checkpoint from disk."
770
910
  case .checkpointDecode: return "Failed to decode `Checkpoint` object."
771
- case .derivationToolSpendingKeyInvalidAccount: return "Invalid account when trying to derive spending key"
772
911
  case .unspentTransactionOutputDAOCreateTable: return "Creation of the table for unspent transaction output failed."
773
912
  case .unspentTransactionOutputDAOStore: return "SQLite query failed when storing unspent transaction output."
774
913
  case .unspentTransactionOutputDAOClearAll: return "SQLite query failed when removing all the unspent transation outputs."
@@ -840,6 +979,12 @@ public enum ZcashError: Equatable, Error {
840
979
  case .serviceBlockStreamFailed: return .serviceBlockStreamFailed
841
980
  case .serviceSubtreeRootsStreamFailed: return .serviceSubtreeRootsStreamFailed
842
981
  case .serviceGetTaddressTxidsFailed: return .serviceGetTaddressTxidsFailed
982
+ case .serviceGetMempoolStreamFailed: return .serviceGetMempoolStreamFailed
983
+ case .torServiceMissingEndpoint: return .torServiceMissingEndpoint
984
+ case .torServiceUnresolvedMode: return .torServiceUnresolvedMode
985
+ case .grpcServiceCalledWithTorMode: return .grpcServiceCalledWithTorMode
986
+ case .torClientUnavailable: return .torClientUnavailable
987
+ case .torNotEnabled: return .torNotEnabled
843
988
  case .simpleConnectionProvider: return .simpleConnectionProvider
844
989
  case .saplingParamsInvalidSpendParams: return .saplingParamsInvalidSpendParams
845
990
  case .saplingParamsInvalidOutputParams: return .saplingParamsInvalidOutputParams
@@ -861,7 +1006,6 @@ public enum ZcashError: Equatable, Error {
861
1006
  case .rustGetNearestRewindHeight: return .rustGetNearestRewindHeight
862
1007
  case .rustGetNextAvailableAddress: return .rustGetNextAvailableAddress
863
1008
  case .rustGetNextAvailableAddressInvalidAddress: return .rustGetNextAvailableAddressInvalidAddress
864
- case .rustGetTransparentBalanceNegativeAccount: return .rustGetTransparentBalanceNegativeAccount
865
1009
  case .rustGetTransparentBalance: return .rustGetTransparentBalance
866
1010
  case .rustGetVerifiedBalance: return .rustGetVerifiedBalance
867
1011
  case .rustGetVerifiedTransparentBalanceNegativeAccount: return .rustGetVerifiedTransparentBalanceNegativeAccount
@@ -915,6 +1059,31 @@ public enum ZcashError: Equatable, Error {
915
1059
  case .rustTorClientInit: return .rustTorClientInit
916
1060
  case .rustTorClientGet: return .rustTorClientGet
917
1061
  case .rustTransactionDataRequests: return .rustTransactionDataRequests
1062
+ case .rustDeriveArbitraryWalletKey: return .rustDeriveArbitraryWalletKey
1063
+ case .rustDeriveArbitraryAccountKey: return .rustDeriveArbitraryAccountKey
1064
+ case .rustImportAccountUfvk: return .rustImportAccountUfvk
1065
+ case .rustDeriveAddressFromUfvk: return .rustDeriveAddressFromUfvk
1066
+ case .rustCreatePCZTFromProposal: return .rustCreatePCZTFromProposal
1067
+ case .rustAddProofsToPCZT: return .rustAddProofsToPCZT
1068
+ case .rustExtractAndStoreTxFromPCZT: return .rustExtractAndStoreTxFromPCZT
1069
+ case .rustUUIDAccountNotFound: return .rustUUIDAccountNotFound
1070
+ case .rustTxidPtrIncorrectLength: return .rustTxidPtrIncorrectLength
1071
+ case .rustRedactPCZTForSigner: return .rustRedactPCZTForSigner
1072
+ case .rustDeriveAccountMetadataKey: return .rustDeriveAccountMetadataKey
1073
+ case .rustDerivePrivateUseMetadataKey: return .rustDerivePrivateUseMetadataKey
1074
+ case .rustTorIsolatedClient: return .rustTorIsolatedClient
1075
+ case .rustTorConnectToLightwalletd: return .rustTorConnectToLightwalletd
1076
+ case .rustTorLwdFetchTransaction: return .rustTorLwdFetchTransaction
1077
+ case .rustTorLwdSubmit: return .rustTorLwdSubmit
1078
+ case .rustTorLwdGetInfo: return .rustTorLwdGetInfo
1079
+ case .rustTorLwdLatestBlockHeight: return .rustTorLwdLatestBlockHeight
1080
+ case .rustTorLwdGetTreeState: return .rustTorLwdGetTreeState
1081
+ case .rustTorHttpRequest: return .rustTorHttpRequest
1082
+ case .rustGetSingleUseTransparentAddress: return .rustGetSingleUseTransparentAddress
1083
+ case .rustGetSingleUseTransparentAddressInvalidAddress: return .rustGetSingleUseTransparentAddressInvalidAddress
1084
+ case .rustCheckSingleUseTransparentAddresses: return .rustCheckSingleUseTransparentAddresses
1085
+ case .rustUpdateTransparentAddressTransactions: return .rustUpdateTransparentAddressTransactions
1086
+ case .rustFetchUTXOsByAddress: return .rustFetchUTXOsByAddress
918
1087
  case .accountDAOGetAll: return .accountDAOGetAll
919
1088
  case .accountDAOGetAllCantDecode: return .accountDAOGetAllCantDecode
920
1089
  case .accountDAOFindBy: return .accountDAOFindBy
@@ -953,7 +1122,6 @@ public enum ZcashError: Equatable, Error {
953
1122
  case .memoBytesInvalidUTF8: return .memoBytesInvalidUTF8
954
1123
  case .checkpointCantLoadFromDisk: return .checkpointCantLoadFromDisk
955
1124
  case .checkpointDecode: return .checkpointDecode
956
- case .derivationToolSpendingKeyInvalidAccount: return .derivationToolSpendingKeyInvalidAccount
957
1125
  case .unspentTransactionOutputDAOCreateTable: return .unspentTransactionOutputDAOCreateTable
958
1126
  case .unspentTransactionOutputDAOStore: return .unspentTransactionOutputDAOStore
959
1127
  case .unspentTransactionOutputDAOClearAll: return .unspentTransactionOutputDAOClearAll
@@ -1,4 +1,4 @@
1
- // Generated using Sourcery 2.2.5 — https://github.com/krzysztofzablocki/Sourcery
1
+ // Generated using Sourcery 2.3.0 — https://github.com/krzysztofzablocki/Sourcery
2
2
  // DO NOT EDIT
3
3
 
4
4
  /*
@@ -43,6 +43,18 @@ public enum ZcashErrorCode: String {
43
43
  case serviceSubtreeRootsStreamFailed = "ZSRVC0009"
44
44
  /// LightWalletService.getTaddressTxids failed.
45
45
  case serviceGetTaddressTxidsFailed = "ZSRVC0010"
46
+ /// LightWalletService.getMempoolStream failed.
47
+ case serviceGetMempoolStreamFailed = "ZSRVC0011"
48
+ /// Endpoint is not provided
49
+ case torServiceMissingEndpoint = "ZTSRV0001"
50
+ /// Tor client fails to resolve ServiceMode
51
+ case torServiceUnresolvedMode = "ZTSRV0002"
52
+ /// GRPC Service is called with a Tor mode instead of direct one
53
+ case grpcServiceCalledWithTorMode = "ZTSRV0003"
54
+ /// TorClient is nil
55
+ case torClientUnavailable = "ZTSRV0004"
56
+ /// TorClient is called but SDKFlags are set as Tor disabled
57
+ case torNotEnabled = "ZTSRV0005"
46
58
  /// SimpleConnectionProvider init of Connection failed.
47
59
  case simpleConnectionProvider = "ZSCPC0001"
48
60
  /// Downloaded file with sapling spending parameters isn't valid.
@@ -85,8 +97,6 @@ public enum ZcashErrorCode: String {
85
97
  case rustGetNextAvailableAddress = "ZRUST0008"
86
98
  /// Unified address generated by rust layer is invalid when calling ZcashRustBackend.getNextAvailableAddress
87
99
  case rustGetNextAvailableAddressInvalidAddress = "ZRUST0009"
88
- /// account parameter is lower than 0 when calling ZcashRustBackend.getTransparentBalance
89
- case rustGetTransparentBalanceNegativeAccount = "ZRUST0010"
90
100
  /// Error from rust layer when calling ZcashRustBackend.getTransparentBalance
91
101
  case rustGetTransparentBalance = "ZRUST0011"
92
102
  /// Error from rust layer when calling ZcashRustBackend.getVerifiedBalance
@@ -193,6 +203,56 @@ public enum ZcashErrorCode: String {
193
203
  case rustTorClientGet = "ZRUST0063"
194
204
  /// Error from rust layer when calling ZcashRustBackend.transactionDataRequests
195
205
  case rustTransactionDataRequests = "ZRUST0064"
206
+ /// Error from rust layer when calling ZcashRustBackend.deriveArbitraryWalletKey
207
+ case rustDeriveArbitraryWalletKey = "ZRUST0065"
208
+ /// Error from rust layer when calling ZcashRustBackend.deriveArbitraryAccountKey
209
+ case rustDeriveArbitraryAccountKey = "ZRUST0066"
210
+ /// Error from rust layer when calling ZcashRustBackend.importAccountUfvk
211
+ case rustImportAccountUfvk = "ZRUST0067"
212
+ /// Error from rust layer when calling ZcashRustBackend.deriveAddressFromUfvk
213
+ case rustDeriveAddressFromUfvk = "ZRUST0068"
214
+ /// Error from rust layer when calling ZcashRustBackend.createPCZTFromProposal
215
+ case rustCreatePCZTFromProposal = "ZRUST0069"
216
+ /// Error from rust layer when calling ZcashRustBackend.addProofsToPCZT
217
+ case rustAddProofsToPCZT = "ZRUST0070"
218
+ /// Error from rust layer when calling ZcashRustBackend.extractAndStoreTxFromPCZT
219
+ case rustExtractAndStoreTxFromPCZT = "ZRUST0071"
220
+ /// Error from rust layer when calling ZcashRustBackend.getAccount
221
+ case rustUUIDAccountNotFound = "ZRUST0072"
222
+ /// Error from rust layer when calling ZcashRustBackend.extractAndStoreTxFromPCZT
223
+ case rustTxidPtrIncorrectLength = "ZRUST0073"
224
+ /// Error from rust layer when calling ZcashRustBackend.redactPCZTForSigner
225
+ case rustRedactPCZTForSigner = "ZRUST0074"
226
+ /// Error from rust layer when calling AccountMetadatKey.init with a seed.
227
+ case rustDeriveAccountMetadataKey = "ZRUST0075"
228
+ /// Error from rust layer when calling AccountMetadatKey.derivePrivateUseMetadataKey
229
+ case rustDerivePrivateUseMetadataKey = "ZRUST0076"
230
+ /// Error from rust layer when calling TorClient.isolatedClient
231
+ case rustTorIsolatedClient = "ZRUST0077"
232
+ /// Error from rust layer when calling TorClient.connectToLightwalletd
233
+ case rustTorConnectToLightwalletd = "ZRUST0078"
234
+ /// Error from rust layer when calling TorLwdConn.fetchTransaction
235
+ case rustTorLwdFetchTransaction = "ZRUST0079"
236
+ /// Error from rust layer when calling TorLwdConn.submit
237
+ case rustTorLwdSubmit = "ZRUST0080"
238
+ /// Error from rust layer when calling TorLwdConn.getInfo
239
+ case rustTorLwdGetInfo = "ZRUST0081"
240
+ /// Error from rust layer when calling TorLwdConn.latestBlockHeight
241
+ case rustTorLwdLatestBlockHeight = "ZRUST0082"
242
+ /// Error from rust layer when calling TorLwdConn.getTreeState
243
+ case rustTorLwdGetTreeState = "ZRUST0083"
244
+ /// Error from rust layer when calling TorClient.httpRequest
245
+ case rustTorHttpRequest = "ZRUST0084"
246
+ /// Error from rust layer when calling ZcashRustBackend.getSingleUseTransparentAddress
247
+ case rustGetSingleUseTransparentAddress = "ZRUST0085"
248
+ /// Single use transparent address generated by rust layer is invalid when calling ZcashRustBackend.getSingleUseTransparentAddress
249
+ case rustGetSingleUseTransparentAddressInvalidAddress = "ZRUST0086"
250
+ /// Error from rust layer when calling ZcashRustBackend.checkSingleUseTransparentAddresses
251
+ case rustCheckSingleUseTransparentAddresses = "ZRUST0087"
252
+ /// Error from rust layer when calling ZcashRustBackend.updateTransparentAddressTransactions
253
+ case rustUpdateTransparentAddressTransactions = "ZRUST0088"
254
+ /// Error from rust layer when calling ZcashRustBackend.fetchUTXOsByAddress
255
+ case rustFetchUTXOsByAddress = "ZRUST0089"
196
256
  /// SQLite query failed when fetching all accounts from the database.
197
257
  case accountDAOGetAll = "ZADAO0001"
198
258
  /// Fetched accounts from SQLite but can't decode them.
@@ -269,8 +329,6 @@ public enum ZcashErrorCode: String {
269
329
  case checkpointCantLoadFromDisk = "ZCHKP0001"
270
330
  /// Failed to decode `Checkpoint` object.
271
331
  case checkpointDecode = "ZCHKP0002"
272
- /// Invalid account when trying to derive spending key
273
- case derivationToolSpendingKeyInvalidAccount = "ZDRVT0001"
274
332
  /// Creation of the table for unspent transaction output failed.
275
333
  case unspentTransactionOutputDAOCreateTable = "ZUTOD0001"
276
334
  /// SQLite query failed when storing unspent transaction output.