Commit Graph

23 Commits

Author SHA1 Message Date
Kevin Gorham d4f0b0474c
New: Expose the stateflows for balances.
This conveniently makes the 'value' property accessible without a cast.
2021-06-30 02:30:24 -04:00
Kevin Gorham ac03fd2358
Fix: Rely on List instead of PagedList for paged repository results. 2021-06-30 02:27:16 -04:00
Kevin Gorham 136b4b1bc2
Fix: Gracefully handle failures while fetching UTXOs
Also added temporary code to prevent a wallet from constantly checking for UTXOs on a server that simply does not have that feature enabled.
2021-06-30 02:25:40 -04:00
Kevin Gorham d095e9359a
New: Add separate balances for sapling, transparent and orchard pools.
Note that the orchard one is just a placeholder for now.
2021-06-15 00:09:24 -04:00
Kevin Gorham a1a28cac82
Add documentation to recent code changes. 2021-06-07 00:18:25 -04:00
Kevin Gorham 0c73f2b585
New: Expose network height as a StateFlow.
We already had latest height but that would require polling. Having a state flow makes it easier for views to be pushed the latest height.
2021-05-25 11:15:09 -04:00
Kevin Gorham fc7cead1f6
New: Add the concept of 'prepare'.
begin adding a step between the creation of a Synchronizer and starting it, called 'prepare' which is responsible for migrations and other steps to get the data ready for syncing.
2021-05-07 03:56:26 -04:00
Kevin Gorham 0acb439793
New: Add quickRewind feature to make it easy to rescan 2wks of blocks.
This helps address https://github.com/nighthawk-apps/nighthawk-wallet-android/issues/38
2021-05-03 22:53:23 -04:00
Kevin Gorham 5dd0df7619
Fix: change rewind behavior to correct for witnesses
Addresses SDK side of https://github.com/zcash/librustzcash/issues/373
2021-04-14 18:44:17 -04:00
Kevin Gorham 4a90e6bf24
New: Derive sapling activation height from network.
This type of change will allow dynamically switching networks within the app or unit tests, later.

fixup network change
2021-04-09 21:46:20 -04:00
Kevin Gorham af190e786b
New: Explicitly declare network when needed.
It is important to be very explicit about the network and not make any assumptions for ease of use because that resulted in numerous bugs while transitioning away from the old two library setup.

squash explicit network
2021-04-09 21:46:20 -04:00
Kevin Gorham 39972d8e43
New: Functionality to refresh UTXOs and updated taddr support. 2021-04-05 18:37:13 -04:00
Kevin Gorham ac9f803d5b
Refactor: Added type package.
In anticipation of UnifiedViewingKeys and, later, URI support as well as NU5 support for Unified Addresses.
2021-04-01 02:14:57 -04:00
Kevin Gorham 997f6988a4
New: Add the ability to rewind and rescan blocks.
This one feature can fix lots of problems that wallets encounter and it is particularly useful for the 'Max Transaction' bug. See this iOS issue for more details: https://github.com/zcash/ZcashLightClientKit/issues/255
2021-03-31 09:16:06 -04:00
Kevin Gorham ad1f2438fb
Docs: Update README to draw attention to the demo app. 2021-03-31 09:07:37 -04:00
Kevin Gorham 24b428e3d5
New: Improve birthday logic.
Previously, the wallet had to manage determining the best birthday but that logic has now been pulled down into the SDK. A wallet can safely skip all blocks prior to the first transaction so the birthday starts as an estimate, based on the checkpoint and then moves forward to the height of the first transaction. If a user starts a wallet but does not receive funds for a long while, their wallet will have a better birthday as a result of this change and that is a very common use case.
2021-03-31 08:47:04 -04:00
Kevin Gorham 1ac3685819
New: Expose isStarted property of the Synchronizer. 2021-03-31 08:37:12 -04:00
Kevin Gorham a0837474d0
Update ktlint formatting and imports. 2021-03-10 22:04:39 -05:00
Kevin Gorham 1d2c7b1a4f
New: Non-Rust changes to support auto-shielding. 2021-02-17 16:07:57 -05:00
Adí 794a9f99b8
Add ktlint (#207)
* Add ktlint

Fix formatting per ktlint rules.
Upgrade dependencies & gradle.

* Move ktlint to apply section

* Keep unused-import check

Remove afterEvaluate check.

* Remove respository setup for ktlint.gradle

Fix format for SaplingParamTool & CompatBlockProcessor
2021-03-10 13:10:03 -05:00
Kevin Gorham 24f7433f1c
Update Synchronizer and Processor APIs to enable changing the server.
Actual implementation is in a subsequent commit.
2020-09-23 12:02:11 -04:00
Kevin Gorham bb77fa2d5d
New: add robust support for tx cancellation
Also greatly improved handling of expired and failed transactions.
2020-08-01 02:13:39 -04:00
Kevin Gorham aa569c99dd
Major refactor: corrected package name.
Now the SDK matches everything else that we have published to bintray and jcenter.
2020-06-10 03:08:19 -04:00