Commit Graph

145 Commits

Author SHA1 Message Date
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
Eljo Prifti a09ce95c2e
Create SaplingParamTool and add a function for clearing the param files from cache (#206)
* Create SaplingParamTool.kt class
add clear and validate function

* add new line

* add SaplingParamToolTest.kt class

* fix PR request

* replace with one single line comment

* revert grandle at exact point in time

* revert build grandle to master

* align build.grandle file with the master one

* align with master
2021-01-22 17:05:11 -05:00
Kevin Gorham 1b5ee935a0
New: Complete changes for adding ZIP-313 to reduce the default fee. 2020-12-18 02:27:23 -05:00
Eljo Prifti ce161d5660
Clear most build warnings (#187)
* Clear the warns build

* Supress inline CurrencyFormatter.kt and Twig.kt
Add FlowPreview into bulild.grandle
Minor change

* Add supres inline at the file level

* Add suppress inline at the file level
2020-12-04 09:28:55 -05:00
Kevin Gorham e9e2593369
New: Make Initializer Config functions fluid.
This adds flexibility and makes it a bit easier to mix in logic while creating a Config object.
2020-11-24 00:39:10 -05:00
Kevin Gorham 7bb895c7e1
New: Add typed exceptions for birthday errors. 2020-11-24 00:37:10 -05:00
Kevin Gorham 90feb5348e
New: Improve birthday configuration.
Make it easier to restore wallets without knowing their birthday. Those wallets will sync from SaplingActivation without the developer having to hardcode that height into their wallet. We achieve this by allowing the Initializer Config object to specify what to do when the birthdayHeight is null. In general, it is probably easier to use the importWallet and newWallet functions to achieve the same goal with more clarity.
2020-11-24 00:36:23 -05:00
Kevin Gorham efc8500959
New: Improved initializer construction.
Builder was misnamed. It is moreso a configuration object. Making this change simplified some of the more confusing aspects of creating an initializer and also made it so the initializer.config.new functions can now work as expected. Prior to these changes it was difficult to make an initializer that used a new birthday.
2020-11-20 12:01:45 -05:00
Kevin Gorham 4087bc65bc
Update to latest lightwalletd service definition.
Updated to the latest service.proto file to utilize the new t-addr endpoints. This closes https://github.com/zcash/zcash-android-wallet-sdk/issues/176.
2020-11-20 11:58:04 -05:00
Kevin Gorham 797ef8733a
Update display name info for Canopy. 2020-11-16 20:33:53 -05:00
Kevin Gorham 4e2065e0df Add ability to erase by alias. 2020-10-30 09:22:03 -04:00
Kevin Gorham 8cbc063caa
Updated visibility on open classes to improve extensibility. 2020-10-16 13:39:16 -04:00
Kevin Gorham 5879bb3442
Publishing is functional again on Bintray.
Minor uncommitted tweaks. Published version Alpha08.
2020-10-01 16:22:29 -04:00
Kevin Gorham 0601ec488b
Various bug fixes and improvements.
- Exposed primary constructor in initializer and added more convenience functions
- Fix: error handler not being passed through when changing server
- New: warn developer when a critical error occurs but is not covered with a callback
- New: Typed exceptions for missing birthday or viewingKey values during initialization
- New: updated default server for checkpoint tool
2020-09-25 09:59:55 -04:00
Kevin Gorham 8d8a1ae8a8
Fix: incorrect query allowing change to show up in TX list.
Originally identified by @pacu on the iOS side. We paired up and fixed
and tested the query over there.
2020-09-23 12:03:15 -04:00
Kevin Gorham ab5b34cbd8
Implement the logic for changing servers. 2020-09-23 12:02:12 -04: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 58925b04b3
Merge initializers.
The new API for initializing with a viewing key will support all existing uses of the other initializer. So they can be safely merged and the changes to support the new one are fairly straight forward.

Also, iterated on the design of the Initializer to simplify construction and make the API easier to use.
2020-09-23 12:02:11 -04:00
Kevin Gorham 306eac73b0
Rename the new VkInitializer to replace the old Initializer. 2020-09-23 12:02:11 -04:00
Kevin Gorham eb463ec233
Remove the existing Initializer. 2020-09-23 12:02:10 -04:00
Kevin Gorham 14deb99362
Iterate on initializers.
Simplify the builder and also allow it to be a stand-alone configuration item, which would be more useful to React apps that cannot use Kotlins receiver function syntax.
2020-09-23 12:02:10 -04:00
Kevin Gorham a08beef93b
Created birthday tool and derivation tool.
By extracting behavior from the Initializer into a more genralized class that can be used statically.
2020-09-11 03:33:25 -04:00
Kevin Gorham 11431f5e5a
Initializer improvements and iteration.
- Extracted parent interface
- Created ViewingKey Initializer to start synchronizing without the seed (only the viewing key is needed)
- Extracted tools from the existing initializer and simlified it a bit
2020-09-11 03:29:17 -04:00
Kevin Gorham 94c8a18be7
Added ability to start a Synchronizer with just a viewing key.
This was a long awaited request from wallet partners who already have keys available when the wallet launches.
2020-09-11 03:23:08 -04:00
Kevin Gorham 01efabe195
POC: prove the concept of local RPC via protobufs.
This is an example of a jni call that accepts and returns proto objects. Ultimately, this trades a minor amount of performance for a significant improvement of ease of use. By exchanging protocol buffers, the Kotlin and Rust layers are able to communicate using far more complex objects. Eventually, this type of approach might completely replace the use of a database or sqlite.
2020-08-13 22:01:52 -04:00
Kevin Gorham 816d1afbb3
New: Add lightwalletd service for fetching t-addr txs. 2020-08-13 20:44:05 -04:00
Kevin Gorham bb747a3ce5
Fix: Minor improvements 2020-08-13 20:37:09 -04:00
Kevin Gorham 0f87961947
New: Change the default lightwalletd server.
The old server will be shutting down to coincide with our internal app deployment changes.
2020-08-13 20:31:54 -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 215788dd27
Migrate changes from hackathon.
Mostly includes changes to make testing more robust.
2020-07-29 00:36:56 -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
Kevin Gorham 4e95c46acb
Add missing newlines. 2020-06-09 23:28:21 -04:00
Kevin Gorham 48f03e6beb
Refactor: Moved validation objects into package.
This helps declutter the Synchronizer, which we do not want to let get complex.
2020-06-09 22:52:32 -04:00
Kevin Gorham dce743d9f9
Refactor: moved 'entity' package into 'db'.
Now it is more clear that these files are related to the databases. Plus, there's one less folder at the top-level, which reduces clutter.
2020-06-09 22:31:00 -04:00
Kevin Gorham c70da1983d
New: Added Heartwood support.
Going forward, consensus branch IDs will automatically switch over, once we reach the activation height.
2020-06-09 22:15:55 -04:00
Kevin Gorham 5cc8a38a5f
New: Additional APIs and functionality.
Added new functions that made things easier while testing, making the SDK a bit more usable.
2020-06-09 22:15:54 -04:00
Kevin Gorham c585ed93ff
Improve error handling. 2020-06-09 22:15:54 -04:00
Kevin Gorham 345725a744
Fix: Wallet details screen does not update.
Should address https://github.com/zcash/zcash-android-wallet/issues/153 but needs to be verified before closing that issue.
2020-06-09 21:53:18 -04:00
Kevin Gorham eecf57383e
Improve polling interval logic per #95.
Add logic to poll on the next time boundary, rather than sleeping a fixed amount of time after processing.
2020-06-09 21:43:23 -04:00
Kevin Gorham 2ee0e9ab3c
Simplified initialization.
Put more emphasis on creating a synchronizer only with an initializer.
Made it easier to specify an initializer and custom dependencies at once.
Removed confusing constructor from SdkSynchronizer that muddied the waters on how to properly create one.
Added extension function to make it easier to start a synchronizer with an imported wallet.
2020-06-09 21:35:40 -04:00
Kevin Gorham ae2af49913
Merge pull request #121 from rex4539/fix-typos
Fix typos and cleanup
2020-04-16 11:33:30 -04:00
Kevin Gorham cdabfc8f4c
Improve the handling of disconnected state. 2020-03-27 16:28:42 -04:00
Kevin Gorham d36e4f276b
Simplified the construction of a synchronizer.
There is no harm in letting the initializer hold a reference to the application context. So let it do that in order to simplify the construction of synchronizers.
2020-03-27 16:26:41 -04:00
Kevin Gorham 82381c5381
Fix: correct the transaction queries.
The new info that we receive during scanning broke some assumptions we were making in the queries.
2020-03-27 16:24:27 -04:00
Dimitris Apostolou 44cba56d30
Fix typos and cleanup 2020-03-26 13:00:04 +02:00
Kevin Gorham 7bb80c4678
Add support for inbound memos and full wallet restore. 2020-03-25 17:58:08 -04:00
Kevin Gorham 83ea9ddac7
Bug fixes and improvements.
Change doc format to html, fix migration issues, etc.
2020-03-25 17:56:27 -04:00
Jack Grigg 25a5eab4be RustBackend.decryptAndStoreTransaction() 2020-03-26 08:37:40 +13:00
Kevin Gorham a43070cd6a
Documented everything public-facing.
This should bring documentation coverage to 100%
2020-02-27 13:51:00 -05:00
Kevin Gorham de0d85c20d
First pass at adding documentation. 2020-02-27 13:51:00 -05:00