-
Notifications
You must be signed in to change notification settings - Fork 10
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
Added .d.ts for sessionless-node #77
base: main
Are you sure you want to change the base?
Conversation
|
||
export declare const AsyncFunction: (func: () => {}) => void; | ||
|
||
export declare const generateKeys: (getKey: () => {}, saveKey: () => {}) => Promise<{privateKey: string, publicKey: string}>; |
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 should be getKeys
, and saveKeys
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.
So here, and for the return of generateKeys above, you should define a Keys type that has privateKey: string, and publicKey: string
export declare const getKeys: () => void; | ||
|
||
export declare const sign: (message: string) => Promise<string>; | ||
export declare const verifySignature: (sig: {r: string, s:string}, message: string, pubKey: string) => boolean; |
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.
sig is just a string
export declare const sign: (message: string) => Promise<string>; | ||
export declare const verifySignature: (sig: {r: string, s:string}, message: string, pubKey: string) => boolean; | ||
export declare const generateUUID: () => string ; | ||
export declare const associate: (primarySignature: {r: string, s:string}, primaryMessage: string, primaryPublicKey: string, secondarySignature: {r: string, s:string}, secondaryMessage: string, secondaryPublicKey: string) => boolean; |
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.
the signatures here are strings
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.
changed to request changes
Not positive this is accurate. Please see file.