From f1de98f348ebd438061a74dba44b04093acdbc81 Mon Sep 17 00:00:00 2001 From: Chris Cassano <1285652+glitch003@users.noreply.github.com> Date: Fri, 15 Sep 2023 18:12:22 -0700 Subject: [PATCH] make cayenne use 3 nodes by default (#217) --- README.md | 58 ++++++++++--------- apps/html/index.html | 4 +- apps/html/manual_tests_claim_pkp.html | 1 - apps/react/src/app/app.tsx | 2 +- .../constants/src/lib/constants/constants.ts | 7 --- .../constants/defaultLitNodeClientConfig.ts | 15 ++--- packages/core/src/lib/lit-core.ts | 2 +- tsconfig.json | 17 ++++-- 8 files changed, 51 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index dcd2b144cb..d8b5dccd6d 100644 --- a/README.md +++ b/README.md @@ -67,37 +67,39 @@ For usage directly in the browser with a script tag -| 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.0.0 | npm
Vanilla JS (UMD) | -| [@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.0.0 | npm
Vanilla JS (UMD) | +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.0.0 | npm
Vanilla JS (UMD) +| [@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.0.0 | npm
Vanilla JS (UMD) + 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.0.0 | npm
Vanilla JS (UMD) | -| [@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.0.0 | npm
Vanilla JS (UMD) | -| [@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.0.0 | npm
Vanilla JS (UMD) | -| [@lit-protocol/constants](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/constants) | ![constants](https://img.shields.io/badge/-universal-8A6496 'constants') | 3.0.0 | npm
Vanilla JS (UMD) | -| [@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.0.0 | npm
Vanilla JS (UMD) | -| [@lit-protocol/core](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/core) | ![core](https://img.shields.io/badge/-universal-8A6496 'core') | 3.0.0 | npm
Vanilla JS (UMD) | -| [@lit-protocol/crypto](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/crypto) | ![crypto](https://img.shields.io/badge/-universal-8A6496 'crypto') | 3.0.0 | npm
Vanilla JS (UMD) | -| [@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.0.0 | npm
Vanilla JS (UMD) | -| [@lit-protocol/encryption](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/encryption) | ![encryption](https://img.shields.io/badge/-universal-8A6496 'encryption') | 3.0.0 | npm
Vanilla JS (UMD) | -| [@lit-protocol/lit-third-party-libs](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/lit-third-party-libs) | ![lit-third-party-libs](https://img.shields.io/badge/-universal-8A6496 'lit-third-party-libs') | 3.0.0 | npm
Vanilla JS (UMD) | -| [@lit-protocol/misc](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/misc) | ![misc](https://img.shields.io/badge/-universal-8A6496 'misc') | 3.0.0 | npm
Vanilla JS (UMD) | -| [@lit-protocol/nacl](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/nacl) | ![nacl](https://img.shields.io/badge/-universal-8A6496 'nacl') | 3.0.0 | npm
Vanilla JS (UMD) | -| [@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.0.0 | npm
Vanilla JS (UMD) | -| [@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.0.0 | npm
Vanilla JS (UMD) | -| [@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.0.0 | npm
Vanilla JS (UMD) | -| [@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.0.0 | npm
Vanilla JS (UMD) | -| [@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.0.0 | npm
Vanilla JS (UMD) | -| [@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.0.0 | npm
Vanilla JS (UMD) | -| [@lit-protocol/types](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/types) | ![types](https://img.shields.io/badge/-universal-8A6496 'types') | 3.0.0 | npm
Vanilla JS (UMD) | -| [@lit-protocol/uint8arrays](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/uint8arrays) | ![uint8arrays](https://img.shields.io/badge/-universal-8A6496 'uint8arrays') | 3.0.0 | npm
Vanilla JS (UMD) | -| [@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.0.0 | npm
Vanilla JS (UMD) | -| [@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.0.0 | npm
Vanilla JS (UMD) | + +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.0.0 | npm
Vanilla JS (UMD) +| [@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.0.0 | npm
Vanilla JS (UMD) +| [@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.0.0 | npm
Vanilla JS (UMD) +| [@lit-protocol/constants](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/constants) | ![constants](https://img.shields.io/badge/-universal-8A6496 "constants") | 3.0.0 | npm
Vanilla JS (UMD) +| [@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.0.0 | npm
Vanilla JS (UMD) +| [@lit-protocol/core](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/core) | ![core](https://img.shields.io/badge/-universal-8A6496 "core") | 3.0.0 | npm
Vanilla JS (UMD) +| [@lit-protocol/crypto](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/crypto) | ![crypto](https://img.shields.io/badge/-universal-8A6496 "crypto") | 3.0.0 | npm
Vanilla JS (UMD) +| [@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.0.0 | npm
Vanilla JS (UMD) +| [@lit-protocol/encryption](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/encryption) | ![encryption](https://img.shields.io/badge/-universal-8A6496 "encryption") | 3.0.0 | npm
Vanilla JS (UMD) +| [@lit-protocol/lit-third-party-libs](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/lit-third-party-libs) | ![lit-third-party-libs](https://img.shields.io/badge/-universal-8A6496 "lit-third-party-libs") | 3.0.0 | npm
Vanilla JS (UMD) +| [@lit-protocol/misc](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/misc) | ![misc](https://img.shields.io/badge/-universal-8A6496 "misc") | 3.0.0 | npm
Vanilla JS (UMD) +| [@lit-protocol/nacl](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/nacl) | ![nacl](https://img.shields.io/badge/-universal-8A6496 "nacl") | 3.0.0 | npm
Vanilla JS (UMD) +| [@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.0.0 | npm
Vanilla JS (UMD) +| [@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.0.0 | npm
Vanilla JS (UMD) +| [@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.0.0 | npm
Vanilla JS (UMD) +| [@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.0.0 | npm
Vanilla JS (UMD) +| [@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.0.0 | npm
Vanilla JS (UMD) +| [@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.0.0 | npm
Vanilla JS (UMD) +| [@lit-protocol/types](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/types) | ![types](https://img.shields.io/badge/-universal-8A6496 "types") | 3.0.0 | npm
Vanilla JS (UMD) +| [@lit-protocol/uint8arrays](https://github.com/LIT-Protocol/js-sdk/tree/master/packages/uint8arrays) | ![uint8arrays](https://img.shields.io/badge/-universal-8A6496 "uint8arrays") | 3.0.0 | npm
Vanilla JS (UMD) +| [@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.0.0 | npm
Vanilla JS (UMD) +| [@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.0.0 | npm
Vanilla JS (UMD) diff --git a/apps/html/index.html b/apps/html/index.html index fd358c8e9d..a7b599aea4 100644 --- a/apps/html/index.html +++ b/apps/html/index.html @@ -1,4 +1,4 @@ - + @@ -62,7 +62,7 @@ - (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Thu, 14 Sep 2023 05:53:44 GMT + (HTML) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-html.mjs Fri, 15 Sep 2023 22:51:26 GMT diff --git a/apps/html/manual_tests_claim_pkp.html b/apps/html/manual_tests_claim_pkp.html index 38895f4954..0d3b492c4c 100644 --- a/apps/html/manual_tests_claim_pkp.html +++ b/apps/html/manual_tests_claim_pkp.html @@ -27,7 +27,6 @@ window.LitJsSdk = LitJsSdk_litNodeClient; const litNodeClient = new LitNodeClient({ - litNetwork: 'cayenne', debug: true }); litNodeClient.connect(); diff --git a/apps/react/src/app/app.tsx b/apps/react/src/app/app.tsx index 3d93b90320..9717295131 100644 --- a/apps/react/src/app/app.tsx +++ b/apps/react/src/app/app.tsx @@ -1802,7 +1802,7 @@ pre { `, }} /> - (REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Thu, 14 Sep 2023 05:53:45 GMT + (REACT) THIS FILE IS AUTOMATICALLY GENERATED FROM tools/scripts/gen-react.mjs Fri, 15 Sep 2023 22:51:27 GMT
diff --git a/packages/constants/src/lib/constants/constants.ts b/packages/constants/src/lib/constants/constants.ts index c6506b72b4..9b46da3918 100644 --- a/packages/constants/src/lib/constants/constants.ts +++ b/packages/constants/src/lib/constants/constants.ts @@ -637,13 +637,6 @@ export const LIT_NETWORKS = { 'https://cayenne.litgateway.com:7370', 'https://cayenne.litgateway.com:7371', 'https://cayenne.litgateway.com:7372', - 'https://cayenne.litgateway.com:7373', - 'https://cayenne.litgateway.com:7374', - 'https://cayenne.litgateway.com:7375', - 'https://cayenne.litgateway.com:7376', - 'https://cayenne.litgateway.com:7377', - 'https://cayenne.litgateway.com:7378', - 'https://cayenne.litgateway.com:7379', ], localhost: [ 'http://localhost:7470', diff --git a/packages/constants/src/lib/constants/defaultLitNodeClientConfig.ts b/packages/constants/src/lib/constants/defaultLitNodeClientConfig.ts index 41c4606a0f..a130101888 100644 --- a/packages/constants/src/lib/constants/defaultLitNodeClientConfig.ts +++ b/packages/constants/src/lib/constants/defaultLitNodeClientConfig.ts @@ -2,19 +2,12 @@ import { LitNodeClientConfig } from '@lit-protocol/types'; export const defaultLitnodeClientConfig: LitNodeClientConfig = { alertWhenUnauthorized: true, - minNodeCount: 6, + minNodeCount: 2, debug: true, bootstrapUrls: [ - 'https://node2.litgateway.com:7370', - 'https://node2.litgateway.com:7371', - 'https://node2.litgateway.com:7372', - 'https://node2.litgateway.com:7373', - 'https://node2.litgateway.com:7374', - 'https://node2.litgateway.com:7375', - 'https://node2.litgateway.com:7376', - 'https://node2.litgateway.com:7377', - 'https://node2.litgateway.com:7378', - 'https://node2.litgateway.com:7379', + 'https://cayenne.litgateway.com:7370', + 'https://cayenne.litgateway.com:7371', + 'https://cayenne.litgateway.com:7372', ], litNetwork: 'cayenne', connectTimeout: 20000, diff --git a/packages/core/src/lib/lit-core.ts b/packages/core/src/lib/lit-core.ts index 54407371dd..4e591dd0bc 100644 --- a/packages/core/src/lib/lit-core.ts +++ b/packages/core/src/lib/lit-core.ts @@ -62,7 +62,7 @@ export class LitCore { // ========== Constructor ========== constructor(args: any[LitNodeClientConfig | CustomNetwork | any]) { - let customConfig = args; + const customConfig = args; // -- initialize default config this.config = defaultLitnodeClientConfig; diff --git a/tsconfig.json b/tsconfig.json index e9cc3cb256..e8f4e19b50 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,15 +10,24 @@ "importHelpers": true, "target": "ES2020", "module": "ES2020", - "lib": ["ES2020", "dom"], + "lib": [ + "ES2020", + "dom", + "ES2021.String" + ], "skipLibCheck": true, "skipDefaultLibCheck": true, "baseUrl": ".", "allowSyntheticDefaultImports": true, "resolveJsonModule": true, "paths": { - "@lit-protocol/*": ["packages/*/src"] + "@lit-protocol/*": [ + "packages/*/src" + ] } }, - "exclude": ["node_modules", "tmp"] -} + "exclude": [ + "node_modules", + "tmp" + ] +} \ No newline at end of file