As an identity holder, I want to create a new identity on my phone and write down its recovery phrase, so that I can comment and talk to agents as myself and never lose the key.
Situation
I have just installed Seed, or I want a second identity. I have only a pen and paper. The Me tab says "No identity yet", or lists the identities I already have.
What I do
Open the Me tab and tap "Create identity".
Optionally type a short name for this key.
Write down the 12 numbered words, in order.
Turn on "I wrote down my recovery phrase".
Tap "Create".
What I should see
A sheet titled "New identity" opens over Me, with "Cancel" on the left and "Create" on the right. See Create identity.
The name field shows "Name (optional)", and under it "Letters, numbers, dashes and underscores. Your public profile name can be set later."
Under "Recovery phrase" the sheet first says "Generating…", then shows 12 words, each with its number.
A "Copy" row under the words copies the whole phrase.
The note under the words reads "Write these 12 words down and keep them private. They are the only way to restore this identity on another device."
"Create" stays disabled until the switch "I wrote down my recovery phrase" is on.
While the identity is made the button reads "Creating…".
The sheet closes by itself and the new identity is at the top of Me as the current identity.
With a name, Me shows the name and the short id followed by "· current".
The identity is still there, and still current, after I close and reopen the app.
The same sheet opens from "Create identity" on the Vault screen.
When something goes wrong
A name with a space or a symbol is refused in red under the switch: "Names may only contain letters, numbers, dashes and underscores." I fix the name and tap "Create" again. The words on screen stay the same.
A name another key already uses is refused with "Name already exists, delete it first." I choose another name.
Not included
The recovery phrase is shown only on this sheet. After it closes the app cannot show it again; later I can only export a key file.
The app does not test me on the words. It takes my word for it.
A refused name and the "Copy" row have no automated interface test.
No picture can be chosen here, and the public name is set afterwards in Edit my public profile. The Create identity design page records the missing icon field.
Trace
Story US-ID-01, 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 |
|---|---|
The sheet where the phrase is shown and confirmed | |
Where the story starts and where the new identity appears as current | |
Second entry point: the Create identity row in the vault list | |
The numbered 12 word grid and its Copy row | |
The current identity row that shows the result | |
Initials avatar on the new identity row | |
The optional name field and the confirmation switch | |
Cancel and Create in the sheet bar | |
Field hints, keyboard settings and where errors appear | |
Lists this form with every field and message | |
The prominent Create button and its disabled rule | |
Generating, confirmed, creating and refused states | |
Why creating is a modal sheet over Me | |
Generating… and Creating… instead of a silent wait | |
Key name versus public name, short id as the fallback label | |
The exact wording of the phrase warning and hints |
Implementation
Page | Part it plays |
|---|---|
Orientation: the package that owns identities and servers | |
MeCreateScreen, its props and the create actions | |
meNewWords and meCreateIdentity, name check and save in one turn | |
Where the key is kept in the Keychain and the name rules | |
Phrase generation and the phrase to key derivation | |
Proof that a phrase gives the same account as the other clients | |
meWords, meCreated and the create drafts in the root contract | |
The create route and its modal presentation | |
meCreated refreshes the identity list, then makes it current | |
Why key derivation yields while creating | |
The secret.keep seed-keys grant that allows saving the key | |
How the new key is folded into the vault afterwards | |
The UI test that creates an identity | |
Unit tests for derivation and the create source |
Code
File | What |
|---|---|
MeCreateScreen | |
MeScreen: Create identity row and the current identity row | |
pkg:me decl: meName, meConfirmed, meWords, meCreated | |
meOpenCreate, meEditName, meConfirm, meCopyWords, meCreate, meAfterAdd | |
view wiring for the create route | |
meNewWords and meCreateIdentity | |
addFromMnemonic and keepIdentity | |
saveKey | |
nameError: the key name rules | |
generateMnemonic | |
keyPairFromMnemonicAsync |
Tests
File | What it checks |
|---|---|
me: create shows 12 words, needs the confirmation, then is listed and current | |
me: empty state offers create and import | |
create rejects key-file input as an invalid recovery phrase with a normal reply | |
mnemonic generation and validation; async derivation matches the sync one and yields; name rules | |
phrase and key derivation parity vectors against the original client |
Delivery
Delivered by #1470.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime