feat(derive): route key derivation through SharedCoreKit - #725
Draft
bmc08gt wants to merge 1 commit into
Draft
Conversation
Derive.seedUsingBIP39 and keyPairUsingBIP39 now call SharedDerivation.seed/derivedKey instead of the Swift-only BIP-39 and SLIP-10 implementation, so derivation logic is shared with Android via :libs:encryption:mnemonic in KMP commonMain. FlipcashCore/Package.swift and FlipcashCoreVectors/Package.swift needed a macOS platform declaration to actually exercise this: neither had ever built for macOS before (FlipcashCore declared iOS only), so FlipcashCoreVectors' Slip10DerivationVectorTests gate had never run. Declaring macOS surfaced that ChatNotificationClient's GRPCClient usage needs macOS 15, not the 13.3/14.0 floor BigDecimal and grpc/nio need, so both manifests are pinned to macOS 15. Verified locally against a macOS-slice build of SharedCore.xcframework via FLIPCASH_SHARED_CORE_LOCAL (kmp/shared-core's macOS targets aren't in a published flipcash-shared-core-spm release yet); the full FlipcashCoreVectors suite passes.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Routes
Derive.seedUsingBIP39andDerive.keyPairUsingBIP39throughSharedCoreKit'sSharedDerivationinstead of the Swift-only BIP-39/SLIP-10 implementation, so key derivation is shared with Android via:libs:encryption:mnemonicin KMP commonMain.Declaring a macOS platform on
FlipcashCore/FlipcashCoreVectors(needed to exerciseSlip10DerivationVectorTests, see below) surfaced two pre-existing gaps unrelated to this change:FlipcashCore/Package.swifthad never declared macOS at all, and once it could build for macOS,ChatNotificationClient'sGRPCClientusage turned out to need macOS 15, not the 13.3/14.0 floorBigDecimal/grpc-nio need. Both manifests are now pinned to macOS 15.Draft because: this depends on a
flipcash-shared-core-spmrelease that hasn't shipped yet. The macOS Kotlin/Native targets it needs are in code-android-app#1402; until that lands and a release is cut, CI here can't resolveSharedCoreKitfor macOS andFlipcashCoreVectorswill fail to build.Test plan
FlipcashCoreVectors' full suite (6 tests, includingSlip10DerivationVectorTests) passes locally against a macOS-slice build ofSharedCore.xcframeworkviaFLIPCASH_SHARED_CORE_LOCALflipcash-shared-core-spmrelease once cut, then mark ready for review