Skip to content

feat: WIP-102 update/revert recovery agent - #381

Merged
Dzejkop merged 9 commits into
mainfrom
kempy/wip-102-adaptions
Jul 28, 2026
Merged

feat: WIP-102 update/revert recovery agent#381
Dzejkop merged 9 commits into
mainfrom
kempy/wip-102-adaptions

Conversation

@Kemperino

@Kemperino Kemperino commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds the WIP-102 V2 recovery-agent flow to walletkit and deprecates the V1 flow.

  • New Authenticator::update_recovery_agent(new_recovery_agent: String) — V2 replacement for initiate_recovery_agent_update. Effective immediately with a revert window instead of a 14-day cooldown.
  • New Authenticator::revert_recovery_agent_update() — V2 replacement for cancel_recovery_agent_update. Reuses the same EIP-712 typehash; only the gateway endpoint differs.
  • Removed the three V1 wrappers (initiate_/execute_/cancel_recovery_agent_update)
  • CLI walletkit recovery-agent subcommands updated: Initiate/Execute/CancelUpdate/Revert. Execute is dropped —

Notable implementation detail

Module-level `#![allow(deprecated)]` is required in `walletkit-core/src/authenticator/mod.rs` because `#[uniffi::export]` generates FFI registrations outside the impl-level lint scope and references the deprecated method names — which would otherwise emit warnings at the V1 wrapper definition sites and fail `-D warnings` in CI.

Why draft

This branch points at the upstream `wip-102` git branch for `world-id-core` and `world-id-proof`. CI will fail until upstream merges WIP-102 and cuts a release


Note

Medium Risk
Changes account recovery-agent control flow and public Authenticator/CLI surface; V1 paths are deprecated but still callable, so integrators must migrate to avoid wrong semantics on V2 gateways.

Overview
Implements WIP-102 recovery-agent semantics in walletkit: V2 immediate update + revert window replaces the V1 initiate → 14-day cooldown → execute/cancel flow.

CLI recovery-agent subcommands are Update / Revert only; Execute is removed and Initiate/Cancel are replaced by the V2 names and APIs.

Reviewed by Cursor Bugbot for commit 8f8d992. Configure here.

Adds the V2 recovery-agent flow from WIP-102 and deprecates the V1
flow. New `update_recovery_agent` and `revert_recovery_agent_update`
wrappers delegate to the SDK's V2 methods. The three V1 wrappers
(`initiate_/execute_/cancel_recovery_agent_update`) are kept for
backward compat but marked `#[deprecated]`; the SDK marks the
underlying methods deprecated too, so the call-site bodies need
`#[allow(deprecated)]`.

Module-level `#![allow(deprecated)]` is required in
`authenticator/mod.rs` because `#[uniffi::export]` generates FFI
registrations outside the impl-level lint scope and references the
deprecated method names.

Updates `walletkit recovery-agent` CLI subcommands from
`Initiate/Execute/Cancel` to `Update/Revert` (Execute is dropped — V2
has no execute step; the underlying SDK call is a no-op on a
V2-upgraded gateway).

WIP-104 verified to have no walletkit impact: the only Rust SDK change
is a doc-comment rewording in primitives/lib.rs.

Pinned to upstream wip-102 git branch until WIP-102 ships in a
world-id-core release; flip to version pin then.

Refs: worldcoin/world-id-protocol#692, worldcoin/world-id-protocol#643

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Kemperino
Kemperino force-pushed the kempy/wip-102-adaptions branch from 9f942ac to 3ac6f9f Compare April 29, 2026 20:27
@Kemperino
Kemperino marked this pull request as ready for review June 26, 2026 11:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8f8d9924b1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread walletkit-core/src/authenticator/mod.rs Outdated
@kilianglas

Copy link
Copy Markdown
Contributor

@Kemperino What's the status of this?

@Kemperino

Copy link
Copy Markdown
Contributor Author

@Kemperino What's the status of this?

is and has been ready to merge, as specified on the v2 contract release plan

Comment thread crates/walletkit-core/src/authenticator/mod.rs Outdated
@Dzejkop
Dzejkop merged commit f438868 into main Jul 28, 2026
21 checks passed
@Dzejkop
Dzejkop deleted the kempy/wip-102-adaptions branch July 28, 2026 11:36
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.

3 participants