Skip to content

feat(wasm/js): expose IdentityCheck in WASM and TS#219

Draft
chipp wants to merge 4 commits into
mainfrom
vladimirburdukov/identity-attributes-ts
Draft

feat(wasm/js): expose IdentityCheck in WASM and TS#219
chipp wants to merge 4 commits into
mainfrom
vladimirburdukov/identity-attributes-ts

Conversation

@chipp
Copy link
Copy Markdown
Contributor

@chipp chipp commented Apr 21, 2026

Summary

  • Adds IdentityCheck preset to Rust WASM bindings: DocumentType, IdentityAttribute union type, IdentityCheckPreset interface, and an identityCheck() factory function
  • Adds identity_attested?: boolean to IDKitResultV4 (present only on IdentityCheck responses)
  • Guards nativePayloadV1FromPreset to reject IdentityCheck presets with a clear error — they require a 4.0-compatible client
  • Exports the new preset, types, and function from @worldcoin/idkit-core and @worldcoin/idkit-react
  • Adds smoke tests for preset construction and native payload generation
  • Updates the Next.js example app with a full Identity Check UI: six toggleable attributes (document type, document number, issuing country, full name, minimum age, nationality) with ISO 3166-1 alpha-3 validation via i18n-iso-countries; displays identity_attested inline in the result
  • Defaults the demo to World ID 4.0

Test plan

  • pnpm test passes in js/ (new smoke tests for identityCheck and native payload rejection)
  • Next.js example: select Identity Check, enable attributes, start the widget flow — request succeeds and identity_attested is shown in the result
  • Selecting Identity Check with no attributes enabled shows the inline error and disables the button
  • Switching away from Identity Check resets attributes to defaults
  • CI JS job passes

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
idkit-js-example Ready Ready Preview, Comment May 20, 2026 7:16pm

Request Review

@chipp chipp changed the title feat(wasm): disallow IdentityCheck presets for v1 native payloads feat(wasm/js): expose IdentityCheck in WASM and TS Apr 21, 2026
@chipp chipp changed the base branch from vladimirburdukov/identity-attributes to graphite-base/219 April 21, 2026 11:42
@chipp chipp force-pushed the graphite-base/219 branch from ce5b9d7 to 4a76aa5 Compare April 21, 2026 11:42
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from 0ae4807 to 6078a1e Compare April 21, 2026 11:42
@chipp chipp changed the base branch from graphite-base/219 to vladimirburdukov/identity-attributes April 21, 2026 11:42
@chipp chipp force-pushed the vladimirburdukov/identity-attributes branch from 4a76aa5 to 6413091 Compare April 21, 2026 11:58
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from 6078a1e to 252820c Compare April 21, 2026 11:58
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from 252820c to 59eb955 Compare April 21, 2026 12:27
@chipp chipp force-pushed the vladimirburdukov/identity-attributes branch from 6413091 to ce6d884 Compare April 21, 2026 12:27
@chipp chipp force-pushed the vladimirburdukov/identity-attributes branch from ce6d884 to 519e823 Compare April 21, 2026 16:39
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from 59eb955 to 2b76bd4 Compare April 21, 2026 16:39
@chipp chipp force-pushed the vladimirburdukov/identity-attributes branch from 519e823 to fc81712 Compare April 23, 2026 13:59
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from 2b76bd4 to fbd94fa Compare April 23, 2026 13:59
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from fbd94fa to 6d8696b Compare April 23, 2026 14:11
@chipp chipp force-pushed the vladimirburdukov/identity-attributes branch from fc81712 to 35d8ccf Compare April 23, 2026 14:11
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from 6d8696b to f3890c5 Compare April 23, 2026 15:19
@chipp chipp force-pushed the vladimirburdukov/identity-attributes branch from 35d8ccf to eb9e87b Compare April 23, 2026 15:19
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from f3890c5 to 3aa491a Compare April 23, 2026 15:48
@chipp chipp force-pushed the vladimirburdukov/identity-attributes branch from 7a61bdc to 961b87a Compare May 1, 2026 16:34
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from e9d349c to e976bb0 Compare May 1, 2026 16:44
@chipp chipp force-pushed the vladimirburdukov/identity-attributes branch from 961b87a to 59cc4a6 Compare May 1, 2026 16:44
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from e976bb0 to 9b59c16 Compare May 1, 2026 16:49
@chipp chipp force-pushed the vladimirburdukov/identity-attributes branch from 59cc4a6 to 07ea956 Compare May 1, 2026 16:49
@chipp chipp force-pushed the vladimirburdukov/identity-attributes branch from 07ea956 to dcf24dc Compare May 1, 2026 17:06
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from 9b59c16 to 04c7c3d Compare May 1, 2026 17:06
Base automatically changed from vladimirburdukov/identity-attributes to main May 4, 2026 19:54
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from 4c3b161 to 59cc424 Compare May 5, 2026 17:51
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from 59cc424 to c74a797 Compare May 7, 2026 17:21
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from c74a797 to eb09eff Compare May 19, 2026 13:07
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from eb09eff to feb58d6 Compare May 19, 2026 13:24
@chipp chipp changed the base branch from main to vladimirburdukov/remove-require-proof-of-humanity-from-identitycheck-preset May 19, 2026 13:29
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from feb58d6 to 330ce03 Compare May 19, 2026 13:31
@chipp chipp force-pushed the vladimirburdukov/remove-require-proof-of-humanity-from-identitycheck-preset branch from d7f43e2 to 4a938ef Compare May 20, 2026 11:24
@chipp chipp force-pushed the vladimirburdukov/identity-attributes-ts branch from 330ce03 to 296ef2f Compare May 20, 2026 11:33
chipp added 4 commits May 20, 2026 22:07
- add `identity_attested: Option<bool>` to `MultiLegacyResponse` variant
- add `identity_attested: Option<bool>` to `ResponseV1` variant
- Add World ID version + request type selectors (Credential Request / Identity Check)
- Interactive identity attribute picker with ISO 3166-1 alpha-3 country validation
- Align layout, field sizes, and staging URL override across both examples
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