Skip to content

Conversation

@Takaros999
Copy link
Contributor

Builds on top of #44, please review that first.

This PR refactors idkit-core:

  • Rewritten from scratch, it exposes the Session from wasm module
  • Updates broswer example

Confirmed the refactor works by testing the broswer example.

I will follow up with a react a package and a next example

@Takaros999 Takaros999 changed the title Takis/js-core-refactor feat!: Refactor idkit-core JS package Jan 16, 2026
@Takaros999 Takaros999 marked this pull request as ready for review January 16, 2026 15:53
Copy link
Collaborator

@andy-t-wang andy-t-wang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine to me generally. I wonder if we need to split the signal out can we just parse it signal?: string | Uint8Array. Do you see a benefit?

* @returns Hash output
*/
export const generateSignal = (signal: IDKitConfig['signal']): HashFunctionOutput => {
export const generateSignal = (signal: AbiEncodedValue | string | undefined): HashFunctionOutput => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is i better to unpack the type. I feel like we should call this the signalHash

Suggested change
export const generateSignal = (signal: AbiEncodedValue | string | undefined): HashFunctionOutput => {
export const generateSignalHash = (signal: AbiEncodedValue | string | undefined): HashFunctionOutput => {

@@ -0,0 +1,183 @@
/**
* IDKit Session
* Pure functional API for World ID verification - no dependencies
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow

* const session = await createSession({
* app_id: 'app_staging_xxxxx',
* action: 'my-action',
* requests: [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should talk about syntax here too with requests and policies. How to do all, any etc

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.

3 participants