From c235094b63c608230ae888224802b0fc0fc69031 Mon Sep 17 00:00:00 2001 From: Ansh Date: Sat, 28 Dec 2024 15:15:14 +0530 Subject: [PATCH 01/27] replace litConnectModal with wagmi --- package.json | 7 +- packages/auth-browser/package.json | 6 +- packages/auth-browser/src/lib/chains/eth.ts | 170 ++-- yarn.lock | 946 +++++++++++++++++++- 4 files changed, 1011 insertions(+), 118 deletions(-) diff --git a/package.json b/package.json index 0449ee248..1e9d53d7b 100644 --- a/package.json +++ b/package.json @@ -47,6 +47,8 @@ "@openagenda/verror": "^3.1.4", "@simplewebauthn/browser": "^7.2.0", "@simplewebauthn/typescript-types": "^7.0.0", + "@tanstack/react-query": "^5.62.11", + "@wagmi/core": "^2.16.3", "@walletconnect/ethereum-provider": "2.9.2", "@walletconnect/jsonrpc-utils": "1.0.8", "@walletconnect/types": "2.9.2", @@ -64,12 +66,15 @@ "micromodal": "^0.4.10", "multiformats": "^9.7.1", "pako": "^2.1.0", + "react": "^19.0.0", "siwe": "^2.3.2", "siwe-recap": "0.0.2-alpha.0", "tslib": "^2.7.0", "tweetnacl": "^1.0.3", "tweetnacl-util": "^0.15.1", - "uint8arrays": "^4.0.3" + "uint8arrays": "^4.0.3", + "viem": "^2.21.57", + "wagmi": "^2.14.6" }, "devDependencies": { "@nx/devkit": "17.3.0", diff --git a/packages/auth-browser/package.json b/packages/auth-browser/package.json index 787d52a3b..54296e719 100644 --- a/packages/auth-browser/package.json +++ b/packages/auth-browser/package.json @@ -26,7 +26,11 @@ "tweetnacl-util": "^0.13.3", "util": "^0.12.4", "web-vitals": "^3.0.4", - "@lit-protocol/contracts": "^0.0.74" + "@lit-protocol/contracts": "^0.0.74", + "wagmi": "^2.14.6", + "viem": "^2.0.0", + "@tanstack/react-query": "^5.0.0", + "react": "^18.0.0" }, "tags": [ "browser" diff --git a/packages/auth-browser/src/lib/chains/eth.ts b/packages/auth-browser/src/lib/chains/eth.ts index faaa2635d..33d15ac64 100644 --- a/packages/auth-browser/src/lib/chains/eth.ts +++ b/packages/auth-browser/src/lib/chains/eth.ts @@ -5,12 +5,7 @@ import { hexlify } from '@ethersproject/bytes'; import { Web3Provider, JsonRpcSigner } from '@ethersproject/providers'; import { toUtf8Bytes } from '@ethersproject/strings'; -// import WalletConnectProvider from '@walletconnect/ethereum-provider'; import { verifyMessage } from '@ethersproject/wallet'; -import { - EthereumProvider, - default as WalletConnectProvider, -} from '@walletconnect/ethereum-provider'; import { ethers } from 'ethers'; import { getAddress } from 'ethers/lib/utils'; import { SiweMessage } from 'siwe'; @@ -43,9 +38,14 @@ import { validateSessionSig, } from '@lit-protocol/misc'; import { getStorageItem } from '@lit-protocol/misc-browser'; -import { AuthSig, AuthCallbackParams } from '@lit-protocol/types'; +import { AuthSig, AuthCallbackParams, LITEVMChain } from '@lit-protocol/types'; -import LitConnectModal from '../connect-modal/modal'; +import { + createConfig, +} from 'wagmi'; +import { connect as wagmiConnect, disconnect as wagmiDisconnect, getWalletClient, Config } from '@wagmi/core'; +import { injected, walletConnect } from '@wagmi/connectors' +import { http } from 'viem'; const deprecated = depd('lit-js-sdk:auth-browser:index'); @@ -74,8 +74,6 @@ interface ConnectWeb3Result { account: string | any; } -type RPCUrls = Record; - interface signAndSaveAuthParams { web3: Web3Provider; account: string; @@ -131,8 +129,7 @@ export type WALLET_ERROR_VALUES = /** ---------- Local Helpers ---------- */ -let litWCProvider: WalletConnectProvider | undefined; - +let wagmiConfig: Config; /** * * Convert chain hex id to chain name @@ -291,35 +288,6 @@ export const getMustResign = (authSig: AuthSig, resources: any): boolean => { return mustResign; }; -/** - * - * Get RPC Urls in the correct format - * need to make it look like this: - --- - rpc: { - 1: "https://mainnet.mycustomnode.com", - 3: "https://ropsten.mycustomnode.com", - 100: "https://dai.poa.network", - // ... - }, - --- - * - * @returns - */ -export const getRPCUrls = (): RPCUrls => { - const rpcUrls: RPCUrls = {}; - - const keys: string[] = Object.keys(LIT_CHAINS); - - for (const chainName of keys) { - const chainId = LIT_CHAINS[chainName].chainId; - const rpcUrl = LIT_CHAINS[chainName].rpcUrls[0]; - rpcUrls[chainId.toString()] = rpcUrl; - } - - return rpcUrls; -}; - /** ---------- Exports ---------- */ /** * @deprecated @@ -353,6 +321,49 @@ export const decodeCallResult = deprecated.function( 'decodeCallResult will be removed.' ); +const getWagmiProvider = async (chainId: number, walletConnectProjectId?: string) => { + const chain = Object.values(LIT_CHAINS).find(c => c.chainId === chainId); + if (!chain) { + throw new Error(`Chain ID ${chainId} not supported`); + } + + const litChainToWagmiChain = (litChain: LITEVMChain) => ({ + id: litChain.chainId, + name: litChain.name, + network: litChain.name.toLowerCase(), + nativeCurrency: { + name: litChain.name, + symbol: litChain.symbol, + decimals: litChain.decimals, + }, + rpcUrls: { + default: { http: litChain.rpcUrls }, + public: { http: litChain.rpcUrls }, + }, + }); + + const litChain = litChainToWagmiChain(chain); + + const config = createConfig({ + chains: [litChain], + transports: { + [litChain.id]: http(litChain.rpcUrls.default.http[0]) + }, + connectors: [ + injected(), + ...(walletConnectProjectId + ? [ + walletConnect({ + projectId: walletConnectProjectId + }) + ] + : []), + ] + }); + + return config; +}; + /** * @browserOnly * Connect to web 3 @@ -371,58 +382,33 @@ export const connectWeb3 = async ({ return { web3: null, account: null }; } - const rpcUrls: RPCUrls = getRPCUrls(); - - let providerOptions = {}; - - if (walletConnectProjectId) { - const wcProvider = await EthereumProvider.init({ - projectId: walletConnectProjectId, - chains: [chainId], - showQrModal: true, - optionalMethods: ['eth_sign'], - rpcMap: rpcUrls, - }); - - providerOptions = { - walletconnect: { - provider: wcProvider, - }, - }; - - if (isBrowser()) { - litWCProvider = wcProvider; - } - } - - log('getting provider via lit connect modal'); + log('getting provider via wagmi'); - const dialog = new LitConnectModal({ providerOptions }); - - const provider = await dialog.getWalletProvider(); + const config = await getWagmiProvider(chainId, walletConnectProjectId); + wagmiConfig = config; + + const result = await wagmiConnect(config, { + connector: config.connectors[0], + chainId, + }); + log('got provider'); + if (!result) { + throw new Error('Failed to connect wallet'); + } - // @ts-ignore - const web3 = new Web3Provider(provider); - - // trigger metamask popup - try { - deprecated( - '@deprecated soon to be removed. - trying to enable provider. this will trigger the metamask popup.' - ); - // @ts-ignore - await provider.enable(); - } catch (e) { - log( - "error enabling provider but swallowed it because it's not important. most wallets use a different function now to enable the wallet so you can ignore this error, because those other methods will be tried.", - e - ); + const walletClient = await getWalletClient(config); + + if (!walletClient) { + throw new Error('No wallet client found'); } + // @ts-ignore - Create Web3Provider from wallet client + const web3 = new Web3Provider(walletClient); + log('listing accounts'); const accounts = await web3.listAccounts(); - log('accounts', accounts); const account = ethers.utils.getAddress(accounts[0]); @@ -437,22 +423,16 @@ export const connectWeb3 = async ({ * * @return { void } */ -export const disconnectWeb3 = (): void => { +export const disconnectWeb3 = async (): Promise => { if (isNode()) { log('disconnectWeb3 is not supported in nodejs.'); return; } - // @ts-ignore - if (isBrowser() && litWCProvider) { - try { - litWCProvider.disconnect(); - } catch (err) { - log( - 'Attempted to disconnect global WalletConnectProvider for lit-connect-modal', - err - ); - } + try { + await wagmiDisconnect(wagmiConfig); + } catch (err) { + log('Error disconnecting wallet:', err); } const storage = LOCAL_STORAGE_KEYS; diff --git a/yarn.lock b/yarn.lock index a50832294..86af5c13f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@adraffy/ens-normalize@^1.10.1": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.11.0.tgz#42cc67c5baa407ac25059fcd7d405cc5ecdb0c33" + integrity sha512-/3DDPKHqqIqxUULp8yP4zODUY1i+2xvVWsv8A79xGWdCAG+8sb0hRh0Rk2QyOJUnnbyPUAZYcpBuRe3nS2OIUg== + "@ampproject/remapping@^2.2.0": version "2.3.0" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4" @@ -983,7 +988,7 @@ "@babel/plugin-transform-modules-commonjs" "^7.25.9" "@babel/plugin-transform-typescript" "^7.25.9" -"@babel/runtime@^7.10.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.22.6", "@babel/runtime@^7.25.0", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4": +"@babel/runtime@^7.10.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.6", "@babel/runtime@^7.25.0", "@babel/runtime@^7.26.0", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4": version "7.26.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.0.tgz#8600c2f595f277c60815256418b85356a65173c1" integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw== @@ -1033,6 +1038,16 @@ "@truffle/contract" "^4.2.6" ethers "^4.0.45" +"@coinbase/wallet-sdk@4.2.3": + version "4.2.3" + resolved "https://registry.yarnpkg.com/@coinbase/wallet-sdk/-/wallet-sdk-4.2.3.tgz#a30fa0605b24bc42c37f52a62d2442bcbb7734af" + integrity sha512-BcyHZ/Ec84z0emORzqdXDv4P0oV+tV3a0OirfA8Ko1JGBIAVvB+hzLvZzCDvnuZx7MTK+Dd8Y9Tjlo446BpCIg== + dependencies: + "@noble/hashes" "^1.4.0" + clsx "^1.2.1" + eventemitter3 "^5.0.1" + preact "^10.24.2" + "@colors/colors@1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" @@ -1221,6 +1236,11 @@ resolved "https://registry.yarnpkg.com/@ecies/ciphers/-/ciphers-0.2.1.tgz#a3119516fb55d27ed2d21c497b1c4988f0b4ca02" integrity sha512-ezMihhjW24VNK/2qQR7lH8xCQY24nk0XHF/kwJ1OuiiY5iEwQXOcKVSy47fSoHPRG8gVGXcK5SgtONDk5xMwtQ== +"@ecies/ciphers@^0.2.2": + version "0.2.2" + resolved "https://registry.yarnpkg.com/@ecies/ciphers/-/ciphers-0.2.2.tgz#82a15b10a6e502b63fb30915d944b2eaf3ff17ff" + integrity sha512-ylfGR7PyTd+Rm2PqQowG08BCKA22QuX8NzrL+LxAAvazN10DMwdJ2fWwAzRj05FI/M8vNFGm3cv9Wq/GFWCBLg== + "@ensdomains/address-encoder@^0.1.7": version "0.1.9" resolved "https://registry.yarnpkg.com/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz#f948c485443d9ef7ed2c0c4790e931c33334d02d" @@ -1452,6 +1472,14 @@ crc-32 "^1.2.0" ethereumjs-util "^7.1.5" +"@ethereumjs/common@^3.2.0": + version "3.2.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-3.2.0.tgz#b71df25845caf5456449163012074a55f048e0a0" + integrity sha512-pksvzI0VyLgmuEF2FA/JR/4/y6hcPq8OUail3/AvycBaW1d5VSauOZzqGvJ3RTmR4MU35lWE8KseKOsEhrFRBA== + dependencies: + "@ethereumjs/util" "^8.1.0" + crc-32 "^1.2.0" + "@ethereumjs/rlp@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@ethereumjs/rlp/-/rlp-4.0.1.tgz#626fabfd9081baab3d0a3074b0c7ecaf674aaa41" @@ -1465,6 +1493,16 @@ "@ethereumjs/common" "^2.5.0" ethereumjs-util "^7.1.2" +"@ethereumjs/tx@^4.1.2", "@ethereumjs/tx@^4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-4.2.0.tgz#5988ae15daf5a3b3c815493bc6b495e76009e853" + integrity sha512-1nc6VO4jtFd172BbSnTnDQVr9IYBFl1y4xPzZdtkrkKIncBCkdbgfdRV+MiTkJYAtTxvV12GRZLqBFT1PNK6Yw== + dependencies: + "@ethereumjs/common" "^3.2.0" + "@ethereumjs/rlp" "^4.0.1" + "@ethereumjs/util" "^8.1.0" + ethereum-cryptography "^2.0.0" + "@ethereumjs/util@^8.0.0", "@ethereumjs/util@^8.1.0": version "8.1.0" resolved "https://registry.yarnpkg.com/@ethereumjs/util/-/util-8.1.0.tgz#299df97fb6b034e0577ce9f94c7d9d1004409ed4" @@ -3013,6 +3051,11 @@ npmlog "^6.0.2" write-file-atomic "^4.0.1" +"@lit-labs/ssr-dom-shim@^1.0.0", "@lit-labs/ssr-dom-shim@^1.1.0": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.1.tgz#2f3a8f1d688935c704dbc89132394a41029acbb8" + integrity sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ== + "@lit-protocol/accs-schemas@^0.0.22": version "0.0.22" resolved "https://registry.yarnpkg.com/@lit-protocol/accs-schemas/-/accs-schemas-0.0.22.tgz#8dd2e6e96836aa22a52c25aac0a686c9ced9f65f" @@ -3025,6 +3068,13 @@ resolved "https://registry.yarnpkg.com/@lit-protocol/contracts/-/contracts-0.0.74.tgz#e726a9190c86b10cc6df3a392cd04d19057be27d" integrity sha512-8uV038gzBp7ew7a4884SVt9Zhu8CtiTb+A8dKNnByxVoT1kFt4O4DmsaniV8p9AGjNR13IWfpU1NFChmPHVIpQ== +"@lit/reactive-element@^1.3.0", "@lit/reactive-element@^1.6.0": + version "1.6.3" + resolved "https://registry.yarnpkg.com/@lit/reactive-element/-/reactive-element-1.6.3.tgz#25b4eece2592132845d303e091bad9b04cdcfe03" + integrity sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ== + dependencies: + "@lit-labs/ssr-dom-shim" "^1.0.0" + "@ljharb/resumer@~0.0.1": version "0.0.1" resolved "https://registry.yarnpkg.com/@ljharb/resumer/-/resumer-0.0.1.tgz#8a940a9192dd31f6a1df17564bbd26dc6ad3e68d" @@ -3039,6 +3089,15 @@ dependencies: call-bind "^1.0.7" +"@metamask/eth-json-rpc-provider@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@metamask/eth-json-rpc-provider/-/eth-json-rpc-provider-1.0.1.tgz#3fd5316c767847f4ca107518b611b15396a5a32c" + integrity sha512-whiUMPlAOrVGmX8aKYVPvlKyG4CpQXiNNyt74vE1xb5sPvmx5oA7B/kOi/JdBvhGQq97U1/AVdXEdk2zkP8qyA== + dependencies: + "@metamask/json-rpc-engine" "^7.0.0" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^5.0.1" + "@metamask/eth-sig-util@5.0.2": version "5.0.2" resolved "https://registry.yarnpkg.com/@metamask/eth-sig-util/-/eth-sig-util-5.0.2.tgz#c518279a6e17a88135a13d53a0b970f145ff8bce" @@ -3051,11 +3110,243 @@ tweetnacl "^1.0.3" tweetnacl-util "^0.15.1" +"@metamask/json-rpc-engine@^7.0.0": + version "7.3.3" + resolved "https://registry.yarnpkg.com/@metamask/json-rpc-engine/-/json-rpc-engine-7.3.3.tgz#f2b30a2164558014bfcca45db10f5af291d989af" + integrity sha512-dwZPq8wx9yV3IX2caLi9q9xZBw2XeIoYqdyihDDDpuHVCEiqadJLwqM3zy+uwf6F1QYQ65A8aOMQg1Uw7LMLNg== + dependencies: + "@metamask/rpc-errors" "^6.2.1" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^8.3.0" + +"@metamask/json-rpc-engine@^8.0.1", "@metamask/json-rpc-engine@^8.0.2": + version "8.0.2" + resolved "https://registry.yarnpkg.com/@metamask/json-rpc-engine/-/json-rpc-engine-8.0.2.tgz#29510a871a8edef892f838ee854db18de0bf0d14" + integrity sha512-IoQPmql8q7ABLruW7i4EYVHWUbF74yrp63bRuXV5Zf9BQwcn5H9Ww1eLtROYvI1bUXwOiHZ6qT5CWTrDc/t/AA== + dependencies: + "@metamask/rpc-errors" "^6.2.1" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^8.3.0" + +"@metamask/json-rpc-middleware-stream@^7.0.1": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@metamask/json-rpc-middleware-stream/-/json-rpc-middleware-stream-7.0.2.tgz#2e8b2cbc38968e3c6239a9144c35bbb08a8fb57d" + integrity sha512-yUdzsJK04Ev98Ck4D7lmRNQ8FPioXYhEUZOMS01LXW8qTvPGiRVXmVltj2p4wrLkh0vW7u6nv0mNl5xzC5Qmfg== + dependencies: + "@metamask/json-rpc-engine" "^8.0.2" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^8.3.0" + readable-stream "^3.6.2" + +"@metamask/object-multiplex@^2.0.0": + version "2.1.0" + resolved "https://registry.yarnpkg.com/@metamask/object-multiplex/-/object-multiplex-2.1.0.tgz#5e2e908fc46aee581cbba809870eeee0e571cbb6" + integrity sha512-4vKIiv0DQxljcXwfpnbsXcfa5glMj5Zg9mqn4xpIWqkv6uJ2ma5/GtUfLFSxhlxnR8asRMv8dDmWya1Tc1sDFA== + dependencies: + once "^1.4.0" + readable-stream "^3.6.2" + +"@metamask/onboarding@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@metamask/onboarding/-/onboarding-1.0.1.tgz#14a36e1e175e2f69f09598e2008ab6dc1b3297e6" + integrity sha512-FqHhAsCI+Vacx2qa5mAFcWNSrTcVGMNjzxVgaX8ECSny/BJ9/vgXP9V7WF/8vb9DltPeQkxr+Fnfmm6GHfmdTQ== + dependencies: + bowser "^2.9.0" + +"@metamask/providers@16.1.0": + version "16.1.0" + resolved "https://registry.yarnpkg.com/@metamask/providers/-/providers-16.1.0.tgz#7da593d17c541580fa3beab8d9d8a9b9ce19ea07" + integrity sha512-znVCvux30+3SaUwcUGaSf+pUckzT5ukPRpcBmy+muBLC0yaWnBcvDqGfcsw6CBIenUdFrVoAFa8B6jsuCY/a+g== + dependencies: + "@metamask/json-rpc-engine" "^8.0.1" + "@metamask/json-rpc-middleware-stream" "^7.0.1" + "@metamask/object-multiplex" "^2.0.0" + "@metamask/rpc-errors" "^6.2.1" + "@metamask/safe-event-emitter" "^3.1.1" + "@metamask/utils" "^8.3.0" + detect-browser "^5.2.0" + extension-port-stream "^3.0.0" + fast-deep-equal "^3.1.3" + is-stream "^2.0.0" + readable-stream "^3.6.2" + webextension-polyfill "^0.10.0" + +"@metamask/rpc-errors@^6.2.1": + version "6.4.0" + resolved "https://registry.yarnpkg.com/@metamask/rpc-errors/-/rpc-errors-6.4.0.tgz#a7ce01c06c9a347ab853e55818ac5654a73bd006" + integrity sha512-1ugFO1UoirU2esS3juZanS/Fo8C8XYocCuBpfZI5N7ECtoG+zu0wF+uWZASik6CkO6w9n/Iebt4iI4pT0vptpg== + dependencies: + "@metamask/utils" "^9.0.0" + fast-safe-stringify "^2.0.6" + "@metamask/safe-event-emitter@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-2.0.0.tgz#af577b477c683fad17c619a78208cede06f9605c" integrity sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q== +"@metamask/safe-event-emitter@^3.0.0", "@metamask/safe-event-emitter@^3.1.1": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@metamask/safe-event-emitter/-/safe-event-emitter-3.1.2.tgz#bfac8c7a1a149b5bbfe98f59fbfea512dfa3bad4" + integrity sha512-5yb2gMI1BDm0JybZezeoX/3XhPDOtTbcFvpTXM9kxsoZjPZFh4XciqRbpD6N86HYZqWDhEaKUDuOyR0sQHEjMA== + +"@metamask/sdk-communication-layer@0.31.0": + version "0.31.0" + resolved "https://registry.yarnpkg.com/@metamask/sdk-communication-layer/-/sdk-communication-layer-0.31.0.tgz#0acc063b62aa09d044c7aab65801712d760e53b2" + integrity sha512-V9CxdzabDPjQVgmKGHsyU3SYt4Af27g+4DbGCx0fLoHqN/i1RBDZqs/LYbJX3ykJCANzE+llz/MolMCMrzM2RA== + dependencies: + bufferutil "^4.0.8" + date-fns "^2.29.3" + debug "^4.3.4" + utf-8-validate "^5.0.2" + uuid "^8.3.2" + +"@metamask/sdk-install-modal-web@0.31.2": + version "0.31.2" + resolved "https://registry.yarnpkg.com/@metamask/sdk-install-modal-web/-/sdk-install-modal-web-0.31.2.tgz#bb8c92a6844a632be8525e7bb5a35924a926d6cd" + integrity sha512-KPv36kQjmTwErU8g2neuHHSgkD5+1hp4D6ERfk5Kc2r73aOYNCdG9wDGRUmFmcY2MKkeK1EuDyZfJ4FPU30fxQ== + dependencies: + "@paulmillr/qr" "^0.2.1" + +"@metamask/sdk@0.31.4": + version "0.31.4" + resolved "https://registry.yarnpkg.com/@metamask/sdk/-/sdk-0.31.4.tgz#2f9266e994ba838652925dc83e3409adfcae75ae" + integrity sha512-HLUN4IZGdyiy5YeebXmXi+ndpmrl6zslCQLdR2QHplIy4JmUL/eDyKNFiK7eBLVKXVVIDYFIb6g1iSEb+i8Kew== + dependencies: + "@babel/runtime" "^7.26.0" + "@metamask/onboarding" "^1.0.1" + "@metamask/providers" "16.1.0" + "@metamask/sdk-communication-layer" "0.31.0" + "@metamask/sdk-install-modal-web" "0.31.2" + "@paulmillr/qr" "^0.2.1" + bowser "^2.9.0" + cross-fetch "^4.0.0" + debug "^4.3.4" + eciesjs "^0.4.11" + eth-rpc-errors "^4.0.3" + eventemitter2 "^6.4.9" + obj-multiplex "^1.0.0" + pump "^3.0.0" + readable-stream "^3.6.2" + socket.io-client "^4.5.1" + tslib "^2.6.0" + util "^0.12.4" + uuid "^8.3.2" + +"@metamask/superstruct@^3.0.0", "@metamask/superstruct@^3.1.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@metamask/superstruct/-/superstruct-3.1.0.tgz#148f786a674fba3ac885c1093ab718515bf7f648" + integrity sha512-N08M56HdOgBfRKkrgCMZvQppkZGcArEop3kixNEtVbJKm6P9Cfg0YkI6X0s1g78sNrj2fWUwvJADdZuzJgFttA== + +"@metamask/utils@^5.0.1": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-5.0.2.tgz#140ba5061d90d9dac0280c19cab101bc18c8857c" + integrity sha512-yfmE79bRQtnMzarnKfX7AEJBwFTxvTyw3nBQlu/5rmGXrjAeAMltoGxO62TFurxrQAFMNa/fEjIHNvungZp0+g== + dependencies: + "@ethereumjs/tx" "^4.1.2" + "@types/debug" "^4.1.7" + debug "^4.3.4" + semver "^7.3.8" + superstruct "^1.0.3" + +"@metamask/utils@^8.3.0": + version "8.5.0" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-8.5.0.tgz#ddd0d4012d5191809404c97648a837ea9962cceb" + integrity sha512-I6bkduevXb72TIM9q2LRO63JSsF9EXduh3sBr9oybNX2hNNpr/j1tEjXrsG0Uabm4MJ1xkGAQEMwifvKZIkyxQ== + dependencies: + "@ethereumjs/tx" "^4.2.0" + "@metamask/superstruct" "^3.0.0" + "@noble/hashes" "^1.3.1" + "@scure/base" "^1.1.3" + "@types/debug" "^4.1.7" + debug "^4.3.4" + pony-cause "^2.1.10" + semver "^7.5.4" + uuid "^9.0.1" + +"@metamask/utils@^9.0.0": + version "9.3.0" + resolved "https://registry.yarnpkg.com/@metamask/utils/-/utils-9.3.0.tgz#4726bd7f5d6a43ea8425b6d663ab9207f617c2d1" + integrity sha512-w8CVbdkDrVXFJbfBSlDfafDR6BAkpDmv1bC1UJVCoVny5tW2RKAdn9i68Xf7asYT4TnUhl/hN4zfUiKQq9II4g== + dependencies: + "@ethereumjs/tx" "^4.2.0" + "@metamask/superstruct" "^3.1.0" + "@noble/hashes" "^1.3.1" + "@scure/base" "^1.1.3" + "@types/debug" "^4.1.7" + debug "^4.3.4" + pony-cause "^2.1.10" + semver "^7.5.4" + uuid "^9.0.1" + +"@motionone/animation@^10.15.1", "@motionone/animation@^10.18.0": + version "10.18.0" + resolved "https://registry.yarnpkg.com/@motionone/animation/-/animation-10.18.0.tgz#868d00b447191816d5d5cf24b1cafa144017922b" + integrity sha512-9z2p5GFGCm0gBsZbi8rVMOAJCtw1WqBTIPw3ozk06gDvZInBPIsQcHgYogEJ4yuHJ+akuW8g1SEIOpTOvYs8hw== + dependencies: + "@motionone/easing" "^10.18.0" + "@motionone/types" "^10.17.1" + "@motionone/utils" "^10.18.0" + tslib "^2.3.1" + +"@motionone/dom@^10.16.2", "@motionone/dom@^10.16.4": + version "10.18.0" + resolved "https://registry.yarnpkg.com/@motionone/dom/-/dom-10.18.0.tgz#7fd25dac04cab72def6d2b92b8e0cdc091576527" + integrity sha512-bKLP7E0eyO4B2UaHBBN55tnppwRnaE3KFfh3Ps9HhnAkar3Cb69kUCJY9as8LrccVYKgHA+JY5dOQqJLOPhF5A== + dependencies: + "@motionone/animation" "^10.18.0" + "@motionone/generators" "^10.18.0" + "@motionone/types" "^10.17.1" + "@motionone/utils" "^10.18.0" + hey-listen "^1.0.8" + tslib "^2.3.1" + +"@motionone/easing@^10.18.0": + version "10.18.0" + resolved "https://registry.yarnpkg.com/@motionone/easing/-/easing-10.18.0.tgz#7b82f6010dfee3a1bb0ee83abfbaff6edae0c708" + integrity sha512-VcjByo7XpdLS4o9T8t99JtgxkdMcNWD3yHU/n6CLEz3bkmKDRZyYQ/wmSf6daum8ZXqfUAgFeCZSpJZIMxaCzg== + dependencies: + "@motionone/utils" "^10.18.0" + tslib "^2.3.1" + +"@motionone/generators@^10.18.0": + version "10.18.0" + resolved "https://registry.yarnpkg.com/@motionone/generators/-/generators-10.18.0.tgz#fe09ab5cfa0fb9a8884097feb7eb60abeb600762" + integrity sha512-+qfkC2DtkDj4tHPu+AFKVfR/C30O1vYdvsGYaR13W/1cczPrrcjdvYCj0VLFuRMN+lP1xvpNZHCRNM4fBzn1jg== + dependencies: + "@motionone/types" "^10.17.1" + "@motionone/utils" "^10.18.0" + tslib "^2.3.1" + +"@motionone/svelte@^10.16.2": + version "10.16.4" + resolved "https://registry.yarnpkg.com/@motionone/svelte/-/svelte-10.16.4.tgz#5daf117cf5b2576fc6dd487c5e0500938a742470" + integrity sha512-zRVqk20lD1xqe+yEDZhMYgftsuHc25+9JSo+r0a0OWUJFocjSV9D/+UGhX4xgJsuwB9acPzXLr20w40VnY2PQA== + dependencies: + "@motionone/dom" "^10.16.4" + tslib "^2.3.1" + +"@motionone/types@^10.15.1", "@motionone/types@^10.17.1": + version "10.17.1" + resolved "https://registry.yarnpkg.com/@motionone/types/-/types-10.17.1.tgz#cf487badbbdc9da0c2cb86ffc1e5d11147c6e6fb" + integrity sha512-KaC4kgiODDz8hswCrS0btrVrzyU2CSQKO7Ps90ibBVSQmjkrt2teqta6/sOG59v7+dPnKMAg13jyqtMKV2yJ7A== + +"@motionone/utils@^10.15.1", "@motionone/utils@^10.18.0": + version "10.18.0" + resolved "https://registry.yarnpkg.com/@motionone/utils/-/utils-10.18.0.tgz#a59ff8932ed9009624bca07c56b28ef2bb2f885e" + integrity sha512-3XVF7sgyTSI2KWvTf6uLlBJ5iAgRgmvp3bpuOiQJvInd4nZ19ET8lX5unn30SlmRH7hXbBbH+Gxd0m0klJ3Xtw== + dependencies: + "@motionone/types" "^10.17.1" + hey-listen "^1.0.8" + tslib "^2.3.1" + +"@motionone/vue@^10.16.2": + version "10.16.4" + resolved "https://registry.yarnpkg.com/@motionone/vue/-/vue-10.16.4.tgz#07d09e3aa5115ca0bcc0076cb9e5322775277c09" + integrity sha512-z10PF9JV6SbjFq+/rYabM+8CVlMokgl8RFGvieSGNTmrkQanfHn+15XBrhG3BgUfvmTeSeyShfOHpG0i9zEdcg== + dependencies: + "@motionone/dom" "^10.16.4" + tslib "^2.3.1" + "@multiformats/murmur3@^2.0.0": version "2.1.8" resolved "https://registry.yarnpkg.com/@multiformats/murmur3/-/murmur3-2.1.8.tgz#81c1c15b6391109f3febfca4b3205196615a04e9" @@ -3106,6 +3397,13 @@ dependencies: "@noble/hashes" "1.4.0" +"@noble/curves@1.7.0", "@noble/curves@^1.4.0", "@noble/curves@~1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.7.0.tgz#0512360622439256df892f21d25b388f52505e45" + integrity sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw== + dependencies: + "@noble/hashes" "1.6.0" + "@noble/curves@^1.0.0", "@noble/curves@^1.4.2", "@noble/curves@^1.6.0", "@noble/curves@~1.6.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.6.0.tgz#be5296ebcd5a1730fccea4786d420f87abfeb40b" @@ -3128,6 +3426,16 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.5.0.tgz#abadc5ca20332db2b1b2aa3e496e9af1213570b0" integrity sha512-1j6kQFb7QRru7eKN3ZDvRcP13rugwdxZqCjbiAVZfIJwgj2A65UmT4TgARXGlXgnRkORLTDTrO19ZErt7+QXgA== +"@noble/hashes@1.6.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.0.tgz#d4bfb516ad6e7b5111c216a5cc7075f4cf19e6c5" + integrity sha512-YUULf0Uk4/mAA89w+k3+yUYh6NrEvxZa5T6SY3wlMvE2chHkxFUUIDI8/XW1QSC357iA5pSnqt7XEhvFOqmDyQ== + +"@noble/hashes@1.6.1", "@noble/hashes@^1.3.1", "@noble/hashes@~1.6.0": + version "1.6.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.1.tgz#df6e5943edcea504bac61395926d6fd67869a0d5" + integrity sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w== + "@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": version "1.7.1" resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" @@ -4219,6 +4527,11 @@ "@parcel/watcher-win32-ia32" "2.5.0" "@parcel/watcher-win32-x64" "2.5.0" +"@paulmillr/qr@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@paulmillr/qr/-/qr-0.2.1.tgz#76ade7080be4ac4824f638146fd8b6db1805eeca" + integrity sha512-IHnV6A+zxU7XwmKFinmYjUcwlyK9+xkG3/s9KcQhI9BjQKycrJ1JRO+FbNYPwZiPKW3je/DR0k7w8/gLa5eaxQ== + "@phenomnomnominal/tsquery@~5.0.1": version "5.0.1" resolved "https://registry.yarnpkg.com/@phenomnomnominal/tsquery/-/tsquery-5.0.1.tgz#a2a5abc89f92c01562a32806655817516653a388" @@ -4339,6 +4652,32 @@ resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.10.4.tgz#427d5549943a9c6fce808e39ea64dbe60d4047f1" integrity sha512-WJgX9nzTqknM393q1QJDJmoW28kUfEnybeTfVNcNAPnIx210RXm2DiXiHzfNPJNIUUb1tJnz/l4QGtJ30PgWmA== +"@safe-global/safe-apps-provider@0.18.5": + version "0.18.5" + resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-provider/-/safe-apps-provider-0.18.5.tgz#745a932bda3739a8a298ae44ec6c465f6c4773b7" + integrity sha512-9v9wjBi3TwLsEJ3C2ujYoexp3pFJ0omDLH/GX91e2QB+uwCKTBYyhxFSrTQ9qzoyQd+bfsk4gjOGW87QcJhf7g== + dependencies: + "@safe-global/safe-apps-sdk" "^9.1.0" + events "^3.3.0" + +"@safe-global/safe-apps-sdk@9.1.0", "@safe-global/safe-apps-sdk@^9.1.0": + version "9.1.0" + resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-sdk/-/safe-apps-sdk-9.1.0.tgz#0e65913e0f202e529ed3c846e0f5a98c2d35aa98" + integrity sha512-N5p/ulfnnA2Pi2M3YeWjULeWbjo7ei22JwU/IXnhoHzKq3pYCN6ynL9mJBOlvDVv892EgLPCWCOwQk/uBT2v0Q== + dependencies: + "@safe-global/safe-gateway-typescript-sdk" "^3.5.3" + viem "^2.1.1" + +"@safe-global/safe-gateway-typescript-sdk@^3.5.3": + version "3.22.4" + resolved "https://registry.yarnpkg.com/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.22.4.tgz#9109a538df40f778666a3e6776e7a08c757e893d" + integrity sha512-Z7Z8w3GEJdJ/paF+NK23VN4AwqWPadq0AeRYjYLjIBiPWpRB2UO/FKq7ONABEq0YFgNPklazIV4IExQU1gavXA== + +"@scure/base@^1.1.3", "@scure/base@~1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.1.tgz#dd0b2a533063ca612c17aa9ad26424a2ff5aa865" + integrity sha512-DGmGtC8Tt63J5GfHgfl5CuAXh96VF/LD8K9Hr/Gv0J2lAoRGlPOMpqMpMbCTOoOJMZCk2Xt+DskdDyn6dEFdzQ== + "@scure/base@~1.1.0", "@scure/base@~1.1.6", "@scure/base@~1.1.7", "@scure/base@~1.1.8": version "1.1.9" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.9.tgz#e5e142fbbfe251091f9c5f1dd4c834ac04c3dbd1" @@ -4362,6 +4701,15 @@ "@noble/hashes" "~1.4.0" "@scure/base" "~1.1.6" +"@scure/bip32@1.6.0", "@scure/bip32@^1.5.0": + version "1.6.0" + resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.6.0.tgz#6dbc6b4af7c9101b351f41231a879d8da47e0891" + integrity sha512-82q1QfklrUUdXJzjuRU7iG7D7XiFx5PHYVS0+oeNKhyDLT7WPqs6pBcM2W5ZdwOwKCwoE1Vy1se+DHjcXwCYnA== + dependencies: + "@noble/curves" "~1.7.0" + "@noble/hashes" "~1.6.0" + "@scure/base" "~1.2.1" + "@scure/bip32@^1.3.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.5.0.tgz#dd4a2e1b8a9da60e012e776d954c4186db6328e6" @@ -4387,6 +4735,14 @@ "@noble/hashes" "~1.4.0" "@scure/base" "~1.1.6" +"@scure/bip39@1.5.0", "@scure/bip39@^1.4.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.5.0.tgz#c8f9533dbd787641b047984356531d84485f19be" + integrity sha512-Dop+ASYhnrwm9+HA/HwXg7j2ZqM6yk2fyLWb5znexjctFY3+E+eU8cIWI0Pql0Qx4hPZCijlGq4OL71g+Uz30A== + dependencies: + "@noble/hashes" "~1.6.0" + "@scure/base" "~1.2.1" + "@scure/bip39@^1.2.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@scure/bip39/-/bip39-1.4.0.tgz#664d4f851564e2e1d4bffa0339f9546ea55960a6" @@ -4589,6 +4945,11 @@ dependencies: "@sinonjs/commons" "^1.7.0" +"@socket.io/component-emitter@~3.1.0": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@socket.io/component-emitter/-/component-emitter-3.1.2.tgz#821f8442f4175d8f0467b9daf26e3a18e2d02af2" + integrity sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA== + "@solana/buffer-layout@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@solana/buffer-layout/-/buffer-layout-4.0.1.tgz#b996235eaec15b1e0b5092a8ed6028df77fa6c15" @@ -4910,6 +5271,18 @@ dependencies: defer-to-connect "^2.0.1" +"@tanstack/query-core@5.62.9": + version "5.62.9" + resolved "https://registry.yarnpkg.com/@tanstack/query-core/-/query-core-5.62.9.tgz#94231ffea5de086b5e6c0f1e527cda5650cb1849" + integrity sha512-lwePd8hNYhyQ4nM/iRQ+Wz2cDtspGeZZHFZmCzHJ7mfKXt+9S301fULiY2IR2byJYY6Z03T427E5PoVfMexHjw== + +"@tanstack/react-query@^5.62.11": + version "5.62.11" + resolved "https://registry.yarnpkg.com/@tanstack/react-query/-/react-query-5.62.11.tgz#95a615a60dc8fd836a5085dea2739a62f4953f55" + integrity sha512-Xb1nw0cYMdtFmwkvH9+y5yYFhXvLRCnXoqlzSw7UkqtCVFq3cG8q+rHZ2Yz1XrC+/ysUaTqbLKJqk95mCgC1oQ== + dependencies: + "@tanstack/query-core" "5.62.9" + "@testing-library/cypress@^8.0.2": version "8.0.7" resolved "https://registry.yarnpkg.com/@testing-library/cypress/-/cypress-8.0.7.tgz#18315eba3cf8852808afadf122e4858406384015" @@ -5142,6 +5515,13 @@ dependencies: "@types/node" "*" +"@types/debug@^4.1.7": + version "4.1.12" + resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.12.tgz#a155f21690871953410df4b6b6f53187f0500917" + integrity sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ== + dependencies: + "@types/ms" "*" + "@types/depd@^1.1.36": version "1.1.37" resolved "https://registry.yarnpkg.com/@types/depd/-/depd-1.1.37.tgz#dc8a8b9e450acaba3f6308c5927e6a3062b80c87" @@ -5239,6 +5619,11 @@ resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.5.tgz#ec10755e871497bcd83efe927e43ec46e8c0747e" integrity sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag== +"@types/ms@*": + version "0.7.34" + resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.34.tgz#10964ba0dee6ac4cd462e2795b6bebd407303433" + integrity sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g== + "@types/node@*", "@types/node@>=13.7.0": version "22.9.0" resolved "https://registry.yarnpkg.com/@types/node/-/node-22.9.0.tgz#b7f16e5c3384788542c72dc3d561a7ceae2c0365" @@ -5329,6 +5714,11 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8" integrity sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw== +"@types/trusted-types@^2.0.2": + version "2.0.7" + resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.7.tgz#baccb07a970b91707df3a3e8ba6896c57ead2d11" + integrity sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw== + "@types/unist@*", "@types/unist@^3.0.0": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.3.tgz#acaab0f919ce69cce629c2d4ed2eb4adc1b6c20c" @@ -5514,6 +5904,27 @@ resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== +"@wagmi/connectors@5.7.3": + version "5.7.3" + resolved "https://registry.yarnpkg.com/@wagmi/connectors/-/connectors-5.7.3.tgz#0e6d274d4734cbfeb8ad964b63b1edcfade42c63" + integrity sha512-i7Gk5M/Fc9gMvkVHbqw2kGtXvY8POsSY798/9I5npyglVjBddxoVk3xTYmcYTB1VIa4Fi0T2gLTHpQnpLrq1CQ== + dependencies: + "@coinbase/wallet-sdk" "4.2.3" + "@metamask/sdk" "0.31.4" + "@safe-global/safe-apps-provider" "0.18.5" + "@safe-global/safe-apps-sdk" "9.1.0" + "@walletconnect/ethereum-provider" "2.17.0" + cbw-sdk "npm:@coinbase/wallet-sdk@3.9.3" + +"@wagmi/core@2.16.3", "@wagmi/core@^2.16.3": + version "2.16.3" + resolved "https://registry.yarnpkg.com/@wagmi/core/-/core-2.16.3.tgz#abbff0a19e75beaad56ffb90da772641552d49c3" + integrity sha512-SVovoWHaQ2AIkmGf+ucNijT6AHXcTMffFcLmcFF6++y21x+ge7Gkh3UoJiU91SDDv8n08eTQ9jbyia3GEgU5jQ== + dependencies: + eventemitter3 "5.0.1" + mipd "0.0.7" + zustand "5.0.0" + "@walletconnect/auth-client@2.1.1": version "2.1.1" resolved "https://registry.yarnpkg.com/@walletconnect/auth-client/-/auth-client-2.1.1.tgz#45548fc5d5e5ac155503d1b42ac97a96a2cba98d" @@ -5554,6 +5965,28 @@ "@walletconnect/types" "^1.8.0" "@walletconnect/utils" "^1.8.0" +"@walletconnect/core@2.17.0": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.17.0.tgz#bf490e85a4702eff0f7cf81ba0d3c1016dffff33" + integrity sha512-On+uSaCfWdsMIQsECwWHZBmUXfrnqmv6B8SXRRuTJgd8tUpEvBkLQH4X7XkSm3zW6ozEkQTCagZ2ox2YPn3kbw== + dependencies: + "@walletconnect/heartbeat" "1.2.2" + "@walletconnect/jsonrpc-provider" "1.0.14" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/jsonrpc-ws-connection" "1.0.14" + "@walletconnect/keyvaluestorage" "1.1.1" + "@walletconnect/logger" "2.1.2" + "@walletconnect/relay-api" "1.0.11" + "@walletconnect/relay-auth" "1.0.4" + "@walletconnect/safe-json" "1.0.2" + "@walletconnect/time" "1.0.2" + "@walletconnect/types" "2.17.0" + "@walletconnect/utils" "2.17.0" + events "3.3.0" + lodash.isequal "4.5.0" + uint8arrays "3.1.0" + "@walletconnect/core@2.9.2": version "2.9.2" resolved "https://registry.yarnpkg.com/@walletconnect/core/-/core-2.9.2.tgz#c46734ca63771b28fd77606fd521930b7ecfc5e1" @@ -5636,6 +6069,22 @@ dependencies: tslib "1.14.1" +"@walletconnect/ethereum-provider@2.17.0": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.17.0.tgz#d74feaaed6180a6799e96760d7ee867ff3a083d2" + integrity sha512-b+KTAXOb6JjoxkwpgYQQKPUcTwENGmdEdZoIDLeRicUmZTn/IQKfkMoC2frClB4YxkyoVMtj1oMV2JAax+yu9A== + dependencies: + "@walletconnect/jsonrpc-http-connection" "1.0.8" + "@walletconnect/jsonrpc-provider" "1.0.14" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/modal" "2.7.0" + "@walletconnect/sign-client" "2.17.0" + "@walletconnect/types" "2.17.0" + "@walletconnect/universal-provider" "2.17.0" + "@walletconnect/utils" "2.17.0" + events "3.3.0" + "@walletconnect/ethereum-provider@2.9.2": version "2.9.2" resolved "https://registry.yarnpkg.com/@walletconnect/ethereum-provider/-/ethereum-provider-2.9.2.tgz#fb3a6fca279bb4e98e75baa2fb9730545d41bb99" @@ -5696,7 +6145,7 @@ "@walletconnect/types" "^1.8.0" "@walletconnect/utils" "^1.8.0" -"@walletconnect/jsonrpc-http-connection@^1.0.7": +"@walletconnect/jsonrpc-http-connection@1.0.8", "@walletconnect/jsonrpc-http-connection@^1.0.7": version "1.0.8" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-http-connection/-/jsonrpc-http-connection-1.0.8.tgz#2f4c3948f074960a3edd07909560f3be13e2c7ae" integrity sha512-+B7cRuaxijLeFDJUq5hAzNyef3e3tBDIxyaCNmFtjwnod5AGis3RToNqzFU33vpVcxFhofkpE7Cx+5MYejbMGw== @@ -5800,6 +6249,31 @@ resolved "https://registry.yarnpkg.com/@walletconnect/mobile-registry/-/mobile-registry-1.4.0.tgz#502cf8ab87330841d794819081e748ebdef7aee5" integrity sha512-ZtKRio4uCZ1JUF7LIdecmZt7FOLnX72RPSY7aUVu7mj7CSfxDwUn6gBuK6WGtH+NZCldBqDl5DenI5fFSvkKYw== +"@walletconnect/modal-core@2.7.0": + version "2.7.0" + resolved "https://registry.yarnpkg.com/@walletconnect/modal-core/-/modal-core-2.7.0.tgz#73c13c3b7b0abf9ccdbac9b242254a86327ce0a4" + integrity sha512-oyMIfdlNdpyKF2kTJowTixZSo0PGlCJRdssUN/EZdA6H6v03hZnf09JnwpljZNfir2M65Dvjm/15nGrDQnlxSA== + dependencies: + valtio "1.11.2" + +"@walletconnect/modal-ui@2.7.0": + version "2.7.0" + resolved "https://registry.yarnpkg.com/@walletconnect/modal-ui/-/modal-ui-2.7.0.tgz#dbbb7ee46a5a25f7d39db622706f2d197b268cbb" + integrity sha512-gERYvU7D7K1ANCN/8vUgsE0d2hnRemfAFZ2novm9aZBg7TEd/4EgB+AqbJ+1dc7GhOL6dazckVq78TgccHb7mQ== + dependencies: + "@walletconnect/modal-core" "2.7.0" + lit "2.8.0" + motion "10.16.2" + qrcode "1.5.3" + +"@walletconnect/modal@2.7.0": + version "2.7.0" + resolved "https://registry.yarnpkg.com/@walletconnect/modal/-/modal-2.7.0.tgz#55f969796d104cce1205f5f844d8f8438b79723a" + integrity sha512-RQVt58oJ+rwqnPcIvRFeMGKuXb9qkgSmwz4noF8JZGUym3gUAzVs+uW2NQ1Owm9XOJAV+sANrtJ+VoVq1ftElw== + dependencies: + "@walletconnect/modal-core" "2.7.0" + "@walletconnect/modal-ui" "2.7.0" + "@walletconnect/qrcode-modal@^1.8.0": version "1.8.0" resolved "https://registry.yarnpkg.com/@walletconnect/qrcode-modal/-/qrcode-modal-1.8.0.tgz#ddd6f5c9b7ee52c16adf9aacec2a3eac4994caea" @@ -5853,6 +6327,21 @@ dependencies: tslib "1.14.1" +"@walletconnect/sign-client@2.17.0": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.17.0.tgz#efe811b1bb10082d964e2f0378aaa1b40f424503" + integrity sha512-sErYwvSSHQolNXni47L3Bm10ptJc1s1YoJvJd34s5E9h9+d3rj7PrhbiW9X82deN+Dm5oA8X9tC4xty1yIBrVg== + dependencies: + "@walletconnect/core" "2.17.0" + "@walletconnect/events" "1.0.1" + "@walletconnect/heartbeat" "1.2.2" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/logger" "2.1.2" + "@walletconnect/time" "1.0.2" + "@walletconnect/types" "2.17.0" + "@walletconnect/utils" "2.17.0" + events "3.3.0" + "@walletconnect/sign-client@2.9.2": version "2.9.2" resolved "https://registry.yarnpkg.com/@walletconnect/sign-client/-/sign-client-2.9.2.tgz#ff4c81c082c2078878367d07f24bcb20b1f7ab9e" @@ -5884,6 +6373,18 @@ dependencies: tslib "1.14.1" +"@walletconnect/types@2.17.0": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.17.0.tgz#20eda5791e3172f8ab9146caa3f317701d4b3232" + integrity sha512-i1pn9URpvt9bcjRDkabuAmpA9K7mzyKoLJlbsAujRVX7pfaG7wur7u9Jz0bk1HxvuABL5LHNncTnVKSXKQ5jZA== + dependencies: + "@walletconnect/events" "1.0.1" + "@walletconnect/heartbeat" "1.2.2" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/keyvaluestorage" "1.1.1" + "@walletconnect/logger" "2.1.2" + events "3.3.0" + "@walletconnect/types@2.17.2": version "2.17.2" resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.17.2.tgz#f9afff242563be33f377de689b03b482f5b20aee" @@ -5913,6 +6414,21 @@ resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-1.8.0.tgz#3f5e85b2d6b149337f727ab8a71b8471d8d9a195" integrity sha512-Cn+3I0V0vT9ghMuzh1KzZvCkiAxTq+1TR2eSqw5E5AVWfmCtECFkVZBP6uUJZ8YjwLqXheI+rnjqPy7sVM4Fyg== +"@walletconnect/universal-provider@2.17.0": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.17.0.tgz#c9d4bbd9b8f0e41b500b2488ccbc207dc5f7a170" + integrity sha512-d3V5Be7AqLrvzcdMZSBS8DmGDRdqnyLk1DWmRKAGgR6ieUWykhhUKlvfeoZtvJrIXrY7rUGYpH1X41UtFkW5Pw== + dependencies: + "@walletconnect/jsonrpc-http-connection" "1.0.8" + "@walletconnect/jsonrpc-provider" "1.0.14" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/jsonrpc-utils" "1.0.8" + "@walletconnect/logger" "2.1.2" + "@walletconnect/sign-client" "2.17.0" + "@walletconnect/types" "2.17.0" + "@walletconnect/utils" "2.17.0" + events "3.3.0" + "@walletconnect/universal-provider@2.9.2": version "2.9.2" resolved "https://registry.yarnpkg.com/@walletconnect/universal-provider/-/universal-provider-2.9.2.tgz#40e54e98bc48b1f2f5f77eb5b7f05462093a8506" @@ -5928,6 +6444,28 @@ "@walletconnect/utils" "2.9.2" events "^3.3.0" +"@walletconnect/utils@2.17.0": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.17.0.tgz#02b3af0b80d0c1a994d692d829d066271b04d071" + integrity sha512-1aeQvjwsXy4Yh9G6g2eGmXrEl+BzkNjHRdCrGdMYqFTFa8ROEJfTGsSH3pLsNDlOY94CoBUvJvM55q/PMoN/FQ== + dependencies: + "@stablelib/chacha20poly1305" "1.0.1" + "@stablelib/hkdf" "1.0.1" + "@stablelib/random" "1.0.2" + "@stablelib/sha256" "1.0.1" + "@stablelib/x25519" "1.0.3" + "@walletconnect/relay-api" "1.0.11" + "@walletconnect/relay-auth" "1.0.4" + "@walletconnect/safe-json" "1.0.2" + "@walletconnect/time" "1.0.2" + "@walletconnect/types" "2.17.0" + "@walletconnect/window-getters" "1.0.1" + "@walletconnect/window-metadata" "1.0.1" + detect-browser "5.3.0" + elliptic "^6.5.7" + query-string "7.1.3" + uint8arrays "3.1.0" + "@walletconnect/utils@2.17.2", "@walletconnect/utils@^2.9.0": version "2.17.2" resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.17.2.tgz#b4b12e3f5ebbfd883b2a5c87fb818e53501dc7ea" @@ -6104,6 +6642,23 @@ abi-decoder@^2.3.0: web3-eth-abi "^1.2.1" web3-utils "^1.2.1" +abitype@1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.7.tgz#876a0005d211e1c9132825d45bcee7b46416b284" + integrity sha512-ZfYYSktDQUwc2eduYu8C4wOs+RDPmnRYMh7zNfzeMtGGgb0U+6tLGjixUic6mXf5xKKCcgT5Qp6cv39tOARVFw== + +abitype@^1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.8.tgz#3554f28b2e9d6e9f35eb59878193eabd1b9f46ba" + integrity sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg== + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + abortcontroller-polyfill@^1.7.3: version "1.7.6" resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.6.tgz#7be8d35b5ed7dfa1a51b36f221720b23deb13f36" @@ -7761,6 +8316,11 @@ bottleneck@^2.18.1: resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.19.5.tgz#5df0b90f59fd47656ebe63c78a98419205cadd91" integrity sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw== +bowser@^2.9.0: + version "2.11.0" + resolved "https://registry.yarnpkg.com/bowser/-/bowser-2.11.0.tgz#5ca3c35757a7aa5771500c70a73a9f91ef420a8f" + integrity sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA== + boxen@7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/boxen/-/boxen-7.0.0.tgz#9e5f8c26e716793fc96edcf7cf754cdf5e3fbf32" @@ -8026,6 +8586,13 @@ bufferutil@^4.0.1: dependencies: node-gyp-build "^4.3.0" +bufferutil@^4.0.8: + version "4.0.9" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.9.tgz#6e81739ad48a95cad45a279588e13e95e24a800a" + integrity sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw== + dependencies: + node-gyp-build "^4.3.0" + builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -8299,6 +8866,21 @@ cbor@^8.1.0: dependencies: nofilter "^3.1.0" +"cbw-sdk@npm:@coinbase/wallet-sdk@3.9.3": + version "3.9.3" + resolved "https://registry.yarnpkg.com/@coinbase/wallet-sdk/-/wallet-sdk-3.9.3.tgz#daf10cb0c85d0363315b7270cb3f02bedc408aab" + integrity sha512-N/A2DRIf0Y3PHc1XAMvbBUu4zisna6qAdqABMZwBMNEfWrXpAwx16pZGkYCLGE+Rvv1edbcB2LYDRnACNcmCiw== + dependencies: + bn.js "^5.2.1" + buffer "^6.0.3" + clsx "^1.2.1" + eth-block-tracker "^7.1.0" + eth-json-rpc-filters "^6.0.0" + eventemitter3 "^5.0.1" + keccak "^3.0.3" + preact "^10.16.0" + sha.js "^2.4.11" + ccount@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/ccount/-/ccount-2.0.1.tgz#17a3bf82302e0870d6da43a01311a8bc02a3ecf5" @@ -8664,6 +9246,15 @@ cliui@^5.0.0: strip-ansi "^5.2.0" wrap-ansi "^5.1.0" +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + cliui@^7.0.2: version "7.0.4" resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" @@ -8715,7 +9306,7 @@ clone@^2.0.0, clone@^2.1.1: resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" integrity sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w== -clsx@^1.1.0: +clsx@^1.1.0, clsx@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== @@ -9322,6 +9913,13 @@ cross-fetch@^2.1.0, cross-fetch@^2.1.1: node-fetch "^2.6.7" whatwg-fetch "^2.0.4" +cross-fetch@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-4.1.0.tgz#8f69355007ee182e47fa692ecbaa37a52e43c3d2" + integrity sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw== + dependencies: + node-fetch "^2.7.0" + cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.5.tgz#910aac880ff5243da96b728bc6521a5f6c2f2f82" @@ -9700,6 +10298,13 @@ date-and-time@^2.4.1: resolved "https://registry.yarnpkg.com/date-and-time/-/date-and-time-2.4.3.tgz#116963998a8cecd478955ae053f31a6747a988df" integrity sha512-xkS/imTmsyEdpp9ie5oV5UWolg3XkYWNySbT2W4ESWr6v4V8YrsHbhpk9fIeQcr0NFTnYbQJLXlgU1zrLItysA== +date-fns@^2.29.3: + version "2.30.0" + resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.30.0.tgz#f367e644839ff57894ec6ac480de40cae4b0f4d0" + integrity sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw== + dependencies: + "@babel/runtime" "^7.21.0" + dateformat@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" @@ -9717,7 +10322,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@^4.3.5: +debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@^4.3.5, debug@~4.3.1, debug@~4.3.2: version "4.3.7" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== @@ -10052,7 +10657,7 @@ detect-browser@5.2.0: resolved "https://registry.yarnpkg.com/detect-browser/-/detect-browser-5.2.0.tgz#c9cd5afa96a6a19fda0bbe9e9be48a6b6e1e9c97" integrity sha512-tr7XntDAu50BVENgQfajMLzacmSe34D+qZc4zjnniz0ZVuw/TZcLcyxHQjYpJTM36sGEkZZlYLnIM1hH7alTMA== -detect-browser@5.3.0: +detect-browser@5.3.0, detect-browser@^5.2.0: version "5.3.0" resolved "https://registry.yarnpkg.com/detect-browser/-/detect-browser-5.3.0.tgz#9705ef2bddf46072d0f7265a1fe300e36fe7ceca" integrity sha512-53rsFbGdwMwlF7qvCt0ypLM5V5/Mbl0szB7GPN8y9NCcbknYOeVVXdrXEq+90IwAfrrzt6Hd+u2E2ntakICU8w== @@ -10396,6 +11001,16 @@ eciesjs@^0.4.10: "@noble/curves" "^1.6.0" "@noble/hashes" "^1.5.0" +eciesjs@^0.4.11: + version "0.4.13" + resolved "https://registry.yarnpkg.com/eciesjs/-/eciesjs-0.4.13.tgz#89fbe2bc37d6dced8c3d1bccac21cceb20bcdcf3" + integrity sha512-zBdtR4K+wbj10bWPpIOF9DW+eFYQu8miU5ypunh0t4Bvt83ZPlEWgT5Dq/0G6uwEXumZKjfb5BZxYUZQ2Hzn/Q== + dependencies: + "@ecies/ciphers" "^0.2.2" + "@noble/ciphers" "^1.0.0" + "@noble/curves" "^1.6.0" + "@noble/hashes" "^1.5.0" + ee-first@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" @@ -10495,6 +11110,11 @@ emojis-list@^3.0.0: resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== +encode-utf8@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/encode-utf8/-/encode-utf8-1.0.3.tgz#f30fdd31da07fb596f281beb2f6b027851994cda" + integrity sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw== + encodeurl@^2.0.0, encodeurl@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-2.0.0.tgz#7b8ea898077d7e409d3ac45474ea38eaf0857a58" @@ -10520,13 +11140,29 @@ encoding@^0.1.11, encoding@^0.1.12, encoding@^0.1.13: dependencies: iconv-lite "^0.6.2" -end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: +end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== dependencies: once "^1.4.0" +engine.io-client@~6.6.1: + version "6.6.2" + resolved "https://registry.yarnpkg.com/engine.io-client/-/engine.io-client-6.6.2.tgz#e0a09e1c90effe5d6264da1c56d7281998f1e50b" + integrity sha512-TAr+NKeoVTjEVW8P3iHguO1LO6RlUz9O5Y8o7EY0fU+gY1NYqas7NN3slpFtbXEsLMHk0h90fJMfKjRkQ0qUIw== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + engine.io-parser "~5.2.1" + ws "~8.17.1" + xmlhttprequest-ssl "~2.1.1" + +engine.io-parser@~5.2.1: + version "5.2.3" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-5.2.3.tgz#00dc5b97b1f233a23c9398d0209504cf5f94d92f" + integrity sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q== + enhanced-resolve@^5.15.0: version "5.17.1" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" @@ -11332,6 +11968,17 @@ eth-block-tracker@^4.2.0, eth-block-tracker@^4.4.2: pify "^3.0.0" safe-event-emitter "^1.0.1" +eth-block-tracker@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-7.1.0.tgz#dfc16085c6817cc30caabba381deb8d204c1c766" + integrity sha512-8YdplnuE1IK4xfqpf4iU7oBxnOYAc35934o083G8ao+8WM8QQtt/mVlAY6yIAdY1eMeLqg4Z//PZjJGmWGPMRg== + dependencies: + "@metamask/eth-json-rpc-provider" "^1.0.0" + "@metamask/safe-event-emitter" "^3.0.0" + "@metamask/utils" "^5.0.1" + json-rpc-random-id "^1.0.1" + pify "^3.0.0" + eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.8: version "2.0.8" resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" @@ -11352,6 +11999,17 @@ eth-json-rpc-filters@^4.0.2, eth-json-rpc-filters@^4.2.1: json-rpc-engine "^6.1.0" pify "^5.0.0" +eth-json-rpc-filters@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/eth-json-rpc-filters/-/eth-json-rpc-filters-6.0.1.tgz#0b3e370f017f5c6f58d3e7bd0756d8099ed85c56" + integrity sha512-ITJTvqoCw6OVMLs7pI8f4gG92n/St6x80ACtHodeS+IXmO0w+t1T5OOzfSt7KLSMLRkVUoexV7tztLgDxg+iig== + dependencies: + "@metamask/safe-event-emitter" "^3.0.0" + async-mutex "^0.2.6" + eth-query "^2.1.2" + json-rpc-engine "^6.1.0" + pify "^5.0.0" + eth-json-rpc-infura@^3.1.0: version "3.2.1" resolved "https://registry.yarnpkg.com/eth-json-rpc-infura/-/eth-json-rpc-infura-3.2.1.tgz#26702a821067862b72d979c016fd611502c6057f" @@ -11473,7 +12131,7 @@ eth-rpc-errors@^3.0.0: dependencies: fast-safe-stringify "^2.0.6" -eth-rpc-errors@^4.0.2: +eth-rpc-errors@^4.0.2, eth-rpc-errors@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eth-rpc-errors/-/eth-rpc-errors-4.0.3.tgz#6ddb6190a4bf360afda82790bb7d9d5e724f423a" integrity sha512-Z3ymjopaoft7JDoxZcEb3pwdGh7yiYMhOwm2doUt6ASXlMavpNlK6Cre0+IMl2VSGyEU9rkiperQhp5iRxn5Pg== @@ -11892,12 +12550,17 @@ event-stream@3.3.4, event-stream@=3.3.4: stream-combiner "~0.0.4" through "~2.3.1" +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + eventemitter2@6.4.7: version "6.4.7" resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.7.tgz#a7f6c4d7abf28a14c1ef3442f21cb306a054271d" integrity sha512-tYUSVOGeQPKt/eC1ABfhHy5Xd96N3oIijJvN3O9+TsC28T5V9yX9oEfEK5faP0EFSNVOG97qtAS68GBrQB2hDg== -eventemitter2@^6.4.3: +eventemitter2@^6.4.3, eventemitter2@^6.4.9: version "6.4.9" resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.9.tgz#41f2750781b4230ed58827bc119d293471ecb125" integrity sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg== @@ -11912,7 +12575,7 @@ eventemitter3@4.0.7, eventemitter3@^4.0.0, eventemitter3@^4.0.4: resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== -eventemitter3@^5.0.1: +eventemitter3@5.0.1, eventemitter3@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-5.0.1.tgz#53f5ffd0a492ac800721bb42c66b841de96423c4" integrity sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA== @@ -12105,6 +12768,14 @@ extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== +extension-port-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/extension-port-stream/-/extension-port-stream-3.0.0.tgz#00a7185fe2322708a36ed24843c81bd754925fef" + integrity sha512-an2S5quJMiy5bnZKEf6AkfH/7r8CzHvhchU40gxN+OM6HPhe7Z9T1FUychcf2M9PpPOO0Hf7BAEfJkw2TDIBDw== + dependencies: + readable-stream "^3.6.2 || ^4.4.2" + webextension-polyfill ">=0.10.0 <1.0" + external-editor@^3.0.3, external-editor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" @@ -13479,6 +14150,11 @@ header-case@^1.0.0: no-case "^2.2.0" upper-case "^1.1.3" +hey-listen@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/hey-listen/-/hey-listen-1.0.8.tgz#8e59561ff724908de1aa924ed6ecc84a56a9aa68" + integrity sha512-COpmrF2NOg4TBWUJ5UVyaCU2A88wEMkUPK4hNqyCkqHbxT92BbvfjoSozkAIIm6XhicGlJHhFdullInrdhwU8Q== + highlight.js@^10.4.1: version "10.7.3" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.7.3.tgz#697272e3991356e40c3cac566a74eef681756531" @@ -14744,6 +15420,11 @@ isomorphic-ws@^5.0.0: resolved "https://registry.yarnpkg.com/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz#e5529148912ecb9b451b46ed44d53dae1ce04bbf" integrity sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw== +isows@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/isows/-/isows-1.0.6.tgz#0da29d706fa51551c663c627ace42769850f86e7" + integrity sha512-lPHCayd40oW98/I0uvgaHKWCSvkzY27LjWLbtzOm64yQ+G3Q5npjjbdppU65iZXkK1Zt+kH9pfegli0AYfwYYw== + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -15963,7 +16644,7 @@ keccak@^1.0.2: nan "^2.2.1" safe-buffer "^5.1.0" -keccak@^3.0.0: +keccak@^3.0.0, keccak@^3.0.3: version "3.0.4" resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.4.tgz#edc09b89e633c0549da444432ecf062ffadee86d" integrity sha512-3vKuW0jV8J3XNTzvfyicFR5qvxrSAGl7KIhvgOu5cmWwM7tZRj3fMbj/pfIf4be7aznbc+prBWGjywox/g2Y6Q== @@ -16350,6 +17031,31 @@ listr2@^3.8.3: through "^2.3.8" wrap-ansi "^7.0.0" +lit-element@^3.3.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/lit-element/-/lit-element-3.3.3.tgz#10bc19702b96ef5416cf7a70177255bfb17b3209" + integrity sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA== + dependencies: + "@lit-labs/ssr-dom-shim" "^1.1.0" + "@lit/reactive-element" "^1.3.0" + lit-html "^2.8.0" + +lit-html@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/lit-html/-/lit-html-2.8.0.tgz#96456a4bb4ee717b9a7d2f94562a16509d39bffa" + integrity sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q== + dependencies: + "@types/trusted-types" "^2.0.2" + +lit@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/lit/-/lit-2.8.0.tgz#4d838ae03059bf9cafa06e5c61d8acc0081e974e" + integrity sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA== + dependencies: + "@lit/reactive-element" "^1.6.0" + lit-element "^3.3.0" + lit-html "^2.8.0" + live-server@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/live-server/-/live-server-1.2.2.tgz#20b4fe5c2ca886faa61813310e28680804f48dad" @@ -17309,6 +18015,11 @@ minizlib@^2.0.0, minizlib@^2.1.1, minizlib@^2.1.2: minipass "^3.0.0" yallist "^4.0.0" +mipd@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mipd/-/mipd-0.0.7.tgz#bb5559e21fa18dc3d9fe1c08902ef14b7ce32fd9" + integrity sha512-aAPZPNDQ3uMTdKbuO2YmAw2TxLHO0moa4YKAyETM/DTj5FloZo+a+8tU+iv4GmW+sOxKLSRwcSFuczk+Cpt6fg== + mixin-deep@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" @@ -17398,6 +18109,18 @@ morgan@^1.8.2, morgan@^1.9.1: on-finished "~2.3.0" on-headers "~1.0.2" +motion@10.16.2: + version "10.16.2" + resolved "https://registry.yarnpkg.com/motion/-/motion-10.16.2.tgz#7dc173c6ad62210a7e9916caeeaf22c51e598d21" + integrity sha512-p+PurYqfUdcJZvtnmAqu5fJgV2kR0uLFQuBKtLeFVTrYEVllI99tiOTSefVNYuip9ELTEkepIIDftNdze76NAQ== + dependencies: + "@motionone/animation" "^10.15.1" + "@motionone/dom" "^10.16.2" + "@motionone/svelte" "^10.16.2" + "@motionone/types" "^10.15.1" + "@motionone/utils" "^10.15.1" + "@motionone/vue" "^10.16.2" + ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -18228,6 +18951,15 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== +obj-multiplex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/obj-multiplex/-/obj-multiplex-1.0.0.tgz#2f2ae6bfd4ae11befe742ea9ea5b36636eabffc1" + integrity sha512-0GNJAOsHoBHeNTvl5Vt6IWnpUEcc3uSRxzBri7EDyIcMgYvnY2JL2qdeV5zTMjWQX5OHcD5amcW2HFfDh0gjIA== + dependencies: + end-of-stream "^1.4.0" + once "^1.4.0" + readable-stream "^2.3.3" + object-assign@^4, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1, object-assign@latest: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -18524,6 +19256,19 @@ ospath@^1.2.2: resolved "https://registry.yarnpkg.com/ospath/-/ospath-1.2.2.tgz#1276639774a3f8ef2572f7fe4280e0ea4550c07b" integrity sha512-o6E5qJV5zkAbIDNhGSIlyOhScKXgQrSRMilfph0clDfM0nEnBOlKlH4sWDmG95BW/CvwNz0vmm7dJVtU2KlMiA== +ox@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ox/-/ox-0.1.2.tgz#0f791be2ccabeaf4928e6d423498fe1c8094e560" + integrity sha512-ak/8K0Rtphg9vnRJlbOdaX9R7cmxD2MiSthjWGaQdMk3D7hrAlDoM+6Lxn7hN52Za3vrXfZ7enfke/5WjolDww== + dependencies: + "@adraffy/ens-normalize" "^1.10.1" + "@noble/curves" "^1.6.0" + "@noble/hashes" "^1.5.0" + "@scure/bip32" "^1.5.0" + "@scure/bip39" "^1.4.0" + abitype "^1.0.6" + eventemitter3 "5.0.1" + p-cancelable@^0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" @@ -19207,6 +19952,11 @@ pngjs@^3.3.0: resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-3.4.0.tgz#99ca7d725965fb655814eaf65f38f12bbdbf555f" integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w== +pngjs@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/pngjs/-/pngjs-5.0.0.tgz#e79dd2b215767fd9c04561c01236df960bce7fbb" + integrity sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw== + pocket-js-core@0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/pocket-js-core/-/pocket-js-core-0.0.3.tgz#1ab278b9a6a5775e2bdc3c2c2e218057774061e4" @@ -19214,6 +19964,11 @@ pocket-js-core@0.0.3: dependencies: axios "^0.18.0" +pony-cause@^2.1.10: + version "2.1.11" + resolved "https://registry.yarnpkg.com/pony-cause/-/pony-cause-2.1.11.tgz#d69a20aaccdb3bdb8f74dd59e5c68d8e6772e4bd" + integrity sha512-M7LhCsdNbNgiLYiP4WjsfLUuFmCfnjdF6jKe2R9NKl4WFN+HZPGHJZ9lnLP7f9ZnKe3U9nuWD0szirmj+migUg== + portfinder@^1.0.28: version "1.0.32" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.32.tgz#2fe1b9e58389712429dc2bea5beb2146146c7f81" @@ -19238,6 +19993,11 @@ preact@10.4.1: resolved "https://registry.yarnpkg.com/preact/-/preact-10.4.1.tgz#9b3ba020547673a231c6cf16f0fbaef0e8863431" integrity sha512-WKrRpCSwL2t3tpOOGhf2WfTpcmbpxaWtDbdJdKdjd0aEiTkvOmS4NBkG6kzlaAHI9AkQ3iVqbFWM3Ei7mZ4o1Q== +preact@^10.16.0, preact@^10.24.2: + version "10.25.3" + resolved "https://registry.yarnpkg.com/preact/-/preact-10.25.3.tgz#22dfb072b088dda9a2bc6d4ca41bf46b588d325e" + integrity sha512-dzQmIFtM970z+fP9ziQ3yG4e3ULIbwZzJ734vaMVUTaKQ2+Ru1Ou/gjshOYVHCcd1rpAelC6ngjvjDXph98unQ== + preact@^10.3.3: version "10.24.3" resolved "https://registry.yarnpkg.com/preact/-/preact-10.24.3.tgz#086386bd47071e3b45410ef20844c21e23828f64" @@ -19454,6 +20214,11 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" +proxy-compare@2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/proxy-compare/-/proxy-compare-2.5.1.tgz#17818e33d1653fbac8c2ec31406bce8a2966f600" + integrity sha512-oyfc0Tx87Cpwva5ZXezSp5V9vht1c7dZBhvuV/y3ctkgMVUmiAGDVeeB0dKhGSyT0v1ZTEQYpe/RXlBVBNuCLA== + proxy-from-env@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" @@ -19586,6 +20351,16 @@ qrcode@1.4.4: pngjs "^3.3.0" yargs "^13.2.4" +qrcode@1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.5.3.tgz#03afa80912c0dccf12bc93f615a535aad1066170" + integrity sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg== + dependencies: + dijkstrajs "^1.0.1" + encode-utf8 "^1.0.3" + pngjs "^5.0.0" + yargs "^15.3.1" + qs@6.13.0, qs@^6.12.3, qs@^6.4.0: version "6.13.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" @@ -19754,6 +20529,11 @@ react-is@^18.0.0: resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" integrity sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg== +react@^19.0.0: + version "19.0.0" + resolved "https://registry.yarnpkg.com/react/-/react-19.0.0.tgz#6e1969251b9f108870aa4bff37a0ce9ddfaaabdd" + integrity sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ== + read-cmd-shim@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-2.0.0.tgz#4a50a71d6f0965364938e9038476f7eede3928d9" @@ -19852,7 +20632,7 @@ read@1, read@^1.0.7, read@~1.0.1, read@~1.0.7: dependencies: mute-stream "~0.0.4" -readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0: +readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.5.0, readable-stream@^3.6.0, readable-stream@^3.6.2: version "3.6.2" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== @@ -19871,7 +20651,7 @@ readable-stream@^1.0.33: isarray "0.0.1" string_decoder "~0.10.x" -readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.5, readable-stream@^2.3.8, readable-stream@~2.3.6: +readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.8, readable-stream@~2.3.6: version "2.3.8" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b" integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== @@ -19884,6 +20664,17 @@ readable-stream@^2.0.0, readable-stream@^2.0.2, readable-stream@^2.0.6, readable string_decoder "~1.1.1" util-deprecate "~1.0.1" +"readable-stream@^3.6.2 || ^4.4.2": + version "4.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-4.6.0.tgz#ce412dfb19c04efde1c5936d99c27f37a1ff94c9" + integrity sha512-cbAdYt0VcnpN2Bekq7PU+k363ZRsPwJoEEJOEtSJQlJXzwaxt3FIo/uL+KeDSGIjJqtkwyge4KQgD2S2kd+CQw== + dependencies: + abort-controller "^3.0.0" + buffer "^6.0.3" + events "^3.3.0" + process "^0.11.10" + string_decoder "^1.3.0" + readable-stream@~1.0.15: version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" @@ -20617,7 +21408,7 @@ semver@^6.0.0, semver@^6.1.0, semver@^6.2.0, semver@^6.3.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.1.1, semver@^7.1.2, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3: +semver@^7.0.0, semver@^7.1.1, semver@^7.1.2, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.3, semver@^7.5.4, semver@^7.6.3: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -20805,7 +21596,7 @@ setprototypeof@1.2.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== -sha.js@^2.4.0, sha.js@^2.4.8: +sha.js@^2.4.0, sha.js@^2.4.11, sha.js@^2.4.8: version "2.4.11" resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== @@ -21001,6 +21792,24 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" +socket.io-client@^4.5.1: + version "4.8.1" + resolved "https://registry.yarnpkg.com/socket.io-client/-/socket.io-client-4.8.1.tgz#1941eca135a5490b94281d0323fe2a35f6f291cb" + integrity sha512-hJVXfu3E28NmzGk8o1sHhN3om52tRvwYeidbj7xKy2eIIse5IoKX3USlS6Tqt3BHAtflLIkCQBkzVrEEfWUyYQ== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.2" + engine.io-client "~6.6.1" + socket.io-parser "~4.2.4" + +socket.io-parser@~4.2.4: + version "4.2.4" + resolved "https://registry.yarnpkg.com/socket.io-parser/-/socket.io-parser-4.2.4.tgz#c806966cf7270601e47469ddeec30fbdfda44c83" + integrity sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew== + dependencies: + "@socket.io/component-emitter" "~3.1.0" + debug "~4.3.1" + socks-proxy-agent@^6.0.0: version "6.2.1" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.2.1.tgz#2687a31f9d7185e38d530bef1944fe1f1496d6ce" @@ -22334,7 +23143,7 @@ tslib@1.14.1, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.4.1, tslib@^2.8.0: +tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.4.1, tslib@^2.6.0, tslib@^2.8.0: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -22989,6 +23798,11 @@ url@^0.11.0: punycode "^1.4.1" qs "^6.12.3" +use-sync-external-store@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" + integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== + use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" @@ -23018,7 +23832,7 @@ util@^0.10.3: dependencies: inherits "2.0.3" -util@^0.12.3, util@^0.12.5: +util@^0.12.3, util@^0.12.4, util@^0.12.5: version "0.12.5" resolved "https://registry.yarnpkg.com/util/-/util-0.12.5.tgz#5f17a6059b73db61a875668781a1c2b136bd6fbc" integrity sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA== @@ -23054,7 +23868,7 @@ uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== -uuid@^9.0.0: +uuid@^9.0.0, uuid@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.1.tgz#e188d4c8853cc722220392c424cd637f32293f30" integrity sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA== @@ -23124,6 +23938,14 @@ validate-npm-package-name@^5.0.0: resolved "https://registry.yarnpkg.com/validate-npm-package-name/-/validate-npm-package-name-5.0.1.tgz#a316573e9b49f3ccd90dbb6eb52b3f06c6d604e8" integrity sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ== +valtio@1.11.2: + version "1.11.2" + resolved "https://registry.yarnpkg.com/valtio/-/valtio-1.11.2.tgz#b8049c02dfe65620635d23ebae9121a741bb6530" + integrity sha512-1XfIxnUXzyswPAPXo1P3Pdx2mq/pIqZICkWN60Hby0d9Iqb+MEIpqgYVlbflvHdrp2YR/q3jyKWRPJJ100yxaw== + dependencies: + proxy-compare "2.5.1" + use-sync-external-store "1.2.0" + varint@^5.0.0: version "5.0.2" resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" @@ -23159,6 +23981,21 @@ vfile@^6.0.0: "@types/unist" "^3.0.0" vfile-message "^4.0.0" +viem@^2.1.1, viem@^2.21.57: + version "2.21.57" + resolved "https://registry.yarnpkg.com/viem/-/viem-2.21.57.tgz#bedbb444bb42e07ccc2264a9a0441903a113aab8" + integrity sha512-Mw4f4Dw0+Y/wSHdynVmP4uh+Cw15HEoj8BOKvKH5nGA6oFZYRxSy9Ruu7ZG8jexeAVCZ57aIuXb0gNg6Vb1x0g== + dependencies: + "@noble/curves" "1.7.0" + "@noble/hashes" "1.6.1" + "@scure/bip32" "1.6.0" + "@scure/bip39" "1.5.0" + abitype "1.0.7" + isows "1.0.6" + ox "0.1.2" + webauthn-p256 "0.0.10" + ws "8.18.0" + vm-browserify@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" @@ -23178,6 +24015,15 @@ w3c-xmlserializer@^2.0.0: dependencies: xml-name-validator "^3.0.0" +wagmi@^2.14.6: + version "2.14.6" + resolved "https://registry.yarnpkg.com/wagmi/-/wagmi-2.14.6.tgz#046db4c119f53c276c9f2d4b0034fe2ebc3ff05c" + integrity sha512-h8KDjPiXywZcKAbGttGDlZpwabZynR4lZ8eDO63tNgfxiMyhld0M5bMcB/u7XnH2xFgd0gq7PA2RVz96XMjazw== + dependencies: + "@wagmi/connectors" "5.7.3" + "@wagmi/core" "2.16.3" + use-sync-external-store "1.2.0" + wait-on@7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/wait-on/-/wait-on-7.0.1.tgz#5cff9f8427e94f4deacbc2762e6b0a489b19eae9" @@ -23526,6 +24372,24 @@ web3@1.10.0: web3-shh "1.10.0" web3-utils "1.10.0" +webauthn-p256@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/webauthn-p256/-/webauthn-p256-0.0.10.tgz#877e75abe8348d3e14485932968edf3325fd2fdd" + integrity sha512-EeYD+gmIT80YkSIDb2iWq0lq2zbHo1CxHlQTeJ+KkCILWpVy3zASH3ByD4bopzfk0uCwXxLqKGLqp2W4O28VFA== + dependencies: + "@noble/curves" "^1.4.0" + "@noble/hashes" "^1.4.0" + +"webextension-polyfill@>=0.10.0 <1.0": + version "0.12.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.12.0.tgz#f62c57d2cd42524e9fbdcee494c034cae34a3d69" + integrity sha512-97TBmpoWJEE+3nFBQ4VocyCdLKfw54rFaJ6EVQYLBCXqCIpLSZkwGgASpv4oPt9gdKCJ80RJlcmNzNn008Ag6Q== + +webextension-polyfill@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/webextension-polyfill/-/webextension-polyfill-0.10.0.tgz#ccb28101c910ba8cf955f7e6a263e662d744dbb8" + integrity sha512-c5s35LgVa5tFaHhrZDnr3FpQpjj1BB+RXhLTYUxGqBVN460HkbM8TBtEqdXWbpTKfzwCcjAZVF7zXCYSKtcp9g== + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" @@ -23885,6 +24749,11 @@ ws@7.5.3: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.3.tgz#160835b63c7d97bfab418fc1b8a9fced2ac01a74" integrity sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg== +ws@8.18.0, ws@^8.5.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + ws@^3.0.0: version "3.3.3" resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" @@ -23906,10 +24775,10 @@ ws@^7, ws@^7.0.0, ws@^7.2.3, ws@^7.4.6, ws@^7.5.1, ws@^7.5.10: resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.10.tgz#58b5c20dc281633f6c19113f39b349bd8bd558d9" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== -ws@^8.5.0: - version "8.18.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" - integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== +ws@~8.17.1: + version "8.17.1" + resolved "https://registry.yarnpkg.com/ws/-/ws-8.17.1.tgz#9293da530bb548febc95371d90f9c878727d919b" + integrity sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ== xdg-basedir@^4.0.0: version "4.0.0" @@ -23963,6 +24832,11 @@ xmlchars@^2.2.0: resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== +xmlhttprequest-ssl@~2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-2.1.2.tgz#e9e8023b3f29ef34b97a859f584c5e6c61418e23" + integrity sha512-TEU+nJVUUnA4CYJFLvK5X9AOeH4KvDvhIfm0vV1GaQRtchnG0hgK5p8hw/xjv8cunWYCsiPCSDzObPyhEwq3KQ== + xmlhttprequest@1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" @@ -24046,6 +24920,14 @@ yargs-parser@^13.1.2: camelcase "^5.0.0" decamelize "^1.2.0" +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" @@ -24075,6 +24957,23 @@ yargs@^13.2.4: y18n "^4.0.0" yargs-parser "^13.1.2" +yargs@^15.3.1: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.2" + yargs@^16.2.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" @@ -24144,6 +25043,11 @@ yoctocolors-cjs@^2.1.2: resolved "https://registry.yarnpkg.com/yoctocolors-cjs/-/yoctocolors-cjs-2.1.2.tgz#f4b905a840a37506813a7acaa28febe97767a242" integrity sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA== +zustand@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/zustand/-/zustand-5.0.0.tgz#71f8aaecf185592a3ba2743d7516607361899da9" + integrity sha512-LE+VcmbartOPM+auOjCCLQOsQ05zUTp8RkgwRzefUk+2jISdMMFnxvyTjA4YNWr5ZGXYbVsEMZosttuxUBkojQ== + zwitch@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-2.0.4.tgz#c827d4b0acb76fc3e685a4c6ec2902d51070e9d7" From 429b95ce24dc0bf40676a9157cea7e752ded9160 Mon Sep 17 00:00:00 2001 From: Ansh Date: Thu, 2 Jan 2025 11:42:00 +0530 Subject: [PATCH 02/27] fix: linting errs --- packages/auth-browser/src/lib/chains/eth.ts | 45 +++++++++++---------- packages/auth-browser/src/lib/chains/sol.ts | 5 +-- 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/packages/auth-browser/src/lib/chains/eth.ts b/packages/auth-browser/src/lib/chains/eth.ts index 33d15ac64..4b5b9d495 100644 --- a/packages/auth-browser/src/lib/chains/eth.ts +++ b/packages/auth-browser/src/lib/chains/eth.ts @@ -1,20 +1,25 @@ import { Buffer as BufferPolyfill } from 'buffer'; -import depd from 'depd'; import { hexlify } from '@ethersproject/bytes'; import { Web3Provider, JsonRpcSigner } from '@ethersproject/providers'; import { toUtf8Bytes } from '@ethersproject/strings'; - import { verifyMessage } from '@ethersproject/wallet'; +import { injected, walletConnect } from '@wagmi/connectors'; +import { + connect as wagmiConnect, + disconnect as wagmiDisconnect, + getWalletClient, + Config, +} from '@wagmi/core'; +import depd from 'depd'; import { ethers } from 'ethers'; import { getAddress } from 'ethers/lib/utils'; import { SiweMessage } from 'siwe'; - -// @ts-ignore: If importing 'nacl' directly, the built files will use .default instead import * as nacl from 'tweetnacl'; import * as naclUtil from 'tweetnacl-util'; +import { http } from 'viem'; +import { createConfig } from 'wagmi'; -// @ts-ignore: If importing 'nacl' directly, the built files will use .default instead import { ELeft, ERight, @@ -40,13 +45,6 @@ import { import { getStorageItem } from '@lit-protocol/misc-browser'; import { AuthSig, AuthCallbackParams, LITEVMChain } from '@lit-protocol/types'; -import { - createConfig, -} from 'wagmi'; -import { connect as wagmiConnect, disconnect as wagmiDisconnect, getWalletClient, Config } from '@wagmi/core'; -import { injected, walletConnect } from '@wagmi/connectors' -import { http } from 'viem'; - const deprecated = depd('lit-js-sdk:auth-browser:index'); if (globalThis && typeof globalThis.Buffer === 'undefined') { @@ -321,8 +319,11 @@ export const decodeCallResult = deprecated.function( 'decodeCallResult will be removed.' ); -const getWagmiProvider = async (chainId: number, walletConnectProjectId?: string) => { - const chain = Object.values(LIT_CHAINS).find(c => c.chainId === chainId); +const getWagmiProvider = async ( + chainId: number, + walletConnectProjectId?: string +) => { + const chain = Object.values(LIT_CHAINS).find((c) => c.chainId === chainId); if (!chain) { throw new Error(`Chain ID ${chainId} not supported`); } @@ -347,18 +348,18 @@ const getWagmiProvider = async (chainId: number, walletConnectProjectId?: string const config = createConfig({ chains: [litChain], transports: { - [litChain.id]: http(litChain.rpcUrls.default.http[0]) + [litChain.id]: http(litChain.rpcUrls.default.http[0]), }, connectors: [ injected(), ...(walletConnectProjectId ? [ walletConnect({ - projectId: walletConnectProjectId - }) + projectId: walletConnectProjectId, + }), ] : []), - ] + ], }); return config; @@ -386,12 +387,11 @@ export const connectWeb3 = async ({ const config = await getWagmiProvider(chainId, walletConnectProjectId); wagmiConfig = config; - + const result = await wagmiConnect(config, { connector: config.connectors[0], chainId, }); - log('got provider'); if (!result) { @@ -399,14 +399,15 @@ export const connectWeb3 = async ({ } const walletClient = await getWalletClient(config); - + if (!walletClient) { throw new Error('No wallet client found'); } + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - Create Web3Provider from wallet client const web3 = new Web3Provider(walletClient); - + log('listing accounts'); const accounts = await web3.listAccounts(); log('accounts', accounts); diff --git a/packages/auth-browser/src/lib/chains/sol.ts b/packages/auth-browser/src/lib/chains/sol.ts index 6be0f19a1..11711ad26 100644 --- a/packages/auth-browser/src/lib/chains/sol.ts +++ b/packages/auth-browser/src/lib/chains/sol.ts @@ -8,12 +8,9 @@ import { NoWalletException, UnknownError, } from '@lit-protocol/constants'; - -import { IProvider, AuthSig } from '@lit-protocol/types'; import { log } from '@lit-protocol/misc'; import { getStorageItem } from '@lit-protocol/misc-browser'; -// import { toString as uint8arrayToString } from 'uint8arrays'; - +import { IProvider, AuthSig } from '@lit-protocol/types'; import { uint8arrayFromString, uint8arrayToString, From c2e4e6d5b7d884bfb0bdb6b9eb65405ad9d2426a Mon Sep 17 00:00:00 2001 From: Ansh Date: Thu, 2 Jan 2025 18:05:03 +0530 Subject: [PATCH 03/27] refactor: litConnectModal as deafult --- packages/auth-browser/src/lib/chains/eth.ts | 161 ++++++++++++++++++-- packages/types/src/lib/interfaces.ts | 10 ++ 2 files changed, 158 insertions(+), 13 deletions(-) diff --git a/packages/auth-browser/src/lib/chains/eth.ts b/packages/auth-browser/src/lib/chains/eth.ts index 4b5b9d495..ea07587ab 100644 --- a/packages/auth-browser/src/lib/chains/eth.ts +++ b/packages/auth-browser/src/lib/chains/eth.ts @@ -11,6 +11,10 @@ import { getWalletClient, Config, } from '@wagmi/core'; +import { + EthereumProvider, + default as WalletConnectProvider, +} from '@walletconnect/ethereum-provider'; import depd from 'depd'; import { ethers } from 'ethers'; import { getAddress } from 'ethers/lib/utils'; @@ -43,7 +47,14 @@ import { validateSessionSig, } from '@lit-protocol/misc'; import { getStorageItem } from '@lit-protocol/misc-browser'; -import { AuthSig, AuthCallbackParams, LITEVMChain } from '@lit-protocol/types'; +import { + AuthSig, + AuthCallbackParams, + LITEVMChain, + AuthProvider, +} from '@lit-protocol/types'; + +import LitConnectModal from '../connect-modal/modal'; const deprecated = depd('lit-js-sdk:auth-browser:index'); @@ -61,6 +72,9 @@ if (globalThis && typeof globalThis.Buffer === 'undefined') { // log("_nacl:", _nacl); // log("_naclUtil:", _naclUtil); +type RPCUrls = Record; +let litWCProvider: WalletConnectProvider | undefined; + /** ---------- Local Interfaces ---------- */ interface ConnectWeb3 { chainId: number; @@ -367,13 +381,13 @@ const getWagmiProvider = async ( /** * @browserOnly - * Connect to web 3 + * Connect to web 3 using wagmi as provider * - * @param { ConnectWeb3 } + * @param { connectWeb3WithWagmi } * * @return { Promise } web3, account */ -export const connectWeb3 = async ({ +export const connectWeb3WithWagmi = async ({ chainId = 1, walletConnectProjectId, }: ConnectWeb3): Promise => { @@ -416,6 +430,111 @@ export const connectWeb3 = async ({ return { web3, account }; }; +/** + * + * Get RPC Urls in the correct format + * need to make it look like this: + --- + rpc: { + 1: "https://mainnet.mycustomnode.com", + 3: "https://ropsten.mycustomnode.com", + 100: "https://dai.poa.network", + // ... + }, + --- + * + * @returns + */ +export const getRPCUrls = (): RPCUrls => { + const rpcUrls: RPCUrls = {}; + + const keys: string[] = Object.keys(LIT_CHAINS); + + for (const chainName of keys) { + const chainId = LIT_CHAINS[chainName].chainId; + const rpcUrl = LIT_CHAINS[chainName].rpcUrls[0]; + rpcUrls[chainId.toString()] = rpcUrl; + } + + return rpcUrls; +}; + +/** + * @browserOnly + * Connect to web 3 using lit connect modal as provider + * + * @param { connectWeb3WithLitConnectModal } + * + * @return { Promise } web3, account + */ +export const connectWeb3WithLitConnectModal = async ({ + chainId = 1, + walletConnectProjectId, +}: ConnectWeb3): Promise => { + // -- check if it's nodejs + if (isNode()) { + log('connectWeb3 is not supported in nodejs.'); + return { web3: null, account: null }; + } + + const rpcUrls: RPCUrls = getRPCUrls(); + + let providerOptions = {}; + + if (walletConnectProjectId) { + const wcProvider = await EthereumProvider.init({ + projectId: walletConnectProjectId, + chains: [chainId], + showQrModal: true, + optionalMethods: ['eth_sign'], + rpcMap: rpcUrls, + }); + + providerOptions = { + walletconnect: { + provider: wcProvider, + }, + }; + + if (isBrowser()) { + litWCProvider = wcProvider; + } + } + + log('getting provider via lit connect modal'); + + const dialog = new LitConnectModal({ providerOptions }); + + const provider = await dialog.getWalletProvider(); + + log('got provider'); + + // @ts-ignore + const web3 = new Web3Provider(provider); + + // trigger metamask popup + try { + deprecated( + '@deprecated soon to be removed. - trying to enable provider. this will trigger the metamask popup.' + ); + // @ts-ignore + await provider.enable(); + } catch (e) { + log( + "error enabling provider but swallowed it because it's not important. most wallets use a different function now to enable the wallet so you can ignore this error, because those other methods will be tried.", + e + ); + } + + log('listing accounts'); + const accounts = await web3.listAccounts(); + + log('accounts', accounts); + const account = ethers.utils.getAddress(accounts[0]); + + return { web3, account }; +}; + /** * @browserOnly * Delete any saved AuthSigs from local storage. Takes no params and returns @@ -429,11 +548,16 @@ export const disconnectWeb3 = async (): Promise => { log('disconnectWeb3 is not supported in nodejs.'); return; } - - try { - await wagmiDisconnect(wagmiConfig); - } catch (err) { - log('Error disconnecting wallet:', err); + if (isBrowser()) { + try { + if (litWCProvider) { + litWCProvider.disconnect(); + } else { + await wagmiDisconnect(wagmiConfig); + } + } catch (err) { + log('Error disconnecting wallet:', err); + } } const storage = LOCAL_STORAGE_KEYS; @@ -460,6 +584,7 @@ export const checkAndSignEVMAuthMessage = async ({ uri, walletConnectProjectId, nonce, + provider = AuthProvider.LitConnectModal, }: AuthCallbackParams): Promise => { // -- check if it's nodejs if (isNode()) { @@ -494,10 +619,20 @@ export const checkAndSignEVMAuthMessage = async ({ const selectedChain = LIT_CHAINS[chain]; const expirationString = expiration ?? getDefaultExpiration(); - const { web3, account } = await connectWeb3({ - chainId: selectedChain.chainId, - walletConnectProjectId, - }); + let web3: Web3Provider; + let account: string; + + if (provider === AuthProvider.Wagmi) { + ({ web3, account } = await connectWeb3WithWagmi({ + chainId: selectedChain.chainId, + walletConnectProjectId, + })); + } else { + ({ web3, account } = await connectWeb3WithLitConnectModal({ + chainId: selectedChain.chainId, + walletConnectProjectId, + })); + } log(`got web3 and account: ${account}`); diff --git a/packages/types/src/lib/interfaces.ts b/packages/types/src/lib/interfaces.ts index c003e0a08..569527752 100644 --- a/packages/types/src/lib/interfaces.ts +++ b/packages/types/src/lib/interfaces.ts @@ -78,6 +78,11 @@ export interface CosmosAuthSig extends AuthSig { export type CosmosWalletType = 'keplr' | 'leap'; +export enum AuthProvider { + Wagmi = "wagmi", + LitConnectModal = "litConnectModal", +} + export interface AuthCallbackParams extends LitActionSdkParams { /** * The serialized session key pair to sign. If not provided, a session key pair will be fetched from localStorge or generated. @@ -127,6 +132,11 @@ export interface AuthCallbackParams extends LitActionSdkParams { walletConnectProjectId?: string; resourceAbilityRequests?: LitResourceAbilityRequest[]; + + /** + * The provider to use for the auth callback. Defaults to `litConnectModal`. + */ + provider?: AuthProvider; } /** ---------- Web3 ---------- */ From 456ad3b29e1155ca5e073d4de971e505dac4261d Mon Sep 17 00:00:00 2001 From: Anson Date: Thu, 2 Jan 2025 17:25:27 +0000 Subject: [PATCH 04/27] chore: update version to `7.0.4` --- lerna.json | 2 +- packages/access-control-conditions/package.json | 2 +- packages/auth-browser/package.json | 2 +- packages/auth-helpers/package.json | 2 +- packages/constants/package.json | 2 +- packages/constants/src/lib/version.ts | 2 +- packages/contracts-sdk/package.json | 2 +- packages/core/package.json | 2 +- packages/crypto/package.json | 2 +- packages/encryption/package.json | 2 +- packages/event-listener/package.json | 2 +- packages/lit-auth-client/package.json | 2 +- packages/lit-node-client-nodejs/package.json | 2 +- packages/lit-node-client/package.json | 2 +- packages/logger/package.json | 2 +- packages/misc-browser/package.json | 2 +- packages/misc/package.json | 2 +- packages/nacl/package.json | 2 +- packages/pkp-base/package.json | 2 +- packages/pkp-cosmos/package.json | 2 +- packages/pkp-ethers/package.json | 2 +- packages/pkp-sui/package.json | 2 +- packages/pkp-walletconnect/package.json | 2 +- packages/types/package.json | 2 +- packages/uint8arrays/package.json | 2 +- packages/wasm/package.json | 2 +- packages/wrapped-keys-lit-actions/package.json | 2 +- packages/wrapped-keys/package.json | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lerna.json b/lerna.json index 04caccfd2..d7ee56780 100644 --- a/lerna.json +++ b/lerna.json @@ -2,5 +2,5 @@ "$schema": "node_modules/lerna/schemas/lerna-schema.json", "useNx": true, "useWorkspaces": true, - "version": "7.0.3" + "version": "7.0.4" } diff --git a/packages/access-control-conditions/package.json b/packages/access-control-conditions/package.json index 90146a689..2e7960c57 100644 --- a/packages/access-control-conditions/package.json +++ b/packages/access-control-conditions/package.json @@ -21,7 +21,7 @@ "tags": [ "universal" ], - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/auth-browser/package.json b/packages/auth-browser/package.json index 787d52a3b..bae9b0b6f 100644 --- a/packages/auth-browser/package.json +++ b/packages/auth-browser/package.json @@ -31,7 +31,7 @@ "tags": [ "browser" ], - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/auth-helpers/package.json b/packages/auth-helpers/package.json index 206becd37..727a76c1f 100644 --- a/packages/auth-helpers/package.json +++ b/packages/auth-helpers/package.json @@ -25,7 +25,7 @@ "crypto": false, "stream": false }, - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/constants/package.json b/packages/constants/package.json index 25d519d2b..f7ad72bf1 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -20,7 +20,7 @@ "tags": [ "universal" ], - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/constants/src/lib/version.ts b/packages/constants/src/lib/version.ts index df5935849..210a6a52e 100644 --- a/packages/constants/src/lib/version.ts +++ b/packages/constants/src/lib/version.ts @@ -1 +1 @@ -export const version = '7.0.3'; +export const version = '7.0.4'; diff --git a/packages/contracts-sdk/package.json b/packages/contracts-sdk/package.json index b0ab53d5b..733ff7eb4 100644 --- a/packages/contracts-sdk/package.json +++ b/packages/contracts-sdk/package.json @@ -25,7 +25,7 @@ "tags": [ "universal" ], - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/core/package.json b/packages/core/package.json index 46a3ef86c..535953e9a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@lit-protocol/core", - "version": "7.0.3", + "version": "7.0.4", "type": "commonjs", "license": "MIT", "homepage": "https://github.com/Lit-Protocol/js-sdk", diff --git a/packages/crypto/package.json b/packages/crypto/package.json index 8c5aa99aa..10d56bdb5 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -21,7 +21,7 @@ "tags": [ "universal" ], - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/encryption/package.json b/packages/encryption/package.json index 81cdfcc4a..19638abfe 100644 --- a/packages/encryption/package.json +++ b/packages/encryption/package.json @@ -25,7 +25,7 @@ "crypto": false, "stream": false }, - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/event-listener/package.json b/packages/event-listener/package.json index d502769ad..656278fad 100644 --- a/packages/event-listener/package.json +++ b/packages/event-listener/package.json @@ -26,7 +26,7 @@ "scripts": { "generate-lit-actions": "yarn node ./esbuild.config.js" }, - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/lit-auth-client/package.json b/packages/lit-auth-client/package.json index 38fafd00f..09f8fdee6 100644 --- a/packages/lit-auth-client/package.json +++ b/packages/lit-auth-client/package.json @@ -1,6 +1,6 @@ { "name": "@lit-protocol/lit-auth-client", - "version": "7.0.3", + "version": "7.0.4", "type": "commonjs", "license": "MIT", "homepage": "https://github.com/Lit-Protocol/js-sdk", diff --git a/packages/lit-node-client-nodejs/package.json b/packages/lit-node-client-nodejs/package.json index d9cddba12..bed6d5870 100644 --- a/packages/lit-node-client-nodejs/package.json +++ b/packages/lit-node-client-nodejs/package.json @@ -24,7 +24,7 @@ "tags": [ "nodejs" ], - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/lit-node-client/package.json b/packages/lit-node-client/package.json index 5a0b0397a..06b8ba95d 100644 --- a/packages/lit-node-client/package.json +++ b/packages/lit-node-client/package.json @@ -28,7 +28,7 @@ "crypto": false, "stream": false }, - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/logger/package.json b/packages/logger/package.json index 92c6cf817..195a64673 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -1,6 +1,6 @@ { "name": "@lit-protocol/logger", - "version": "7.0.3", + "version": "7.0.4", "type": "commonjs", "tags": [ "universal" diff --git a/packages/misc-browser/package.json b/packages/misc-browser/package.json index 7e83c896e..0a09c9945 100644 --- a/packages/misc-browser/package.json +++ b/packages/misc-browser/package.json @@ -21,7 +21,7 @@ "tags": [ "browser" ], - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/misc/package.json b/packages/misc/package.json index e9e8fb1ab..bf234d599 100644 --- a/packages/misc/package.json +++ b/packages/misc/package.json @@ -21,7 +21,7 @@ "tags": [ "universal" ], - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/nacl/package.json b/packages/nacl/package.json index 77a113594..8554b83dc 100644 --- a/packages/nacl/package.json +++ b/packages/nacl/package.json @@ -21,7 +21,7 @@ "access": "public", "directory": "../../dist/packages/nacl" }, - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/pkp-base/package.json b/packages/pkp-base/package.json index 51de248ce..f3bc64dbf 100644 --- a/packages/pkp-base/package.json +++ b/packages/pkp-base/package.json @@ -1,6 +1,6 @@ { "name": "@lit-protocol/pkp-base", - "version": "7.0.3", + "version": "7.0.4", "type": "commonjs", "license": "MIT", "homepage": "https://github.com/Lit-Protocol/js-sdk", diff --git a/packages/pkp-cosmos/package.json b/packages/pkp-cosmos/package.json index 83f6dee39..3ed1829d2 100644 --- a/packages/pkp-cosmos/package.json +++ b/packages/pkp-cosmos/package.json @@ -1,6 +1,6 @@ { "name": "@lit-protocol/pkp-cosmos", - "version": "7.0.3", + "version": "7.0.4", "type": "commonjs", "license": "MIT", "homepage": "https://github.com/Lit-Protocol/js-sdk", diff --git a/packages/pkp-ethers/package.json b/packages/pkp-ethers/package.json index 1bbef1a5f..016112b4a 100644 --- a/packages/pkp-ethers/package.json +++ b/packages/pkp-ethers/package.json @@ -20,7 +20,7 @@ "tags": [ "universal" ], - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/pkp-sui/package.json b/packages/pkp-sui/package.json index b22f15deb..8a35d935b 100644 --- a/packages/pkp-sui/package.json +++ b/packages/pkp-sui/package.json @@ -1,6 +1,6 @@ { "name": "@lit-protocol/pkp-sui", - "version": "7.0.3", + "version": "7.0.4", "type": "commonjs", "license": "MIT", "homepage": "https://github.com/Lit-Protocol/js-sdk", diff --git a/packages/pkp-walletconnect/package.json b/packages/pkp-walletconnect/package.json index c2b173a2e..d1b2f7c4e 100644 --- a/packages/pkp-walletconnect/package.json +++ b/packages/pkp-walletconnect/package.json @@ -1,6 +1,6 @@ { "name": "@lit-protocol/pkp-walletconnect", - "version": "7.0.3", + "version": "7.0.4", "type": "commonjs", "license": "MIT", "homepage": "https://github.com/Lit-Protocol/js-sdk", diff --git a/packages/types/package.json b/packages/types/package.json index d387b3f30..d282b6eb8 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -23,7 +23,7 @@ "buildOptions": { "genReact": false }, - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/uint8arrays/package.json b/packages/uint8arrays/package.json index c1027cfbc..b74f3492f 100644 --- a/packages/uint8arrays/package.json +++ b/packages/uint8arrays/package.json @@ -21,7 +21,7 @@ "tags": [ "universal" ], - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/wasm/package.json b/packages/wasm/package.json index 0622add64..1b252561e 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -1,6 +1,6 @@ { "name": "@lit-protocol/wasm", - "version": "7.0.3", + "version": "7.0.4", "type": "commonjs", "homepage": "https://github.com/Lit-Protocol/js-sdk", "repository": { diff --git a/packages/wrapped-keys-lit-actions/package.json b/packages/wrapped-keys-lit-actions/package.json index c9011b95c..2824e6922 100644 --- a/packages/wrapped-keys-lit-actions/package.json +++ b/packages/wrapped-keys-lit-actions/package.json @@ -26,7 +26,7 @@ "scripts": { "generate-lit-actions": "yarn node ./esbuild.config.js" }, - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } diff --git a/packages/wrapped-keys/package.json b/packages/wrapped-keys/package.json index 936906633..0d88748de 100644 --- a/packages/wrapped-keys/package.json +++ b/packages/wrapped-keys/package.json @@ -23,7 +23,7 @@ "buildOptions": { "genReact": false }, - "version": "7.0.3", + "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" } From 6711032fb7618ffc78e0d42eea6d4edb12f353c7 Mon Sep 17 00:00:00 2001 From: Ansh Date: Thu, 2 Jan 2025 23:30:36 +0530 Subject: [PATCH 05/27] feat: wagmi as optional --- packages/auth-browser/src/lib/chains/eth.ts | 35 ++++++++++++++++++--- packages/types/src/lib/interfaces.ts | 4 +-- 2 files changed, 32 insertions(+), 7 deletions(-) diff --git a/packages/auth-browser/src/lib/chains/eth.ts b/packages/auth-browser/src/lib/chains/eth.ts index ea07587ab..fbd1c1efc 100644 --- a/packages/auth-browser/src/lib/chains/eth.ts +++ b/packages/auth-browser/src/lib/chains/eth.ts @@ -94,6 +94,7 @@ interface signAndSaveAuthParams { expiration: string; uri?: string; nonce: string; + provider: AuthProvider; } interface IABI { @@ -124,6 +125,7 @@ interface SignMessageParams { body: string; web3: Web3Provider; account: string; + provider: AuthProvider; } interface SignedMessage { @@ -619,19 +621,28 @@ export const checkAndSignEVMAuthMessage = async ({ const selectedChain = LIT_CHAINS[chain]; const expirationString = expiration ?? getDefaultExpiration(); - let web3: Web3Provider; - let account: string; + let web3: Web3Provider | undefined; + let account: string | undefined; if (provider === AuthProvider.Wagmi) { ({ web3, account } = await connectWeb3WithWagmi({ chainId: selectedChain.chainId, walletConnectProjectId, })); - } else { + } else if (provider === AuthProvider.LitConnectModal) { ({ web3, account } = await connectWeb3WithLitConnectModal({ chainId: selectedChain.chainId, walletConnectProjectId, })); + } else { + throw new Error('Invalid provider'); + } + + if (!web3) { + throw new Error('Web3Provider is undefined'); + } + if (!account) { + throw new Error('Account is undefined'); } log(`got web3 and account: ${account}`); @@ -668,7 +679,7 @@ export const checkAndSignEVMAuthMessage = async ({ // -- 4. case: (current chain id is NOT equal to selected chain) AND is set to switch chain if (currentChainIdOrError.result !== selectedChainId && switchChain) { - const provider = web3.provider as any; + const provider = web3?.provider as any; // -- (case) if able to switch chain id try { @@ -733,6 +744,7 @@ export const checkAndSignEVMAuthMessage = async ({ expiration: expirationString, uri, nonce, + provider, }); authSigOrError = { @@ -779,6 +791,7 @@ export const checkAndSignEVMAuthMessage = async ({ expiration: expirationString, uri, nonce, + provider, }); log('7. authSig:', authSig); @@ -795,6 +808,7 @@ export const checkAndSignEVMAuthMessage = async ({ expiration: expirationString, uri, nonce, + provider, }); } log('8. mustResign:', mustResign); @@ -819,6 +833,7 @@ export const checkAndSignEVMAuthMessage = async ({ expiration: expirationString, uri, nonce, + provider, }); } @@ -837,6 +852,7 @@ const _signAndGetAuth = async ({ expiration, uri, nonce, + provider, }: signAndSaveAuthParams): Promise => { await signAndSaveAuthMessage({ web3, @@ -846,6 +862,7 @@ const _signAndGetAuth = async ({ expiration, uri, nonce, + provider, }); const authSigOrError = getStorageItem(LOCAL_STORAGE_KEYS.AUTH_SIGNATURE); @@ -885,6 +902,7 @@ export const signAndSaveAuthMessage = async ({ expiration, uri, nonce, + provider, }: signAndSaveAuthParams): Promise => { // check if it's nodejs if (isNode()) { @@ -925,6 +943,7 @@ export const signAndSaveAuthMessage = async ({ body, web3, account: formattedAccount, + provider, }); // -- 3. prepare auth message @@ -970,6 +989,7 @@ export const signMessage = async ({ body, web3, account, + provider, }: SignMessageParams): Promise => { // check if it's nodejs if (isNode()) { @@ -983,7 +1003,12 @@ export const signMessage = async ({ // -- validate if (!web3 || !account) { log(`web3: ${web3} OR ${account} not found. Connecting web3..`); - const res = await connectWeb3({ chainId: 1 }); + let res; + if (provider === AuthProvider.Wagmi) { + res = await connectWeb3WithWagmi({ chainId: 1 }); + } else { + res = await connectWeb3WithLitConnectModal({ chainId: 1 }); + } web3 = res.web3; account = res.account; } diff --git a/packages/types/src/lib/interfaces.ts b/packages/types/src/lib/interfaces.ts index 569527752..969c2827e 100644 --- a/packages/types/src/lib/interfaces.ts +++ b/packages/types/src/lib/interfaces.ts @@ -79,8 +79,8 @@ export interface CosmosAuthSig extends AuthSig { export type CosmosWalletType = 'keplr' | 'leap'; export enum AuthProvider { - Wagmi = "wagmi", - LitConnectModal = "litConnectModal", + Wagmi = 'wagmi', + LitConnectModal = 'litConnectModal', } export interface AuthCallbackParams extends LitActionSdkParams { From 9fd958ce24777e0fb2e0397ada25de4d9b51957b Mon Sep 17 00:00:00 2001 From: Anson Date: Thu, 2 Jan 2025 18:18:36 +0000 Subject: [PATCH 06/27] fmt --- packages/access-control-conditions/package.json | 2 +- packages/auth-browser/package.json | 2 +- packages/auth-helpers/package.json | 2 +- packages/constants/package.json | 2 +- packages/contracts-sdk/package.json | 2 +- packages/core/package.json | 2 +- packages/crypto/package.json | 2 +- packages/encryption/package.json | 2 +- packages/event-listener/package.json | 2 +- packages/lit-auth-client/package.json | 2 +- packages/lit-node-client-nodejs/package.json | 2 +- packages/lit-node-client/package.json | 2 +- packages/logger/package.json | 2 +- packages/misc-browser/package.json | 2 +- packages/misc/package.json | 2 +- packages/nacl/package.json | 2 +- packages/pkp-base/package.json | 2 +- packages/pkp-cosmos/package.json | 2 +- packages/pkp-ethers/package.json | 2 +- packages/pkp-sui/package.json | 2 +- packages/pkp-walletconnect/package.json | 2 +- packages/types/package.json | 2 +- packages/uint8arrays/package.json | 2 +- packages/wasm/package.json | 2 +- packages/wrapped-keys-lit-actions/package.json | 2 +- packages/wrapped-keys/package.json | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/packages/access-control-conditions/package.json b/packages/access-control-conditions/package.json index 2e7960c57..c06c04fac 100644 --- a/packages/access-control-conditions/package.json +++ b/packages/access-control-conditions/package.json @@ -24,4 +24,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/auth-browser/package.json b/packages/auth-browser/package.json index bae9b0b6f..cce8a9cab 100644 --- a/packages/auth-browser/package.json +++ b/packages/auth-browser/package.json @@ -34,4 +34,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/auth-helpers/package.json b/packages/auth-helpers/package.json index 727a76c1f..cf4c1a731 100644 --- a/packages/auth-helpers/package.json +++ b/packages/auth-helpers/package.json @@ -28,4 +28,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/constants/package.json b/packages/constants/package.json index f7ad72bf1..08c23d25f 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -23,4 +23,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/contracts-sdk/package.json b/packages/contracts-sdk/package.json index 733ff7eb4..9c0b3659a 100644 --- a/packages/contracts-sdk/package.json +++ b/packages/contracts-sdk/package.json @@ -28,4 +28,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/core/package.json b/packages/core/package.json index 535953e9a..9b540970c 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -27,4 +27,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/crypto/package.json b/packages/crypto/package.json index 10d56bdb5..df668956f 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -24,4 +24,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/encryption/package.json b/packages/encryption/package.json index 19638abfe..0dc6fd6bc 100644 --- a/packages/encryption/package.json +++ b/packages/encryption/package.json @@ -28,4 +28,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/event-listener/package.json b/packages/event-listener/package.json index 656278fad..7117dd8ea 100644 --- a/packages/event-listener/package.json +++ b/packages/event-listener/package.json @@ -29,4 +29,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/lit-auth-client/package.json b/packages/lit-auth-client/package.json index 09f8fdee6..bd11784f3 100644 --- a/packages/lit-auth-client/package.json +++ b/packages/lit-auth-client/package.json @@ -31,4 +31,4 @@ }, "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/lit-node-client-nodejs/package.json b/packages/lit-node-client-nodejs/package.json index bed6d5870..2a33df662 100644 --- a/packages/lit-node-client-nodejs/package.json +++ b/packages/lit-node-client-nodejs/package.json @@ -27,4 +27,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/lit-node-client/package.json b/packages/lit-node-client/package.json index 06b8ba95d..a8460e5d5 100644 --- a/packages/lit-node-client/package.json +++ b/packages/lit-node-client/package.json @@ -31,4 +31,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/logger/package.json b/packages/logger/package.json index 195a64673..f65799256 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -11,4 +11,4 @@ }, "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/misc-browser/package.json b/packages/misc-browser/package.json index 0a09c9945..eb1870c21 100644 --- a/packages/misc-browser/package.json +++ b/packages/misc-browser/package.json @@ -24,4 +24,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/misc/package.json b/packages/misc/package.json index bf234d599..4b7445839 100644 --- a/packages/misc/package.json +++ b/packages/misc/package.json @@ -24,4 +24,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/nacl/package.json b/packages/nacl/package.json index 8554b83dc..dc6f4d65a 100644 --- a/packages/nacl/package.json +++ b/packages/nacl/package.json @@ -24,4 +24,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/pkp-base/package.json b/packages/pkp-base/package.json index f3bc64dbf..93d586fe9 100644 --- a/packages/pkp-base/package.json +++ b/packages/pkp-base/package.json @@ -27,4 +27,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/pkp-cosmos/package.json b/packages/pkp-cosmos/package.json index 3ed1829d2..47ded6484 100644 --- a/packages/pkp-cosmos/package.json +++ b/packages/pkp-cosmos/package.json @@ -27,4 +27,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/pkp-ethers/package.json b/packages/pkp-ethers/package.json index 016112b4a..011d8b167 100644 --- a/packages/pkp-ethers/package.json +++ b/packages/pkp-ethers/package.json @@ -23,4 +23,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/pkp-sui/package.json b/packages/pkp-sui/package.json index 8a35d935b..c95e56217 100644 --- a/packages/pkp-sui/package.json +++ b/packages/pkp-sui/package.json @@ -27,4 +27,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/pkp-walletconnect/package.json b/packages/pkp-walletconnect/package.json index d1b2f7c4e..cb36ceba4 100644 --- a/packages/pkp-walletconnect/package.json +++ b/packages/pkp-walletconnect/package.json @@ -34,4 +34,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/types/package.json b/packages/types/package.json index d282b6eb8..e4372e21d 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -26,4 +26,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/uint8arrays/package.json b/packages/uint8arrays/package.json index b74f3492f..70be2b696 100644 --- a/packages/uint8arrays/package.json +++ b/packages/uint8arrays/package.json @@ -24,4 +24,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/wasm/package.json b/packages/wasm/package.json index 1b252561e..065f76c7c 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -31,4 +31,4 @@ }, "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/wrapped-keys-lit-actions/package.json b/packages/wrapped-keys-lit-actions/package.json index 2824e6922..32a64a0f9 100644 --- a/packages/wrapped-keys-lit-actions/package.json +++ b/packages/wrapped-keys-lit-actions/package.json @@ -29,4 +29,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file diff --git a/packages/wrapped-keys/package.json b/packages/wrapped-keys/package.json index 0d88748de..8c2a6a805 100644 --- a/packages/wrapped-keys/package.json +++ b/packages/wrapped-keys/package.json @@ -26,4 +26,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} +} \ No newline at end of file From 412264bb37ec586785d389fc9a9416f422b91c7f Mon Sep 17 00:00:00 2001 From: Anson Date: Thu, 2 Jan 2025 18:34:45 +0000 Subject: [PATCH 07/27] fmt --- packages/access-control-conditions/package.json | 2 +- packages/auth-browser/package.json | 2 +- packages/auth-helpers/package.json | 2 +- packages/constants/package.json | 2 +- packages/contracts-sdk/package.json | 2 +- packages/core/package.json | 2 +- packages/crypto/package.json | 2 +- packages/encryption/package.json | 2 +- packages/event-listener/package.json | 2 +- packages/lit-auth-client/package.json | 2 +- packages/lit-node-client-nodejs/package.json | 2 +- packages/lit-node-client/package.json | 2 +- packages/logger/package.json | 2 +- packages/misc-browser/package.json | 2 +- packages/misc/package.json | 2 +- packages/nacl/package.json | 2 +- packages/pkp-base/package.json | 2 +- packages/pkp-cosmos/package.json | 2 +- packages/pkp-ethers/package.json | 2 +- packages/pkp-sui/package.json | 2 +- packages/pkp-walletconnect/package.json | 2 +- packages/types/package.json | 2 +- packages/uint8arrays/package.json | 2 +- packages/wasm/package.json | 2 +- packages/wrapped-keys-lit-actions/package.json | 2 +- packages/wrapped-keys/package.json | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/packages/access-control-conditions/package.json b/packages/access-control-conditions/package.json index c06c04fac..2e7960c57 100644 --- a/packages/access-control-conditions/package.json +++ b/packages/access-control-conditions/package.json @@ -24,4 +24,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/auth-browser/package.json b/packages/auth-browser/package.json index cce8a9cab..bae9b0b6f 100644 --- a/packages/auth-browser/package.json +++ b/packages/auth-browser/package.json @@ -34,4 +34,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/auth-helpers/package.json b/packages/auth-helpers/package.json index cf4c1a731..727a76c1f 100644 --- a/packages/auth-helpers/package.json +++ b/packages/auth-helpers/package.json @@ -28,4 +28,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/constants/package.json b/packages/constants/package.json index 08c23d25f..f7ad72bf1 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -23,4 +23,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/contracts-sdk/package.json b/packages/contracts-sdk/package.json index 9c0b3659a..733ff7eb4 100644 --- a/packages/contracts-sdk/package.json +++ b/packages/contracts-sdk/package.json @@ -28,4 +28,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/core/package.json b/packages/core/package.json index 9b540970c..535953e9a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -27,4 +27,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/crypto/package.json b/packages/crypto/package.json index df668956f..10d56bdb5 100644 --- a/packages/crypto/package.json +++ b/packages/crypto/package.json @@ -24,4 +24,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/encryption/package.json b/packages/encryption/package.json index 0dc6fd6bc..19638abfe 100644 --- a/packages/encryption/package.json +++ b/packages/encryption/package.json @@ -28,4 +28,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/event-listener/package.json b/packages/event-listener/package.json index 7117dd8ea..656278fad 100644 --- a/packages/event-listener/package.json +++ b/packages/event-listener/package.json @@ -29,4 +29,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/lit-auth-client/package.json b/packages/lit-auth-client/package.json index bd11784f3..09f8fdee6 100644 --- a/packages/lit-auth-client/package.json +++ b/packages/lit-auth-client/package.json @@ -31,4 +31,4 @@ }, "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/lit-node-client-nodejs/package.json b/packages/lit-node-client-nodejs/package.json index 2a33df662..bed6d5870 100644 --- a/packages/lit-node-client-nodejs/package.json +++ b/packages/lit-node-client-nodejs/package.json @@ -27,4 +27,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/lit-node-client/package.json b/packages/lit-node-client/package.json index a8460e5d5..06b8ba95d 100644 --- a/packages/lit-node-client/package.json +++ b/packages/lit-node-client/package.json @@ -31,4 +31,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/logger/package.json b/packages/logger/package.json index f65799256..195a64673 100644 --- a/packages/logger/package.json +++ b/packages/logger/package.json @@ -11,4 +11,4 @@ }, "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/misc-browser/package.json b/packages/misc-browser/package.json index eb1870c21..0a09c9945 100644 --- a/packages/misc-browser/package.json +++ b/packages/misc-browser/package.json @@ -24,4 +24,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/misc/package.json b/packages/misc/package.json index 4b7445839..bf234d599 100644 --- a/packages/misc/package.json +++ b/packages/misc/package.json @@ -24,4 +24,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/nacl/package.json b/packages/nacl/package.json index dc6f4d65a..8554b83dc 100644 --- a/packages/nacl/package.json +++ b/packages/nacl/package.json @@ -24,4 +24,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/pkp-base/package.json b/packages/pkp-base/package.json index 93d586fe9..f3bc64dbf 100644 --- a/packages/pkp-base/package.json +++ b/packages/pkp-base/package.json @@ -27,4 +27,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/pkp-cosmos/package.json b/packages/pkp-cosmos/package.json index 47ded6484..3ed1829d2 100644 --- a/packages/pkp-cosmos/package.json +++ b/packages/pkp-cosmos/package.json @@ -27,4 +27,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/pkp-ethers/package.json b/packages/pkp-ethers/package.json index 011d8b167..016112b4a 100644 --- a/packages/pkp-ethers/package.json +++ b/packages/pkp-ethers/package.json @@ -23,4 +23,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/pkp-sui/package.json b/packages/pkp-sui/package.json index c95e56217..8a35d935b 100644 --- a/packages/pkp-sui/package.json +++ b/packages/pkp-sui/package.json @@ -27,4 +27,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/pkp-walletconnect/package.json b/packages/pkp-walletconnect/package.json index cb36ceba4..d1b2f7c4e 100644 --- a/packages/pkp-walletconnect/package.json +++ b/packages/pkp-walletconnect/package.json @@ -34,4 +34,4 @@ ], "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/types/package.json b/packages/types/package.json index e4372e21d..d282b6eb8 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -26,4 +26,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/uint8arrays/package.json b/packages/uint8arrays/package.json index 70be2b696..b74f3492f 100644 --- a/packages/uint8arrays/package.json +++ b/packages/uint8arrays/package.json @@ -24,4 +24,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/wasm/package.json b/packages/wasm/package.json index 065f76c7c..1b252561e 100644 --- a/packages/wasm/package.json +++ b/packages/wasm/package.json @@ -31,4 +31,4 @@ }, "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/wrapped-keys-lit-actions/package.json b/packages/wrapped-keys-lit-actions/package.json index 32a64a0f9..2824e6922 100644 --- a/packages/wrapped-keys-lit-actions/package.json +++ b/packages/wrapped-keys-lit-actions/package.json @@ -29,4 +29,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} diff --git a/packages/wrapped-keys/package.json b/packages/wrapped-keys/package.json index 8c2a6a805..0d88748de 100644 --- a/packages/wrapped-keys/package.json +++ b/packages/wrapped-keys/package.json @@ -26,4 +26,4 @@ "version": "7.0.4", "main": "./dist/src/index.js", "typings": "./dist/src/index.d.ts" -} \ No newline at end of file +} From 39af557f0085988d01110e7f8c7715dbe0c9271c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 19:11:32 +0000 Subject: [PATCH 08/27] docs: improve package descriptions in READMEs - Add clear description of logger package's purpose and functionality - Improve WASM package description and formatting - Enhance nacl package description with its role in the ecosystem - Clarify lit-node-client-nodejs package purpose and benefits Co-Authored-By: anson@litprotocol.com --- packages/lit-node-client-nodejs/README.md | 4 +--- packages/logger/README.md | 2 +- packages/nacl/README.md | 2 +- packages/wasm/README.md | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/lit-node-client-nodejs/README.md b/packages/lit-node-client-nodejs/README.md index 4f20193e8..c12661df1 100644 --- a/packages/lit-node-client-nodejs/README.md +++ b/packages/lit-node-client-nodejs/README.md @@ -1,8 +1,6 @@ # Getting Started -This `LitNodeClientNodeJs` is created solely to run on Node.js. - -The usual `checkAndSignAuthMessage` is not included in this package, so you need to add it manually to the constructor if you decide to use it on a browser, or with any custom auth callback. +This package provides a Node.js-specific implementation of the Lit Protocol client, enabling server-side applications to interact with the Lit network. It offers optimized Node.js performance while maintaining all core Lit Protocol functionality, excluding browser-specific authentication which can be manually added if needed. ```js import * as LitJsSdkNodeJs from '@lit-protocol/lit-node-client-nodejs'; diff --git a/packages/logger/README.md b/packages/logger/README.md index 671f26597..98c0b0b1e 100644 --- a/packages/logger/README.md +++ b/packages/logger/README.md @@ -1,6 +1,6 @@ # logger -This library was generated with [Nx](https://nx.dev). +This package provides a centralized logging utility for the Lit Protocol SDK, offering structured logging capabilities across all packages. It enables consistent log formatting, level-based filtering, and standardized error reporting throughout the Lit Protocol ecosystem. ## Building diff --git a/packages/nacl/README.md b/packages/nacl/README.md index 9e0511c57..426d661f4 100644 --- a/packages/nacl/README.md +++ b/packages/nacl/README.md @@ -1,6 +1,6 @@ # Quick Start -re-export of https://www.npmjs.com/package/nacl +This package provides essential cryptographic operations for the Lit Protocol by re-exporting TweetNaCl.js (https://www.npmjs.com/package/nacl). It offers a lightweight implementation of the NaCl (pronounced "salt") cryptography library, enabling secure encryption, decryption, and digital signatures across the Lit Protocol ecosystem. ### node.js / browser diff --git a/packages/wasm/README.md b/packages/wasm/README.md index 1a667a60b..3cfb92f38 100644 --- a/packages/wasm/README.md +++ b/packages/wasm/README.md @@ -1,8 +1,8 @@ # WASM -Core lit utilities implemented in `Rust` and compiled to `WebAssembly` through `wasm-pack` implementations within this package wrap the compiled implementations from `rust` and provides functionality for converting the compiled artifact to a `base64` encoded string for binding to the generated bridge. the functionality contained within this package exposes the functinoality provided from the wasm utilities. +This package provides high-performance cryptographic operations for the Lit Protocol by implementing core utilities in Rust and compiling them to WebAssembly. It enables efficient cross-platform execution of critical cryptographic functions while maintaining security and performance. The package handles the compilation process through wasm-pack and provides JavaScript bindings for seamless integration. -For information on implementations see the [rust](./rust/README.md) directory. +For detailed implementation information, see the [rust](./rust/README.md) directory. ### Building From b3f65374efc15952b1001ede027f1bc156589453 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 19:26:57 +0000 Subject: [PATCH 09/27] docs: update core package READMEs with improved descriptions and examples Co-Authored-By: anson@litprotocol.com --- packages/core/README.md | 32 ++++++++++++++++++++-- packages/crypto/README.md | 39 +++++++++++++++++++++++--- packages/lit-auth-client/README.md | 44 ++++++++++++++++++++++-------- packages/lit-node-client/README.md | 35 +++++++++++++++++++++--- packages/types/README.md | 40 +++++++++++++++++++++++++-- 5 files changed, 165 insertions(+), 25 deletions(-) diff --git a/packages/core/README.md b/packages/core/README.md index 0b50a3b3e..838c2e4d3 100644 --- a/packages/core/README.md +++ b/packages/core/README.md @@ -1,11 +1,37 @@ -# core +# Core -This library was generated with [Nx](https://nx.dev). +This package provides foundational utilities and interfaces that power the core functionalities of the Lit Protocol SDK. It includes essential data structures, business logic, and shared configurations that other packages build upon. + +## Installation + +```bash +yarn add @lit-protocol/core +``` + +## Quick Start + +```typescript +import { LitCore } from '@lit-protocol/core'; + +// Initialize core functionality +const litCore = new LitCore(); + +// Use core utilities +await litCore.connect(); +``` + +## Key Features + +- Core data structures and interfaces +- Shared configurations and constants +- Base classes for Lit Protocol functionality +- Essential utility functions +- Type definitions for core components ## Building Run `nx build core` to build the library. -## Running unit tests +## Testing Run `nx test core` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/packages/crypto/README.md b/packages/crypto/README.md index f7cb8d8f3..d1c4efa2d 100644 --- a/packages/crypto/README.md +++ b/packages/crypto/README.md @@ -1,9 +1,40 @@ -# Quick Start +# Crypto -The crypto.ts file in the Lit SDK handles cryptographic operations, including the generation, import, encryption and decryption of keys, as well as management of cryptographic shares using BLS and ECDSA schemes. +A comprehensive cryptographic toolkit for the Lit Protocol SDK that handles secure key operations, encryption/decryption, and advanced cryptographic schemes. -### node.js / browser +## Installation -``` +```bash yarn add @lit-protocol/crypto ``` + +## Quick Start + +```typescript +import { + generatePrivateKey, + encryptWithSignature +} from '@lit-protocol/crypto'; + +// Generate a new private key +const privateKey = await generatePrivateKey(); + +// Encrypt data with signature +const encryptedData = await encryptWithSignature(data, signature); +``` + +## Key Features + +- Private key generation and management +- BLS and ECDSA cryptographic schemes +- Secure key import/export +- Data encryption and decryption +- Cryptographic share management +- Signature generation and verification + +## Supported Operations + +- Key Generation: Create secure cryptographic keys +- Encryption/Decryption: Protect sensitive data +- Share Management: Handle distributed key shares +- Signature Operations: Generate and verify cryptographic signatures diff --git a/packages/lit-auth-client/README.md b/packages/lit-auth-client/README.md index 989eb9c44..161bd8f64 100644 --- a/packages/lit-auth-client/README.md +++ b/packages/lit-auth-client/README.md @@ -1,27 +1,49 @@ -# lit-auth-client +# Lit Auth Client -`lit-auth-client` makes it easy to manage PKP authentication with Lit Protocol. This library offers convenient classes for social logins, Ethereum wallet sign-ins, and minting and fetching of PKPs linked to auth methods. +A comprehensive authentication client for managing PKP (Programmable Key Pair) authentication with Lit Protocol. This package simplifies the integration of various authentication methods including social logins and Ethereum wallet sign-ins. -## 📜 API Reference +## Installation -Check out the [API reference](https://docs.lit-js-sdk-v2.litprotocol.com/modules/lit_auth_client_src.html). +```bash +yarn add @lit-protocol/lit-auth-client +``` -## 📦 Installation +## Quick Start -Get started by installing the package: +```typescript +import { LitAuthClient } from '@lit-protocol/lit-auth-client'; -```bash -yarn add @lit-protocol/lit-auth-client +// Initialize the auth client +const client = new LitAuthClient({ + redirectUri: 'https://your-app.com/callback' +}); + +// Handle social login +await client.initializeGoogleLogin(); + +// Handle wallet authentication +await client.initializeWalletConnect(); ``` -## 🙌 Contributing +## Key Features + +- Social login integration +- Ethereum wallet authentication +- PKP minting and management +- Auth method linking +- Secure token handling +- Multiple provider support + +## Documentation + +For detailed API documentation, visit the [API reference](https://docs.lit-js-sdk-v2.litprotocol.com/modules/lit_auth_client_src.html). -This library was generated with [Nx](https://nx.dev). +## Development ### Building Run `nx build lit-auth-client` to build the library. -### Running unit tests +### Testing Run `nx test lit-auth-client` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/packages/lit-node-client/README.md b/packages/lit-node-client/README.md index 86ee2ff17..48c27fc06 100644 --- a/packages/lit-node-client/README.md +++ b/packages/lit-node-client/README.md @@ -1,9 +1,36 @@ -# Quick Start +# Lit Node Client -This module is the main module of this monorepo. It sets a default authentication callback using the `checkAndSignAuthMessage` function from the auth-browser submodule, which is designed to work in both browser and Node.js environments, facilitating interaction with Lit nodes. +This module is the main interface for interacting with the Lit Protocol network. It provides a robust client implementation that handles network communication, authentication, and node interactions in both browser and Node.js environments. -### node.js / browser +## Installation -``` +```bash yarn add @lit-protocol/lit-node-client ``` + +## Quick Start + +```typescript +import { LitNodeClient } from '@lit-protocol/lit-node-client'; + +// Initialize the client +const client = new LitNodeClient({ + alertWhenUnauthorized: false, +}); + +// Connect to the network +await client.connect(); +``` + +## Key Features + +- Seamless authentication with Lit nodes +- Default authentication callback using `checkAndSignAuthMessage` +- Cross-platform support (browser and Node.js) +- Network connection management +- Secure node communication +- Automatic request handling and retries + +## Authentication + +The client automatically sets up authentication using the `checkAndSignAuthMessage` function from the auth-browser submodule. This provides a secure and consistent way to interact with Lit nodes across different environments. diff --git a/packages/types/README.md b/packages/types/README.md index 0d8237767..c783752fd 100644 --- a/packages/types/README.md +++ b/packages/types/README.md @@ -1,9 +1,43 @@ # Types -This submodule exports various interfaces & types related to Lit Protocol. eg. access control conditions, chain properties, JSON requests, auth statuses, wallet provider options, etc. +This package provides comprehensive TypeScript type definitions for the entire Lit Protocol ecosystem. It exports interfaces and types that ensure type safety and provide excellent IDE support across all Lit Protocol packages. -# Getting Started +## Installation -``` +```bash yarn add @lit-protocol/types ``` + +## Quick Start + +```typescript +import { + AccessControlConditions, + ChainProperties, + AuthStatus, + WalletProvider +} from '@lit-protocol/types'; + +// Use types in your code +const conditions: AccessControlConditions = { + // ... your conditions +}; +``` + +## Available Types + +- Access Control Conditions: Define access rules +- Chain Properties: Blockchain-specific configurations +- JSON Request/Response: Network communication types +- Authentication: Auth status and provider types +- Wallet Providers: Supported wallet options +- Node Configuration: Lit node setup types +- Protocol Interfaces: Core protocol definitions + +## Benefits + +- Full TypeScript support +- Enhanced code completion +- Compile-time type checking +- Better development experience +- Consistent type definitions across packages From dd4a81833570c3fab6362903e695524fbc376d95 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 19:28:49 +0000 Subject: [PATCH 10/27] docs: update auth package READMEs with improved descriptions Co-Authored-By: anson@litprotocol.com --- packages/access-control-conditions/README.md | 38 +++++++++++++++++-- packages/auth-browser/README.md | 38 +++++++++++++++---- packages/auth-helpers/README.md | 40 ++++++++++++++++++-- 3 files changed, 100 insertions(+), 16 deletions(-) diff --git a/packages/access-control-conditions/README.md b/packages/access-control-conditions/README.md index 0a207960e..af3d8aff2 100644 --- a/packages/access-control-conditions/README.md +++ b/packages/access-control-conditions/README.md @@ -1,9 +1,39 @@ -# Quick Start +# Access Control Conditions -This submodule provides functionalities for formatting and canonicalizing data, validating and creating digital signatures, and hashing various types of conditions and identifiers in a deterministic way to ensure data integrity and security within the LIT protocol. +A comprehensive toolkit for managing access control conditions within the Lit Protocol ecosystem. This package provides functionalities for formatting, validating, and securing access control rules. -### node.js / browser +## Installation -``` +```bash yarn add @lit-protocol/access-control-conditions ``` + +## Quick Start + +```typescript +import { + validateAccessControlConditions, + hashAccessControlConditions +} from '@lit-protocol/access-control-conditions'; + +// Validate conditions +const isValid = await validateAccessControlConditions(conditions); + +// Hash conditions for verification +const hash = await hashAccessControlConditions(conditions); +``` + +## Key Features + +- Data formatting and canonicalization +- Digital signature validation and creation +- Deterministic condition hashing +- Access control rule validation +- Secure identifier management + +## Core Operations + +- Condition Validation: Verify access control rules +- Hash Generation: Create deterministic hashes +- Signature Management: Handle digital signatures +- Data Canonicalization: Ensure consistent formats diff --git a/packages/auth-browser/README.md b/packages/auth-browser/README.md index 4daea68c8..527d2f3a8 100644 --- a/packages/auth-browser/README.md +++ b/packages/auth-browser/README.md @@ -1,18 +1,40 @@ -# Quick Start +# Auth Browser -This submodule provides functionalities from various modules within the Lit SDK, enabling users to authenticate in the browser and connect to different blockchain networks (Ethereum, Cosmos, and Solana) with convenience, while also providing a function to disconnect from the Ethereum network. +Browser-specific authentication utilities for the Lit Protocol, enabling seamless connection to various blockchain networks including Ethereum, Cosmos, and Solana. -### node.js / browser +## Installation -``` +```bash yarn add @lit-protocol/auth-browser ``` -## Generate an authSig with long expiration +## Quick Start + +```typescript +import { checkAndSignAuthMessage } from '@lit-protocol/auth-browser'; +// Generate an authSig with long expiration +const expiration = new Date(Date.now() + 1000 * 60 * 60 * 24 * 30).toISOString(); +const authSig = await checkAndSignAuthMessage({ + chain: 'ethereum', + expiration: expiration +}); ``` -const expiration = new Date(Date.now() + 1000 * 60 * 60 * 99999).toISOString(); -const authSig = LitJsSdk_authBrowser.checkAndSignAuthMessage({chain: 'ethereum', expiration: expiration}); +## Key Features -``` +- Multi-chain authentication support + - Ethereum + - Cosmos + - Solana +- Convenient network connection management +- Automatic signature generation +- Flexible expiration handling +- Network disconnection utilities + +## Authentication Methods + +- Standard Authentication: Quick connect with default settings +- Custom Expiration: Control signature validity period +- Multi-Chain Support: Connect to different networks +- Network Management: Connect and disconnect as needed diff --git a/packages/auth-helpers/README.md b/packages/auth-helpers/README.md index 440c2d3e2..4458d7504 100644 --- a/packages/auth-helpers/README.md +++ b/packages/auth-helpers/README.md @@ -1,9 +1,41 @@ -# Quick Start +# Auth Helpers -This submodule manages permissions and capabilities related to accessing specific resources on the blockchain. It utilizes features from the 'siwe' and 'siwe-recap' libraries to verify and handle data, allowing users to encode and decode session capabilities, add proofs and attenuations (specific resource permissions), and verify whether certain capabilities for a resource are supported. It also provides the ability to add capabilities to 'siwe' messages and provides methods specifically tailored to the LIT protocol, enabling adding and verifying capabilities for specific LIT resources. +Advanced authentication utilities for managing blockchain resource permissions and capabilities within the Lit Protocol ecosystem. Built on top of SIWE (Sign-In with Ethereum) and SIWE-RECAP for robust authentication flows. -### node.js / browser +## Installation -``` +```bash yarn add @lit-protocol/auth-helpers ``` + +## Quick Start + +```typescript +import { + encodeSessionCapabilities, + verifyCapabilities +} from '@lit-protocol/auth-helpers'; + +// Encode session capabilities +const encoded = await encodeSessionCapabilities(capabilities); + +// Verify resource capabilities +const isValid = await verifyCapabilities(resource, capabilities); +``` + +## Key Features + +- Session capability management +- SIWE integration and extensions +- Resource permission handling +- Proof and attestation support +- Custom capability verification +- Lit Protocol-specific methods + +## Core Functionality + +- Capability Encoding/Decoding: Manage session permissions +- Resource Verification: Check access rights +- SIWE Message Enhancement: Add capability information +- Permission Management: Handle resource access +- Proof System: Manage attestations and verifications From 14b4c41de108ea0eed3f9535ecea09f4b8ebc88b Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 19:32:31 +0000 Subject: [PATCH 11/27] docs: update PKP package READMEs with improved documentation Co-Authored-By: anson@litprotocol.com --- packages/pkp-base/README.md | 67 +++++++++++++++++++++------- packages/pkp-cosmos/README.md | 58 ++++++++++++++++++++++-- packages/pkp-ethers/README.md | 62 +++++++++++++++++++++---- packages/pkp-walletconnect/README.md | 62 ++++++++++++++++++++----- 4 files changed, 208 insertions(+), 41 deletions(-) diff --git a/packages/pkp-base/README.md b/packages/pkp-base/README.md index 3580e7709..0f511a523 100644 --- a/packages/pkp-base/README.md +++ b/packages/pkp-base/README.md @@ -1,22 +1,55 @@ -# Quick Start +# PKP Base -This submodule defines a PKPBase class, providing shared wallet functionality for PKP signers, responsible for managing public key compression, initializing and connecting to the LIT node, running LIT actions, and offering debug functions for logging and error handling. +A foundational package providing shared wallet functionality for PKP (Programmable Key Pair) signers in the Lit Protocol ecosystem. This package manages public key operations, LIT node connections, and action execution. -| Method/Property | Description | -| -------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `compressPubKey(pubKey: string)` | Compresses a provided public key | -| `setUncompressPubKeyAndBuffer(prop: PKPBaseProp)` | Sets the uncompressed public key and its buffer representation | -| `setCompressedPubKeyAndBuffer(prop: PKPBaseProp)` | Sets the compressed public key and its buffer representation | -| `setLitAction(prop: PKPBaseProp)` | Sets the Lit action to be executed by the LitNode client | -| `setLitActionJsParams(params: CustomType)` | Sets the value of the `litActionJsParams` property to the given params object | -| `createAndSetSessionSigs(sessionParams: GetSessionSigsProps)` | Creates and sets the session sigs and their expiration | -| `init()` | Initializes the PKPBase instance by connecting to the LIT node | -| `runLitAction(toSign: Uint8Array, sigName: string)` | Runs the specified Lit action with the given parameters | -| `ensureLitNodeClientReady()` | Ensures that the LitNode client is ready for use | -| `log(...args: any[])` | Logs the provided arguments to the console, but only if debugging is enabled | +## Installation -### node.js / browser - -``` +```bash yarn add @lit-protocol/pkp-base ``` + +## Quick Start + +```typescript +import { PKPBase } from '@lit-protocol/pkp-base'; + +// Initialize PKP Base +const pkpBase = new PKPBase({ + controllerAuthSig: authSig, + pkpPubKey: publicKey, +}); + +// Connect to LIT node +await pkpBase.init(); + +// Run LIT action +const signature = await pkpBase.runLitAction(dataToSign, 'sign'); +``` + +## Key Features + +- Public key compression and management +- LIT node connection handling +- Session signature management +- LIT action execution +- Debug logging capabilities + +## Core Methods + +| Method | Description | +| ------ | ----------- | +| `init()` | Initialize and connect to LIT node | +| `compressPubKey()` | Compress public keys | +| `runLitAction()` | Execute LIT actions | +| `createAndSetSessionSigs()` | Manage session signatures | +| `ensureLitNodeClientReady()` | Verify node connection | + +## Development + +### Building + +Run `nx build pkp-base` to build the library. + +### Testing + +Run `nx test pkp-base` to execute the unit tests. diff --git a/packages/pkp-cosmos/README.md b/packages/pkp-cosmos/README.md index 095f23e0e..c2db97f4e 100644 --- a/packages/pkp-cosmos/README.md +++ b/packages/pkp-cosmos/README.md @@ -1,9 +1,59 @@ -# PKPCosmos +# PKP Cosmos -The `PKPCosmosWallet` class is a specialized wallet for the Cosmos blockchain, based on the `DirectSecp256k1HdWallet` class from the `@cosmjs/proto-signing` library. This class implements the `OfflineDirectSigner` and `PKPClientHelpers` interfaces. The wallet can generate its own Bech32 address (address), manage account data (`getAccounts`), and sign transactions (`signDirect`) with the private key using a LIT node client. It can also create a SigningStargateClient instance (`getClient`), prepare transaction data (formSendTx), and sign a transaction following the SigningStargateClient.sign method (`sign`). The class supports the customization of the Cosmos RPC URL (`rpc`) and the Bech32 address prefix (`addressPrefix`). +A specialized wallet implementation for the Cosmos blockchain ecosystem using Lit Protocol's PKP (Programmable Key Pair) technology. Built on top of `@cosmjs/proto-signing`, this package enables secure transaction signing and account management through Lit nodes. -# Getting Started +## Installation -``` +```bash yarn add @lit-protocol/pkp-cosmos ``` + +## Quick Start + +```typescript +import { PKPCosmosWallet } from '@lit-protocol/pkp-cosmos'; + +// Initialize wallet +const wallet = new PKPCosmosWallet({ + controllerAuthSig: authSig, + pkpPubKey: publicKey, + addressPrefix: 'cosmos', +}); + +// Get wallet address +const address = await wallet.getAddress(); + +// Sign transaction +const signedTx = await wallet.signDirect(address, { + bodyBytes: tx.bodyBytes, + authInfoBytes: tx.authInfoBytes, + chainId: chainId, +}); +``` + +## Key Features + +- Bech32 address generation +- Account data management +- Transaction signing via LIT nodes +- SigningStargateClient integration +- Customizable RPC endpoints +- Flexible address prefix support + +## Core Functionality + +- Address Generation: Create Cosmos blockchain addresses +- Transaction Management: Sign and prepare transactions +- Client Integration: Create SigningStargateClient instances +- Account Operations: Manage account data and balances +- Network Configuration: Customize RPC URLs and prefixes + +## Development + +### Building + +Run `nx build pkp-cosmos` to build the library. + +### Testing + +Run `nx test pkp-cosmos` to execute the unit tests. diff --git a/packages/pkp-ethers/README.md b/packages/pkp-ethers/README.md index 514974194..f2141f354 100644 --- a/packages/pkp-ethers/README.md +++ b/packages/pkp-ethers/README.md @@ -1,14 +1,60 @@ -# Getting started +# PKP Ethers -This module presents a modified version of `new ethers.Wallet()`, known as `PKPEthersWallet`. Unlike its counterpart, `PKPEthersWallet` does not store private keys nor does it support the creation of random wallets. +A specialized Ethereum wallet implementation using Lit Protocol's PKP (Programmable Key Pair) technology, built as an extension of ethers.js Wallet. This package provides secure transaction signing and account management through Lit nodes without storing private keys locally. -Despite these differences, it retains the ability to sign and send transactions, process JSON requests, retrieve balance and transaction count, among other functionalities, just like a standard ethers.js Wallet instance. +## Installation -API: https://docs.ethers.org/v4/api-wallet.html - -``` +```bash yarn add @lit-protocol/pkp-ethers ethers ``` -More info here: -https://github.com/LIT-Protocol/pkp-ethers/tree/master/packages/wallet +## Quick Start + +```typescript +import { PKPEthersWallet } from '@lit-protocol/pkp-ethers'; + +// Initialize wallet +const wallet = new PKPEthersWallet({ + controllerAuthSig: authSig, + pkpPubKey: publicKey, +}); + +// Get wallet address +const address = await wallet.getAddress(); + +// Sign transaction +const signedTx = await wallet.signTransaction({ + to: recipient, + value: ethers.utils.parseEther("0.1"), +}); +``` + +## Key Features + +- Secure transaction signing via LIT nodes +- Full ethers.js Wallet compatibility +- JSON-RPC request handling +- Balance and nonce management +- Gas estimation support +- Message signing capabilities + +## Core Functionality + +- Transaction Management: Sign and send transactions +- Account Operations: Get balances and transaction counts +- Message Signing: Sign messages and typed data +- Network Integration: Connect to any EVM network +- Gas Handling: Estimate and manage gas costs + +For detailed API documentation, visit: +https://docs.ethers.org/v4/api-wallet.html + +## Development + +### Building + +Run `nx build pkp-ethers` to build the library. + +### Testing + +Run `nx test pkp-ethers` to execute the unit tests. diff --git a/packages/pkp-walletconnect/README.md b/packages/pkp-walletconnect/README.md index b752371d8..3f333b965 100644 --- a/packages/pkp-walletconnect/README.md +++ b/packages/pkp-walletconnect/README.md @@ -1,27 +1,65 @@ -# pkp-walletconnect +# PKP WalletConnect -`pkp-walletconnect` wraps [`@walletconnect/web3wallet`](https://docs.walletconnect.com/2.0/web/web3wallet/wallet-usage) to provide base functionality needed to pair PKPs to dApps, approve and reject session proposals, and respond to session requests. This library is intended to be used with `pkp-client`. +A WalletConnect integration for Lit Protocol's PKP (Programmable Key Pair) system, enabling secure dApp connections and session management. This package wraps WalletConnect's Web3Wallet to provide seamless PKP integration with decentralized applications. -## 📜 API Reference +## Installation -Check out the [API reference](https://docs.lit-js-sdk-v2.litprotocol.com/modules/pkp_walletconnect_src.html). +```bash +yarn add @lit-protocol/pkp-walletconnect +``` -## 📦 Installation +## Quick Start -Get started by installing the package: +```typescript +import { PKPWalletConnect } from '@lit-protocol/pkp-walletconnect'; -```bash -yarn add @lit-protocol/pkp-walletconnect +// Initialize WalletConnect client +const client = new PKPWalletConnect({ + projectId: 'your-project-id', + metadata: { + name: 'Your App', + description: 'Your app description', + url: 'https://your-app.com', + icons: ['https://your-app.com/icon.png'] + } +}); + +// Handle session proposals +client.on('session_proposal', async (proposal) => { + const approved = await client.approveSession(proposal); +}); + +// Handle session requests +client.on('session_request', async (request) => { + const response = await client.respondToRequest(request); +}); ``` -## 🙌 Contributing +## Key Features + +- WalletConnect v2.0 integration +- dApp pairing management +- Session proposal handling +- Request/response management +- Multi-chain support +- Event handling system + +## Core Functionality + +- Session Management: Handle dApp connections +- Request Processing: Respond to session requests +- Pairing: Manage PKP-dApp pairings +- Event Handling: Subscribe to WalletConnect events +- Chain Configuration: Support multiple blockchains + +For detailed API documentation, visit the [API reference](https://docs.lit-js-sdk-v2.litprotocol.com/modules/pkp_walletconnect_src.html). -This library was generated with [Nx](https://nx.dev). +## Development ### Building Run `nx build pkp-walletconnect` to build the library. -### Running unit tests +### Testing -Run `nx test pkp-walletconnect` to execute the unit tests via [Jest](https://jestjs.io). +Run `nx test pkp-walletconnect` to execute the unit tests. From 873aacf296ca42a358fd3a5eb95e9b6b4091109e Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 19:38:12 +0000 Subject: [PATCH 12/27] docs: improve package descriptions and standardize README formatting - Add comprehensive package descriptions - Standardize README structure across packages - Add installation and quick start sections - Include key features and core functionality - Fix formatting issues from linter - Update root README with core systems overview Co-Authored-By: anson@litprotocol.com --- README.md | 22 ++++++++++++++++++++ packages/access-control-conditions/README.md | 4 ++-- packages/auth-browser/README.md | 6 ++++-- packages/auth-helpers/README.md | 4 ++-- packages/crypto/README.md | 5 +---- packages/lit-auth-client/README.md | 2 +- packages/pkp-base/README.md | 14 ++++++------- packages/pkp-ethers/README.md | 2 +- packages/pkp-walletconnect/README.md | 4 ++-- packages/types/README.md | 4 ++-- 10 files changed, 44 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 147bb24a8..45a4bd3c2 100644 --- a/README.md +++ b/README.md @@ -343,6 +343,28 @@ yarn graph ![](https://i.ibb.co/2dLyMTW/Screenshot-2022-11-15-at-15-18-46.png) +# Core Systems and Services + +The Lit Protocol SDK provides the following core systems: + +- Cryptographic key management (PKP - Public Key Protocol) +- Blockchain wallet interactions (Ethereum, Solana, Cosmos) +- Decentralized authentication and authorization +- Distributed computing and signing +- Smart contract management +- Access control and encryption services + +# Main Functions and Classes + +Key components available across packages: + +- `PKPEthersWallet`: Ethereum wallet management for PKP +- `LitNodeClient`: Network interaction client +- `executeJs()`: Decentralized JavaScript execution +- `signMessageWithEncryptedKey()`: Cryptographic signing +- `generatePrivateKey()`: Key generation utilities +- `TinnyEnvironment`: Testing environment setup + # FAQs & Common Errors
diff --git a/packages/access-control-conditions/README.md b/packages/access-control-conditions/README.md index af3d8aff2..b1b5047d8 100644 --- a/packages/access-control-conditions/README.md +++ b/packages/access-control-conditions/README.md @@ -11,9 +11,9 @@ yarn add @lit-protocol/access-control-conditions ## Quick Start ```typescript -import { +import { validateAccessControlConditions, - hashAccessControlConditions + hashAccessControlConditions, } from '@lit-protocol/access-control-conditions'; // Validate conditions diff --git a/packages/auth-browser/README.md b/packages/auth-browser/README.md index 527d2f3a8..4f0e39be1 100644 --- a/packages/auth-browser/README.md +++ b/packages/auth-browser/README.md @@ -14,10 +14,12 @@ yarn add @lit-protocol/auth-browser import { checkAndSignAuthMessage } from '@lit-protocol/auth-browser'; // Generate an authSig with long expiration -const expiration = new Date(Date.now() + 1000 * 60 * 60 * 24 * 30).toISOString(); +const expiration = new Date( + Date.now() + 1000 * 60 * 60 * 24 * 30 +).toISOString(); const authSig = await checkAndSignAuthMessage({ chain: 'ethereum', - expiration: expiration + expiration: expiration, }); ``` diff --git a/packages/auth-helpers/README.md b/packages/auth-helpers/README.md index 4458d7504..3c4a633a1 100644 --- a/packages/auth-helpers/README.md +++ b/packages/auth-helpers/README.md @@ -11,9 +11,9 @@ yarn add @lit-protocol/auth-helpers ## Quick Start ```typescript -import { +import { encodeSessionCapabilities, - verifyCapabilities + verifyCapabilities, } from '@lit-protocol/auth-helpers'; // Encode session capabilities diff --git a/packages/crypto/README.md b/packages/crypto/README.md index d1c4efa2d..c2d05f9e0 100644 --- a/packages/crypto/README.md +++ b/packages/crypto/README.md @@ -11,10 +11,7 @@ yarn add @lit-protocol/crypto ## Quick Start ```typescript -import { - generatePrivateKey, - encryptWithSignature -} from '@lit-protocol/crypto'; +import { generatePrivateKey, encryptWithSignature } from '@lit-protocol/crypto'; // Generate a new private key const privateKey = await generatePrivateKey(); diff --git a/packages/lit-auth-client/README.md b/packages/lit-auth-client/README.md index 161bd8f64..6a6502c93 100644 --- a/packages/lit-auth-client/README.md +++ b/packages/lit-auth-client/README.md @@ -15,7 +15,7 @@ import { LitAuthClient } from '@lit-protocol/lit-auth-client'; // Initialize the auth client const client = new LitAuthClient({ - redirectUri: 'https://your-app.com/callback' + redirectUri: 'https://your-app.com/callback', }); // Handle social login diff --git a/packages/pkp-base/README.md b/packages/pkp-base/README.md index 0f511a523..2ac289f4f 100644 --- a/packages/pkp-base/README.md +++ b/packages/pkp-base/README.md @@ -36,13 +36,13 @@ const signature = await pkpBase.runLitAction(dataToSign, 'sign'); ## Core Methods -| Method | Description | -| ------ | ----------- | -| `init()` | Initialize and connect to LIT node | -| `compressPubKey()` | Compress public keys | -| `runLitAction()` | Execute LIT actions | -| `createAndSetSessionSigs()` | Manage session signatures | -| `ensureLitNodeClientReady()` | Verify node connection | +| Method | Description | +| ---------------------------- | ---------------------------------- | +| `init()` | Initialize and connect to LIT node | +| `compressPubKey()` | Compress public keys | +| `runLitAction()` | Execute LIT actions | +| `createAndSetSessionSigs()` | Manage session signatures | +| `ensureLitNodeClientReady()` | Verify node connection | ## Development diff --git a/packages/pkp-ethers/README.md b/packages/pkp-ethers/README.md index f2141f354..0f513ea6b 100644 --- a/packages/pkp-ethers/README.md +++ b/packages/pkp-ethers/README.md @@ -25,7 +25,7 @@ const address = await wallet.getAddress(); // Sign transaction const signedTx = await wallet.signTransaction({ to: recipient, - value: ethers.utils.parseEther("0.1"), + value: ethers.utils.parseEther('0.1'), }); ``` diff --git a/packages/pkp-walletconnect/README.md b/packages/pkp-walletconnect/README.md index 3f333b965..ff0fb46fa 100644 --- a/packages/pkp-walletconnect/README.md +++ b/packages/pkp-walletconnect/README.md @@ -20,8 +20,8 @@ const client = new PKPWalletConnect({ name: 'Your App', description: 'Your app description', url: 'https://your-app.com', - icons: ['https://your-app.com/icon.png'] - } + icons: ['https://your-app.com/icon.png'], + }, }); // Handle session proposals diff --git a/packages/types/README.md b/packages/types/README.md index c783752fd..3af9e2ad2 100644 --- a/packages/types/README.md +++ b/packages/types/README.md @@ -11,11 +11,11 @@ yarn add @lit-protocol/types ## Quick Start ```typescript -import { +import { AccessControlConditions, ChainProperties, AuthStatus, - WalletProvider + WalletProvider, } from '@lit-protocol/types'; // Use types in your code From 19054affae267a6cad55bd106016c09e9e345663 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 21:38:55 +0000 Subject: [PATCH 13/27] docs: improve root README.md organization and clarity - Remove outdated sections (react demo, package deletion, graph dependencies) - Enhance documentation structure and readability - Improve section headings and descriptions - Add detailed tables for environment variables - Restructure error handling and troubleshooting guides Co-Authored-By: anson@litprotocol.com --- README.md | 239 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 125 insertions(+), 114 deletions(-) diff --git a/README.md b/README.md index 45a4bd3c2..d0964309a 100644 --- a/README.md +++ b/README.md @@ -98,35 +98,37 @@ If you're a tech-savvy user and wish to utilize only specific submodules that ou # Contributing and developing to this SDK -## Prerequisite +## Prerequisites -- node (v19.x or above) -- rust (v1.70.00 or above) -- [wasm-pack](https://github.com/rustwasm/wasm-pack) +Before you begin, ensure you have the following installed: -## Recommended +- Node.js v19.0.0 or later +- Rust v1.70.0 or later +- [wasm-pack](https://github.com/rustwasm/wasm-pack) for WebAssembly compilation -- NX Console: https://nx.dev/core-features/integrate-with-editors +## Development Tools -# Quick Start +Recommended for better development experience: +- [NX Console](https://nx.dev/core-features/integrate-with-editors) - Visual Studio Code extension for NX workspace management -The following commands will help you start developing with this repository. +# Quick Start -First, install the dependencies via yarn: +To start developing with this repository: +1. Install dependencies: ``` yarn ``` ## Building -You can build the project with the following commands: +Build the project using one of these commands: ``` -// for local development - It stripped away operations that don't matter for local dev +// For local development (optimized, excludes production-only operations) yarn build:dev -// you should never need to use yarn build unless you want to test or publish it +// For testing and publishing (full build with all operations) yarn build ``` @@ -148,21 +150,7 @@ yarn test:local `nx generate @nx/js:library` -## Create a new react demo app using the Lit JS SDK - -```sh -yarn tools --create --react contracts-sdk --demo -``` -## Deleting a package or app - -``` -// delete an app from ./app/ -yarn delete:app - -// delete a package from ./packages/ -yarn delete:package -``` ## Building @@ -210,124 +198,146 @@ Having done this setup, this is what the development cycle looks like moving for 2. Rebuild specific package 3. Rebuild client application. -### Building changes to Rust source - -If changes are made to `packages/wasm` see [here](./packages/wasm/README.md) for info on building from source. - -## Publishing +### Building Rust Components -You must have at least nodejs v18 to do this. +For changes to WebAssembly components in `packages/wasm`, refer to the [WebAssembly build guide](./packages/wasm/README.md). -1. Install the latest packages with `yarn install` +## Publishing New Versions -2. Run `yarn bump` to bump the version +Prerequisites: +- Node.js v18.0.0 or later -3. Build all the packages with `yarn build` +Publishing steps: +1. Update dependencies: `yarn install` +2. Increment version: `yarn bump` +3. Build packages: `yarn build` +4. Run tests: + - Unit tests: `yarn test:unit` + - E2E tests: `yarn test:local` +5. Generate documentation: `yarn gen:docs --push` +6. Publish packages: `yarn publish:packages` +7. Commit with message: "Published version X.X.X" -4. Run the unit tests with `yarn test:unit` & e2e node tests `yarn test:local` locally & ensure that they pass +## Testing Guide -5. Update the docs with `yarn gen:docs --push` +### Available Test Commands -6. Finally, publish with `yarn publish:packages` +| Command | Description | +|---------|-------------| +| `yarn test:unit` | Run unit tests for all packages | +| `yarn test:local` | Launch E2E tests with Cypress and serve React test app | -7. Commit these changes "Published version X.X.X" - -## Testing - -### Quick Start on E2E Testing - -The following will serve the react testing app and launch the cypress e2e testing after - -```sh -yarn test:local -``` - -### Unit Tests - -```sh -yarn test:unit -``` +### Running Tests +1. Unit Tests: + ```sh + yarn test:unit + ``` -## Testing with a Local Lit Node +2. End-to-End Tests: + ```sh + yarn test:local + ``` + This command: + - Starts the React testing application + - Launches Cypress test runner + - Executes E2E test suites -First, deploy your Lit Node Contracts, since the correct addresses will be pulled from the `../lit-assets/blockchain/contracts/deployed-lit-node-contracts-temp.json` file. +## Local Development with Lit Node -Set these two env vars: +### Setup Local Environment +1. Deploy Lit Node Contracts (addresses will be read from `../lit-assets/blockchain/contracts/deployed-lit-node-contracts-temp.json`) +2. Configure environment variables: ```sh +# Enable local node development export LIT_JS_SDK_LOCAL_NODE_DEV="true" -export LIT_JS_SDK_FUNDED_WALLET_PRIVATE_KEY="putAFundedPrivateKeyOnChronicleHere" -``` -Run: +# Set funded wallet for Chronicle testnet +export LIT_JS_SDK_FUNDED_WALLET_PRIVATE_KEY="your-funded-private-key" +``` +3. Update and build contracts: ```sh +# Fetch and generate contract updates yarn update:contracts-sdk --fetch yarn update:contracts-sdk --gen + +# Build all packages yarn build:packages ``` -To run manual tests: - +4. Start local development server: ```sh - yarn nx run nodejs:serve +yarn nx run nodejs:serve ``` -## ENV Vars +## Environment Variables -- LIT_JS_SDK_GITHUB_ACCESS_TOKEN - a github access token to get the contract ABIs from a private repo -- LIT_JS_SDK_LOCAL_NODE_DEV - set to true to use a local node -- LIT_JS_SDK_FUNDED_WALLET_PRIVATE_KEY - set to a funded wallet on Chronicle Testnet +| Variable | Description | Usage | +|----------|-------------|--------| +| `LIT_JS_SDK_GITHUB_ACCESS_TOKEN` | GitHub access token | Required for accessing contract ABIs from private repository | +| `LIT_JS_SDK_LOCAL_NODE_DEV` | Local node development flag | Set to `true` to use a local Lit node | +| `LIT_JS_SDK_FUNDED_WALLET_PRIVATE_KEY` | Funded wallet private key | Required for Chronicle Testnet transactions | -# Error Handling +# Error Handling Guide -This SDK uses custom error classes derived from [@openagenda/verror](https://github.com/OpenAgenda/verror) to handle errors between packages and to the SDK consumers. -Normal error handling is also supported as VError extends the native Error class, but using VError allows for better error composition and information propagation. -You can check their documentation for the extra fields that are added to the error object and methods on how to handle them in a safe way. +## Overview +The SDK implements a robust error handling system using [@openagenda/verror](https://github.com/OpenAgenda/verror). This system provides: +- Detailed error information with cause tracking +- Error composition and chaining +- Additional context through metadata +- Compatibility with native JavaScript Error handling -## Example +## Using Error Handling +### Basic Example ```ts import { VError } from '@openagenda/verror'; import { LitNodeClientBadConfigError } from '@lit-protocol/constants'; try { + // Simulate an error condition const someNativeError = new Error('some native error'); + // Throw a Lit-specific error with context throw new LitNodeClientBadConfigError( { cause: someNativeError, - info: { - foo: 'bar', - }, - meta: { - baz: 'qux', - }, + info: { foo: 'bar' }, + meta: { baz: 'qux' }, }, 'some useful message' ); } catch (e) { - console.log(e.name); // LitNodeClientBadConfigError - console.log(e.message); // some useful message: some native error - console.log(e.info); // { foo: 'bar' } - console.log(e.baz); // qux - // VError.cause(e) is someNativeError - // VError.info(e) is { foo: 'bar' } - // VError.meta(e) is { baz: 'qux', code: 'lit_node_client_bad_config_error', kind: 'Config' } - // Verror.fullStack(e) is the full stack trace composed of the error chain including the causes + // Access error details + console.log(e.name); // LitNodeClientBadConfigError + console.log(e.message); // some useful message: some native error + console.log(e.info); // { foo: 'bar' } + console.log(e.baz); // qux + + // Additional error information + // - VError.cause(e): Original error (someNativeError) + // - VError.info(e): Additional context ({ foo: 'bar' }) + // - VError.meta(e): Metadata ({ baz: 'qux', code: 'lit_node_client_bad_config_error', kind: 'Config' }) + // - VError.fullStack(e): Complete error chain stack trace } ``` -## Creating a new error - -In file `packages/constants/src/lib/errors.ts` you can find the list of errors that are currently supported and add new ones if needed. +## Creating Custom Errors -To create and use a new error, you need to: +To add new error types: -1. Add the error information to the `LIT_ERROR` object in `packages/constants/src/lib/errors.ts` -2. Export the error from the `errors.ts` file at the end of the file -3. Import the error where you need it -4. Throw the error in your code adding all the information a user might need to know about the error such as the cause, the info, etc. +1. Locate `packages/constants/src/lib/errors.ts` +2. Add your error definition to the `LIT_ERROR` object +3. Export the new error class +4. Import and use in your code with relevant context: + ```ts + throw new YourCustomError({ + cause: originalError, + info: { /* context */ }, + meta: { /* metadata */ } + }, "Error message"); + ``` # Dockerfile @@ -335,13 +345,7 @@ To create and use a new error, you need to: ## Other Commands -### Interactive graph dependencies using NX -``` -yarn graph -``` - -![](https://i.ibb.co/2dLyMTW/Screenshot-2022-11-15-at-15-18-46.png) # Core Systems and Services @@ -365,37 +369,44 @@ Key components available across packages: - `generatePrivateKey()`: Key generation utilities - `TinnyEnvironment`: Testing environment setup -# FAQs & Common Errors - -
-(React) Failed to parse source map from +# Troubleshooting Guide -In your React package.json, add `GENERATE_SOURCEMAP=false` to your start script +## Common Issues and Solutions -eg. +### React Source Map Error +**Problem:** "Failed to parse source map from" error in React -``` +**Solution:** +Disable source map generation in your React `package.json`: +```json +{ "scripts": { "start": "GENERATE_SOURCEMAP=false react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" - }, + } +} ``` -
- -
-Reference Error: crypto is not defined +### Crypto API Error +**Problem:** "Reference Error: crypto is not defined" +**Solution:** +Add the following polyfill for environments without native crypto: ```js import crypto, { createHash } from 'crypto'; + +// Add crypto to global scope Object.defineProperty(globalThis, 'crypto', { value: { + // Implement getRandomValues getRandomValues: (arr: any) => crypto.randomBytes(arr.length), + + // Implement subtle crypto subtle: { digest: (algorithm: string, data: Uint8Array) => { - return new Promise((resolve, reject) => + return new Promise((resolve) => resolve( createHash(algorithm.toLowerCase().replace('-', '')) .update(data) From 5884685ffd907668a857278f3677615e5edf1930 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 21:46:53 +0000 Subject: [PATCH 14/27] docs: fix formatting issues in README.md Co-Authored-By: anson@litprotocol.com --- README.md | 68 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index d0964309a..6ce0dd865 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,7 @@ Before you begin, ensure you have the following installed: ## Development Tools Recommended for better development experience: + - [NX Console](https://nx.dev/core-features/integrate-with-editors) - Visual Studio Code extension for NX workspace management # Quick Start @@ -116,6 +117,7 @@ Recommended for better development experience: To start developing with this repository: 1. Install dependencies: + ``` yarn ``` @@ -150,8 +152,6 @@ yarn test:local `nx generate @nx/js:library` - - ## Building ```sh @@ -205,9 +205,11 @@ For changes to WebAssembly components in `packages/wasm`, refer to the [WebAssem ## Publishing New Versions Prerequisites: + - Node.js v18.0.0 or later Publishing steps: + 1. Update dependencies: `yarn install` 2. Increment version: `yarn bump` 3. Build packages: `yarn build` @@ -222,13 +224,15 @@ Publishing steps: ### Available Test Commands -| Command | Description | -|---------|-------------| -| `yarn test:unit` | Run unit tests for all packages | +| Command | Description | +| ----------------- | ------------------------------------------------------ | +| `yarn test:unit` | Run unit tests for all packages | | `yarn test:local` | Launch E2E tests with Cypress and serve React test app | ### Running Tests + 1. Unit Tests: + ```sh yarn test:unit ``` @@ -245,9 +249,11 @@ Publishing steps: ## Local Development with Lit Node ### Setup Local Environment + 1. Deploy Lit Node Contracts (addresses will be read from `../lit-assets/blockchain/contracts/deployed-lit-node-contracts-temp.json`) 2. Configure environment variables: + ```sh # Enable local node development export LIT_JS_SDK_LOCAL_NODE_DEV="true" @@ -257,6 +263,7 @@ export LIT_JS_SDK_FUNDED_WALLET_PRIVATE_KEY="your-funded-private-key" ``` 3. Update and build contracts: + ```sh # Fetch and generate contract updates yarn update:contracts-sdk --fetch @@ -267,22 +274,25 @@ yarn build:packages ``` 4. Start local development server: + ```sh yarn nx run nodejs:serve ``` ## Environment Variables -| Variable | Description | Usage | -|----------|-------------|--------| -| `LIT_JS_SDK_GITHUB_ACCESS_TOKEN` | GitHub access token | Required for accessing contract ABIs from private repository | -| `LIT_JS_SDK_LOCAL_NODE_DEV` | Local node development flag | Set to `true` to use a local Lit node | -| `LIT_JS_SDK_FUNDED_WALLET_PRIVATE_KEY` | Funded wallet private key | Required for Chronicle Testnet transactions | +| Variable | Description | Usage | +| -------------------------------------- | --------------------------- | ------------------------------------------------------------ | +| `LIT_JS_SDK_GITHUB_ACCESS_TOKEN` | GitHub access token | Required for accessing contract ABIs from private repository | +| `LIT_JS_SDK_LOCAL_NODE_DEV` | Local node development flag | Set to `true` to use a local Lit node | +| `LIT_JS_SDK_FUNDED_WALLET_PRIVATE_KEY` | Funded wallet private key | Required for Chronicle Testnet transactions | # Error Handling Guide ## Overview + The SDK implements a robust error handling system using [@openagenda/verror](https://github.com/OpenAgenda/verror). This system provides: + - Detailed error information with cause tracking - Error composition and chaining - Additional context through metadata @@ -291,6 +301,7 @@ The SDK implements a robust error handling system using [@openagenda/verror](htt ## Using Error Handling ### Basic Example + ```ts import { VError } from '@openagenda/verror'; import { LitNodeClientBadConfigError } from '@lit-protocol/constants'; @@ -310,10 +321,10 @@ try { ); } catch (e) { // Access error details - console.log(e.name); // LitNodeClientBadConfigError - console.log(e.message); // some useful message: some native error - console.log(e.info); // { foo: 'bar' } - console.log(e.baz); // qux + console.log(e.name); // LitNodeClientBadConfigError + console.log(e.message); // some useful message: some native error + console.log(e.info); // { foo: 'bar' } + console.log(e.baz); // qux // Additional error information // - VError.cause(e): Original error (someNativeError) @@ -332,11 +343,18 @@ To add new error types: 3. Export the new error class 4. Import and use in your code with relevant context: ```ts - throw new YourCustomError({ - cause: originalError, - info: { /* context */ }, - meta: { /* metadata */ } - }, "Error message"); + throw new YourCustomError( + { + cause: originalError, + info: { + /* context */ + }, + meta: { + /* metadata */ + }, + }, + 'Error message' + ); ``` # Dockerfile @@ -345,8 +363,6 @@ To add new error types: ## Other Commands - - # Core Systems and Services The Lit Protocol SDK provides the following core systems: @@ -374,10 +390,12 @@ Key components available across packages: ## Common Issues and Solutions ### React Source Map Error + **Problem:** "Failed to parse source map from" error in React -**Solution:** +**Solution:** Disable source map generation in your React `package.json`: + ```json { "scripts": { @@ -390,10 +408,12 @@ Disable source map generation in your React `package.json`: ``` ### Crypto API Error + **Problem:** "Reference Error: crypto is not defined" -**Solution:** +**Solution:** Add the following polyfill for environments without native crypto: + ```js import crypto, { createHash } from 'crypto'; @@ -402,7 +422,7 @@ Object.defineProperty(globalThis, 'crypto', { value: { // Implement getRandomValues getRandomValues: (arr: any) => crypto.randomBytes(arr.length), - + // Implement subtle crypto subtle: { digest: (algorithm: string, data: Uint8Array) => { From 7893a7c3f1879f6eaecc00d8255846459fb68dca Mon Sep 17 00:00:00 2001 From: Anson Date: Thu, 2 Jan 2025 22:11:42 +0000 Subject: [PATCH 15/27] doc: clean up devin's work --- README.md | 49 +++++++++---------------------------------------- 1 file changed, 9 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 6ce0dd865..0784934ff 100644 --- a/README.md +++ b/README.md @@ -227,7 +227,7 @@ Publishing steps: | Command | Description | | ----------------- | ------------------------------------------------------ | | `yarn test:unit` | Run unit tests for all packages | -| `yarn test:local` | Launch E2E tests with Cypress and serve React test app | +| `yarn test:local` | Run E2E tests in Node.js environment | ### Running Tests @@ -241,10 +241,14 @@ Publishing steps: ```sh yarn test:local ``` - This command: - - Starts the React testing application - - Launches Cypress test runner - - Executes E2E test suites + Optional Environment Variables: + - NETWORK= (datil, datil-test, datil-dev, etc.) + - DEBUG=true/false + + Optional Flags: + - --filter= + + See more in `local-tests/README.md` ## Local Development with Lit Node @@ -262,23 +266,6 @@ export LIT_JS_SDK_LOCAL_NODE_DEV="true" export LIT_JS_SDK_FUNDED_WALLET_PRIVATE_KEY="your-funded-private-key" ``` -3. Update and build contracts: - -```sh -# Fetch and generate contract updates -yarn update:contracts-sdk --fetch -yarn update:contracts-sdk --gen - -# Build all packages -yarn build:packages -``` - -4. Start local development server: - -```sh -yarn nx run nodejs:serve -``` - ## Environment Variables | Variable | Description | Usage | @@ -389,24 +376,6 @@ Key components available across packages: ## Common Issues and Solutions -### React Source Map Error - -**Problem:** "Failed to parse source map from" error in React - -**Solution:** -Disable source map generation in your React `package.json`: - -```json -{ - "scripts": { - "start": "GENERATE_SOURCEMAP=false react-scripts start", - "build": "react-scripts build", - "test": "react-scripts test", - "eject": "react-scripts eject" - } -} -``` - ### Crypto API Error **Problem:** "Reference Error: crypto is not defined" From 763bd141b6a73aa69055add2d0344377ef4e40d2 Mon Sep 17 00:00:00 2001 From: Anson Date: Thu, 2 Jan 2025 22:12:13 +0000 Subject: [PATCH 16/27] fmt --- README.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0784934ff..c3ad1368b 100644 --- a/README.md +++ b/README.md @@ -224,9 +224,9 @@ Publishing steps: ### Available Test Commands -| Command | Description | -| ----------------- | ------------------------------------------------------ | -| `yarn test:unit` | Run unit tests for all packages | +| Command | Description | +| ----------------- | ------------------------------------ | +| `yarn test:unit` | Run unit tests for all packages | | `yarn test:local` | Run E2E tests in Node.js environment | ### Running Tests @@ -238,14 +238,18 @@ Publishing steps: ``` 2. End-to-End Tests: + ```sh yarn test:local ``` + Optional Environment Variables: + - NETWORK= (datil, datil-test, datil-dev, etc.) - DEBUG=true/false Optional Flags: + - --filter= See more in `local-tests/README.md` From fee3b14a10ca149a75a05dc960d2a1d1e52bacc2 Mon Sep 17 00:00:00 2001 From: Anson Date: Thu, 2 Jan 2025 22:35:01 +0000 Subject: [PATCH 17/27] doc: cleanup Devin's work --- packages/lit-auth-client/README.md | 25 +------------------------ packages/pkp-base/README.md | 10 ---------- packages/pkp-cosmos/README.md | 10 ---------- packages/pkp-ethers/README.md | 10 ---------- packages/pkp-walletconnect/README.md | 20 +------------------- 5 files changed, 2 insertions(+), 73 deletions(-) diff --git a/packages/lit-auth-client/README.md b/packages/lit-auth-client/README.md index 6a6502c93..3a62da755 100644 --- a/packages/lit-auth-client/README.md +++ b/packages/lit-auth-client/README.md @@ -10,20 +10,7 @@ yarn add @lit-protocol/lit-auth-client ## Quick Start -```typescript -import { LitAuthClient } from '@lit-protocol/lit-auth-client'; - -// Initialize the auth client -const client = new LitAuthClient({ - redirectUri: 'https://your-app.com/callback', -}); - -// Handle social login -await client.initializeGoogleLogin(); - -// Handle wallet authentication -await client.initializeWalletConnect(); -``` +See the lit-pkp-auth-demo [here](https://github.com/LIT-Protocol/lit-pkp-auth-demo/blob/8f9e301e82e655b28fe9ab767ad3778bfe74701d/src/utils/lit.ts#L75-L85) ## Key Features @@ -37,13 +24,3 @@ await client.initializeWalletConnect(); ## Documentation For detailed API documentation, visit the [API reference](https://docs.lit-js-sdk-v2.litprotocol.com/modules/lit_auth_client_src.html). - -## Development - -### Building - -Run `nx build lit-auth-client` to build the library. - -### Testing - -Run `nx test lit-auth-client` to execute the unit tests via [Jest](https://jestjs.io). diff --git a/packages/pkp-base/README.md b/packages/pkp-base/README.md index 2ac289f4f..48ca71851 100644 --- a/packages/pkp-base/README.md +++ b/packages/pkp-base/README.md @@ -43,13 +43,3 @@ const signature = await pkpBase.runLitAction(dataToSign, 'sign'); | `runLitAction()` | Execute LIT actions | | `createAndSetSessionSigs()` | Manage session signatures | | `ensureLitNodeClientReady()` | Verify node connection | - -## Development - -### Building - -Run `nx build pkp-base` to build the library. - -### Testing - -Run `nx test pkp-base` to execute the unit tests. diff --git a/packages/pkp-cosmos/README.md b/packages/pkp-cosmos/README.md index c2db97f4e..0ed0eec3e 100644 --- a/packages/pkp-cosmos/README.md +++ b/packages/pkp-cosmos/README.md @@ -47,13 +47,3 @@ const signedTx = await wallet.signDirect(address, { - Client Integration: Create SigningStargateClient instances - Account Operations: Manage account data and balances - Network Configuration: Customize RPC URLs and prefixes - -## Development - -### Building - -Run `nx build pkp-cosmos` to build the library. - -### Testing - -Run `nx test pkp-cosmos` to execute the unit tests. diff --git a/packages/pkp-ethers/README.md b/packages/pkp-ethers/README.md index 0f513ea6b..67fee011c 100644 --- a/packages/pkp-ethers/README.md +++ b/packages/pkp-ethers/README.md @@ -48,13 +48,3 @@ const signedTx = await wallet.signTransaction({ For detailed API documentation, visit: https://docs.ethers.org/v4/api-wallet.html - -## Development - -### Building - -Run `nx build pkp-ethers` to build the library. - -### Testing - -Run `nx test pkp-ethers` to execute the unit tests. diff --git a/packages/pkp-walletconnect/README.md b/packages/pkp-walletconnect/README.md index ff0fb46fa..1478347f0 100644 --- a/packages/pkp-walletconnect/README.md +++ b/packages/pkp-walletconnect/README.md @@ -14,15 +14,7 @@ yarn add @lit-protocol/pkp-walletconnect import { PKPWalletConnect } from '@lit-protocol/pkp-walletconnect'; // Initialize WalletConnect client -const client = new PKPWalletConnect({ - projectId: 'your-project-id', - metadata: { - name: 'Your App', - description: 'Your app description', - url: 'https://your-app.com', - icons: ['https://your-app.com/icon.png'], - }, -}); +const client = new PKPWalletConnect(); // Handle session proposals client.on('session_proposal', async (proposal) => { @@ -53,13 +45,3 @@ client.on('session_request', async (request) => { - Chain Configuration: Support multiple blockchains For detailed API documentation, visit the [API reference](https://docs.lit-js-sdk-v2.litprotocol.com/modules/pkp_walletconnect_src.html). - -## Development - -### Building - -Run `nx build pkp-walletconnect` to build the library. - -### Testing - -Run `nx test pkp-walletconnect` to execute the unit tests. From 862199b6e8d290634ea6e823d12d7b26a3ea7fb5 Mon Sep 17 00:00:00 2001 From: bull Date: Fri, 3 Jan 2025 17:46:42 +0900 Subject: [PATCH 18/27] fix logger test --- packages/logger/src/lib/logger.spec.ts | 19 ++++++++++--------- packages/logger/src/lib/logger.ts | 1 + 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/packages/logger/src/lib/logger.spec.ts b/packages/logger/src/lib/logger.spec.ts index 2ba278416..a033af942 100644 --- a/packages/logger/src/lib/logger.spec.ts +++ b/packages/logger/src/lib/logger.spec.ts @@ -1,4 +1,4 @@ -import { LOG_LEVEL, LogManager } from './logger'; +import { LOG_LEVEL, LogLevel, LogManager } from './logger'; describe('logger', () => { let lm: LogManager; @@ -25,7 +25,7 @@ describe('logger', () => { lm.withConfig({ condenseLogs: true, }); - let logger = lm.get('category'); + const logger = lm.get('category'); expect(logger.Config?.['condenseLogs']).toEqual(true); }); @@ -33,12 +33,12 @@ describe('logger', () => { lm.withConfig({ condenseLogs: true, }); - let logger = lm.get('category', 'bar'); + const logger = lm.get('category', 'bar'); logger.setLevel(LOG_LEVEL.INFO); expect(logger.Config?.['condenseLogs']).toEqual(true); logger.info('hello'); logger.info('hello'); - let logs = lm.getLogsForId('bar'); + const logs = lm.getLogsForId('bar'); expect(logs.length).toEqual(1); }); @@ -47,7 +47,7 @@ describe('logger', () => { logger.setLevel(LOG_LEVEL.INFO); logger.info('logging'); logger.debug('shouldnt log'); - let logs = lm.getLogsForId('foo'); + const logs = lm.getLogsForId('foo'); expect(logs.length).toEqual(1); }); @@ -56,14 +56,14 @@ describe('logger', () => { logger.setLevel(LOG_LEVEL.DEBUG); logger.debug('logging'); logger.error('error'); - let logs = lm.getLogsForId('foo2'); + const logs = lm.getLogsForId('foo2'); expect(logs.length).toEqual(2); }); it('should safe serialize circular references', () => { const logger = lm.get('info-logger', 'foo3'); logger.setLevel(LOG_LEVEL.DEBUG); - let circ: any = { foo: 'bar' }; + const circ: any = { foo: 'bar' }; circ.circ = circ; logger.debug('circular reference to serialize', circ); console.log(lm.getLogsForId('foo3')); @@ -122,7 +122,8 @@ describe('logger', () => { const requestIds = lm.LoggerIds; expect(requestIds.length).toBe(2); - expect(loggerA.timestamp).toEqual(requestIds[0]); - expect(loggerB.timestamp).toEqual(requestIds[1]); + expect(loggerA.timestamp).toBeLessThan(loggerB.timestamp); + expect(requestIds[0]).toBe('1'); + expect(requestIds[1]).toBe('2'); }); }); diff --git a/packages/logger/src/lib/logger.ts b/packages/logger/src/lib/logger.ts index 9ec0dbe3e..e6aa6a97b 100644 --- a/packages/logger/src/lib/logger.ts +++ b/packages/logger/src/lib/logger.ts @@ -1,6 +1,7 @@ import { version, LOG_LEVEL, LOG_LEVEL_VALUES } from '@lit-protocol/constants'; import { hashMessage } from 'ethers/lib/utils'; +export { LOG_LEVEL }; export enum LogLevel { OFF = -1, ERROR = 0, From 30f32171ca459763c60ab920bd9f1492474c10e8 Mon Sep 17 00:00:00 2001 From: bull Date: Sat, 4 Jan 2025 22:38:20 +0900 Subject: [PATCH 19/27] fix wrapped keys test issue760 --- .../wrapped-keys/src/lib/api/utils.spec.ts | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/packages/wrapped-keys/src/lib/api/utils.spec.ts b/packages/wrapped-keys/src/lib/api/utils.spec.ts index 3b529ff76..e008dfa75 100644 --- a/packages/wrapped-keys/src/lib/api/utils.spec.ts +++ b/packages/wrapped-keys/src/lib/api/utils.spec.ts @@ -87,19 +87,17 @@ describe('getPkpAccessControlCondition', () => { it('should correctly create the ACC', () => { const pkpAddress = '0xd1Af1AAC50aC837C873200D17b78664aFCde597C'; const acc = getPkpAccessControlCondition(pkpAddress); - expect(acc).toEqual([ - { - contractAddress: '', - standardContractType: '', - chain: CHAIN_ETHEREUM, - method: '', - parameters: [':userAddress'], - returnValueTest: { - comparator: '=', - value: pkpAddress, - }, + expect(acc).toEqual({ + contractAddress: '', + standardContractType: '', + chain: CHAIN_ETHEREUM, + method: '', + parameters: [':userAddress'], + returnValueTest: { + comparator: '=', + value: pkpAddress, }, - ]); + }); }); it('should throw an error for non-Ethereum address', () => { From 9f0bcdeebdedd509045fb031abd15ff76c868f62 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:50:49 +0000 Subject: [PATCH 20/27] docs: address reviewer feedback on README Co-Authored-By: anson@litprotocol.com --- README.md | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index c3ad1368b..c02665b4a 100644 --- a/README.md +++ b/README.md @@ -117,11 +117,15 @@ Recommended for better development experience: To start developing with this repository: 1. Install dependencies: - ``` yarn ``` +2. Build the packages: +``` +yarn build:dev +``` + ## Building Build the project using one of these commands: @@ -210,15 +214,22 @@ Prerequisites: Publishing steps: -1. Update dependencies: `yarn install` -2. Increment version: `yarn bump` -3. Build packages: `yarn build` -4. Run tests: - - Unit tests: `yarn test:unit` - - E2E tests: `yarn test:local` -5. Generate documentation: `yarn gen:docs --push` -6. Publish packages: `yarn publish:packages` -7. Commit with message: "Published version X.X.X" +1. Create a release PR: + - Create a new branch from master with format `vX.X.X-Publish` + - Add changelog as PR description + - Add "Release" label to the PR + - Reference example: https://github.com/LIT-Protocol/js-sdk/pull/753 + +2. After PR approval, proceed with publishing: + - Update dependencies: `yarn install` + - Increment version: `yarn bump` + - Build packages: `yarn build` + - Run tests: + - Unit tests: `yarn test:unit` + - E2E tests: `yarn test:local` + - Generate documentation: `yarn gen:docs --push` + - Publish packages: `yarn publish:packages` + - Commit with message: "Published version X.X.X" ## Testing Guide From 45efa332b6b7acece863112201dec05ed91024a4 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:53:45 +0000 Subject: [PATCH 21/27] chore: fix formatting Co-Authored-By: anson@litprotocol.com --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index c02665b4a..673024095 100644 --- a/README.md +++ b/README.md @@ -117,11 +117,13 @@ Recommended for better development experience: To start developing with this repository: 1. Install dependencies: + ``` yarn ``` 2. Build the packages: + ``` yarn build:dev ``` @@ -215,6 +217,7 @@ Prerequisites: Publishing steps: 1. Create a release PR: + - Create a new branch from master with format `vX.X.X-Publish` - Add changelog as PR description - Add "Release" label to the PR From 6cd6f072fb6eb1442b371cc6b33c87d734317299 Mon Sep 17 00:00:00 2001 From: Anson Date: Mon, 6 Jan 2025 15:06:20 +0000 Subject: [PATCH 22/27] Update packages/pkp-base/README.md Co-authored-by: Federico Amura Signed-off-by: Anson --- packages/pkp-base/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/pkp-base/README.md b/packages/pkp-base/README.md index 48ca71851..d21775d49 100644 --- a/packages/pkp-base/README.md +++ b/packages/pkp-base/README.md @@ -39,7 +39,5 @@ const signature = await pkpBase.runLitAction(dataToSign, 'sign'); | Method | Description | | ---------------------------- | ---------------------------------- | | `init()` | Initialize and connect to LIT node | -| `compressPubKey()` | Compress public keys | | `runLitAction()` | Execute LIT actions | -| `createAndSetSessionSigs()` | Manage session signatures | -| `ensureLitNodeClientReady()` | Verify node connection | +| `runSign()` | Signs a message | From 90ee71089edd7b9811572d9c65206328ff6c6133 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 15:12:07 +0000 Subject: [PATCH 23/27] chore: apply prettier formatting Co-Authored-By: anson@litprotocol.com --- packages/pkp-base/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/pkp-base/README.md b/packages/pkp-base/README.md index d21775d49..26763b411 100644 --- a/packages/pkp-base/README.md +++ b/packages/pkp-base/README.md @@ -36,8 +36,8 @@ const signature = await pkpBase.runLitAction(dataToSign, 'sign'); ## Core Methods -| Method | Description | -| ---------------------------- | ---------------------------------- | -| `init()` | Initialize and connect to LIT node | -| `runLitAction()` | Execute LIT actions | -| `runSign()` | Signs a message | +| Method | Description | +| ---------------- | ---------------------------------- | +| `init()` | Initialize and connect to LIT node | +| `runLitAction()` | Execute LIT actions | +| `runSign()` | Signs a message | From 35137ce204db0fc957a85e55d29c10297e88bf3b Mon Sep 17 00:00:00 2001 From: FedericoAmura Date: Mon, 6 Jan 2025 17:03:59 +0100 Subject: [PATCH 24/27] feat: fix feedback devin missed --- packages/crypto/README.md | 14 +++++++++----- packages/lit-node-client/README.md | 6 +----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packages/crypto/README.md b/packages/crypto/README.md index c2d05f9e0..61774e2fe 100644 --- a/packages/crypto/README.md +++ b/packages/crypto/README.md @@ -11,13 +11,17 @@ yarn add @lit-protocol/crypto ## Quick Start ```typescript -import { generatePrivateKey, encryptWithSignature } from '@lit-protocol/crypto'; +import { generateSessionKeyPair, encrypt } from '@lit-protocol/crypto'; -// Generate a new private key -const privateKey = await generatePrivateKey(); +// Generate a new key pair +const keyPair = await generateSessionKeyPair(); -// Encrypt data with signature -const encryptedData = await encryptWithSignature(data, signature); +// Encrypt data with public key and identity param +const encryptedData = await encrypt( + keyPair.slice(2), + new Uint8Array([1, 2, 3]), + new Uint8Array([4, 5, 6]) +); ``` ## Key Features diff --git a/packages/lit-node-client/README.md b/packages/lit-node-client/README.md index 48c27fc06..417365731 100644 --- a/packages/lit-node-client/README.md +++ b/packages/lit-node-client/README.md @@ -15,7 +15,7 @@ import { LitNodeClient } from '@lit-protocol/lit-node-client'; // Initialize the client const client = new LitNodeClient({ - alertWhenUnauthorized: false, + litNetwork: 'datil', }); // Connect to the network @@ -30,7 +30,3 @@ await client.connect(); - Network connection management - Secure node communication - Automatic request handling and retries - -## Authentication - -The client automatically sets up authentication using the `checkAndSignAuthMessage` function from the auth-browser submodule. This provides a secure and consistent way to interact with Lit nodes across different environments. From 0801de056f08ff3bee33f98dc6a1dcb1efdfa2a4 Mon Sep 17 00:00:00 2001 From: FedericoAmura Date: Mon, 6 Jan 2025 17:14:31 +0100 Subject: [PATCH 25/27] feat: fix feedback devin missed --- README.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 673024095..a7c79b9d7 100644 --- a/README.md +++ b/README.md @@ -372,7 +372,7 @@ To add new error types: The Lit Protocol SDK provides the following core systems: -- Cryptographic key management (PKP - Public Key Protocol) +- Cryptographic key management (PKP - Programmable Key Pair) - Blockchain wallet interactions (Ethereum, Solana, Cosmos) - Decentralized authentication and authorization - Distributed computing and signing @@ -426,10 +426,9 @@ Object.defineProperty(globalThis, 'crypto', { }); ``` -
-
-error Command failed with exit code 13. +### Unexpected Error on Node -Make sure your node version is above v18.0.0 +**Problem:** Exit code 13 -
+**Solution:** +Make sure your node version is above v18.0.0 From f1d068de4742f7e1b9414d3a77654e1c671861cc Mon Sep 17 00:00:00 2001 From: Anson Date: Wed, 15 Jan 2025 18:16:21 +0000 Subject: [PATCH 26/27] fix(ci): update Rust version to 1.83.0 for wasm compatibility --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a9a2627a..8e4243486 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,11 @@ jobs: node-version: '20' cache: 'yarn' - name: Install rust - uses: dtolnay/rust-toolchain@1.76.0 + uses: actions-rs/toolchain@v1 + with: + toolchain: 1.83.0 + override: true + components: rust-std - uses: jetli/wasm-pack-action@v0.4.0 with: # Optional version of wasm-pack to install(eg. 'v0.9.1', 'latest') From 92856c6f74b5eee8cb4e1a21074f844a8691fb84 Mon Sep 17 00:00:00 2001 From: Anson Date: Tue, 11 Feb 2025 18:20:22 +0000 Subject: [PATCH 27/27] fix: add temp types export from constant --- local-tests/tests/testRelayer.ts | 2 +- packages/constants/src/index.ts | 3 + yarn.lock | 221 +++++++++++++++++++++---------- 3 files changed, 154 insertions(+), 72 deletions(-) diff --git a/local-tests/tests/testRelayer.ts b/local-tests/tests/testRelayer.ts index 6b07955bc..7576309af 100644 --- a/local-tests/tests/testRelayer.ts +++ b/local-tests/tests/testRelayer.ts @@ -23,7 +23,7 @@ export const testRelayer = async (devEnv: TinnyEnvironment) => { litNodeClient: devEnv.litNodeClient, }); - const pkps = await ethWalletProvider.fetchPKPsThroughRelayer( + const pkps = await ethWalletProvider.fetchPKPs( alice.authMethod ); diff --git a/packages/constants/src/index.ts b/packages/constants/src/index.ts index 940d84a59..7e249245a 100644 --- a/packages/constants/src/index.ts +++ b/packages/constants/src/index.ts @@ -16,6 +16,9 @@ export * from './lib/errors'; // ----------- Utils ----------- export * from './lib/utils/utils'; +// ----------- Types ----------- +export * from './lib/constants/types'; + // ----------- ABIs ----------- import * as ABI_ERC20 from './lib/abis/ERC20.json'; diff --git a/yarn.lock b/yarn.lock index f7fd9d1f2..6e68496bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -970,7 +970,7 @@ "@babel/plugin-transform-modules-commonjs" "^7.25.9" "@babel/plugin-transform-typescript" "^7.25.9" -"@babel/runtime@^7.10.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.22.6", "@babel/runtime@^7.25.0", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4": +"@babel/runtime@^7.10.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.6", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.6", "@babel/runtime@^7.25.0", "@babel/runtime@^7.26.0", "@babel/runtime@^7.4.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.8.4": version "7.26.7" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.26.7.tgz#f4e7fe527cd710f8dc0618610b61b4b060c3c341" integrity sha512-AOPI3D+a8dXnja+iwsUqGRjr1BbZIe771sXdapOtYI531gSqpi92vXivKcq2asu/DFpdl1ceFAKZyRzK2PCVcQ== @@ -1218,11 +1218,6 @@ resolved "https://registry.yarnpkg.com/@ecies/ciphers/-/ciphers-0.2.2.tgz#82a15b10a6e502b63fb30915d944b2eaf3ff17ff" integrity sha512-ylfGR7PyTd+Rm2PqQowG08BCKA22QuX8NzrL+LxAAvazN10DMwdJ2fWwAzRj05FI/M8vNFGm3cv9Wq/GFWCBLg== -"@ecies/ciphers@^0.2.2": - version "0.2.2" - resolved "https://registry.yarnpkg.com/@ecies/ciphers/-/ciphers-0.2.2.tgz#82a15b10a6e502b63fb30915d944b2eaf3ff17ff" - integrity sha512-ylfGR7PyTd+Rm2PqQowG08BCKA22QuX8NzrL+LxAAvazN10DMwdJ2fWwAzRj05FI/M8vNFGm3cv9Wq/GFWCBLg== - "@ensdomains/address-encoder@^0.1.7": version "0.1.9" resolved "https://registry.yarnpkg.com/@ensdomains/address-encoder/-/address-encoder-0.1.9.tgz#f948c485443d9ef7ed2c0c4790e931c33334d02d" @@ -3384,6 +3379,13 @@ dependencies: "@noble/hashes" "1.4.0" +"@noble/curves@1.7.0", "@noble/curves@~1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.7.0.tgz#0512360622439256df892f21d25b388f52505e45" + integrity sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw== + dependencies: + "@noble/hashes" "1.6.0" + "@noble/curves@1.8.0": version "1.8.0" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.8.0.tgz#fe035a23959e6aeadf695851b51a87465b5ba8f7" @@ -3391,7 +3393,7 @@ dependencies: "@noble/hashes" "1.7.0" -"@noble/curves@^1.0.0", "@noble/curves@^1.4.2", "@noble/curves@^1.6.0", "@noble/curves@~1.8.1": +"@noble/curves@^1.0.0", "@noble/curves@^1.4.0", "@noble/curves@^1.4.2", "@noble/curves@^1.6.0", "@noble/curves@~1.8.1": version "1.8.1" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.8.1.tgz#19bc3970e205c99e4bdb1c64a4785706bce497ff" integrity sha512-warwspo+UYUPep0Q+vtdVB4Ugn8GGQj8iyB3gnRWsztmUHTI3S1nhdiWNsPUGL0vud7JlRRk1XEu7Lq1KGTnMQ== @@ -3408,16 +3410,6 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426" integrity sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg== -"@noble/hashes@1.7.0": - version "1.7.0" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.7.0.tgz#5d9e33af2c7d04fee35de1519b80c958b2e35e39" - integrity sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w== - -"@noble/hashes@1.7.1", "@noble/hashes@^1", "@noble/hashes@^1.0.0", "@noble/hashes@^1.1.2", "@noble/hashes@^1.3.0", "@noble/hashes@^1.4.0", "@noble/hashes@^1.5.0", "@noble/hashes@~1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.7.1.tgz#5738f6d765710921e7a751e00c20ae091ed8db0f" - integrity sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ== - "@noble/hashes@1.6.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.0.tgz#d4bfb516ad6e7b5111c216a5cc7075f4cf19e6c5" @@ -3428,6 +3420,16 @@ resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.6.1.tgz#df6e5943edcea504bac61395926d6fd67869a0d5" integrity sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w== +"@noble/hashes@1.7.0": + version "1.7.0" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.7.0.tgz#5d9e33af2c7d04fee35de1519b80c958b2e35e39" + integrity sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w== + +"@noble/hashes@1.7.1", "@noble/hashes@^1", "@noble/hashes@^1.0.0", "@noble/hashes@^1.1.2", "@noble/hashes@^1.3.0", "@noble/hashes@^1.4.0", "@noble/hashes@^1.5.0", "@noble/hashes@~1.7.1": + version "1.7.1" + resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.7.1.tgz#5738f6d765710921e7a751e00c20ae091ed8db0f" + integrity sha512-B8XBPsn4vT/KJAGqDzbwztd+6Yte3P4V7iafm24bxgDe/mlRuK6xmWPuCNrKt2vDafZ8MfJLlchDG/vYafQEjQ== + "@noble/secp256k1@1.7.1", "@noble/secp256k1@~1.7.0": version "1.7.1" resolved "https://registry.yarnpkg.com/@noble/secp256k1/-/secp256k1-1.7.1.tgz#b251c70f824ce3ca7f8dc3df08d58f005cc0507c" @@ -4421,6 +4423,11 @@ node-addon-api "^3.2.1" node-gyp-build "^4.3.0" +"@paulmillr/qr@^0.2.1": + version "0.2.1" + resolved "https://registry.yarnpkg.com/@paulmillr/qr/-/qr-0.2.1.tgz#76ade7080be4ac4824f638146fd8b6db1805eeca" + integrity sha512-IHnV6A+zxU7XwmKFinmYjUcwlyK9+xkG3/s9KcQhI9BjQKycrJ1JRO+FbNYPwZiPKW3je/DR0k7w8/gLa5eaxQ== + "@phenomnomnominal/tsquery@~5.0.1": version "5.0.1" resolved "https://registry.yarnpkg.com/@phenomnomnominal/tsquery/-/tsquery-5.0.1.tgz#a2a5abc89f92c01562a32806655817516653a388" @@ -4541,16 +4548,37 @@ resolved "https://registry.yarnpkg.com/@rushstack/eslint-patch/-/eslint-patch-1.10.5.tgz#3a1c12c959010a55c17d46b395ed3047b545c246" integrity sha512-kkKUDVlII2DQiKy7UstOR1ErJP8kUKAQ4oa+SQtM0K+lPdmmjj0YnnxBgtTVYH7mUKtbsxeFC9y0AmK7Yb78/A== -"@scure/base@~1.1.0", "@scure/base@~1.1.6": - version "1.1.9" - resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.9.tgz#e5e142fbbfe251091f9c5f1dd4c834ac04c3dbd1" - integrity sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg== +"@safe-global/safe-apps-provider@0.18.5": + version "0.18.5" + resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-provider/-/safe-apps-provider-0.18.5.tgz#745a932bda3739a8a298ae44ec6c465f6c4773b7" + integrity sha512-9v9wjBi3TwLsEJ3C2ujYoexp3pFJ0omDLH/GX91e2QB+uwCKTBYyhxFSrTQ9qzoyQd+bfsk4gjOGW87QcJhf7g== + dependencies: + "@safe-global/safe-apps-sdk" "^9.1.0" + events "^3.3.0" + +"@safe-global/safe-apps-sdk@9.1.0", "@safe-global/safe-apps-sdk@^9.1.0": + version "9.1.0" + resolved "https://registry.yarnpkg.com/@safe-global/safe-apps-sdk/-/safe-apps-sdk-9.1.0.tgz#0e65913e0f202e529ed3c846e0f5a98c2d35aa98" + integrity sha512-N5p/ulfnnA2Pi2M3YeWjULeWbjo7ei22JwU/IXnhoHzKq3pYCN6ynL9mJBOlvDVv892EgLPCWCOwQk/uBT2v0Q== + dependencies: + "@safe-global/safe-gateway-typescript-sdk" "^3.5.3" + viem "^2.1.1" + +"@safe-global/safe-gateway-typescript-sdk@^3.5.3": + version "3.22.9" + resolved "https://registry.yarnpkg.com/@safe-global/safe-gateway-typescript-sdk/-/safe-gateway-typescript-sdk-3.22.9.tgz#7f6571aaf1aecbe1217f6dd294ad2f3d90c2c8c2" + integrity sha512-7ojVK/crhOaGowEO8uYWaopZzcr5rR76emgllGIfjCLR70aY4PbASpi9Pbs+7jIRzPDBBkM0RBo+zYx5UduX8Q== -"@scure/base@~1.2.2", "@scure/base@~1.2.4": +"@scure/base@^1.1.3", "@scure/base@~1.2.1", "@scure/base@~1.2.2", "@scure/base@~1.2.4": version "1.2.4" resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.2.4.tgz#002eb571a35d69bdb4c214d0995dff76a8dcd2a9" integrity sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ== +"@scure/base@~1.1.0", "@scure/base@~1.1.6": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.9.tgz#e5e142fbbfe251091f9c5f1dd4c834ac04c3dbd1" + integrity sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg== + "@scure/bip32@1.1.5": version "1.1.5" resolved "https://registry.yarnpkg.com/@scure/bip32/-/bip32-1.1.5.tgz#d2ccae16dcc2e75bc1d75f5ef3c66a338d1ba300" @@ -6091,6 +6119,16 @@ tslib "1.14.1" ws "^7.5.1" +"@walletconnect/jsonrpc-ws-connection@1.0.14": + version "1.0.14" + resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.14.tgz#eec700e74766c7887de2bd76c91a0206628732aa" + integrity sha512-Jsl6fC55AYcbkNVkwNM6Jo+ufsuCQRqViOQ8ZBPH9pRREHH9welbBiszuTLqEJiQcO/6XfFDl6bzCJIkrEi8XA== + dependencies: + "@walletconnect/jsonrpc-utils" "^1.0.6" + "@walletconnect/safe-json" "^1.0.2" + events "^3.3.0" + ws "^7.5.1" + "@walletconnect/jsonrpc-ws-connection@1.0.16": version "1.0.16" resolved "https://registry.yarnpkg.com/@walletconnect/jsonrpc-ws-connection/-/jsonrpc-ws-connection-1.0.16.tgz#666bb13fbf32a2d4f7912d5b4d0bdef26a1d057b" @@ -6266,6 +6304,18 @@ dependencies: tslib "1.14.1" +"@walletconnect/types@2.17.0": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.17.0.tgz#20eda5791e3172f8ab9146caa3f317701d4b3232" + integrity sha512-i1pn9URpvt9bcjRDkabuAmpA9K7mzyKoLJlbsAujRVX7pfaG7wur7u9Jz0bk1HxvuABL5LHNncTnVKSXKQ5jZA== + dependencies: + "@walletconnect/events" "1.0.1" + "@walletconnect/heartbeat" "1.2.2" + "@walletconnect/jsonrpc-types" "1.0.4" + "@walletconnect/keyvaluestorage" "1.1.1" + "@walletconnect/logger" "2.1.2" + events "3.3.0" + "@walletconnect/types@2.17.5": version "2.17.5" resolved "https://registry.yarnpkg.com/@walletconnect/types/-/types-2.17.5.tgz#be0cdfdb0e53d4d9398cf7a55fcd8ab82a509cda" @@ -6325,6 +6375,28 @@ "@walletconnect/utils" "2.9.2" events "^3.3.0" +"@walletconnect/utils@2.17.0": + version "2.17.0" + resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.17.0.tgz#02b3af0b80d0c1a994d692d829d066271b04d071" + integrity sha512-1aeQvjwsXy4Yh9G6g2eGmXrEl+BzkNjHRdCrGdMYqFTFa8ROEJfTGsSH3pLsNDlOY94CoBUvJvM55q/PMoN/FQ== + dependencies: + "@stablelib/chacha20poly1305" "1.0.1" + "@stablelib/hkdf" "1.0.1" + "@stablelib/random" "1.0.2" + "@stablelib/sha256" "1.0.1" + "@stablelib/x25519" "1.0.3" + "@walletconnect/relay-api" "1.0.11" + "@walletconnect/relay-auth" "1.0.4" + "@walletconnect/safe-json" "1.0.2" + "@walletconnect/time" "1.0.2" + "@walletconnect/types" "2.17.0" + "@walletconnect/window-getters" "1.0.1" + "@walletconnect/window-metadata" "1.0.1" + detect-browser "5.3.0" + elliptic "^6.5.7" + query-string "7.1.3" + uint8arrays "3.1.0" + "@walletconnect/utils@2.17.5", "@walletconnect/utils@^2.9.0": version "2.17.5" resolved "https://registry.yarnpkg.com/@walletconnect/utils/-/utils-2.17.5.tgz#4d1eace920dfae51b13f4209a57e77a5eb18774a" @@ -6500,11 +6572,23 @@ abi-decoder@^2.3.0: web3-eth-abi "^1.2.1" web3-utils "^1.2.1" -abitype@^1.0.8: +abitype@1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.7.tgz#876a0005d211e1c9132825d45bcee7b46416b284" + integrity sha512-ZfYYSktDQUwc2eduYu8C4wOs+RDPmnRYMh7zNfzeMtGGgb0U+6tLGjixUic6mXf5xKKCcgT5Qp6cv39tOARVFw== + +abitype@^1.0.6, abitype@^1.0.8: version "1.0.8" resolved "https://registry.yarnpkg.com/abitype/-/abitype-1.0.8.tgz#3554f28b2e9d6e9f35eb59878193eabd1b9f46ba" integrity sha512-ZeiI6h3GnW06uYDLx0etQtX/p8E24UaHHBj57RSjK7YBFe7iuVn07EDpOeP451D06sF27VOz9JJPlIKJmXgkEg== +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + abortcontroller-polyfill@^1.7.3: version "1.7.8" resolved "https://registry.yarnpkg.com/abortcontroller-polyfill/-/abortcontroller-polyfill-1.7.8.tgz#fe8d4370403f02e2aa37e3d2b0b178bae9d83f49" @@ -8422,14 +8506,7 @@ buffer@^5.0.5, buffer@^5.2.1, buffer@^5.4.3, buffer@^5.5.0, buffer@^5.6.0: base64-js "^1.3.1" ieee754 "^1.1.13" -bufferutil@^4.0.1: - version "4.0.9" - resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.9.tgz#6e81739ad48a95cad45a279588e13e95e24a800a" - integrity sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw== - dependencies: - node-gyp-build "^4.3.0" - -bufferutil@^4.0.8: +bufferutil@^4.0.1, bufferutil@^4.0.8: version "4.0.9" resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.9.tgz#6e81739ad48a95cad45a279588e13e95e24a800a" integrity sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw== @@ -9757,6 +9834,13 @@ cross-fetch@^3.1.4: dependencies: node-fetch "^2.7.0" +cross-fetch@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-4.1.0.tgz#8f69355007ee182e47fa692ecbaa37a52e43c3d2" + integrity sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw== + dependencies: + node-fetch "^2.7.0" + cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.6" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" @@ -10187,6 +10271,13 @@ debug@^3.1.0, debug@^3.2.7: dependencies: ms "^2.1.1" +debug@~4.3.1, debug@~4.3.2: + version "4.3.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" + integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + dependencies: + ms "^2.1.3" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -10832,17 +10923,7 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" -eciesjs@^0.4.10: - version "0.4.13" - resolved "https://registry.yarnpkg.com/eciesjs/-/eciesjs-0.4.13.tgz#89fbe2bc37d6dced8c3d1bccac21cceb20bcdcf3" - integrity sha512-zBdtR4K+wbj10bWPpIOF9DW+eFYQu8miU5ypunh0t4Bvt83ZPlEWgT5Dq/0G6uwEXumZKjfb5BZxYUZQ2Hzn/Q== - dependencies: - "@ecies/ciphers" "^0.2.2" - "@noble/ciphers" "^1.0.0" - "@noble/curves" "^1.6.0" - "@noble/hashes" "^1.5.0" - -eciesjs@^0.4.11: +eciesjs@^0.4.10, eciesjs@^0.4.11: version "0.4.13" resolved "https://registry.yarnpkg.com/eciesjs/-/eciesjs-0.4.13.tgz#89fbe2bc37d6dced8c3d1bccac21cceb20bcdcf3" integrity sha512-zBdtR4K+wbj10bWPpIOF9DW+eFYQu8miU5ypunh0t4Bvt83ZPlEWgT5Dq/0G6uwEXumZKjfb5BZxYUZQ2Hzn/Q== @@ -19015,6 +19096,19 @@ own-keys@^1.0.1: object-keys "^1.1.1" safe-push-apply "^1.0.0" +ox@0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ox/-/ox-0.1.2.tgz#0f791be2ccabeaf4928e6d423498fe1c8094e560" + integrity sha512-ak/8K0Rtphg9vnRJlbOdaX9R7cmxD2MiSthjWGaQdMk3D7hrAlDoM+6Lxn7hN52Za3vrXfZ7enfke/5WjolDww== + dependencies: + "@adraffy/ens-normalize" "^1.10.1" + "@noble/curves" "^1.6.0" + "@noble/hashes" "^1.5.0" + "@scure/bip32" "^1.5.0" + "@scure/bip39" "^1.4.0" + abitype "^1.0.6" + eventemitter3 "5.0.1" + p-cancelable@^0.4.0: version "0.4.1" resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.4.1.tgz#35f363d67d52081c8d9585e37bcceb7e0bbcb2a0" @@ -20083,6 +20177,16 @@ qrcode@1.4.4: pngjs "^3.3.0" yargs "^13.2.4" +qrcode@1.5.3: + version "1.5.3" + resolved "https://registry.yarnpkg.com/qrcode/-/qrcode-1.5.3.tgz#03afa80912c0dccf12bc93f615a535aad1066170" + integrity sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg== + dependencies: + dijkstrajs "^1.0.1" + encode-utf8 "^1.0.3" + pngjs "^5.0.0" + yargs "^15.3.1" + qs@6.13.0: version "6.13.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.13.0.tgz#6ca3bd58439f7e245655798997787b0d88a51906" @@ -22031,7 +22135,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0": +"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -22049,15 +22153,6 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - string-width@^2.0.0, string-width@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" @@ -22184,7 +22279,7 @@ stringify-package@^1.0.1: resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.1.tgz#e5aa3643e7f74d0f28628b72f3dad5cecfc3ba85" integrity sha512-sa4DUQsYciMP1xhKWGuFM04fB0LG/9DlluZoSVywUMRNvzid6XucHK0/90xGxRoHrAaROrcHK1aPKaijCtSrhg== -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -22212,13 +22307,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -22931,7 +23019,7 @@ tslib@1.14.1, tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.4.0, tslib@^2.4.1, tslib@^2.7.0, tslib@^2.8.0: +tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.3.1, tslib@^2.4.0, tslib@^2.4.1, tslib@^2.6.0, tslib@^2.7.0, tslib@^2.8.0: version "2.8.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.8.1.tgz#612efe4ed235d567e8aba5f2a5fab70280ade83f" integrity sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w== @@ -24383,7 +24471,7 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -24418,15 +24506,6 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.0.1, wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"