Skip to content
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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

habomane
Copy link
Contributor

@habomane habomane commented Sep 4, 2024

Not positive this is accurate. Please see file.


export declare const AsyncFunction: (func: () => {}) => void;

export declare const generateKeys: (getKey: () => {}, saveKey: () => {}) => Promise<{privateKey: string, publicKey: string}>;
Copy link
Contributor

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

Copy link
Contributor

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;
Copy link
Contributor

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;
Copy link
Contributor

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

Copy link
Contributor

@zach-planet-nine zach-planet-nine left a 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

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.

2 participants