Me: identities and servers
Orientation for the Me package: the Me tab's screens, its data sources for creating, importing, renaming, exporting and removing identities, and choosing the Seed server.

The Me package is the fourth tab of the mobile app. It lets a person create or import an identity, pick which one is current, back one up, remove one, and choose which Seed site the app reads from. It owns the UI and sources; the keys themselves are stored by Identity.

Responsibility

    List the identities on this device with their published profile names.

    Create an identity from a fresh 12-word recovery phrase.

    Import one from a 12 or 24 word phrase or an unencrypted .seedkey file.

    Rename, export and remove a key.

    Validate and switch the server (https://hyper.media, https://dev.hyper.media, or a custom origin), and remember custom servers.

    Link onward to the agent server setting, the Vault and the profile editor.

Files

File

Role

Page

src/me/sources.ts

The ten me* data sources

Sources and import logic

src/me/logic.ts

Pure logic: import check, server URL parsing, Account response reading

Sources and import logic

src/me/__tests__/

17 Bun tests

Sources and import logic

me.contract

Five screens, six shapes, three helper functions

Screens and components

me.test.contract

13 Contract tests

Screens and components

app.contract, pkg:me blocks

Routes, state, resources, mutations, actions, view switch

Screens and components

src/identity/

Keychain storage (owned by this package)

Identity

How the pieces relate

flowchart LR UI["me.contract screens"] -->|actions| ROOT["app.contract pkg:me blocks"] ROOT -->|"resources and mutations"| SRC["src/me/sources.ts"] SRC --> LOGIC["src/me/logic.ts"] SRC --> ID["src/identity"] ID --> KC[("Keychain secret seed-keys")] ID --> CR["src/crypto primitives"] SRC -->|"GET /api/Account, GET /hm/api/config"| SITE[Seed site] ROOT -. "currentAccount, server" .-> OTHERS[Other packages]

Two pieces of root state are shared with every other package and set from here: currentAccount and server, both persisted (The root contract). Other packages read them as arguments; they never read the Keychain to find out who is current.

Routes

Declared in the Me tab's stack in app.contract:

Route

Path

Screen

me (tab root)

/me

MeScreen

identity

/me/id/:uid

MeIdentityScreen

create

/me/create

MeCreateScreen (modal)

import

/me/import

MeImportScreen (modal)

server

/me/server

MeServerScreen

profile-edit

/me/id/:uid/edit

Profile

vault, vault-connect

/me/vault, /me/vault/connect

Vault screens

Constraints

    No answer carries a key, except the explicit export (meExportKey).

    Recovery phrase text is never persisted: meImportText is plain state, while the name drafts are persist.

    Password-protected key files are refused, since Argon2id is unavailable in the data module (Current limits and known gaps).

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

Unsubscribe anytime