Commit Graph

22 Commits

Author SHA1 Message Date
Jack Grigg abffb3f9ee Adjust `Synchronizer.proposeShielding` API
- Returns `null` when there are no funds to shield or the shielding
  threshold is not met.
- Throws an exception if there are funds to shield in more than one
  transparent receiver within the account.
- Has an optional parameter for specifying which transparent receiver
  to shield funds from.

Part of Electric-Coin-Company/zcash-android-wallet-sdk#680.
2024-03-06 20:17:41 +00:00
Jack Grigg e36bbdec7a Expose shielding threshold in `Synchronizer.proposeShielding`
`Synchronizer.shieldFunds` is not altered because it is deprecated.
2024-03-06 16:40:21 +01:00
Jack Grigg a27fbda8c0 Expose APIs for working with transaction proposals
Closes Electric-Coin-Company/zcash-android-wallet-sdk#1359.
2024-03-06 16:40:21 +01:00
Honza Rychnovský 19cca515fb
[#1385] Adopt `AccountBalance` fields in Kotlin layer
* [#1385] Adopt `AccountBalance` fields in Kotlin layer

- Adds the Kotlin side changes for #1380
- Changed WalletBalance to contain these three fields: available, changePending, and valuePending, instead of total and available, and change the transparent flow to StateFlow<Zatoshi>, as we don't distinguish there.
- Related connected APIs changed
- Closes #1385

* Add WalletBalanceFixture

Placed in the public directory to be visible for clients as well

* Changelog update

* Remove `getVerifiedTransparentBalance ` API entirely

Co-authored-by: str4d <jack@electriccoin.co>
2024-02-07 17:33:47 +01:00
Jack Grigg a8965b01c6 Fix types of arguments to `GetSubtreeRoots` and `putSaplingSubtreeRoots` 2024-01-30 17:23:37 +00:00
Jack Grigg 7149def6f1 Expose `ScanSummary` across the FFI
Closes Electric-Coin-Company/zcash-android-wallet-sdk#1368.
2024-01-30 17:23:37 +00:00
Jack Grigg 0f0cd81a12 Replace `Backend.{createToAddress, shieldToAddress}` with proposal-based methods
Closes Electric-Coin-Company/zcash-android-wallet-sdk#1338.
2024-01-30 17:23:37 +00:00
Jack Grigg 85af183cee backend-lib: Migrate to latest in-progress revision of Rust crates 2024-01-30 17:23:37 +00:00
Honza Rychnovský 73d7afc2a4
[#1327] Ktlint 1.1.0
* [#1327] Ktlint 1.1.0

Closes #1327

* [#1327] Autoformatting with Ktlint

* Ktlint formatting warnings fix
2024-01-04 21:21:32 +01:00
str4d ae2d7152aa
Replace Sapling balance and scan progress FFIs with wallet summary FFI
* Replace Sapling balance and scan progress FFIs with wallet summary FFI

Closes zcash/zcash-android-wallet-sdk#1282.

* Using test fixture for JniAccountBalance

* Minor documentation changes

* Fix typo

---------

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-11-08 10:57:23 +01:00
Honza c7125f4183 Update createAccountAndGetSpendingKey API
- TypesafeBackend.createAccountAndGetSpendingKey now works with a type-safe TreeState model class instead of ByteArray.
- New type-safe TreeState added. Once we get the TreeState object from the lightwalletd server, potential validation comes into this object.
2023-09-11 19:11:03 +02:00
Honza a43c5f130e Change createAccountAndGetSpendingKey API
The checkpoint parameter changed for treeState: ByteArray
2023-09-09 19:11:58 +02:00
Jack Grigg 42cf9d6466 Migrate to Rust revision that exposes scanned heights 2023-09-08 20:19:51 +02:00
Honza 7b7275b5bd Migrate to latest Rust revision follow-up changes 2023-09-08 20:19:51 +02:00
Jack Grigg 11d9529f2b Migrate to latest Rust revision
- Account birthdays
- Scan progress
- Bugfixes
2023-09-08 20:19:51 +02:00
Jack Grigg 54d016e401 Migrate to Rust revision with checkpoint and memo bugfixes 2023-09-08 20:18:10 +02:00
Honza Rychnovský 6a68889df6 [#1123] Linear vs Non-linear decision mechanism 2023-09-08 20:18:10 +02:00
Honza 57fe48e9fe Switch to ScanRange model in sdk-lib module 2023-09-08 20:18:10 +02:00
Jack Grigg 12c3441778 Migrate to Rust crate versions with fast spendability support 2023-09-08 20:18:10 +02:00
Honza Rychnovský f1b5e3aade
[#1014] Decorate Backend with Typesafe APIs
* [#1014] Decorate Backend with Typesafe APIs
2023-07-17 12:50:53 +02:00
Honza Rychnovský b99ab6cdf9
[#920] Rust backend void return
* [#920] Tweak RustBackend public APIs to have void return values

- Contains changes for putUtxo() function

* Changes for scanBlocks() function

* Changes for decryptAndStoreTransaction()

* Changes for rewindToHeight()

* Changes for writeBlockMetadata()

* Changes for initBlocksTable and initAccountsTable
2023-06-09 10:29:33 +02:00
Carter Jernigan bc19797125
[#971] Refactor Rust FFI to separate module
---------

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-05-18 07:36:15 -04:00