Skip to content

feat(derive): route key derivation through SharedCoreKit - #725

Draft
bmc08gt wants to merge 1 commit into
mainfrom
feat/shared-core-mnemonic-derivation
Draft

feat(derive): route key derivation through SharedCoreKit#725
bmc08gt wants to merge 1 commit into
mainfrom
feat/shared-core-mnemonic-derivation

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Routes Derive.seedUsingBIP39 and Derive.keyPairUsingBIP39 through SharedCoreKit's SharedDerivation instead of the Swift-only BIP-39/SLIP-10 implementation, so key derivation is shared with Android via :libs:encryption:mnemonic in KMP commonMain.

Declaring a macOS platform on FlipcashCore/FlipcashCoreVectors (needed to exercise Slip10DerivationVectorTests, see below) surfaced two pre-existing gaps unrelated to this change: FlipcashCore/Package.swift had never declared macOS at all, and once it could build for macOS, ChatNotificationClient's GRPCClient usage turned out to need macOS 15, not the 13.3/14.0 floor BigDecimal/grpc-nio need. Both manifests are now pinned to macOS 15.

Draft because: this depends on a flipcash-shared-core-spm release 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 resolve SharedCoreKit for macOS and FlipcashCoreVectors will fail to build.

Test plan

  • FlipcashCoreVectors' full suite (6 tests, including Slip10DerivationVectorTests) passes locally against a macOS-slice build of SharedCore.xcframework via FLIPCASH_SHARED_CORE_LOCAL
  • Re-verify against a real flipcash-shared-core-spm release once cut, then mark ready for review

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.
@bmc08gt bmc08gt self-assigned this Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant