Repository navigation
Conversation
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
… into dzejkop/wip-109-attachments
Read bodies of up to 22 MiB, and give the two operations that carry a full response a 2 min request timeout and a 5 min operation budget. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ents Pin world-id-protocol to the WIP-109 attachments revision. The requester declares its supported issuer schemas, and the approver sends a vault with the selected credentials plus opaque issuer attachments, capped at MAX_TRANSFER_SIZE together. BREAKING CHANGE: RegistrationRequester::start takes supported_issuer_schema_ids, CheckedRegistration::approve takes an Option<CredentialTransfer> instead of the vault bytes, ApproverError::VaultTooLarge is now TransferTooLarge, and MAX_VAULT_SIZE is replaced by MAX_TRANSFER_SIZE. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…8 head Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch has not been deployed
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.
Implements the WIP-109 change in world-id-protocol#1246 for the registration flows. Stacked on #697 (filtered vault export) and includes #683 (reject oversized vaults before insertion), which this replaces.
Draft: the
world-id-*crates are pinned by[patch.crates-io]to the branch of world-id-protocol#1268 until it is released.Changes
RegistrationRequester::starttakessupported_issuer_schema_ids: Option<Vec<u64>>.Registeredgainsattachments, released withvault_backuponly after on-chain verification.RegistrationResult::attachment_count().supported_issuer_schema_ids()onIncomingRegistrationandCheckedRegistration, for building the selection screen.approvetakestransfer: Option<CredentialTransfer>(vaultplusattachments) instead ofvault: Option<Vec<u8>>.Nonesends neither.TransferTooLarge(vault plus attachments over 15 MiB; replacesVaultTooLarge) andUnsupportedAttachment(an attachment for an issuer schema the request does not list).PUT /response/:idandGET /response/:idget 2 min per request and 5 min per operation; other operations keep 30 s and 1 min.docs/accounts.mddescribes selection per issuer schema ID, attachments and the cap.WalletKit treats attachments as opaque bytes. The host builds the vault with
export_vault_for_issuer_schemas, gets attachments from issuer-specific code, and hands received attachments back to that code. WalletKit does not open the vault, so matching attachments to the credentials in it is the host's job.Breaking
start,approve,RegisteredandApproverErrorchange as above, andMAX_VAULT_SIZEbecomesMAX_TRANSFER_SIZE. On the wire, this is incompatible with authenticators on world-id 0.25.Validation
cargo fmt --all -- --checkandcargo clippy --workspace --all-targets -- -D warningspass.cargo test -p walletkit-core --lib registration: 31 pass. New tests cover the attachment round trip, both pre-insertion errors (no insertion submitted, session stays open), duplicate schema IDs and a 21 MiB bridge read.cargo test -p walletkit-core --test registration_integrationpasses against staging (with a small attachment; staging-bridge still caps bodies at 5 MiB).cargo deny.Known gaps
formatstrings use more than the 4 KiB allowance. That is answered withinternal_errorbefore insertion, but it ends the session instead of returningTransferTooLarge.delivered = falsealthough the authenticator is registered.AI disclosure
Written with Claude Fable 5.2 (Claude Code). Prompt summary: implement the WIP-109 spec change (per-issuer-schema credential selection, issuer attachments, supported issuer schemas, 15 MiB cap) in the registration flows, with pre-insertion size and schema checks and bridge limits sized for the larger response.
🤖 Generated with Claude Code