Skip to content

Add NativeDeviceSignerKeyStorage with iOS/Android native bridge#1653

Draft
tomas-martins-crossmint wants to merge 7 commits intowallets-v1from
tomas/wal-9202-react-native-implement-nativedevicesignerkeystorage-expo
Draft

Add NativeDeviceSignerKeyStorage with iOS/Android native bridge#1653
tomas-martins-crossmint wants to merge 7 commits intowallets-v1from
tomas/wal-9202-react-native-implement-nativedevicesignerkeystorage-expo

Conversation

@tomas-martins-crossmint
Copy link

@tomas-martins-crossmint tomas-martins-crossmint commented Mar 16, 2026

Implements hardware-backed device signing for React Native / Expo wallets, rebased on wallets-v1 where the wallets-sdk device signer logic already lives.

Changes

@crossmint/expo-device-signer — new Expo native module exposing NativeDeviceSignerKeyStorage extends DeviceSignerKeyStorage:

  • Android: P-256 key generation via KeyGenParameterSpec + SHA256withECDSA, metadata persisted in SharedPreferences
  • iOS: delegates to CrossmintDeviceSigner CocoaPod (SecureEnclaveKeyStorage on device, KeychainDeviceSignerKeyStorage on simulator)
  • hasKey(publicKeyBase64): Android checks SharedPreferences index; iOS maintains a UserDefaults index kept in sync across generate/delete calls
  • Public keys encoded as uncompressed 65-byte P-256 points (0x04 || x || y) to match the format expected by createDeviceSigner

@crossmint/client-sdk-react-native-ui — wires up device signing:

  • CrossmintWalletProvider gains a deviceSignerKeyStorage?: DeviceSignerKeyStorage prop
  • Passed through to CrossmintWalletBaseProvider, which already handles device signer registration and re-registration

@crossmint/wallets-sdk — minor export addition:

  • BiometricPolicy type is now exported from the package index

Usage

import { NativeDeviceSignerKeyStorage } from "@crossmint/expo-device-signer";

<CrossmintWalletProvider
    deviceSignerKeyStorage={new NativeDeviceSignerKeyStorage()}
>
    {children}
</CrossmintWalletProvider>

Notes

  • iOS depends on CrossmintDeviceSigner CocoaPod from crossmint-swift-sdk — needs a tagged release before this can be merged
  • Android is self-contained (Keystore + JCA, no external pod dependency)

@changeset-bot
Copy link

changeset-bot bot commented Mar 16, 2026

⚠️ No Changeset found

Latest commit: d966c04

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@tomas-martins-crossmint tomas-martins-crossmint changed the title feat(rn): implement NativeDeviceSignerKeyStorage with iOS/Android native bridge Add NativeDeviceSignerKeyStorage with iOS/Android native bridge Mar 16, 2026
@tomas-martins-crossmint tomas-martins-crossmint force-pushed the tomas/wal-9202-react-native-implement-nativedevicesignerkeystorage-expo branch from a48d77a to 4413e3a Compare March 16, 2026 21:12
@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

🔥 Smoke Test Results

Status: Passed

Statistics

  • Total Tests: 5
  • Passed: 5 ✅
  • Failed: 0
  • Skipped: 0
  • Duration: 3.41 min

✅ All smoke tests passed!

All critical flows are working correctly.


This is a non-blocking smoke test. Full regression tests run separately.

@tomas-martins-crossmint tomas-martins-crossmint force-pushed the tomas/wal-9202-react-native-implement-nativedevicesignerkeystorage-expo branch from 4413e3a to 4ba06d6 Compare March 16, 2026 21:19
@tomas-martins-crossmint tomas-martins-crossmint force-pushed the tomas/wal-9202-react-native-implement-nativedevicesignerkeystorage-expo branch from 4ba06d6 to 83fbe36 Compare March 17, 2026 14:30
@tomas-martins-crossmint tomas-martins-crossmint changed the base branch from main to wallets-v1 March 17, 2026 14:30
@tomas-martins-crossmint tomas-martins-crossmint force-pushed the tomas/wal-9202-react-native-implement-nativedevicesignerkeystorage-expo branch from ad989bc to d966c04 Compare March 17, 2026 20:26
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