Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
810869f
docs(preview): establish parallel recoverable wallet test stream and …
antuz123 Oct 8, 2026
034ace5
Add isolated recoverable wallet client preview
antuz123 Oct 8, 2026
4da383b
Add Seedless wallet chooser and client recovery foundations
antuz123 Oct 8, 2026
88803d6
Record native packaging limit for updated preview
antuz123 Oct 9, 2026
9f25905
Show three wallet choices on empty preview Wallets screen
antuz123 Oct 9, 2026
87a873d
Clarify wallet choice names and seedless preview copy
antuz123 Oct 9, 2026
a99f8f2
Explain seedless backup boundary after wallet choice
antuz123 Oct 9, 2026
fa70b38
Show simulated Seedless key progress before hardware choice
antuz123 Oct 9, 2026
3b5e84d
Gate inheritance preview by hardware policy capability
antuz123 Oct 9, 2026
72c57ab
Advance simulated Seedless setup and preview Mobile Key groundwork
antuz123 Oct 9, 2026
86f4be0
Add preview-only native Mobile Key store and public hardware import
antuz123 Oct 9, 2026
2999a75
Clarify testnet rollout and real inheritance recovery checks
antuz123 Oct 9, 2026
25b0b54
copy(preview): rename Seedless Wallet to Assisted Multisig
antuz123 Oct 11, 2026
96e8509
copy(preview): rename Seedless Wallet to Assisted Multisig
antuz123 Oct 11, 2026
7cd73a4
copy(preview): rename Seedless Wallet to Assisted Multisig
antuz123 Oct 11, 2026
aba5c8a
copy(preview): rename Seedless Wallet to Assisted Multisig
antuz123 Oct 11, 2026
53abccb
copy(preview): rename Seedless Wallet to Assisted Multisig
antuz123 Oct 11, 2026
bb0d625
docs(preview): adopt Assisted Multisig chooser name
antuz123 Oct 11, 2026
9a545a1
docs(preview): adopt Assisted Multisig chooser name
antuz123 Oct 11, 2026
9ad607a
docs(preview): adopt Assisted Multisig chooser name
antuz123 Oct 11, 2026
2c25a3b
docs(preview): adopt Assisted Multisig chooser name
antuz123 Oct 11, 2026
ffbfa8c
docs(preview): finalize Assisted Multisig and direct factual Bitkey c…
antuz123 Oct 11, 2026
3b80703
docs(preview): ground campaign and security checks in Ledger and COLD…
antuz123 Oct 11, 2026
b982edf
testnet(preview): add unfundable 2-of-3 P2WSH script and descriptor v…
antuz123 Oct 12, 2026
3c35ebd
test(preview): cover BIP67 descriptor compatibility and all 2-of-3 PS…
antuz123 Oct 12, 2026
de7a196
docs(preview): record first public-only testnet 2-of-3 signing checkp…
antuz123 Oct 12, 2026
9d0a687
feat(preview): add honest local Mobile Key readback diagnostic
antuz123 Oct 12, 2026
c5a3a6f
fix(preview): narrow device-generated Mobile Key public origin
antuz123 Oct 12, 2026
0747777
test(preview): verify Mobile Key continuity evidence and failure gating
antuz123 Oct 12, 2026
fed6c93
feat(preview): add opt-in native Mobile Key readback screen and backu…
antuz123 Oct 12, 2026
8c0656d
Harden isolated preview keys, policy and recovery verification
codex Oct 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .env.recoverable-preview
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file is intentionally public and contains no signing or cloud credentials.
KEEPER_PREVIEW=true
KEEPER_PREVIEW_TESTNET_ONLY=true
# Reserved for the reviewed, integrated wallet chooser. The current preview shell never runs wallet sagas.
KEEPER_EMPTY_WALLET_ONBOARDING=true
ENVIRONMENT=DEVELOPMENT
# Fail closed if a regular service client is accidentally reached by the preview shell.
RELAY=http://127.0.0.1:1/
SIGNING_SERVER_TESTNET=http://127.0.0.1:1/
SIGNING_SERVER_MAINNET=http://127.0.0.1:1/
CHANNEL_URL=http://127.0.0.1:1/
55 changes: 55 additions & 0 deletions .github/workflows/recoverable-preview-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Recoverable Preview checks

on:
pull_request:
branches: [sprint]
paths:
- '.github/workflows/recoverable-preview-checks.yml'
- 'src/preview/recoverable-wallet/**'
- 'src/services/wallets/recoverable/**'
- 'src/services/wallets/operations/recoverable/**'
- 'tests/preview/**'
- 'tests/services/recoverable/**'
- 'tests/native/preview-mobile-key/**'
- 'android/app/src/main/java/com/hexa_keeper/KeeperPreviewMobileKey*.kt'
- 'ios/recoverablePreviewMobileKey/**'
- 'package.json'
- 'yarn.lock'

permissions:
contents: read

jobs:
native-core:
name: Preview native core and bridge types
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: '21'
- name: Check actual Kotlin core and Android bridge types
run: bash tests/native/preview-mobile-key/run.sh --android-bridge-typecheck

offline-tests:
name: Preview offline regressions
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '22'
- name: Select Yarn
run: corepack prepare yarn@1.22.22 --activate
- name: Install without native setup or lockfile mutation
run: yarn install --pure-lockfile --ignore-scripts
# The existing live-Electrum suites remain in the repository Tests job.
# These offline checks never receive, broadcast or query real test sats.
- name: Run offline regressions
run: >-
yarn test --runInBand --coverage=false
--testPathIgnorePatterns /node_modules/
'tests/services/(client|wallet|vault)\.test\.ts$'
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ yarn-error.log
.env*
env*
!.env.example
!.env.recoverable-preview

# testing
modules/
Expand All @@ -78,4 +79,4 @@ modules/
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
!.yarn/versions
67 changes: 67 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Bitcoin Keeper: Codex workflow

This repository uses a **ChatGPT → Codex Cloud → Codex Local (Mac)** workflow for coding tasks. The GitHub pull request is the durable handoff between stages. Do **not** rely on one agent having access to another agent's conversation, unpushed changes, machine, or installed tools.

Repository: `KeeperCommunity/bitcoin-keeper`. Use `sprint` as the PR base unless the task explicitly specifies another base.

## Codex Cloud: implement and prepare handoff

1. Work in a task-specific branch; investigate, implement, add or update tests, and run suitable checks (for example, `npm run test` and `npm run lint`). Report actual pass/fail results; do not claim a native simulator was run unless it really was.
2. Open or update a GitHub PR with the code changes. Preserve the user's existing work; never overwrite or silently discard another branch's changes.
3. Before asking for local testing, add a section named **Codex local handoff** to the PR description (or a fresh PR comment), using this format:

```text
## Codex local handoff
State: NEEDS_LOCAL
PR: #<number>
Base: sprint
Head branch: <branch>
Head commit: <full SHA>
Goal and acceptance criteria: <concise description>
Changes made: <concise description>
Cloud checks: <commands and exact pass/fail/not-run outcomes>
Required local checks: IOS, ANDROID
Local checks requested: <targeted iOS/Android simulator, native build, and/or physical-device scenarios>
Risks / known gaps: <known limitations or 'none known'>
```

4. For app/code changes, `Required local checks` must list one or more of `IOS`, `ANDROID`, `HARDWARE` (comma-separated). Use both iOS and Android for cross-platform changes; add hardware for signer/device interactions. If no Mac tests are necessary, explain why, but the GitHub gate exempts only documentation and `.github/` changes. The handoff must name the actual PR head commit SHA after the final cloud push.
5. Return the PR URL/number and state `NEEDS_LOCAL` to the user so ChatGPT can generate the exact local handoff prompt. Continue unrelated cloud tasks while waiting for a Mac.
6. If a task needs only code review, explicitly state why local testing is not required rather than silently skipping it.

## Codex Local (Mac): validate the PR

When given **"Validate Keeper PR #<number>"**, first read the newest **Codex local handoff** section and inspect the PR head SHA.

1. Fetch the PR branch into a separate worktree or another safe checkout. Never reset, clean, or overwrite uncommitted user changes.
2. Verify the exact tested commit. Perform the **requested** native build and simulator/emulator scenarios using the available local tools. The repo defines an iPhone simulator script (`npm run ios`), Android development script (`npm run androidDevelopmentDebug`), and Jest tests. Do not assume signing credentials, device access, or an emulator are configured.
3. Run relevant regression checks and record outcomes. If hardware-wallet, NFC, USB, camera, or real-device behaviour matters, distinguish physical-device tests actually performed from tests requiring a person/device.
4. If bugs are found, make targeted fixes on the PR branch when permitted, push those changes, and retest the new SHA.
5. Leave a PR comment in this format:

```text
## Codex local validation
State: LOCAL_PASSED | LOCAL_FAILED | BLOCKED
Tested commit: <full SHA>
iOS build/simulator: <pass/fail/not run + details>
Android build/emulator: <pass/fail/not run + details>
Real devices/signers: <pass/fail/not run + details>
Other checks: <commands and outcomes>
Open issues / next action: <concise next step>
Release readiness: <ready for review / not ready>
```

6. Report the result and PR link to ChatGPT/the user.

## Release safety and coordination

- `LOCAL_PASSED` means only the reported checks passed on the reported commit. It is **not** approval to merge, sign, distribute, upload to TestFlight/Play Store, or publish a release.
- Release operations require **explicit user approval** for the intended build, environment, and distribution channel.
- ChatGPT is the coordinator: when the user shares a PR or asks for a handoff/status, inspect the latest PR details and comments; then provide the next exact copy-and-paste prompt for Cloud or Local Codex. ChatGPT should not claim to know Codex's private session state or that the Mac is currently available.
- If the Mac is offline, the state remains `NEEDS_LOCAL`; cloud work does not have to stop.

## GitHub merge gate

The `.github/workflows/keeper-local-validation.yml` workflow posts commit status `keeper/local-validation` for the current PR head SHA. For code changes, it remains failing until a repository collaborator posts a `Codex local validation` comment with `State: LOCAL_PASSED`, the **exact current commit SHA**, and `pass` for every platform named by `Required local checks`. New commits invalidate previous local sign-off. Documentation and `.github/`-only PRs are exempt from Mac tests.

This workflow **reports** a status; to **enforce** it, repository administrators must require the `keeper/local-validation` commit status for merges to `sprint` in GitHub Rulesets or branch protection. Require the existing `Tests` CI check as well. This is a review/test gate, not a guarantee that tests were actually executed; agents must report actual results truthfully. Release signing, TestFlight, Play Store, and production deployment remain separate and require explicit user approval.
93 changes: 28 additions & 65 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,71 +1,34 @@
import { LogBox, Platform } from 'react-native';
import React, { ReactElement, useEffect } from 'react';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { StatusBar } from '@gluestack-ui/themed-native-base';
import { PersistGate } from 'redux-persist/integration/react';
import { Provider } from 'react-redux';
import { initConnection, endConnection } from 'react-native-iap';
import { TorContextProvider } from 'src/context/TorContext';
import { HCESessionProvider } from 'react-native-hce';
import { LocalizationProvider } from 'src/context/Localization/LocContext';
import { AppContextProvider } from 'src/context/AppContext';
import Navigator from './src/navigation/Navigator';
import { persistor, store } from './src/store/store';
import NotificationHandler from 'src/hooks/useNotificationHandler';
import { SentryWrapper } from 'src/services/sentry';
import ThemeContextProvider from 'src/context/ThemeContext';
import { SafeAreaProvider, initialWindowMetrics } from 'react-native-safe-area-context';

LogBox.ignoreLogs([
"[react-native-gesture-handler] Seems like you're using an old API with gesture components, check out new Gestures system!",
/\b{$Require cycle}\b/gi,
'Warning: ...',
/.+/s,
]);

function AndroidProvider({ children }: { children: ReactElement }) {
return Platform.OS === 'android' ? <HCESessionProvider>{children}</HCESessionProvider> : children;
}
import React from 'react';
import { Text, View } from 'react-native';
import NativeConfig from 'react-native-config';
import DeviceInfo from 'react-native-device-info';
import RecoverableWalletPreviewApp from './src/preview/recoverable-wallet/RecoverableWalletPreviewApp';
import { getPreviewRuntime } from './src/preview/recoverable-wallet/previewRuntime';

function App() {
useEffect(() => {
initConnection();
return () => {
endConnection();
};
}, []);

return (
<GestureHandlerRootView style={{ flex: 1 }}>
<SafeAreaProvider initialMetrics={initialWindowMetrics}>
<ThemeContextProvider>
<NotificationHandler />
<StatusBar translucent backgroundColor="transparent" barStyle="light-content" />
<LocalizationProvider>
<AppContextProvider>
<TorContextProvider>
<AndroidProvider>
<Navigator />
</AndroidProvider>
</TorContextProvider>
</AppContextProvider>
</LocalizationProvider>
</ThemeContextProvider>
</SafeAreaProvider>
</GestureHandlerRootView>
const mode = getPreviewRuntime(
NativeConfig.KEEPER_PREVIEW,
DeviceInfo.getBundleId(),
NativeConfig.KEEPER_PREVIEW_TESTNET_ONLY
);
}

function AppWrapper() {
return (
<PersistGate persistor={persistor} loading={null}>
<Provider store={store}>
<App />
</Provider>
</PersistGate>
);
}
if (mode === 'misconfigured') {
return (
<View style={{ flex: 1, justifyContent: 'center', padding: 24 }}>

Check warning on line 17 in App.tsx

View workflow job for this annotation

GitHub Actions / Lint

Inline style: { flex: 1, justifyContent: 'center', padding: 24 }
<Text accessibilityRole="alert">
This Keeper Preview build is misconfigured. No wallet features are available.
</Text>
</View>
);
}

const SentryApp = SentryWrapper(AppWrapper);
if (mode === 'preview') {
return <RecoverableWalletPreviewApp />;
}

// Keep the shipping app's providers and services out of the preview runtime.
const ProductionApp = require('./ProductionApp').default;
return <ProductionApp />;
}

export default SentryApp;
export default App;
71 changes: 71 additions & 0 deletions ProductionApp.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { LogBox, Platform } from 'react-native';
import React, { ReactElement, useEffect } from 'react';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { StatusBar } from '@gluestack-ui/themed-native-base';
import { PersistGate } from 'redux-persist/integration/react';
import { Provider } from 'react-redux';
import { initConnection, endConnection } from 'react-native-iap';
import { TorContextProvider } from 'src/context/TorContext';
import { HCESessionProvider } from 'react-native-hce';
import { LocalizationProvider } from 'src/context/Localization/LocContext';
import { AppContextProvider } from 'src/context/AppContext';
import Navigator from './src/navigation/Navigator';

Check failure on line 12 in ProductionApp.tsx

View workflow job for this annotation

GitHub Actions / Lint

`./src/navigation/Navigator` import should occur after import of `react-native-safe-area-context`
import { persistor, store } from './src/store/store';

Check failure on line 13 in ProductionApp.tsx

View workflow job for this annotation

GitHub Actions / Lint

`./src/store/store` import should occur after import of `react-native-safe-area-context`
import NotificationHandler from 'src/hooks/useNotificationHandler';
import { SentryWrapper } from 'src/services/sentry';
import ThemeContextProvider from 'src/context/ThemeContext';
import { SafeAreaProvider, initialWindowMetrics } from 'react-native-safe-area-context';

LogBox.ignoreLogs([
"[react-native-gesture-handler] Seems like you're using an old API with gesture components, check out new Gestures system!",
/\b{$Require cycle}\b/gi,
'Warning: ...',
/.+/s,
]);

function AndroidProvider({ children }: { children: ReactElement }) {
return Platform.OS === 'android' ? <HCESessionProvider>{children}</HCESessionProvider> : children;
}

function App() {
useEffect(() => {
initConnection();
return () => {
endConnection();
};
}, []);

return (
<GestureHandlerRootView style={{ flex: 1 }}>

Check warning on line 39 in ProductionApp.tsx

View workflow job for this annotation

GitHub Actions / Lint

Inline style: { flex: 1 }
<SafeAreaProvider initialMetrics={initialWindowMetrics}>
<ThemeContextProvider>
<NotificationHandler />
<StatusBar translucent backgroundColor="transparent" barStyle="light-content" />
<LocalizationProvider>
<AppContextProvider>
<TorContextProvider>
<AndroidProvider>
<Navigator />
</AndroidProvider>
</TorContextProvider>
</AppContextProvider>
</LocalizationProvider>
</ThemeContextProvider>
</SafeAreaProvider>
</GestureHandlerRootView>
);
}

function AppWrapper() {
return (
<PersistGate persistor={persistor} loading={null}>
<Provider store={store}>
<App />
</Provider>
</PersistGate>
);
}

const SentryApp = SentryWrapper(AppWrapper);

export default SentryApp;
Loading
Loading