Skip to content

Commit

Permalink
[Urgent Release] 3.2.1 (#377)
Browse files Browse the repository at this point in the history
* init patch

* Feature/lit 2545 js sdk fix cosmjscrypto (#381)

* fix: should add dependencies to related packages

* fix: include cosmos dependencies

* fix: correct version

* fix: correct version

* Check certificate before passing to wasm (#374)

* init release

* feat: fix contracts-sdk (#359)

* use testThis in testThese to unify criteria and fix the pipeline that… (#360)

* use testThis in testThese to unify criteria and fix the pipeline that was missing some tests due to testThese finishing the process with code 0

* fmt

* remove problematic process.exit

* Add `K256` as alias of `ECDSA_CAIT_SITH` sig type

* add CI run on PRs targeting staging branches (#361)

* add comment pointing to repo (#362)

* Add `K256` as alias of `ECDSA_CAIT_SITH` sig type (#356)

* add comment pointing to repo

---------

Co-authored-by: Massimo Cairo <[email protected]>

* prettied

* feature/lit-2511-js-sdk-review-remove-lit-siwe (#373)

* implement new interface to unify session authentication in client (#358)

* implement new interface to unify session authentication in client

* fix eth pkp wallet creation unit test

* update test to use global config

* add test group to CI

* change encryption test to also validate getting session sigs from cache

* remove process termination order included on testThese that was avoiding other tests to run

* Add `K256` as alias of `ECDSA_CAIT_SITH` sig type (#356)

* fix rpc constant used in testing

* add empty resourceAbilityRequests to test

* fix and clean test using new session cache interface to sign using PKPEthersWallet

* fix encryption test

* remove old test

* staging

* chore: update readme

* v?

* use throwError function

* remove unnnecessary sessionKeys as they are obtained from cache afterwards

* move authContext validation to function that validates the PKP auth context

* backwards compatibility to avoid a breaking change

* fmt

* fmt

* fix siwe import

---------

Co-authored-by: Massimo Cairo <[email protected]>
Co-authored-by: Ansonhkg <[email protected]>

* remove vanilla js builds (#372)

* Feature/lit 2494 js sdk get rid of lit third party libs (#371)

* remove 3rd party libs

* fix: revert back to fix react

* it works

* cherry picks 735438f 3b0422f

* readme

* resolve conflicts

---------

Signed-off-by: Anson <[email protected]>

* fix: build issues

* Check certificate before passing to wasm

---------

Signed-off-by: Anson <[email protected]>
Co-authored-by: Ansonhkg <[email protected]>
Co-authored-by: Federico Amura <[email protected]>
Co-authored-by: Massimo Cairo <[email protected]>

* fix: add blockhash to react demo app (#379)

---------

Signed-off-by: Anson <[email protected]>
Co-authored-by: Chris Cassano <[email protected]>
Co-authored-by: Federico Amura <[email protected]>
Co-authored-by: Massimo Cairo <[email protected]>
  • Loading branch information
4 people authored Feb 22, 2024
1 parent cb018a5 commit f02430d
Show file tree
Hide file tree
Showing 162 changed files with 334 additions and 324 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

# [3.2.0] - 2024-02-20

- [staging/3.2.0](https://github.com/LIT-Protocol/js-sdk/pull/370)

# [3.1.3] - 2024-02-13
Expand Down
55 changes: 27 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div align="center">
<h1>Lit Protocol Javascript/Typescript SDK V3.2.0</h1>
<h1>Lit Protocol Javascript/Typescript SDK V3.2.1</h1>

<img src="https://i.ibb.co/p2xfzK1/Screenshot-2022-11-15-at-09-56-57.png">
<br/>
Expand Down Expand Up @@ -45,7 +45,6 @@ Operable in both Node.js and the browser
yarn add @lit-protocol/lit-node-client
```


</div>

<div align="center">
Expand All @@ -58,38 +57,38 @@ yarn add @lit-protocol/lit-node-client

Package | Category | Version | Download
--- | --- | --- | ---
| [@lit-protocol/lit-node-client-nodejs](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/lit-node-client-nodejs) | ![lit-node-client-nodejs](https://img.shields.io/badge/-nodejs-2E8B57 "lit-node-client-nodejs") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/lit-node-client-nodejs">npm</a>
| [@lit-protocol/lit-node-client](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/lit-node-client) | ![lit-node-client](https://img.shields.io/badge/-universal-8A6496 "lit-node-client") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/lit-node-client">npm</a>
| [@lit-protocol/lit-node-client-nodejs](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/lit-node-client-nodejs) | ![lit-node-client-nodejs](https://img.shields.io/badge/-nodejs-2E8B57 "lit-node-client-nodejs") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/lit-node-client-nodejs">npm</a>
| [@lit-protocol/lit-node-client](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/lit-node-client) | ![lit-node-client](https://img.shields.io/badge/-universal-8A6496 "lit-node-client") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/lit-node-client">npm</a>


If you're a tech-savvy user and wish to utilize only specific submodules that our main module relies upon, you can find individual packages listed below. This way, you can import only the necessary packages that cater to your specific use case::


Package | Category | Version | Download
--- | --- | --- | ---
| [@lit-protocol/access-control-conditions](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/access-control-conditions) | ![access-control-conditions](https://img.shields.io/badge/-universal-8A6496 "access-control-conditions") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/access-control-conditions">npm</a>
| [@lit-protocol/auth-helpers](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/auth-helpers) | ![auth-helpers](https://img.shields.io/badge/-universal-8A6496 "auth-helpers") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/auth-helpers">npm</a>
| [@lit-protocol/bls-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/bls-sdk) | ![bls-sdk](https://img.shields.io/badge/-universal-8A6496 "bls-sdk") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/bls-sdk">npm</a>
| [@lit-protocol/constants](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/constants) | ![constants](https://img.shields.io/badge/-universal-8A6496 "constants") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/constants">npm</a>
| [@lit-protocol/contracts-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/contracts-sdk) | ![contracts-sdk](https://img.shields.io/badge/-universal-8A6496 "contracts-sdk") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/contracts-sdk">npm</a>
| [@lit-protocol/core](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/core) | ![core](https://img.shields.io/badge/-universal-8A6496 "core") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/core">npm</a>
| [@lit-protocol/crypto](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/crypto) | ![crypto](https://img.shields.io/badge/-universal-8A6496 "crypto") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/crypto">npm</a>
| [@lit-protocol/ecdsa-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/ecdsa-sdk) | ![ecdsa-sdk](https://img.shields.io/badge/-universal-8A6496 "ecdsa-sdk") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/ecdsa-sdk">npm</a>
| [@lit-protocol/encryption](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/encryption) | ![encryption](https://img.shields.io/badge/-universal-8A6496 "encryption") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/encryption">npm</a>
| [@lit-protocol/logger](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/logger) | ![logger](https://img.shields.io/badge/-universal-8A6496 "logger") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/logger">npm</a>
| [@lit-protocol/misc](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/misc) | ![misc](https://img.shields.io/badge/-universal-8A6496 "misc") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/misc">npm</a>
| [@lit-protocol/nacl](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/nacl) | ![nacl](https://img.shields.io/badge/-universal-8A6496 "nacl") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/nacl">npm</a>
| [@lit-protocol/pkp-base](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-base) | ![pkp-base](https://img.shields.io/badge/-universal-8A6496 "pkp-base") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-base">npm</a>
| [@lit-protocol/pkp-client](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-client) | ![pkp-client](https://img.shields.io/badge/-universal-8A6496 "pkp-client") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-client">npm</a>
| [@lit-protocol/pkp-cosmos](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-cosmos) | ![pkp-cosmos](https://img.shields.io/badge/-universal-8A6496 "pkp-cosmos") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-cosmos">npm</a>
| [@lit-protocol/pkp-ethers](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-ethers) | ![pkp-ethers](https://img.shields.io/badge/-universal-8A6496 "pkp-ethers") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-ethers">npm</a>
| [@lit-protocol/pkp-sui](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-sui) | ![pkp-sui](https://img.shields.io/badge/-universal-8A6496 "pkp-sui") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-sui">npm</a>
| [@lit-protocol/pkp-walletconnect](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-walletconnect) | ![pkp-walletconnect](https://img.shields.io/badge/-universal-8A6496 "pkp-walletconnect") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-walletconnect">npm</a>
| [@lit-protocol/sev-snp-utils-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/sev-snp-utils-sdk) | ![sev-snp-utils-sdk](https://img.shields.io/badge/-universal-8A6496 "sev-snp-utils-sdk") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/sev-snp-utils-sdk">npm</a>
| [@lit-protocol/types](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/types) | ![types](https://img.shields.io/badge/-universal-8A6496 "types") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/types">npm</a>
| [@lit-protocol/uint8arrays](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/uint8arrays) | ![uint8arrays](https://img.shields.io/badge/-universal-8A6496 "uint8arrays") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/uint8arrays">npm</a>
| [@lit-protocol/auth-browser](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/auth-browser) | ![auth-browser](https://img.shields.io/badge/-browser-E98869 "auth-browser") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/auth-browser">npm</a>
| [@lit-protocol/misc-browser](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/misc-browser) | ![misc-browser](https://img.shields.io/badge/-browser-E98869 "misc-browser") | 3.2.0 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/misc-browser">npm</a>
| [@lit-protocol/access-control-conditions](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/access-control-conditions) | ![access-control-conditions](https://img.shields.io/badge/-universal-8A6496 "access-control-conditions") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/access-control-conditions">npm</a>
| [@lit-protocol/auth-helpers](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/auth-helpers) | ![auth-helpers](https://img.shields.io/badge/-universal-8A6496 "auth-helpers") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/auth-helpers">npm</a>
| [@lit-protocol/bls-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/bls-sdk) | ![bls-sdk](https://img.shields.io/badge/-universal-8A6496 "bls-sdk") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/bls-sdk">npm</a>
| [@lit-protocol/constants](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/constants) | ![constants](https://img.shields.io/badge/-universal-8A6496 "constants") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/constants">npm</a>
| [@lit-protocol/contracts-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/contracts-sdk) | ![contracts-sdk](https://img.shields.io/badge/-universal-8A6496 "contracts-sdk") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/contracts-sdk">npm</a>
| [@lit-protocol/core](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/core) | ![core](https://img.shields.io/badge/-universal-8A6496 "core") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/core">npm</a>
| [@lit-protocol/crypto](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/crypto) | ![crypto](https://img.shields.io/badge/-universal-8A6496 "crypto") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/crypto">npm</a>
| [@lit-protocol/ecdsa-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/ecdsa-sdk) | ![ecdsa-sdk](https://img.shields.io/badge/-universal-8A6496 "ecdsa-sdk") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/ecdsa-sdk">npm</a>
| [@lit-protocol/encryption](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/encryption) | ![encryption](https://img.shields.io/badge/-universal-8A6496 "encryption") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/encryption">npm</a>
| [@lit-protocol/logger](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/logger) | ![logger](https://img.shields.io/badge/-universal-8A6496 "logger") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/logger">npm</a>
| [@lit-protocol/misc](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/misc) | ![misc](https://img.shields.io/badge/-universal-8A6496 "misc") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/misc">npm</a>
| [@lit-protocol/nacl](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/nacl) | ![nacl](https://img.shields.io/badge/-universal-8A6496 "nacl") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/nacl">npm</a>
| [@lit-protocol/pkp-base](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-base) | ![pkp-base](https://img.shields.io/badge/-universal-8A6496 "pkp-base") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-base">npm</a>
| [@lit-protocol/pkp-client](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-client) | ![pkp-client](https://img.shields.io/badge/-universal-8A6496 "pkp-client") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-client">npm</a>
| [@lit-protocol/pkp-cosmos](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-cosmos) | ![pkp-cosmos](https://img.shields.io/badge/-universal-8A6496 "pkp-cosmos") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-cosmos">npm</a>
| [@lit-protocol/pkp-ethers](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-ethers) | ![pkp-ethers](https://img.shields.io/badge/-universal-8A6496 "pkp-ethers") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-ethers">npm</a>
| [@lit-protocol/pkp-sui](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-sui) | ![pkp-sui](https://img.shields.io/badge/-universal-8A6496 "pkp-sui") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-sui">npm</a>
| [@lit-protocol/pkp-walletconnect](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/pkp-walletconnect) | ![pkp-walletconnect](https://img.shields.io/badge/-universal-8A6496 "pkp-walletconnect") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/pkp-walletconnect">npm</a>
| [@lit-protocol/sev-snp-utils-sdk](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/sev-snp-utils-sdk) | ![sev-snp-utils-sdk](https://img.shields.io/badge/-universal-8A6496 "sev-snp-utils-sdk") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/sev-snp-utils-sdk">npm</a>
| [@lit-protocol/types](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/types) | ![types](https://img.shields.io/badge/-universal-8A6496 "types") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/types">npm</a>
| [@lit-protocol/uint8arrays](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/uint8arrays) | ![uint8arrays](https://img.shields.io/badge/-universal-8A6496 "uint8arrays") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/uint8arrays">npm</a>
| [@lit-protocol/auth-browser](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/auth-browser) | ![auth-browser](https://img.shields.io/badge/-browser-E98869 "auth-browser") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/auth-browser">npm</a>
| [@lit-protocol/misc-browser](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/misc-browser) | ![misc-browser](https://img.shields.io/badge/-browser-E98869 "misc-browser") | 3.2.1 | <a target="_blank" href="https://www.npmjs.com/package/@lit-protocol/misc-browser">npm</a>

<!-- autogen:package:end -->

Expand All @@ -98,11 +97,11 @@ Package | Category | Version | Download
- V3 (Current): https://v3.api-docs.getlit.dev/ <b4/>

### Old APIs Doc(s)

- V2: http://docs.lit-js-sdk-v2.litprotocol.com/ <br/>

</div>


# Contributing and developing to this SDK

## Prerequisite
Expand Down
4 changes: 2 additions & 2 deletions apps/html/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- (DO NOT EDIT!) (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Wed, 21 Feb 2024 00:16:36 GMT -->
<!-- (DO NOT EDIT!) (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Thu, 22 Feb 2024 05:05:54 GMT -->
<!DOCTYPE html>
<html lang="en">
<head>
Expand Down Expand Up @@ -62,7 +62,7 @@
</style>
</head>
<body>
(HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Wed, 21 Feb 2024 00:16:36 GMT
(HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Thu, 22 Feb 2024 05:05:54 GMT

<!-- ==================== ALL EXPORTED VANILLA LIBRARIES ==================== -->

Expand Down
2 changes: 1 addition & 1 deletion apps/react/src/app/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1805,7 +1805,7 @@ pre {
`,
}}
/>
(REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Wed, 21 Feb 2024 00:16:38 GMT
(REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Thu, 22 Feb 2024 05:05:54 GMT
<div id="root"></div>
<pre><code id="result"></code></pre>
</>
Expand Down
12 changes: 11 additions & 1 deletion apps/react/src/app/lit-node-client-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,17 @@ const LitNodeClientPage = () => {
// @ts-ignore
globalThis.authBrowser = authBrowser;

const authsig = await authBrowser.checkAndSignAuthMessage({ chain: 'ethereum' });
const client = new LitJsSdk.LitNodeClient({
litNetwork: 'cayenne',
debug: true,
});

const latestBlockhash = client.getLatestBlockhash();

const authsig = await authBrowser.checkAndSignAuthMessage({
chain: 'ethereum',
nonce: latestBlockhash,
});
console.log('authsig:', authsig)
};

Expand Down
Loading

0 comments on commit f02430d

Please sign in to comment.