-
Notifications
You must be signed in to change notification settings - Fork 1
feat!: Refactor idkit-core JS package
#45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
idkit-core JS package
andy-t-wang
left a comment
There was a problem hiding this 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 => { |
There was a problem hiding this comment.
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
| 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 | |||
There was a problem hiding this comment.
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: [ |
There was a problem hiding this comment.
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
Builds on top of #44, please review that first.
This PR refactors
idkit-core:Confirmed the refactor works by testing the broswer example.
I will follow up with a react a package and a next example