-
Notifications
You must be signed in to change notification settings - Fork 72
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
[V3] Upgrade ACC-based encryption + JWT signing #145
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -0,0 +1,47 @@ | |||
/** |
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 types don't seem to be linking properly...
await savedParams.litNodeClient.saveEncryptionKey({ | ||
describe('Encrypt and Decrypt', () => { | ||
it('encrypts', async () => { | ||
cy.window().then(async () => { |
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.
I'm not sure why, but without wrapping each functionality with this cy.window()
the wasm
is undefined and not initialized
@@ -4,13 +4,18 @@ | |||
"private": true, | |||
"dependencies": { | |||
"@lit-protocol/lit-node-client": "^2.1.158", |
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.
TODO: need to update version once published.
"main": "index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@lit-protocol/lit-node-client-nodejs": "file:../../packages/lit-node-client-nodejs", |
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.
TODO: need to update version once published.
da294a2
to
958d035
Compare
958d035
to
014d8d8
Compare
Not sure why CI is failing, can't repro locally too with |
@@ -105,9 +106,11 @@ export const checkAndSignSolAuthMessage = async (): Promise<AuthSig> => { | |||
|
|||
try { | |||
// when it's not in local storage, it's a string | |||
// @ts-ignore |
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 probably want to refactor the IEither type at some point so we don't have to do this
014d8d8
to
52732ad
Compare
]; | ||
|
||
// execute | ||
const plaintext = blsSdk.verify_and_decrypt_with_signature_shares( |
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.
(can't seem to comment on the packages/bls-sdk/src/lib/bls-sdk.ts
file directly)
maybe we should strive to keep casing consistent across the sdk
52732ad
to
5acdc3e
Compare
…instead of throwing
…e-client-nodejs package
…st arrayify utf-16 strings
10dd561
to
9ad5af3
Compare
Closing as functionality has been merged into: https://github.com/LIT-Protocol/js-sdk/tree/feat/SDK-V3 |
What
Closes LIT-804.
Closes LIT-695.
Related to LIT-951.
This PR:
bls-sdk.ts
) is entirely replaced with new code. Unit tests are added to this package.jalapeno
network moving forward. Developers can use the old SDK versions to continue using the old encryption and JWT signing schemes.serrano
network is the new default.crypto
package to be a lightweight wrapper overbls-sdk
package with minor conversion logic.encryption
package to replace the old encryption + JWT signing logic with the new schemes. This is becoming more a helper library overlit-node-client-nodejs
andcrypto
.params-validators
to use a plugin-based approach with various*Validator
s.apps/html
to use the new ID-based encryption and JWT signing schemes. You will notice quite a few test cases are removed since we no longer need to store encryption keys, or store signing conditions respectively.demo-encrypt-decrypt-react
:encryptString
anddecryptToString
call.demo-locked-express-app
to demo the new JWT signing flow. Instructions in itsREADME.md
.IEither
,SuccessNodePromises
andbenchmark()
Testing
TODO
demo-encrypt-decrypt-react
after rebasingdemo-locked-express-app
after rebasingdemo-encrypt-decrypt-react/package.json
to use newly published SDK version.demo-locked-express-app/package.json
to use newly published SDK version.serrano
too and introducecayenne
as the new default.