Skip to content

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

Merged
bmc08gt merged 3 commits into
mainfrom
feat/shared-core-mnemonic-derivation
Sep 5, 2026
Merged

bmc08gt merged 3 commits 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
FlipcashCore, FlipcashUI, and CrossPlatformVectors were still pinned to
.upToNextMinor(from: "0.4.0"), which predates the SharedCore release that
ships SLIP-10 derivation. Moving the floor to 0.5.0 lets SwiftPM resolve
0.5.1, the release with a macOS-safe XCFramework zip (0.5.0's macOS slice
had its framework-bundle symlinks flattened into duplicated files by
KMMBridge's zip task, which broke codesign for anything linking the
macOS build of SharedCore).

FlipcashCoreVectors, the new macOS-only regression gate for this
derivation work, needs that fix to codesign at all — it now builds and
passes against the real published 0.5.1 package.
@bmc08gt
bmc08gt marked this pull request as ready for review September 5, 2026 22:25
…onic-derivation

* origin/main:
  fix(chat): keep a preview on the row after a delete (#727)
  fix(chat): settle the send animation (#726)
  feat(chat): gate edit and delete on the server's message windows (#724)
  fix(deps): move shared-core to 0.4.1, which has the KikCode figure API (#723)
  feat(account): carry message edit/delete windows on UserFlags (#721)

# Conflicts:
#	FlipcashUI/Package.swift
@bmc08gt
bmc08gt merged commit be9b1bd into main Sep 5, 2026
1 check passed
bmc08gt added a commit that referenced this pull request Sep 6, 2026
Every Xcode Cloud build off `main` fails at Archive:

```
an out-of-date resolved file was detected at .../Package.resolved, which is not
allowed when automatic dependency resolution is disabled; please make sure to
update the file to reflect the changes in dependencies.
```

#725 raised the `flipcash-shared-core-spm` requirement to `upToNextMinor 0.5.0` but left `Package.resolved` pinned at `0.4.1`. Locally Xcode just re-resolves and the mismatch is invisible; Xcode Cloud archives with automatic resolution disabled, so it stops.

This is the resolution a local build produces against `main` — shared-core `0.5.1`, `originHash` updated to match. Nothing else moves.

Found by build #524.
@bmc08gt
bmc08gt deleted the feat/shared-core-mnemonic-derivation branch September 15, 2026 17:49
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