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

Fix: type error shown when using generated keypair #1131

Merged
merged 2 commits into from
Sep 11, 2021
Merged

Fix: type error shown when using generated keypair #1131

merged 2 commits into from
Sep 11, 2021

Conversation

pepyta
Copy link
Contributor

@pepyta pepyta commented Sep 7, 2021

There is a bug in the type declaration files, where we define SEA's functions.
These functions use and result an IGunCryptoKeyPair, but in the declaration files we use CryptoKeyPair.

The IGunCryptoKeyPair fields looks like these:

{
    pub: string;
    epub: string;
    priv: string;
    epriv: string;
}

And the CryptoKeyPair interface's fields looks like these:

{
    publicKey: string;
    privateKey: string;
}

- a callback is optional, because we could just use the async/await methodology to recieve the keypair
- when signing only `priv` is used
- when verifying only `pub` is used
- both when encrypting/decrypting only `epriv` is used
@amark
Copy link
Owner

amark commented Sep 11, 2021

@pepyta 👏 ⚡ 🔥 🙏 🎉 👏 ⚡ 🔥 🙏 🎉 👏 ⚡ 🔥 🙏 🎉 thank goodness someone here knows TypeScript! It is all community contributed. Thank you, pulling right away - would you be willing to correct/fix anything else & refactor it??

@amark amark merged commit c97ac00 into amark:master Sep 11, 2021
@amark
Copy link
Owner

amark commented Sep 11, 2021

(I mean, not your PR, but the rest of the TypeScript stuff)

@pepyta
Copy link
Contributor Author

pepyta commented Sep 12, 2021

Sure, but I will create separate PRs for those fixes.

@pepyta
Copy link
Contributor Author

pepyta commented Sep 12, 2021

Btw I think a full Typescript reimplementation would be beneficial. What do you think about that? @amark

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