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

[version 3.0.0] Major version bump #199

Closed
wants to merge 243 commits into from
Closed

[version 3.0.0] Major version bump #199

wants to merge 243 commits into from

Conversation

joshLong145
Copy link

@joshLong145 joshLong145 commented Aug 22, 2023

!! SDK VERSION 3.0.0 Release Branch !!
Changes from #145

ACC-based JWT Signing (V2): This new scheme simplifies the overall flow by baking into each dapp endpoint the required 

access control conditions directly. This means that there is no "store signing condition" step as dapp developers just write it into their dapp code and an additional check against the access control condition is performed there. 

When clients request for a signed JWT with claims of the specified access control condition, the signature of this JWT is only provided when the nodes determine that the user satisfy this access control condition. Read more in the spec here: https://www.notion.so/litprotocol/ACC-based-JWT-signing-V2-a4db1446bac54eea90b7ab08e5455246.

The BLS WASM (bls-sdk.ts) is entirely replaced with new code. Unit tests are added to this package.
The SDK no longer supports the 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.

Updated crypto package to be a lightweight wrapper over bls-sdk package with minor conversion logic.
Updated encryption package to replace the old encryption + JWT signing logic with the new schemes. This is becoming more a helper library over lit-node-client-nodejs and crypto.

Refactored params-validators to use a plugin-based approach with various *Validators.
Updated all manual tests in 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:

Turned this into a TS project.

Updated this demo to use the new ID-based encryption scheme - just a encryptString and decryptToString call.
Implement demo-locked-express-app to demo the new JWT signing flow. Instructions in its README.md.
Made use of generics in a number of places, eg. IEither, SuccessNodePromises and benchmark()

Changes from #107

 - Adds support for new ECDSA implementation for
     - k256
     - p256
- Updates `ecdsa-sdk.ts` in `packages/ecdsa-sdk` with updated wasm bundle
- Adds  post build step to `ecdsa-sdk` for correcting a tic generation error
- Update `SIGTYPE` to include new ecdsa types
- Adds key recovery tests to `packages/crypto`

  • Adds computePubKey to lit-core which wraps an implementation in crypto for interfacing with a new wasm module for deriving HD public keys: for reference the implementation which is compiled to WASM is here: https://github.com/LIT-Protocol/lit-ecdsa-wasm-combine/blob/main/src/combiners/hd_ecdsa/mod.rs
  • Addition of claimKeyId method on lit-node-client-nodejs for deriving a key from an authMethod
    • Supports a new MintCallBack which is defined as async (params: ClaimKeyResponse): Promise<ClaimKeyResponse> which is called to route derived keys from a claim operation on chain.
  • New ClaimProcessor abstraction for specifying arguments to a callback implementation for forwarding aggregated claim responses from nodes to the Chronicle chain which can be done by a relayer or contract client implementation within the callback.

Josh Long and others added 28 commits November 6, 2023 18:47
* add normalization fix

* use different prop names for signature data

* feat: refactor normalizeParams

* fix jsparam undefined case, adds test

---------

Co-authored-by: Ansonhkg <[email protected]>
* pkpethers - tableland works

* feat: lit config & pkp-ethers update
* mint by auth method

* remove url

* feat: fix authmethod type 6

* add a note

* feat: add enums

* remove declare

* rename from 'mint' to 'mintWithAuth' for better clarity

* fix: ignore_dirs
…function (#254)

* feat: public static to get auth id by auth method

* fix: import
* WIP

* wip2 - awaiting verifyAndMintPKPThroughRelayer to be implemented

* fix: verifyAndMintPKPThroughRelayer with custom args

* update pkg

* remove comment

* rm lock

---------

Signed-off-by: Anson <[email protected]>
A hack was added a year ago to suppress a webpack complaint. Other packages import crypto and don't seem to contain this hack. The metro bundler doesn't allow for conditional requires / substitutions, and as such causes react-native to fail loading the crypto library. This PR removes the hack.

I have not checked if webpack still complains but am hoping Chris can chime in.
* feat: Store blockhash from handshake + use it in SIWE

* feat: Pass blockhash instead of client in authSig functions

* refac: Cleanup

* feat: Client getter for blockhash + Manual tests

* refac: Remove comments

* refac: latest_blockhash -> latestBlockhash

* test: Display result of manual tests

* test: Node E2E test for creating authSig by fetching the blockhash from the client
@joshLong145
Copy link
Author

closing for #266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.