feat: expose initiateRecoveryAgentUpdate and executeRecoveryAgentUpdate#320
feat: expose initiateRecoveryAgentUpdate and executeRecoveryAgentUpdate#320paolodamico merged 4 commits intomainfrom
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
6231391 to
65c26ce
Compare
Expose cancel_recovery_agent_update() following the same pattern as initiate_recovery_agent_update and execute_recovery_agent_update. The method signs an EIP-712 CancelRecoveryAgentUpdate payload and submits it to the gateway's /cancel-recovery-agent-update endpoint, returning the gateway request ID for status polling.
65c26ce to
4238eb1
Compare
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|

Summary
Adds three new methods to the WalletKit
Authenticator:initiate_recovery_agent_update(new_recovery_agent)— signs an EIP-712InitiateRecoveryAgentUpdatepayload and submits it to the gateway, starting the 14-day cooldown.execute_recovery_agent_update()— submits the permissionless execute call to the gateway after the cooldown has elapsed.cancel_recovery_agent_update()— signs an EIP-712CancelRecoveryAgentUpdatepayload and submits it to the gateway, cancelling a pending update before the cooldown expires.All three methods return the gateway request ID for status polling, following the same pattern as existing gateway operations (
insert_authenticator,remove_authenticator, etc.) inworld-id-core.Changes
Cargo.toml—world-id-coreusesversion = "0.7"(crates.io);Cargo.lockpins to0.7.1.walletkit-core/src/authenticator/mod.rs— Store aSigneralongsideCoreAuthenticator(derived from the same seed) so recovery-agent signing can be performed at the WalletKit layer. Add three new UniFFI-exported async methods:initiate_recovery_agent_update,execute_recovery_agent_update, andcancel_recovery_agent_update.walletkit-core/src/credential.rs— Adapt to upstream renameassociated_data_hash→associated_data_commitment.Notes
main(resolving conflicts with chore: bump world-id-core 0.6 → 0.7 #325 which bumped world-id-core 0.6 → 0.7).world-id-core0.7.1 in lockfile).cancel_recovery_agent_updateis fully exposed via UniFFI (#[uniffi::export(async_runtime = "tokio")]impl block).GatewayRequestIdnewtype (.to_string()for the UniFFIStringreturn type).References
Note
Medium Risk
Adds new gateway-facing APIs that can change a user’s recovery agent (including a permissionless execute), so incorrect wiring/validation could impact account recovery behavior. Changes are otherwise localized and mostly wrap
world-id-coremethods.Overview
Exposes the recovery-agent update lifecycle through WalletKit’s UniFFI
Authenticator:initiate_recovery_agent_update(new_recovery_agent)(EIP-712-signed),execute_recovery_agent_update()(permissionless), andcancel_recovery_agent_update()(EIP-712-signed), each returning a gateway request ID asString.Updates dependencies by bumping
world-id-*crates to0.7.1inCargo.lock, and tweaksCredentialdocs to reflect theassociated_data_commitmentnaming.Written by Cursor Bugbot for commit e8a8e23. This will update automatically on new commits. Configure here.