Skip to content

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

Draft
Kemperino wants to merge 4 commits into
mainfrom
kempy/wip-102-adaptions
Draft

feat: WIP-102 update/revert recovery agent#381
Kemperino wants to merge 4 commits into
mainfrom
kempy/wip-102-adaptions

Conversation

@Kemperino
Copy link
Copy Markdown
Contributor

@Kemperino Kemperino commented Apr 29, 2026

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.
  • Deprecated the three V1 wrappers (initiate_/execute_/cancel_recovery_agent_update) with #[deprecated]. Kept for backward compatibility — Swift/Kotlin consumers continue to compile.
  • 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

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