Skip to content

feat(core): add the WIP-109 authenticator registration flows - #608

Draft
Dzejkop wants to merge 5 commits into
dzejkop/world-id-0.15from
dzejkop/wip-109-registration
Draft

Dzejkop wants to merge 5 commits into
dzejkop/world-id-0.15from
dzejkop/wip-109-registration

Conversation

@Dzejkop

@Dzejkop Dzejkop commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Adds walletkit_core::registration: the WIP-109 bridge client and the requester and approver flows for registering a new authenticator through an existing Admin Authenticator. The wire format and cryptography stay in world_id_core::registration.

Ported from worldcoin/world-id-protocol#1062, with the wording of worldcoin/world-id-protocol#1093. Stacked on #607.

  • Protocol pin. world-id-core and world-id-proof come from world-id-protocol rev f159a868 (#1061, stacked on #1104, on a main that already has #1060) until a protocol release ships the registration API. deny.toml allows that git source.
  • Send futures. Every public flow future is Send + 'static when built from owned values, so UniFFI can export it. Bridge retries and the indexer lookup in verify build each attempt from owned values. A compile-time test covers publish, poll, verify, receive, authenticate, check, reject_name, reject, user_verification_failed and approve.
  • HTTP client. The bridge client uses WalletKit's bundled-roots client, now shared through http_client::builder(). On native it has a 10 s connect timeout and a 30 s request timeout, and it does not follow redirects. Browsers follow redirects, so the client rejects a redirected response.
  • Vault format. PlaintextVault is shared as walletkit_plaintext_v1. PlaintextVault::try_from(Vault) rejects every other format before import.
  • Blocking key derivation. RegistrationRequester::new and PendingRegistration::authenticate run Argon2id (64 MiB) synchronously. In walletkit-web they must run in a Web Worker.

Follow-ups

  • UniFFI and walletkit-web exports, including the Web Worker for the key derivation.
  • Wire PlaintextVault into CredentialStore::merge_vault_from_backup and export_vault_for_backup.
  • Port the end-to-end test (crates/core/tests/e2e_authenticator_registration.rs). Blocked: world-id-test-utils needs taceo-oprf-types, which does not compile against WalletKit's alloy-sol-macro 1.7.
  • Switch back to crates.io once the protocol releases the registration API.

AI disclosure

Written with Claude Opus 5.5 (Claude Code). Prompt summary: port the WIP-109 registration flows and their tests from world-id-protocol#1062/#1093 into walletkit-core on a protocol pin; make every flow future Send; build the bridge client on WalletKit's HTTP client; define WalletKit's vault format; document where the Argon2id derivation must run in a browser; try to port the end-to-end test.

🤖 Generated with Claude Code

Dzejkop and others added 3 commits October 14, 2026 17:37
world-id-protocol rev 39024910 adds the registration module and the
account lookups the WIP-109 flows need. The pin is temporary until a
protocol release ships them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clients other than `Request` need the same TLS roots with their own
timeouts and redirect policy, so the configuration moves to its own
module that returns a builder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port the bridge client and the requester and approver flows from
worldcoin/world-id-protocol#1062 into `walletkit_core::registration`.
The wire format and cryptography stay in `world_id_core::registration`.

- Every flow future is `Send + 'static` when built from owned values, as
  UniFFI's async exports require. Bridge retries and the indexer lookup
  in `verify` build each attempt from owned values instead of closures
  that borrow the operation's arguments.
- The bridge client builds on WalletKit's bundled-roots client, with
  connect and request timeouts and no redirects on native.
- WalletKit owns the vault format: `PlaintextVault` is shared as
  `walletkit_plaintext_v1`, and a received vault in another format is
  rejected before import.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Comment @coderabbitai help to get the list of available commands.

Dzejkop and others added 2 commits October 14, 2026 18:12
world-id-protocol #1061 replaced AccountSnapshot with
insert_authenticator_at. The approver now plans from the account's
AccountAuthenticators and inserts at the planned slot; the registry's
slot limit is enforced at insertion. Pins world-id-core and
world-id-proof to f159a868 (#1061 on main).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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