-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from ZIP 32 account indices to UUID account identifiers (#1640)
* Switch from ZIP 32 account indices to UUID account identifiers * Rename TransactionRecipient.Account To emphasize the distinction between Account and TransactionRecipient.Account * Fix `Backend.createAccount` API parameters * Add `importAccountUfvk` to the Rust backend. * Propagate accountName and keySource across SDK * Propagate new importAccount across SDK * Wrap createAccount setup information * Wrap importAccount setup information * Add `Zip32AccountIndex` wrapper * Update key source parameter * Remove account from `UnifiedSpendingKey` * Fix `importAccountByUfvk` API * Refactor Account.accountUuid to wrapper class So we can easily keep it typesafe and compare it to each other * Add `JniAccountUsk` * Add `seedFingerprint` and `zip32AccountIndex` To public API `importAccountUfvk` * Transactions by account UUID * Refactor default account creation * Migrate to Rust crate revision with bugfixes to account UUID migration * Refactor inputs of `importAccountUfvk` * Use `FirsClassByteArray` for `seed` parameter --------- Co-authored-by: Honza <[email protected]> Co-authored-by: Kris Nuttycombe <[email protected]> Co-authored-by: Honza Rychnovský <[email protected]> Co-authored-by: Daira-Emma Hopwood <[email protected]>
- Loading branch information
1 parent
ad1325b
commit 2cb7315
Showing
75 changed files
with
1,494 additions
and
587 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
backend-lib/src/main/java/cash/z/ecc/android/sdk/internal/jni/JniConstants.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package cash.z.ecc.android.sdk.internal.jni | ||
|
||
import cash.z.ecc.android.sdk.internal.model.JniAccount | ||
|
||
/** | ||
* The number of bytes in the account UUID parameter. It's used e.g. in [JniAccount.accountUuid], or | ||
* [JniUnifiedSpendingKey.accountUuid] | ||
*/ | ||
const val JNI_ACCOUNT_UUID_BYTES_SIZE = 16 | ||
|
||
/** | ||
* The number of bytes in the seed fingerprint parameter. It's used e.g. in [JniAccount.seedFingerprint] | ||
*/ | ||
const val JNI_ACCOUNT_SEED_FP_BYTES_SIZE = 32 |
Oops, something went wrong.