feat: expose authenticator management via UniFFI#399
Open
agentotto[bot] wants to merge 9 commits into
Open
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.
Reviewed by Cursor Bugbot for commit f3ce0d9. Configure here.
Contributor
Author
|
Follow-up update pushed in
Additional validation:
|
Reduce each doc comment to a single short line. Remove all # Errors sections, multi-paragraph explanations, redundant detail, and # Warning /
Each doc comment now describes what the method does, its key inputs, and what it returns. Verbose multi-paragraph walls of text and # Errors / # Arguments / # Warning sections remain removed.
Only the 4 newly introduced methods (insert_authenticator, update_authenticator, remove_authenticator, poll_gateway_request_status) should have had their doc comments modified. Restore all pre-existing method/type doc comments to their main-branch versions.
…thenticator management methods Replace the #[expect(clippy::missing_errors_doc, reason = "FFI")] suppression attributes on insert_authenticator, update_authenticator, remove_authenticator, and poll_gateway_request_status with proper # Errors doc sections describing the error conditions each method can return.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

cc @Dzejkop
Summary
Exposes the current
world-id-coreauthenticator management APIs through WalletKit's UniFFI surface:Authenticator::insert_authenticator(...)Authenticator::update_authenticator(...)Authenticator::remove_authenticator(...)Authenticator::poll_gateway_request_status(...)This is a fresh implementation on top of latest
main; it does not reuse the stale approach from #306. The wrapper delegates protocol semantics/signing/commitment updates toworld-id-core0.10.2, whose authenticator-management behavior reflects worldcoin/world-id-protocol#673.Semantics
packed_account_data.EdDSApublic key as the protocolUint256representation and its on-chain signer address as a hex string.pubkey_idslot, matching the protocol API.Validation
cargo fmt --allcargo test -p walletkit-core authenticator::tests --no-default-featurescargo check -p walletkit-core --no-default-featurescargo check -p walletkit-corecargo clippy -p walletkit-core --no-default-features -- -D warningscargo clippy -p walletkit-core --no-default-features --tests -- -D warningsNote:
cargo test -p walletkit-core authenticator::testswith default features currently fails onmainbecausewalletkit-core/src/issuers/recovery_bindings_manager.rsimportscache_embedded_groth16_materialin tests without enabling theembed-zkeysfeature; this is unrelated to this change.Note
Medium Risk
Exposes new key-management operations (insert/update/remove authenticators) and changes the public gateway status enum shape, which can affect downstream clients and has on-chain side effects if misused.
Overview
Adds UniFFI-facing authenticator-management APIs on
Authenticatorforinsert_authenticator,update_authenticator, andremove_authenticator, plus a genericpoll_gateway_request_statusto wait for gateway/on-chain finalization.Replaces the registration-only
RegistrationStatuswith a sharedGatewayRequestStatusenum that carriestx_hashforSubmitted/Finalized, updatesInitializingAuthenticator::poll_statusand the CLI registration polling to use it, and re-exports the new enum fromwalletkit-core.Reviewed by Cursor Bugbot for commit bae0737. Bugbot is set up for automated code reviews on this repo. Configure here.