Import an identity I already have
A person who already has a Seed identity brings it to the phone with its recovery phrase or a key file.

As an identity holder, I want to bring an identity I already have onto this phone with its recovery phrase or key file, so that I am the same person here as on my other devices.

Situation

I created my identity somewhere else, on Seed desktop or on another phone. I have its 12 or 24 recovery words on paper, or the text of a key file I exported. I am on the Me tab.

What I do

    Tap "Import identity".

    Type the words, or paste the key file text, into the large field.

    Read the line under the field until it says the input is good.

    Optionally type a name for the key.

    Tap "Import".

What I should see

    A sheet titled "Import identity" with "Cancel" and "Import". See Import identity.

    The field is headed "Recovery phrase or key file" and hints "12 words, or paste a .seedkey file".

    The keyboard does not capitalise, correct or spell check what I type.

    While I type, the line under the field counts, for example "7 of 12 words." in red.

    A complete, correct phrase turns the line grey: "12 words, checksum OK." A 24 word phrase is accepted the same way.

    Pasted key file text shows "Key file" in grey.

    "Import" is enabled only when the line is grey.

    After "Import" the button reads "Importing…", the sheet closes, and the identity is current at the top of Me.

    The same sheet opens from "Import recovery phrase or key" on Vault and from "Import identity" in Edit profile.

When something goes wrong

    A wrong word is named: "Word 2 is not a valid recovery word." or "Words at positions 2, 4 are not valid recovery words." I correct those words in place.

    Words in the wrong order or a wrong last word give "Invalid recovery phrase checksum. The 12th word must match the checksum of the others." I check the paper and retype.

    A name already in use gives "Name already exists, delete it first." I change the name and tap "Import" again.

    A broken key file gives a reason that starts "Invalid key file:", for example "Invalid key file: not valid JSON." I paste the complete text again.

Not included

    Key files protected by a password are refused with "Password-protected key exports are not supported yet." See Current limits and known gaps.

    There is no file picker and no camera scan. A key file has to be pasted as text.

    Identities from the earlier React Native app are not carried over automatically. See the same limits page.

Trace

Story US-ID-02, status Shipped. These links are kept in step with the traceability matrix and with the "User stories" section of every page listed here.

Design

Page

Part it plays

Import identity sheet

The sheet with the one field for a phrase or a key file

Me

Entry point and where the imported identity appears as current

Vault

Second entry point: Import recovery phrase or key

Edit profile

Third entry point when the key for a profile is missing

Identity rows

The row that shows the imported identity

input, textarea, select and label

The text area and name field with keyboard help switched off

header, footer and nav

Cancel and Import in the sheet bar

Forms and inputs

Live validation under the field, grey for good and red for bad

Every form

Lists this form with every status message

Every bar button

The prominent Import button and its disabled rule

States for every screen

Every status line of the import sheet

Stacks, pushes and sheets

Why importing is a modal sheet

Honest state: loading, failure and empty

The error says which word is wrong

Voice and wording

Wording of validation messages

Representative strings

The exact import strings

Implementation

Page

Part it plays

Me: identities and servers

Orientation: the package that owns identities and servers

Me: screens and components

MeImportScreen and the import actions

Me: sources and import logic

meCheckImport and meImportIdentity, and the checkImport logic

Identity: key storage

Key file parsing, name rules and Keychain storage

Crypto: primitives and key derivation

Phrase validation and phrase to key derivation

Crypto: parity vectors against the original client

Phrase and key file vectors shared with the other clients

Root declarations: Me, Profile, Crypto and Vault

meImportText (never persisted), meImportCheck and meImported

Navigation and routes

The import route and its modal presentation

State, refresh and stale-reply patterns

meImported refreshes the identity list, then makes it current

Where the app yields for the turn budget

Why phrase derivation yields during import

Vault: the store and on-device format

How an imported key is folded into the vault

Current limits and known gaps

Password-protected key files and React Native installs

Contract UI tests

The UI tests that import phrases and key files

Bun unit tests

Unit tests for the import check and storage

Code

File

What

me.contract L285-314

MeImportScreen

app.contract L208-238

pkg:me decl: meImportText, meImportName, meImportCheck, meImported

app.contract L578-599

meOpenImport, meEditImport, meEditImportName, meImport, meAfterImport

app.contract L875-876

view wiring for the import route

src/me/logic.ts L6-41

normalizeWords and checkImport

src/me/sources.ts L89-98

meImportIdentity

src/me/sources.ts L31-47

addFromMnemonic and keepIdentity

src/identity/index.ts L198-227

ENCRYPTEDSEEDKEYERROR and parseSeedKey

src/identity/index.ts L155-172

nameError

src/identity/crypto-impl.ts L14-17

isMnemonicWord

src/crypto/primitives.ts L41-72

keyPairFromMnemonicAsync

Tests

File

What it checks

me.test.contract

me: an invalid phrase is refused with the reason

me.test.contract

me: import a phrase, import a key file, switch, remove after asking

me.test.contract

me: a duplicate name is refused

src/me/__tests__/logic.test.ts

checkImport: empty, messy valid phrase, bad words, partial, checksum, key file

src/me/__tests__/sources.test.ts

import normalizes key names before storing and checking uniqueness; reimporting the same identity and name is idempotent; concurrent mnemonic imports cannot reserve the same key name twice

src/identity/__tests__/identity.test.ts

.seedkey import round trip and errors

src/crypto/__tests__/crypto.test.ts

seedkey desktop JSON and mnemonic parity vectors

Delivery

Delivered by #1470.

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Attributes
Epic
Identity
name
Import an identity I already have
Story
US-ID-02
Status
Shipped
summary
A person who already has a Seed identity brings it to the phone with its recovery phrase or a key file.