From 55a0ca2f586ff2ff2f47c7fade09d6f6ab15f67e Mon Sep 17 00:00:00 2001 From: jxom Date: Mon, 12 Dec 2022 06:51:08 +1100 Subject: [PATCH] feat: connectors (#3) * feat: add connectors package * chore: add test script * chore: changeset * chore: add proxy pkgs * fix: rpc urls * chore: mark @wagmi/core as optional peer * chore: @wagmi/core 0.8 * chore: add readme * feat: dev script * chore: connectors requirements * docs: update contributing * chore: contributing update * chore: "Connectors" Co-authored-by: awkweb * chore: rename repo dir Co-authored-by: awkweb Co-authored-by: Tom Meagher --- .changeset/large-clouds-explain.md | 5 + .github/CONTRIBUTING.md | 60 +- .github/workflows/main.yml | 28 + README.md | 2 +- package.json | 5 + packages/chains/package.json | 3 +- packages/chains/tsup.config.ts | 1 + packages/connectors/.keep | 0 packages/connectors/README.md | 58 + .../connectors/coinbaseWallet/package.json | 4 + packages/connectors/injected/package.json | 4 + packages/connectors/metaMask/package.json | 4 + packages/connectors/mock/package.json | 4 + packages/connectors/package.json | 98 + packages/connectors/src/base.ts | 82 + .../connectors/src/coinbaseWallet.test.ts | 18 + packages/connectors/src/coinbaseWallet.ts | 285 +++ packages/connectors/src/index.ts | 2 + packages/connectors/src/injected.test.ts | 5 + packages/connectors/src/injected.ts | 319 +++ packages/connectors/src/metaMask.test.ts | 5 + packages/connectors/src/metaMask.ts | 136 ++ .../connectors/src/mock/connector.test.ts | 149 ++ packages/connectors/src/mock/connector.ts | 131 ++ packages/connectors/src/mock/index.ts | 2 + packages/connectors/src/mock/provider.test.ts | 110 + packages/connectors/src/mock/provider.ts | 99 + .../src/utils/getInjectedName.test.ts | 66 + .../connectors/src/utils/getInjectedName.ts | 46 + packages/connectors/src/walletConnect.test.ts | 19 + packages/connectors/src/walletConnect.ts | 216 ++ packages/connectors/tsup.config.ts | 18 + .../connectors/walletConnect/package.json | 4 + pnpm-lock.yaml | 1871 ++++++++++++++++- scripts/tsup.ts | 81 +- 35 files changed, 3882 insertions(+), 58 deletions(-) create mode 100644 .changeset/large-clouds-explain.md delete mode 100644 packages/connectors/.keep create mode 100644 packages/connectors/README.md create mode 100644 packages/connectors/coinbaseWallet/package.json create mode 100644 packages/connectors/injected/package.json create mode 100644 packages/connectors/metaMask/package.json create mode 100644 packages/connectors/mock/package.json create mode 100644 packages/connectors/package.json create mode 100644 packages/connectors/src/base.ts create mode 100644 packages/connectors/src/coinbaseWallet.test.ts create mode 100644 packages/connectors/src/coinbaseWallet.ts create mode 100644 packages/connectors/src/index.ts create mode 100644 packages/connectors/src/injected.test.ts create mode 100644 packages/connectors/src/injected.ts create mode 100644 packages/connectors/src/metaMask.test.ts create mode 100644 packages/connectors/src/metaMask.ts create mode 100644 packages/connectors/src/mock/connector.test.ts create mode 100644 packages/connectors/src/mock/connector.ts create mode 100644 packages/connectors/src/mock/index.ts create mode 100644 packages/connectors/src/mock/provider.test.ts create mode 100644 packages/connectors/src/mock/provider.ts create mode 100644 packages/connectors/src/utils/getInjectedName.test.ts create mode 100644 packages/connectors/src/utils/getInjectedName.ts create mode 100644 packages/connectors/src/walletConnect.test.ts create mode 100644 packages/connectors/src/walletConnect.ts create mode 100644 packages/connectors/tsup.config.ts create mode 100644 packages/connectors/walletConnect/package.json diff --git a/.changeset/large-clouds-explain.md b/.changeset/large-clouds-explain.md new file mode 100644 index 00000000..d95a0fa3 --- /dev/null +++ b/.changeset/large-clouds-explain.md @@ -0,0 +1,5 @@ +--- +'@wagmi/connectors': minor +--- + +Initial release of the `@wagmi/connectors` package – a collection of Connectors for wagmi. diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 2865e797..f69a21fb 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -8,25 +8,25 @@ If you want to contribute, but aren't sure where to start, you can create a [new ## Chains -If you wish to contribute to add an additional chain to `@wagmi/chains`, there are a few requirements to note before submitting a pull request. +If you wish to contribute to add an additional Chain to `@wagmi/chains`, there are a few requirements to note before submitting a pull request. ### Requirements - **Must haves**: - - a Chain ID (`id`), - - a human readable name (`name`), + - a unique Chain ID (`id`), + - a human-readable name (`name`), - an internal network label (`network`), - a native currency reference (`nativeCurrency`), - - a public, credible RPC URL. + - a public, credible RPC URL - **Nice to haves** - a block explorer (`blockExplorers`) - a multicall contract (`contracts.multicall`) - **Optional** - - other named RPC URLs (such as `rpcUrls.alchemy`, `rpcUrls.infura`, etc) + - other named RPC URLs (such as `rpcUrls.alchemy`, `rpcUrls.infura`, etc.) - ENS registry contract (`contracts.ensRegistry`) - testnet flag (`testnet`) -If your chain satisfies the necessary criteria, you may submit a pull request for consideration. +If your Chain satisfies the necessary criteria, you may submit a pull request for consideration. ### Attribute reference @@ -38,13 +38,53 @@ The [`Chain` type](../packages/chains/src/types.ts) has a number of important at - `nativeCurrency`: The native currently of the network. Found from [`ethereum-lists/chains`](https://github.com/ethereum-lists/chains/blob/3fbd4eeac7ce116579634bd042b84e2b1d89886a/_data/chains/eip155-56.json#L20-L24). - `rpcUrls`: A set of RPC URLs for the chain. Found from [`ethereum-lists/chains`](https://github.com/ethereum-lists/chains/blob/3fbd4eeac7ce116579634bd042b84e2b1d89886a/_data/chains/eip155-56.json#L4-L18). - `blockExplorers`: A set of block explorers for the chain. Found from [`ethereum-lists/chains`](https://github.com/ethereum-lists/chains/blob/3fbd4eeac7ce116579634bd042b84e2b1d89886a/_data/chains/eip155-56.json#L30-L36). -- `contracts`: A set of deployed contracts for the chain. - - `multicall3` is optional, but it's address is most likely `0xca11bde05977b3631167028862be2a173976ca11` – you can find the deployed block number on the block explorer. - - `ensRegistry` is optional – not all chains have an ENS Registry. -- `testnet`: Whether or not the chain is a testnet. +- `contracts`: A set of deployed contracts for the Chain. + - `multicall3` is optional, but it's address is most likely `0xca11bde05977b3631167028862be2a173976ca11` – you can find the deployed block number on the block explorer. Found from [`mds1/multicall`](](https://github.com/mds1/multicall#multicall3-contract-addresses). + - `ensRegistry` is optional – not all Chains have an ENS Registry. See [ENS Deployments](https://docs.ens.domains/ens-deployments) for more info. +- `testnet`: Whether or not the Chain is a testnet.
+## Connectors + +> **Warning** **Please ask first before starting work on a new Connector.** +> +> To avoid having your pull request declined after investing time and effort into a new Connector, we ask that contributors create a [Connector Request](https://github.com/wagmi-dev/references/discussions/new?category=ideas) before starting work on new Connectors. This helps ensure the Connector solves for an important or general use-case of interest to wagmi users. + +There are a few requirements to note before submitting a pull request: + +### 1. The Connector must present a **novel use-case** + +A novel use-case is likely one that is not already covered by or not easily extended from another Connector (such as the `InjectedConnector` or `WalletConnectConnector`). + +Examples of **novel** use-cases could be a Connector that integrates with: + +- the injected `window.ethereum` provider (a la `InjectedConnector`) +- a series of wallets via QR Codes or Mobile Deep Links (a la `WalletConnectConnector`) +- a wallet with it's own SDK (a la `CoinbaseWalletConnector`) +- hardware wallet(s) via Web USB/Bluetooth +- an Externally Owned Account (e.g. Ethers.js `Wallet`) + +Examples of **nonnovel** use-cases would be a Connector that: + +- extends another Connector (e.g. `WalletConnectConnector`) with no significant differences + +### 2. The Connector's integrations must be production-ready and generally available + +Connectors are intended to be used by consumers in production as part of wagmi. As such, the Connector and all dependencies must be production-ready and generally available. This means your Connector should not rely on non-production software or be restricted to a limited group of users. For example, if your Connector requires a wallet that has a closed beta, it is not ready for inclusion in wagmi. + +### 3. The Connector must be actively maintained + +It is critical Connectors are updated in a timely manner and actively maintained so that users of wagmi can rely on them in production settings. The wagmi core team will provide as much assistance as possible to keep Connectors up-to-date with breaking changes from wagmi, but it is your responsibility to ensure that downstream dependencies and issues/discussions related to the Connector are handled in a timely manner. If this is not done, the Connector could be removed from the future versions. + +### 4. The Connector should have minimal third-party dependencies + +The Connector should rely on as few external libraries or dependencies as possible. This is important for several reasons. First, it helps to ensure the security of the Connector by reducing the potential attack surface (e.g. supply chain attacks). Second, it helps keep the Connector's bundle size down, which can improve initial page-load performance. Finally, having minimal dependencies can improve the reliability of the Connector by reducing the likelihood of conflicts or other issues arising from the use of other external libraries. + +### 5. The Connector should use permissive-license dependencies + +The Connector should use dependencies with the MIT license (or similar) whenever possible. The MIT license is a permissive open-source license that allows for the use, modification, and distribution of software without many of the restrictions that are common in other open-source licenses. Using dependencies with an MIT license can help to ensure that the Connector can be freely used, modified, and distributed by others without any legal complications. + ---
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e36978d..667c536a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -102,3 +102,31 @@ jobs: key: modules-${{ hashFiles('pnpm-lock.yaml') }} - name: Build run: pnpm build + + test: + name: Test + needs: lint + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18] + pnpm-version: [7] + steps: + - uses: actions/checkout@v3 + - uses: pnpm/action-setup@v2.2.4 + with: + version: ${{ matrix.pnpm-version }} + - name: Set up Node ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + cache: 'pnpm' + node-version: ${{ matrix.node-version }} + - name: Cache node_modules + uses: actions/cache@v3 + with: + path: | + node_modules + packages/**/node_modules + key: modules-${{ hashFiles('pnpm-lock.yaml') }} + - name: Run tests + run: pnpm test diff --git a/README.md b/README.md index 77855049..cbec195d 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ The purpose of the references monorepo is so that contributors can open discussi It consists of: - **[Chains](/packages/chains/)**: An extensive collection of chains (e.g. mainnet, polygon, bsc, etc) to use in wagmi. -- **Connectors** (Soon): A collection of connectors (e.g. Injected, WalletConnect, etc) to use in wagmi +- **[Connectors](/packages/connectors/)**: A collection of connectors (e.g. Injected, WalletConnect, etc) to use in wagmi ## Contributing diff --git a/package.json b/package.json index b5e88f06..1d835989 100644 --- a/package.json +++ b/package.json @@ -6,16 +6,19 @@ "build": "pnpm --filter './packages/**' build", "changeset:release": "pnpm build && changeset publish", "changeset:version": "changeset version && pnpm install --lockfile-only", + "dev": "pnpm --filter './packages/**' dev", "lint": "eslint .", "lint:fix": "pnpm lint --fix", "lint:format": "prettier --write", "prepare": "npx simple-git-hooks", + "test": "vitest", "typecheck": "tsc --noEmit" }, "devDependencies": { "@changesets/changelog-github": "^0.4.7", "@changesets/cli": "^2.25.2", "@types/eslint": "^8.4.9", + "@types/fs-extra": "^9.0.13", "@types/node": "^18.11.9", "@typescript-eslint/eslint-plugin": "^5.42.0", "@typescript-eslint/parser": "^5.42.0", @@ -25,6 +28,8 @@ "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-import": "^2.26.0", "eslint-plugin-prettier": "^4.2.1", + "execa": "^6.1.0", + "fs-extra": "^11.1.0", "lint-staged": "^13.0.3", "prettier": "^2.7.1", "simple-git-hooks": "^2.8.1", diff --git a/packages/chains/package.json b/packages/chains/package.json index 4214de18..ac6230f4 100644 --- a/packages/chains/package.json +++ b/packages/chains/package.json @@ -7,7 +7,8 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "scripts": { - "build": "tsup" + "build": "tsup", + "dev": "DEV=true tsup" }, "exports": { ".": { diff --git a/packages/chains/tsup.config.ts b/packages/chains/tsup.config.ts index 7d751541..ef37ee22 100644 --- a/packages/chains/tsup.config.ts +++ b/packages/chains/tsup.config.ts @@ -4,6 +4,7 @@ import { getConfig } from '../../scripts/tsup' export default defineConfig( getConfig({ + dev: process.env.DEV === 'true', entry: ['src/index.ts'], platform: 'browser', }), diff --git a/packages/connectors/.keep b/packages/connectors/.keep deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/connectors/README.md b/packages/connectors/README.md new file mode 100644 index 00000000..22a5c654 --- /dev/null +++ b/packages/connectors/README.md @@ -0,0 +1,58 @@ +# `@wagmi/connectors` + +Collection of connectors for wagmi. + +## Installation + +Install the `@wagmi/connectors` package. + +``` +npm i @wagmi/connectors +``` + +## Usage + +Configure your wagmi client with connectors! + +```tsx +import { configureChains, createClient } from 'wagmi' + +import { InjectedConnector } from '@wagmi/connectors/injected' +import { CoinbaseWalletConnector } from '@wagmi/connectors/coinbaseWallet' +import { WalletConnectConnector } from '@wagmi/connectors/walletConnect' + +const { chains, provider } = configureChains(...) + +const client = createClient({ + connectors: [ + new CoinbaseWalletConnector({ + chains, + options: { + appName: 'wagmi', + }, + }), + new WalletConnectConnector({ + chains, + options: { + qrcode: true, + }, + }), + new InjectedConnector({ chains }), + ], + provider, +}) +``` + +> If your bundler supports tree-shaking (most likely), only the used connectors will be included in the bundle, so you don't have to worry about bundle size. 😊 + +## Connectors + +- [`InjectedConnector`](/packages/connectors/src/injected.ts) +- [`CoinbaseWalletConnector`](/packages/connectors/src/coinbaseWallet.ts) +- [`MetaMaskConnector`](/packages/connectors/src/metaMask.ts) +- [`MockConnector`](/packages/connectors/src/mock.ts) +- [`WalletConnectConnector`](/packages/connectors/src/walletConnect.ts) + +## Contributing + +Want to add another chain to the list? Make sure you read the [contributing guide](../../.github/CONTRIBUTING.md) first. diff --git a/packages/connectors/coinbaseWallet/package.json b/packages/connectors/coinbaseWallet/package.json new file mode 100644 index 00000000..8512061c --- /dev/null +++ b/packages/connectors/coinbaseWallet/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "main": "../dist/coinbaseWallet.js" +} diff --git a/packages/connectors/injected/package.json b/packages/connectors/injected/package.json new file mode 100644 index 00000000..ed8af492 --- /dev/null +++ b/packages/connectors/injected/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "main": "../dist/injected.js" +} diff --git a/packages/connectors/metaMask/package.json b/packages/connectors/metaMask/package.json new file mode 100644 index 00000000..98d43817 --- /dev/null +++ b/packages/connectors/metaMask/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "main": "../dist/metaMask.js" +} diff --git a/packages/connectors/mock/package.json b/packages/connectors/mock/package.json new file mode 100644 index 00000000..81353730 --- /dev/null +++ b/packages/connectors/mock/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "main": "../dist/mock/index.js" +} diff --git a/packages/connectors/package.json b/packages/connectors/package.json new file mode 100644 index 00000000..67726145 --- /dev/null +++ b/packages/connectors/package.json @@ -0,0 +1,98 @@ +{ + "name": "@wagmi/connectors", + "description": "A collection of connectors for wagmi", + "license": "MIT", + "version": "0.0.0", + "scripts": { + "build": "tsup", + "dev": "DEV=true tsup" + }, + "peerDependencies": { + "@wagmi/core": "0.8.x", + "ethers": "^5.0.0" + }, + "peerDependenciesMeta": { + "@wagmi/core": { + "optional": true + } + }, + "dependencies": { + "@coinbase/wallet-sdk": "^3.5.4", + "@walletconnect/ethereum-provider": "^1.8.0", + "abitype": "^0.1.8", + "eventemitter3": "^4.0.7" + }, + "devDependencies": { + "@wagmi/core": "^0.8.0", + "ethers": "^5.7.2" + }, + "type": "module", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "./coinbaseWallet": { + "types": "./dist/coinbaseWallet.d.ts", + "default": "./dist/coinbaseWallet.js" + }, + "./injected": { + "types": "./dist/injected.d.ts", + "default": "./dist/injected.js" + }, + "./metaMask": { + "types": "./dist/metaMask.d.ts", + "default": "./dist/metaMask.js" + }, + "./mock": { + "types": "./dist/mock/index.d.ts", + "default": "./dist/mock/index.js" + }, + "./walletConnect": { + "types": "./dist/walletConnect.d.ts", + "default": "./dist/walletConnect.js" + } + }, + "files": [ + "/coinbaseWallet", + "/dist", + "/injected", + "/metaMask", + "/mock", + "/walletConnect" + ], + "sideEffects": false, + "contributors": [ + "awkweb.eth ", + "jxom.eth " + ], + "homepage": "https://wagmi.sh", + "ethereum": "wagmi-dev.eth", + "funding": [ + { + "type": "gitcoin", + "url": "https://gitcoin.co/grants/4493/wagmi-react-hooks-library-for-ethereum" + }, + { + "type": "github", + "url": "https://github.com/sponsors/wagmi-dev" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/wagmi-dev/references.git", + "directory": "packages/connectors" + }, + "keywords": [ + "react", + "hooks", + "eth", + "ethereum", + "dapps", + "wallet", + "web3", + "abi" + ] +} diff --git a/packages/connectors/src/base.ts b/packages/connectors/src/base.ts new file mode 100644 index 00000000..137d204f --- /dev/null +++ b/packages/connectors/src/base.ts @@ -0,0 +1,82 @@ +import type { Chain } from '@wagmi/core/chains' +import { goerli, mainnet } from '@wagmi/core/chains' +import type { Address } from 'abitype' +import { default as EventEmitter } from 'eventemitter3' + +export type ConnectorData = { + account?: Address + chain?: { id: number; unsupported: boolean } + provider?: Provider +} + +export interface ConnectorEvents { + change(data: ConnectorData): void + connect(data: ConnectorData): void + message({ type, data }: { type: string; data?: unknown }): void + disconnect(): void + error(error: Error): void +} + +export abstract class Connector< + Provider = any, + Options = any, + Signer = any, +> extends EventEmitter> { + /** Unique connector id */ + abstract readonly id: string + /** Connector name */ + abstract readonly name: string + /** Chains connector supports */ + readonly chains: Chain[] + /** Options to use with connector */ + readonly options: Options + /** Whether connector is usable */ + abstract readonly ready: boolean + + constructor({ + chains = [mainnet, goerli], + options, + }: { + chains?: Chain[] + options: Options + }) { + super() + this.chains = chains + this.options = options + } + + abstract connect(config?: { + chainId?: number + }): Promise> + abstract disconnect(): Promise + abstract getAccount(): Promise
+ abstract getChainId(): Promise + abstract getProvider(config?: { chainId?: number }): Promise + abstract getSigner(config?: { chainId?: number }): Promise + abstract isAuthorized(): Promise + switchChain?(chainId: number): Promise + watchAsset?(asset: { + address: string + decimals?: number + image?: string + symbol: string + }): Promise + + protected abstract onAccountsChanged(accounts: Address[]): void + protected abstract onChainChanged(chain: number | string): void + protected abstract onDisconnect(error: Error): void + + protected getBlockExplorerUrls(chain: Chain) { + const { default: blockExplorer, ...blockExplorers } = + chain.blockExplorers ?? {} + if (blockExplorer) + return [ + blockExplorer.url, + ...Object.values(blockExplorers).map((x) => x.url), + ] + } + + protected isChainUnsupported(chainId: number) { + return !this.chains.some((x) => x.id === chainId) + } +} diff --git a/packages/connectors/src/coinbaseWallet.test.ts b/packages/connectors/src/coinbaseWallet.test.ts new file mode 100644 index 00000000..d6b4db6b --- /dev/null +++ b/packages/connectors/src/coinbaseWallet.test.ts @@ -0,0 +1,18 @@ +import { foundry } from '@wagmi/core/chains' +import { testChains } from '@wagmi/core/internal/test' +import { describe, expect, it } from 'vitest' + +import { CoinbaseWalletConnector } from './coinbaseWallet' + +describe('CoinbaseWalletConnector', () => { + it('inits', () => { + const connector = new CoinbaseWalletConnector({ + chains: testChains, + options: { + appName: 'wagmi', + jsonRpcUrl: foundry.rpcUrls.default.http[0], + }, + }) + expect(connector.name).toEqual('Coinbase Wallet') + }) +}) diff --git a/packages/connectors/src/coinbaseWallet.ts b/packages/connectors/src/coinbaseWallet.ts new file mode 100644 index 00000000..07c088d2 --- /dev/null +++ b/packages/connectors/src/coinbaseWallet.ts @@ -0,0 +1,285 @@ +import type { + CoinbaseWalletProvider, + CoinbaseWalletSDK, +} from '@coinbase/wallet-sdk' +import type { CoinbaseWalletSDKOptions } from '@coinbase/wallet-sdk/dist/CoinbaseWalletSDK' +import type { ProviderRpcError } from '@wagmi/core' +import { + AddChainError, + ChainNotConfiguredError, + SwitchChainError, + UserRejectedRequestError, + normalizeChainId, +} from '@wagmi/core' +import type { Chain } from '@wagmi/core/chains' +import type { Address } from 'abitype' +import { providers } from 'ethers' +import { getAddress, hexValue } from 'ethers/lib/utils.js' + +import { Connector } from './base' + +type Options = CoinbaseWalletSDKOptions & { + /** + * Fallback Ethereum JSON RPC URL + * @default "" + */ + jsonRpcUrl?: string + /** + * Fallback Ethereum Chain ID + * @default 1 + */ + chainId?: number +} + +export class CoinbaseWalletConnector extends Connector< + CoinbaseWalletProvider, + Options, + providers.JsonRpcSigner +> { + readonly id = 'coinbaseWallet' + readonly name = 'Coinbase Wallet' + readonly ready = true + + #client?: CoinbaseWalletSDK + #provider?: CoinbaseWalletProvider + + constructor({ chains, options }: { chains?: Chain[]; options: Options }) { + super({ + chains, + options: { + reloadOnDisconnect: false, + ...options, + }, + }) + } + + async connect({ chainId }: { chainId?: number } = {}) { + try { + const provider = await this.getProvider() + provider.on('accountsChanged', this.onAccountsChanged) + provider.on('chainChanged', this.onChainChanged) + provider.on('disconnect', this.onDisconnect) + + this.emit('message', { type: 'connecting' }) + + const accounts = await provider.enable() + const account = getAddress(accounts[0] as string) + // Switch to chain if provided + let id = await this.getChainId() + let unsupported = this.isChainUnsupported(id) + if (chainId && id !== chainId) { + const chain = await this.switchChain(chainId) + id = chain.id + unsupported = this.isChainUnsupported(id) + } + + return { + account, + chain: { id, unsupported }, + provider: new providers.Web3Provider( + provider as unknown as providers.ExternalProvider, + ), + } + } catch (error) { + if ( + /(user closed modal|accounts received is empty)/i.test( + (error as ProviderRpcError).message, + ) + ) + throw new UserRejectedRequestError(error) + throw error + } + } + + async disconnect() { + if (!this.#provider) return + + const provider = await this.getProvider() + provider.removeListener('accountsChanged', this.onAccountsChanged) + provider.removeListener('chainChanged', this.onChainChanged) + provider.removeListener('disconnect', this.onDisconnect) + provider.disconnect() + provider.close() + } + + async getAccount() { + const provider = await this.getProvider() + const accounts = await provider.request({ + method: 'eth_accounts', + }) + // return checksum address + return getAddress(accounts[0] as string) + } + + async getChainId() { + const provider = await this.getProvider() + const chainId = normalizeChainId(provider.chainId) + return chainId + } + + async getProvider() { + if (!this.#provider) { + let CoinbaseWalletSDK = (await import('@coinbase/wallet-sdk')).default + // Workaround for Vite dev import errors + // https://github.com/vitejs/vite/issues/7112 + if ( + typeof CoinbaseWalletSDK !== 'function' && + // @ts-expect-error This import error is not visible to TypeScript + typeof CoinbaseWalletSDK.default === 'function' + ) + CoinbaseWalletSDK = ( + CoinbaseWalletSDK as unknown as { default: typeof CoinbaseWalletSDK } + ).default + this.#client = new CoinbaseWalletSDK(this.options) + + /** + * Mock implementations to retrieve private `walletExtension` method + * from the Coinbase Wallet SDK. + */ + abstract class WalletProvider { + // https://github.com/coinbase/coinbase-wallet-sdk/blob/b4cca90022ffeb46b7bbaaab9389a33133fe0844/packages/wallet-sdk/src/provider/CoinbaseWalletProvider.ts#L927-L936 + abstract getChainId(): number + } + abstract class Client { + // https://github.com/coinbase/coinbase-wallet-sdk/blob/b4cca90022ffeb46b7bbaaab9389a33133fe0844/packages/wallet-sdk/src/CoinbaseWalletSDK.ts#L233-L235 + abstract get walletExtension(): WalletProvider | undefined + } + const walletExtensionChainId = ( + this.#client as unknown as Client + ).walletExtension?.getChainId() + + const chain = + this.chains.find((chain) => + this.options.chainId + ? chain.id === this.options.chainId + : chain.id === walletExtensionChainId, + ) || this.chains[0] + const chainId = this.options.chainId || chain?.id + const jsonRpcUrl = + this.options.jsonRpcUrl || chain?.rpcUrls.default.http[0] + + this.#provider = this.#client.makeWeb3Provider(jsonRpcUrl, chainId) + } + return this.#provider + } + + async getSigner({ chainId }: { chainId?: number } = {}) { + const [provider, account] = await Promise.all([ + this.getProvider(), + this.getAccount(), + ]) + return new providers.Web3Provider( + provider as unknown as providers.ExternalProvider, + chainId, + ).getSigner(account) + } + + async isAuthorized() { + try { + const account = await this.getAccount() + return !!account + } catch { + return false + } + } + + async switchChain(chainId: number) { + const provider = await this.getProvider() + const id = hexValue(chainId) + + try { + await provider.request({ + method: 'wallet_switchEthereumChain', + params: [{ chainId: id }], + }) + return ( + this.chains.find((x) => x.id === chainId) ?? { + id: chainId, + name: `Chain ${id}`, + network: `${id}`, + nativeCurrency: { name: 'Ether', decimals: 18, symbol: 'ETH' }, + rpcUrls: { default: { http: [''] } }, + } + ) + } catch (error) { + const chain = this.chains.find((x) => x.id === chainId) + if (!chain) + throw new ChainNotConfiguredError({ chainId, connectorId: this.id }) + + // Indicates chain is not added to provider + if ((error as ProviderRpcError).code === 4902) { + try { + await provider.request({ + method: 'wallet_addEthereumChain', + params: [ + { + chainId: id, + chainName: chain.name, + nativeCurrency: chain.nativeCurrency, + rpcUrls: [ + chain.rpcUrls.public?.http[0] ?? + chain.rpcUrls.default.http[0], + ], + blockExplorerUrls: this.getBlockExplorerUrls(chain), + }, + ], + }) + return chain + } catch (addError) { + if (this.#isUserRejectedRequestError(addError)) + throw new UserRejectedRequestError(addError) + throw new AddChainError() + } + } + + if (this.#isUserRejectedRequestError(error)) + throw new UserRejectedRequestError(error) + throw new SwitchChainError(error) + } + } + + async watchAsset({ + address, + decimals = 18, + image, + symbol, + }: { + address: string + decimals?: number + image?: string + symbol: string + }) { + const provider = await this.getProvider() + return provider.request({ + method: 'wallet_watchAsset', + params: { + type: 'ERC20', + options: { + address, + decimals, + image, + symbol, + }, + }, + }) + } + + protected onAccountsChanged = (accounts: string[]) => { + if (accounts.length === 0) this.emit('disconnect') + else this.emit('change', { account: getAddress(accounts[0] as string) }) + } + + protected onChainChanged = (chainId: number | string) => { + const id = normalizeChainId(chainId) + const unsupported = this.isChainUnsupported(id) + this.emit('change', { chain: { id, unsupported } }) + } + + protected onDisconnect = () => { + this.emit('disconnect') + } + + #isUserRejectedRequestError(error: unknown) { + return /(user rejected)/i.test((error as Error).message) + } +} diff --git a/packages/connectors/src/index.ts b/packages/connectors/src/index.ts new file mode 100644 index 00000000..51ec4092 --- /dev/null +++ b/packages/connectors/src/index.ts @@ -0,0 +1,2 @@ +export { Connector } from './base' +export type { ConnectorData, ConnectorEvents } from './base' diff --git a/packages/connectors/src/injected.test.ts b/packages/connectors/src/injected.test.ts new file mode 100644 index 00000000..568287fa --- /dev/null +++ b/packages/connectors/src/injected.test.ts @@ -0,0 +1,5 @@ +import { describe, it } from 'vitest' + +describe('InjectedConnector', () => { + it.todo('inits') +}) diff --git a/packages/connectors/src/injected.ts b/packages/connectors/src/injected.ts new file mode 100644 index 00000000..a079cda9 --- /dev/null +++ b/packages/connectors/src/injected.ts @@ -0,0 +1,319 @@ +import type { ProviderRpcError, RpcError } from '@wagmi/core' +import { + AddChainError, + ChainNotConfiguredError, + ConnectorNotFoundError, + ResourceUnavailableError, + SwitchChainError, + UserRejectedRequestError, + getClient, + normalizeChainId, +} from '@wagmi/core' +import type { Chain } from '@wagmi/core/chains' +import type { Address } from 'abitype' +import { providers } from 'ethers' +import { getAddress, hexValue } from 'ethers/lib/utils.js' + +import { Connector } from './base' +import { getInjectedName } from './utils/getInjectedName' + +export type InjectedConnectorOptions = { + /** Name of connector */ + name?: string | ((detectedName: string | string[]) => string) + /** + * [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) Ethereum Provider to target + * + * @default + * () => typeof window !== 'undefined' ? window.ethereum : undefined + */ + getProvider?: () => Window['ethereum'] | undefined + /** + * MetaMask 10.9.3 emits disconnect event when chain is changed. + * This flag prevents the `"disconnect"` event from being emitted upon switching chains. See [GitHub issue](https://github.com/MetaMask/metamask-extension/issues/13375#issuecomment-1027663334) for more info. + */ + shimChainChangedDisconnect?: boolean + /** + * MetaMask and other injected providers do not support programmatic disconnect. + * This flag simulates the disconnect behavior by keeping track of connection status in storage. See [GitHub issue](https://github.com/MetaMask/metamask-extension/issues/10353) for more info. + * @default true + */ + shimDisconnect?: boolean +} + +type ConnectorOptions = InjectedConnectorOptions & + Required> + +export class InjectedConnector extends Connector< + Window['ethereum'], + ConnectorOptions, + providers.JsonRpcSigner +> { + readonly id: string + readonly name: string + readonly ready: boolean + + #provider?: Window['ethereum'] + #switchingChains?: boolean + + protected shimDisconnectKey = 'injected.shimDisconnect' + + constructor({ + chains, + options: options_, + }: { + chains?: Chain[] + options?: InjectedConnectorOptions + } = {}) { + const options = { + shimDisconnect: true, + shimChainChangedDisconnect: true, + getProvider: () => + typeof window !== 'undefined' ? window.ethereum : undefined, + ...options_, + } + super({ chains, options }) + + const provider = options.getProvider() + if (typeof options.name === 'string') this.name = options.name + else if (provider) { + const detectedName = getInjectedName(provider) + if (options.name) this.name = options.name(detectedName) + else { + if (typeof detectedName === 'string') this.name = detectedName + else this.name = detectedName[0] as string + } + } else this.name = 'Injected' + + this.id = 'injected' + this.ready = !!provider + } + + async connect({ chainId }: { chainId?: number } = {}) { + try { + const provider = await this.getProvider() + if (!provider) throw new ConnectorNotFoundError() + + if (provider.on) { + provider.on('accountsChanged', this.onAccountsChanged) + provider.on('chainChanged', this.onChainChanged) + provider.on('disconnect', this.onDisconnect) + } + + this.emit('message', { type: 'connecting' }) + + const accounts = await provider.request({ + method: 'eth_requestAccounts', + }) + const account = getAddress(accounts[0] as string) + // Switch to chain if provided + let id = await this.getChainId() + let unsupported = this.isChainUnsupported(id) + if (chainId && id !== chainId) { + const chain = await this.switchChain(chainId) + id = chain.id + unsupported = this.isChainUnsupported(id) + } + + // Add shim to storage signalling wallet is connected + if (this.options.shimDisconnect) + getClient().storage?.setItem(this.shimDisconnectKey, true) + + return { account, chain: { id, unsupported }, provider } + } catch (error) { + if (this.isUserRejectedRequestError(error)) + throw new UserRejectedRequestError(error) + if ((error as RpcError).code === -32002) + throw new ResourceUnavailableError(error) + throw error + } + } + + async disconnect() { + const provider = await this.getProvider() + if (!provider?.removeListener) return + + provider.removeListener('accountsChanged', this.onAccountsChanged) + provider.removeListener('chainChanged', this.onChainChanged) + provider.removeListener('disconnect', this.onDisconnect) + + // Remove shim signalling wallet is disconnected + if (this.options.shimDisconnect) + getClient().storage?.removeItem(this.shimDisconnectKey) + } + + async getAccount() { + const provider = await this.getProvider() + if (!provider) throw new ConnectorNotFoundError() + const accounts = await provider.request({ + method: 'eth_accounts', + }) + // return checksum address + return getAddress(accounts[0] as string) + } + + async getChainId() { + const provider = await this.getProvider() + if (!provider) throw new ConnectorNotFoundError() + return provider.request({ method: 'eth_chainId' }).then(normalizeChainId) + } + + async getProvider() { + const provider = this.options.getProvider() + if (provider) this.#provider = provider + return this.#provider + } + + async getSigner({ chainId }: { chainId?: number } = {}) { + const [provider, account] = await Promise.all([ + this.getProvider(), + this.getAccount(), + ]) + return new providers.Web3Provider( + provider as providers.ExternalProvider, + chainId, + ).getSigner(account) + } + + async isAuthorized() { + try { + if ( + this.options.shimDisconnect && + // If shim does not exist in storage, wallet is disconnected + !getClient().storage?.getItem(this.shimDisconnectKey) + ) + return false + + const provider = await this.getProvider() + if (!provider) throw new ConnectorNotFoundError() + const account = await this.getAccount() + return !!account + } catch { + return false + } + } + + async switchChain(chainId: number) { + if (this.options.shimChainChangedDisconnect) this.#switchingChains = true + + const provider = await this.getProvider() + if (!provider) throw new ConnectorNotFoundError() + const id = hexValue(chainId) + + try { + await provider.request({ + method: 'wallet_switchEthereumChain', + params: [{ chainId: id }], + }) + return ( + this.chains.find((x) => x.id === chainId) ?? { + id: chainId, + name: `Chain ${id}`, + network: `${id}`, + nativeCurrency: { name: 'Ether', decimals: 18, symbol: 'ETH' }, + rpcUrls: { default: { http: [''] } }, + } + ) + } catch (error) { + const chain = this.chains.find((x) => x.id === chainId) + if (!chain) + throw new ChainNotConfiguredError({ chainId, connectorId: this.id }) + + // Indicates chain is not added to provider + if ( + (error as ProviderRpcError).code === 4902 || + // Unwrapping for MetaMask Mobile + // https://github.com/MetaMask/metamask-mobile/issues/2944#issuecomment-976988719 + (error as RpcError<{ originalError?: { code: number } }>)?.data + ?.originalError?.code === 4902 + ) { + try { + await provider.request({ + method: 'wallet_addEthereumChain', + params: [ + { + chainId: id, + chainName: chain.name, + nativeCurrency: chain.nativeCurrency, + rpcUrls: [ + chain.rpcUrls.public?.http[0] ?? + chain.rpcUrls.default.http[0] ?? + '', + ], + blockExplorerUrls: this.getBlockExplorerUrls(chain), + }, + ], + }) + return chain + } catch (addError) { + if (this.isUserRejectedRequestError(addError)) + throw new UserRejectedRequestError(error) + throw new AddChainError() + } + } + + if (this.isUserRejectedRequestError(error)) + throw new UserRejectedRequestError(error) + throw new SwitchChainError(error) + } + } + + async watchAsset({ + address, + decimals = 18, + image, + symbol, + }: { + address: Address + decimals?: number + image?: string + symbol: string + }) { + const provider = await this.getProvider() + if (!provider) throw new ConnectorNotFoundError() + return provider.request({ + method: 'wallet_watchAsset', + params: { + type: 'ERC20', + options: { + address, + decimals, + image, + symbol, + }, + }, + }) + } + + protected onAccountsChanged = (accounts: string[]) => { + if (accounts.length === 0) this.emit('disconnect') + else + this.emit('change', { + account: getAddress(accounts[0] as string), + }) + } + + protected onChainChanged = (chainId: number | string) => { + const id = normalizeChainId(chainId) + const unsupported = this.isChainUnsupported(id) + this.emit('change', { chain: { id, unsupported } }) + } + + protected onDisconnect = () => { + // We need this as MetaMask can emit the "disconnect" event + // upon switching chains. This workaround ensures that the + // user currently isn't in the process of switching chains. + if (this.options.shimChainChangedDisconnect && this.#switchingChains) { + this.#switchingChains = false + return + } + + this.emit('disconnect') + // Remove shim signalling wallet is disconnected + if (this.options.shimDisconnect) + getClient().storage?.removeItem(this.shimDisconnectKey) + } + + protected isUserRejectedRequestError(error: unknown) { + return (error as ProviderRpcError).code === 4001 + } +} diff --git a/packages/connectors/src/metaMask.test.ts b/packages/connectors/src/metaMask.test.ts new file mode 100644 index 00000000..51015a2a --- /dev/null +++ b/packages/connectors/src/metaMask.test.ts @@ -0,0 +1,5 @@ +import { describe, it } from 'vitest' + +describe('MetaMaskConnector', () => { + it.todo('inits') +}) diff --git a/packages/connectors/src/metaMask.ts b/packages/connectors/src/metaMask.ts new file mode 100644 index 00000000..23d7b2e4 --- /dev/null +++ b/packages/connectors/src/metaMask.ts @@ -0,0 +1,136 @@ +import { + ConnectorNotFoundError, + ResourceUnavailableError, + UserRejectedRequestError, + getClient, +} from '@wagmi/core' +import type { Ethereum, RpcError } from '@wagmi/core' +import type { Chain } from '@wagmi/core/chains' +import type { Address } from 'abitype' +import { getAddress } from 'ethers/lib/utils.js' + +import type { InjectedConnectorOptions } from './injected' +import { InjectedConnector } from './injected' + +export type MetaMaskConnectorOptions = Pick< + InjectedConnectorOptions, + 'shimChainChangedDisconnect' | 'shimDisconnect' +> & { + /** + * While "disconnected" with `shimDisconnect`, allows user to select a different MetaMask account (than the currently connected account) when trying to connect. + */ + UNSTABLE_shimOnConnectSelectAccount?: boolean +} + +export class MetaMaskConnector extends InjectedConnector { + readonly id = 'metaMask' + + #UNSTABLE_shimOnConnectSelectAccount: MetaMaskConnectorOptions['UNSTABLE_shimOnConnectSelectAccount'] + + constructor({ + chains, + options: options_, + }: { + chains?: Chain[] + options?: MetaMaskConnectorOptions + } = {}) { + const options = { + name: 'MetaMask', + shimDisconnect: true, + shimChainChangedDisconnect: true, + getProvider() { + function getReady(ethereum?: Ethereum) { + const isMetaMask = !!ethereum?.isMetaMask + if (!isMetaMask) return + // Brave tries to make itself look like MetaMask + // Could also try RPC `web3_clientVersion` if following is unreliable + if (ethereum.isBraveWallet && !ethereum._events && !ethereum._state) + return + if (ethereum.isAvalanche) return + if (ethereum.isKuCoinWallet) return + if (ethereum.isPortal) return + if (ethereum.isTokenPocket) return + if (ethereum.isTokenary) return + return ethereum + } + + if (typeof window === 'undefined') return + if (window.ethereum?.providers) + return window.ethereum.providers.find(getReady) + return getReady(window.ethereum) + }, + ...options_, + } + super({ chains, options }) + + this.#UNSTABLE_shimOnConnectSelectAccount = + options.UNSTABLE_shimOnConnectSelectAccount + } + + async connect({ chainId }: { chainId?: number } = {}) { + try { + const provider = await this.getProvider() + if (!provider) throw new ConnectorNotFoundError() + + if (provider.on) { + provider.on('accountsChanged', this.onAccountsChanged) + provider.on('chainChanged', this.onChainChanged) + provider.on('disconnect', this.onDisconnect) + } + + this.emit('message', { type: 'connecting' }) + + // Attempt to show wallet select prompt with `wallet_requestPermissions` when + // `shimDisconnect` is active and account is in disconnected state (flag in storage) + let account: Address | null = null + if ( + this.#UNSTABLE_shimOnConnectSelectAccount && + this.options?.shimDisconnect && + !getClient().storage?.getItem(this.shimDisconnectKey) + ) { + account = await this.getAccount().catch(() => null) + const isConnected = !!account + if (isConnected) + // Attempt to show another prompt for selecting wallet if already connected + try { + await provider.request({ + method: 'wallet_requestPermissions', + params: [{ eth_accounts: {} }], + }) + } catch (error) { + // Not all MetaMask injected providers support `wallet_requestPermissions` (e.g. MetaMask iOS). + // Only bubble up error if user rejects request + if (this.isUserRejectedRequestError(error)) + throw new UserRejectedRequestError(error) + } + } + + if (!account) { + const accounts = await provider.request({ + method: 'eth_requestAccounts', + }) + account = getAddress(accounts[0] as string) + } + + // Switch to chain if provided + let id = await this.getChainId() + let unsupported = this.isChainUnsupported(id) + if (chainId && id !== chainId) { + const chain = await this.switchChain(chainId) + id = chain.id + unsupported = this.isChainUnsupported(id) + } + + if (this.options?.shimDisconnect) + getClient().storage?.setItem(this.shimDisconnectKey, true) + + return { account, chain: { id, unsupported }, provider } + } catch (error) { + if (this.isUserRejectedRequestError(error)) + throw new UserRejectedRequestError(error) + if ((error as RpcError).code === -32002) + throw new ResourceUnavailableError(error) + throw error + } + } +} diff --git a/packages/connectors/src/mock/connector.test.ts b/packages/connectors/src/mock/connector.test.ts new file mode 100644 index 00000000..7bd7a412 --- /dev/null +++ b/packages/connectors/src/mock/connector.test.ts @@ -0,0 +1,149 @@ +import type { Signer } from '@wagmi/core' +import { getSigners } from '@wagmi/core/internal/test' +import { beforeEach, describe, expect, it, vi } from 'vitest' + +import { MockConnector } from './connector' + +describe('MockConnector', () => { + let connector: MockConnector + let signer: Signer + beforeEach(() => { + const signers = getSigners() + signer = signers[0]! + connector = new MockConnector({ + options: { signer }, + }) + }) + + it('constructor', () => { + expect(connector.name).toEqual('Mock') + expect(connector.ready).toEqual(true) + }) + + describe('connect', () => { + it('succeeds', async () => { + const onChange = vi.fn() + connector.on('change', onChange) + + expect(await connector.connect()).toMatchInlineSnapshot(` + { + "account": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "chain": { + "id": 1, + "unsupported": false, + }, + "provider": "", + } + `) + expect(onChange).toBeCalledTimes(1) + expect(await connector.isAuthorized()).toEqual(true) + }) + + it('fails', async () => { + const connector = new MockConnector({ + options: { + flags: { failConnect: true }, + signer, + }, + }) + await expect( + connector.connect(), + ).rejects.toThrowErrorMatchingInlineSnapshot(`"User rejected request"`) + }) + }) + + it('disconnect', async () => { + const onDisconnect = vi.fn() + connector.on('disconnect', onDisconnect) + + await connector.connect() + await connector.disconnect() + expect(onDisconnect).toBeCalledTimes(1) + }) + + describe('getAccount', () => { + it('succeeds', async () => { + await connector.connect() + expect(await connector.getAccount()).toMatchInlineSnapshot( + `"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"`, + ) + }) + + it('fails', async () => { + await expect( + connector.getAccount(), + ).rejects.toThrowErrorMatchingInlineSnapshot(`"Failed to get account"`) + }) + }) + + it('getChainId', async () => { + expect(await connector.getChainId()).toEqual(1) + }) + + it('getProvider', async () => { + expect(await connector.getProvider()).toMatchInlineSnapshot( + `""`, + ) + }) + + it('getSigner', async () => { + await connector.connect() + expect(await connector.getSigner()).toMatchInlineSnapshot(` + WalletSigner { + "_isSigner": true, + "_mnemonic": [Function], + "_signingKey": [Function], + "address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "provider": "", + } + `) + }) + + describe('isAuthorized', () => { + it('true', async () => { + await connector.connect() + expect(await connector.isAuthorized()).toMatchInlineSnapshot(`true`) + }) + + it('false', async () => { + expect(await connector.isAuthorized()).toMatchInlineSnapshot(`true`) + }) + }) + + describe('switchChain', () => { + it('succeeds', async () => { + const onChange = vi.fn() + connector.on('change', onChange) + + expect(await connector.getChainId()).toEqual(1) + await connector.connect() + await connector.switchChain?.(4) + expect(onChange).toBeCalledTimes(2) + expect(await connector.getChainId()).toEqual(4) + }) + + it('fails', async () => { + const connector = new MockConnector({ + options: { + flags: { failSwitchChain: true }, + signer, + }, + }) + await connector.connect() + await expect( + connector.switchChain?.(4), + ).rejects.toThrowErrorMatchingInlineSnapshot(`"User rejected request"`) + }) + }) + + it('watchAsset', async () => { + await connector.connect() + expect( + await connector.watchAsset({ + address: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984', + decimals: 18, + symbol: 'UNI', + }), + ).toEqual(true) + }) +}) diff --git a/packages/connectors/src/mock/connector.ts b/packages/connectors/src/mock/connector.ts new file mode 100644 index 00000000..cb72c1c7 --- /dev/null +++ b/packages/connectors/src/mock/connector.ts @@ -0,0 +1,131 @@ +import { normalizeChainId } from '@wagmi/core' +import type { Chain } from '@wagmi/core/chains' +import { getAddress } from 'ethers/lib/utils.js' + +import type { ConnectorData } from '../base' +import { Connector } from '../base' +import type { MockProviderOptions } from './provider' +import { MockProvider } from './provider' + +export class MockConnector extends Connector< + MockProvider, + MockProviderOptions +> { + readonly id = 'mock' + readonly name = 'Mock' + readonly ready = true + + #provider?: MockProvider + + constructor(config: { chains?: Chain[]; options: MockProviderOptions }) { + super(config) + } + + async connect({ chainId }: { chainId?: number } = {}) { + const provider = await this.getProvider({ chainId }) + provider.on('accountsChanged', this.onAccountsChanged) + provider.on('chainChanged', this.onChainChanged) + provider.on('disconnect', this.onDisconnect) + + this.emit('message', { type: 'connecting' }) + + const accounts = await provider.enable() + const account = getAddress(accounts[0] as string) + const id = normalizeChainId(provider._network.chainId) + const unsupported = this.isChainUnsupported(id) + const data = { account, chain: { id, unsupported }, provider } + + if (!this.options.flags?.noSwitchChain) this.switchChain = this.#switchChain + + return new Promise>((res) => + setTimeout(() => res(data), 100), + ) + } + + async disconnect() { + const provider = await this.getProvider() + await provider.disconnect() + + provider.removeListener('accountsChanged', this.onAccountsChanged) + provider.removeListener('chainChanged', this.onChainChanged) + provider.removeListener('disconnect', this.onDisconnect) + } + + async getAccount() { + const provider = await this.getProvider() + const accounts = await provider.getAccounts() + const account = accounts[0] + if (!account) throw new Error('Failed to get account') + // return checksum address + return getAddress(account) + } + + async getChainId() { + const provider = await this.getProvider() + return normalizeChainId(provider.network.chainId) + } + + async getProvider({ chainId }: { chainId?: number } = {}) { + if (!this.#provider || chainId) + this.#provider = new MockProvider({ ...this.options, chainId }) + return this.#provider + } + + async getSigner() { + const provider = await this.getProvider() + return provider.getSigner() + } + + async isAuthorized() { + try { + const provider = await this.getProvider() + const account = await provider.getAccounts() + return this.options.flags?.isAuthorized ?? !!account + } catch { + return false + } + } + + async #switchChain(chainId: number) { + const provider = await this.getProvider() + await provider.switchChain(chainId) + return ( + this.chains.find((x) => x.id === chainId) ?? { + id: chainId, + name: `Chain ${chainId}`, + network: `${chainId}`, + nativeCurrency: { name: 'Ether', decimals: 18, symbol: 'ETH' }, + rpcUrls: { default: { http: [''] } }, + } + ) + } + + async watchAsset(asset: { + address: string + decimals?: number + image?: string + symbol: string + }) { + const provider = await this.getProvider() + return provider.watchAsset(asset) + } + + protected onAccountsChanged = (accounts: string[]) => { + if (accounts.length === 0) this.emit('disconnect') + else this.emit('change', { account: getAddress(accounts[0] as string) }) + } + + protected onChainChanged = (chainId: number | string) => { + const id = normalizeChainId(chainId) + const unsupported = this.isChainUnsupported(id) + this.emit('change', { chain: { id, unsupported } }) + } + + protected onDisconnect = () => { + this.emit('disconnect') + } + + toJSON() { + return '' + } +} diff --git a/packages/connectors/src/mock/index.ts b/packages/connectors/src/mock/index.ts new file mode 100644 index 00000000..11715386 --- /dev/null +++ b/packages/connectors/src/mock/index.ts @@ -0,0 +1,2 @@ +export { MockConnector } from './connector' +export { type MockProviderOptions, MockProvider } from './provider' diff --git a/packages/connectors/src/mock/provider.test.ts b/packages/connectors/src/mock/provider.test.ts new file mode 100644 index 00000000..57447d2f --- /dev/null +++ b/packages/connectors/src/mock/provider.test.ts @@ -0,0 +1,110 @@ +import type { Signer } from '@wagmi/core' +import { getSigners } from '@wagmi/core/internal/test' +import { beforeEach, describe, expect, it } from 'vitest' + +import { MockProvider } from './provider' + +describe('MockProvider', () => { + let provider: MockProvider + let signer: Signer + beforeEach(() => { + const signers = getSigners() + signer = signers[0]! + provider = new MockProvider({ signer }) + }) + + it('constructor', () => { + expect(provider).toBeDefined() + }) + + describe('connect', () => { + it('succeeds', async () => { + const accounts = await provider.enable() + const account = await signer.getAddress() + expect(accounts[0]).toEqual(account) + }) + + it('fails', async () => { + const signers = getSigners() + signer = signers[0]! + const provider = new MockProvider({ + flags: { failConnect: true }, + signer, + }) + await expect( + provider.enable(), + ).rejects.toThrowErrorMatchingInlineSnapshot(`"User rejected request"`) + }) + }) + + it('disconnect', async () => { + await provider.enable() + await provider.disconnect() + const accounts = await provider.getAccounts() + expect(accounts[0]).toEqual(undefined) + }) + + describe('getAccounts', () => { + it('disconnected', async () => { + const accounts = await provider.getAccounts() + expect(accounts[0]).toEqual(undefined) + }) + + it('connected', async () => { + await provider.enable() + const account = await signer.getAddress() + const connected = await provider.getAccounts() + expect(connected[0]).toEqual(account) + }) + }) + + describe('getSigner', () => { + it('disconnected', () => { + try { + provider.getSigner() + } catch (error) { + expect(error).toMatchInlineSnapshot(`[Error: Signer not found]`) + } + }) + + it('connected', async () => { + await provider.enable() + expect(provider.getSigner()).toMatchInlineSnapshot(` + WalletSigner { + "_isSigner": true, + "_mnemonic": [Function], + "_signingKey": [Function], + "address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "provider": "", + } + `) + }) + }) + + describe('switchChain', () => { + it('succeeds', async () => { + await provider.switchChain(4) + expect(provider.network.chainId).toEqual(4) + }) + + it('fails', async () => { + const provider = new MockProvider({ + flags: { failSwitchChain: true }, + signer, + }) + await expect( + provider.switchChain(4), + ).rejects.toThrowErrorMatchingInlineSnapshot(`"User rejected request"`) + }) + }) + + it('watchAsset', async () => { + expect( + await provider.watchAsset({ + address: '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984', + decimals: 18, + symbol: 'UNI', + }), + ).toEqual(true) + }) +}) diff --git a/packages/connectors/src/mock/provider.ts b/packages/connectors/src/mock/provider.ts new file mode 100644 index 00000000..3bfe6263 --- /dev/null +++ b/packages/connectors/src/mock/provider.ts @@ -0,0 +1,99 @@ +import { UserRejectedRequestError } from '@wagmi/core' +import type { Signer } from '@wagmi/core' +import { providers } from 'ethers' +import { getAddress } from 'ethers/lib/utils.js' +import { default as EventEmitter } from 'eventemitter3' + +export type MockProviderOptions = { + chainId?: number + flags?: { + isAuthorized?: boolean + failConnect?: boolean + failSwitchChain?: boolean + noSwitchChain?: boolean + } + signer: Signer +} + +type Events = { + accountsChanged(accounts: string[]): void + chainChanged(chainId: number | string): void + disconnect(): void +} +type Event = keyof Events + +export class MockProvider extends providers.BaseProvider { + events = new EventEmitter() + + #options: MockProviderOptions + #signer?: Signer + + constructor(options: MockProviderOptions) { + super({ name: 'Network', chainId: options.chainId ?? 1 }) + this.#options = options + } + + async enable() { + if (this.#options.flags?.failConnect) + throw new UserRejectedRequestError(new Error('Failed to connect')) + if (!this.#signer) this.#signer = this.#options.signer + const address = await this.#signer.getAddress() + this.events.emit('accountsChanged', [address]) + return [address] + } + + async disconnect() { + this.events.emit('disconnect') + this.#signer = undefined + } + + async getAccounts() { + const address = await this.#signer?.getAddress() + if (!address) return [] + return [getAddress(address)] + } + + getSigner() { + const signer = this.#signer + if (!signer) throw new Error('Signer not found') + return signer + } + + async switchChain(chainId: number) { + if (this.#options.flags?.failSwitchChain) + throw new UserRejectedRequestError(new Error('Failed to switch chain')) + this.#options.chainId = chainId + this.network.chainId = chainId + this.events.emit('chainChanged', chainId) + } + + async watchAsset(_asset: { + address: string + decimals?: number + image?: string + symbol: string + }) { + return true + } + + on(event: Event, listener: providers.Listener) { + this.events.on(event, listener) + return this + } + once(event: Event, listener: providers.Listener) { + this.events.once(event, listener) + return this + } + removeListener(event: Event, listener: providers.Listener) { + this.events.removeListener(event, listener) + return this + } + off(event: Event, listener: providers.Listener) { + this.events.off(event, listener) + return this + } + + toJSON() { + return '' + } +} diff --git a/packages/connectors/src/utils/getInjectedName.test.ts b/packages/connectors/src/utils/getInjectedName.test.ts new file mode 100644 index 00000000..bfff4bda --- /dev/null +++ b/packages/connectors/src/utils/getInjectedName.test.ts @@ -0,0 +1,66 @@ +import type { Ethereum } from '@wagmi/core' +import { describe, expect, it } from 'vitest' + +import { getInjectedName } from './getInjectedName' + +describe.each([ + { ethereum: undefined, expected: 'Injected' }, + { ethereum: { isAvalanche: true }, expected: 'Core Wallet' }, + { + ethereum: { isAvalanche: true, isMetaMask: true }, + expected: 'Core Wallet', + }, + { ethereum: { isBitKeep: true }, expected: 'BitKeep' }, + { ethereum: { isBraveWallet: true }, expected: 'Brave Wallet' }, + { + ethereum: { isBraveWallet: true, isMetaMask: true }, + expected: 'Brave Wallet', + }, + { ethereum: { isCoinbaseWallet: true }, expected: 'Coinbase Wallet' }, + { ethereum: { isExodus: true }, expected: 'Exodus' }, + { ethereum: { isFrame: true }, expected: 'Frame' }, + { ethereum: { isKuCoinWallet: true }, expected: 'KuCoin Wallet' }, + { + ethereum: { isKuCoinWallet: true, isMetaMask: true }, + expected: 'KuCoin Wallet', + }, + { + ethereum: { isMathWallet: true, isMetaMask: true }, + expected: 'MathWallet', + }, + { ethereum: { isOneInchIOSWallet: true }, expected: '1inch Wallet' }, + { ethereum: { isOneInchAndroidWallet: true }, expected: '1inch Wallet' }, + { ethereum: { isPortal: true }, expected: 'Ripio Portal' }, + { ethereum: { isTally: true }, expected: 'Tally' }, + { + ethereum: { isTokenPocket: true, isMetaMask: true }, + expected: 'TokenPocket', + }, + { ethereum: { isTokenary: true, isMetaMask: true }, expected: 'Tokenary' }, + { ethereum: { isTrust: true }, expected: 'Trust Wallet' }, + { ethereum: { isTrustWallet: true }, expected: 'Trust Wallet' }, + { ethereum: { isMetaMask: true }, expected: 'MetaMask' }, + { + ethereum: { providers: [{ isMetaMask: true }, { isCoinbaseWallet: true }] }, + expected: ['MetaMask', 'Coinbase Wallet'], + }, + { + ethereum: { + providers: [ + { isMetaMask: true }, + { isMetaMask: true, isTokenary: true }, + { isCoinbaseWallet: true }, + ], + }, + expected: ['MetaMask', 'Tokenary', 'Coinbase Wallet'], + }, + { + ethereum: { providers: [{ isMetaMask: true }, { isFooWallet: true }, {}] }, + expected: ['MetaMask', 'Unknown Wallet #1', 'Unknown Wallet #2'], + }, + { ethereum: {}, expected: 'Injected' }, +])('getInjectedName($ethereum)', ({ ethereum, expected }) => { + it(`returns ${expected}`, () => { + expect(getInjectedName(ethereum as Ethereum)).toEqual(expected) + }) +}) diff --git a/packages/connectors/src/utils/getInjectedName.ts b/packages/connectors/src/utils/getInjectedName.ts new file mode 100644 index 00000000..569b8e5c --- /dev/null +++ b/packages/connectors/src/utils/getInjectedName.ts @@ -0,0 +1,46 @@ +import type { Ethereum } from '@wagmi/core' + +export function getInjectedName(ethereum?: Ethereum) { + if (!ethereum) return 'Injected' + + const getName = (provider: Ethereum) => { + if (provider.isAvalanche) return 'Core Wallet' + if (provider.isBitKeep) return 'BitKeep' + if (provider.isBraveWallet) return 'Brave Wallet' + if (provider.isCoinbaseWallet) return 'Coinbase Wallet' + if (provider.isExodus) return 'Exodus' + if (provider.isFrame) return 'Frame' + if (provider.isKuCoinWallet) return 'KuCoin Wallet' + if (provider.isMathWallet) return 'MathWallet' + if (provider.isOneInchIOSWallet || provider.isOneInchAndroidWallet) + return '1inch Wallet' + if (provider.isOpera) return 'Opera' + if (provider.isPortal) return 'Ripio Portal' + if (provider.isTally) return 'Tally' + if (provider.isTokenPocket) return 'TokenPocket' + if (provider.isTokenary) return 'Tokenary' + if (provider.isTrust || provider.isTrustWallet) return 'Trust Wallet' + if (provider.isMetaMask) return 'MetaMask' + } + + // Some injected providers detect multiple other providers and create a list at `ethers.providers` + if (ethereum.providers?.length) { + // Deduplicate names using Set + // Coinbase Wallet puts multiple providers in `ethereum.providers` + const nameSet = new Set() + let unknownCount = 1 + for (const provider of ethereum.providers) { + let name = getName(provider) + if (!name) { + name = `Unknown Wallet #${unknownCount}` + unknownCount += 1 + } + nameSet.add(name) + } + const names = [...nameSet] + if (names.length) return names + return names[0] ?? 'Injected' + } + + return getName(ethereum) ?? 'Injected' +} diff --git a/packages/connectors/src/walletConnect.test.ts b/packages/connectors/src/walletConnect.test.ts new file mode 100644 index 00000000..c599ec70 --- /dev/null +++ b/packages/connectors/src/walletConnect.test.ts @@ -0,0 +1,19 @@ +import { foundry } from '@wagmi/core/chains' +import { testChains } from '@wagmi/core/internal/test' +import { describe, expect, it } from 'vitest' + +import { WalletConnectConnector } from './walletConnect' + +describe('WalletConnectConnector', () => { + it('inits', () => { + const connector = new WalletConnectConnector({ + chains: testChains, + options: { + rpc: { + [foundry.id]: foundry.rpcUrls.default.http[0]!, + }, + }, + }) + expect(connector.name).toEqual('WalletConnect') + }) +}) diff --git a/packages/connectors/src/walletConnect.ts b/packages/connectors/src/walletConnect.ts new file mode 100644 index 00000000..849dc764 --- /dev/null +++ b/packages/connectors/src/walletConnect.ts @@ -0,0 +1,216 @@ +import type { ProviderRpcError } from '@wagmi/core' +import { + SwitchChainError, + UserRejectedRequestError, + getClient, + normalizeChainId, +} from '@wagmi/core' +import type { Chain } from '@wagmi/core/chains' +import type WalletConnectProvider from '@walletconnect/ethereum-provider' +import { providers } from 'ethers' +import { getAddress, hexValue } from 'ethers/lib/utils.js' + +import { Connector } from './base' + +/** + * Wallets that support chain switching through WalletConnect + * - imToken (token.im) + * - MetaMask (metamask.io) + * - Rainbow (rainbow.me) + * - Trust Wallet (trustwallet.com) + */ +const switchChainAllowedRegex = /(imtoken|metamask|rainbow|trust wallet)/i + +type WalletConnectOptions = ConstructorParameters< + typeof WalletConnectProvider +>[0] + +type WalletConnectSigner = providers.JsonRpcSigner + +export class WalletConnectConnector extends Connector< + WalletConnectProvider, + WalletConnectOptions, + WalletConnectSigner +> { + readonly id = 'walletConnect' + readonly name = 'WalletConnect' + readonly ready = true + + #provider?: WalletConnectProvider + + constructor(config: { chains?: Chain[]; options: WalletConnectOptions }) { + super(config) + } + + async connect({ chainId }: { chainId?: number } = {}) { + try { + let targetChainId = chainId + if (!targetChainId) { + const lastUsedChainId = getClient().lastUsedChainId + if (lastUsedChainId && !this.isChainUnsupported(lastUsedChainId)) + targetChainId = lastUsedChainId + } + + const provider = await this.getProvider({ + chainId: targetChainId, + create: true, + }) + provider.on('accountsChanged', this.onAccountsChanged) + provider.on('chainChanged', this.onChainChanged) + provider.on('disconnect', this.onDisconnect) + + // Defer message to the next tick to ensure wallet connect data (provided by `.enable()`) is available + setTimeout(() => this.emit('message', { type: 'connecting' }), 0) + + const accounts = await provider.enable() + const account = getAddress(accounts[0] as string) + const id = await this.getChainId() + const unsupported = this.isChainUnsupported(id) + + // Not all WalletConnect options support programmatic chain switching + // Only enable for wallet options that do + const walletName = provider.connector?.peerMeta?.name ?? '' + if (switchChainAllowedRegex.test(walletName)) + this.switchChain = this.#switchChain + + return { + account, + chain: { id, unsupported }, + provider: new providers.Web3Provider( + provider as providers.ExternalProvider, + ), + } + } catch (error) { + if (/user closed modal/i.test((error as ProviderRpcError).message)) + throw new UserRejectedRequestError(error) + throw error + } + } + + async disconnect() { + const provider = await this.getProvider() + await provider.disconnect() + + provider.removeListener('accountsChanged', this.onAccountsChanged) + provider.removeListener('chainChanged', this.onChainChanged) + provider.removeListener('disconnect', this.onDisconnect) + + typeof localStorage !== 'undefined' && + localStorage.removeItem('walletconnect') + } + + async getAccount() { + const provider = await this.getProvider() + const accounts = provider.accounts + // return checksum address + return getAddress(accounts[0] as string) + } + + async getChainId() { + const provider = await this.getProvider() + const chainId = normalizeChainId(provider.chainId) + return chainId + } + + async getProvider({ + chainId, + create, + }: { chainId?: number; create?: boolean } = {}) { + // Force create new provider + if (!this.#provider || chainId || create) { + const rpc = !this.options?.infuraId + ? this.chains.reduce( + (rpc, chain) => ({ + ...rpc, + [chain.id]: chain.rpcUrls.default.http[0], + }), + {}, + ) + : {} + + const WalletConnectProvider = ( + await import('@walletconnect/ethereum-provider') + ).default + this.#provider = new WalletConnectProvider({ + ...this.options, + chainId, + rpc: { ...rpc, ...this.options?.rpc }, + }) + } + + return this.#provider + } + + async getSigner({ chainId }: { chainId?: number } = {}) { + const [provider, account] = await Promise.all([ + this.getProvider({ chainId }), + this.getAccount(), + ]) + return new providers.Web3Provider( + provider as providers.ExternalProvider, + chainId, + ).getSigner(account) + } + + async isAuthorized() { + try { + const account = await this.getAccount() + return !!account + } catch { + return false + } + } + + async #switchChain(chainId: number) { + const provider = await this.getProvider() + const id = hexValue(chainId) + + try { + // Set up a race between `wallet_switchEthereumChain` & the `chainChanged` event + // to ensure the chain has been switched. This is because there could be a case + // where a wallet may not resolve the `wallet_switchEthereumChain` method, or + // resolves slower than `chainChanged`. + await Promise.race([ + provider.request({ + method: 'wallet_switchEthereumChain', + params: [{ chainId: id }], + }), + new Promise((res) => + this.on('change', ({ chain }) => { + if (chain?.id === chainId) res(chainId) + }), + ), + ]) + return ( + this.chains.find((x) => x.id === chainId) ?? { + id: chainId, + name: `Chain ${id}`, + network: `${id}`, + nativeCurrency: { name: 'Ether', decimals: 18, symbol: 'ETH' }, + rpcUrls: { default: { http: [''] } }, + } + ) + } catch (error) { + const message = + typeof error === 'string' ? error : (error as ProviderRpcError)?.message + if (/user rejected request/i.test(message)) + throw new UserRejectedRequestError(error) + throw new SwitchChainError(error) + } + } + + protected onAccountsChanged = (accounts: string[]) => { + if (accounts.length === 0) this.emit('disconnect') + else this.emit('change', { account: getAddress(accounts[0] as string) }) + } + + protected onChainChanged = (chainId: number | string) => { + const id = normalizeChainId(chainId) + const unsupported = this.isChainUnsupported(id) + this.emit('change', { chain: { id, unsupported } }) + } + + protected onDisconnect = () => { + this.emit('disconnect') + } +} diff --git a/packages/connectors/tsup.config.ts b/packages/connectors/tsup.config.ts new file mode 100644 index 00000000..23d97e68 --- /dev/null +++ b/packages/connectors/tsup.config.ts @@ -0,0 +1,18 @@ +import { defineConfig } from 'tsup' + +import { getConfig } from '../../scripts/tsup' + +export default defineConfig( + getConfig({ + dev: process.env.DEV === 'true', + entry: [ + 'src/index.ts', + 'src/injected.ts', + 'src/coinbaseWallet.ts', + 'src/metaMask.ts', + 'src/mock/index.ts', + 'src/walletConnect.ts', + ], + platform: 'browser', + }), +) diff --git a/packages/connectors/walletConnect/package.json b/packages/connectors/walletConnect/package.json new file mode 100644 index 00000000..9819c066 --- /dev/null +++ b/packages/connectors/walletConnect/package.json @@ -0,0 +1,4 @@ +{ + "type": "module", + "main": "../dist/walletConnect.js" +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 76227fe0..9a4d79f1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,7 @@ importers: '@changesets/changelog-github': ^0.4.7 '@changesets/cli': ^2.25.2 '@types/eslint': ^8.4.9 + '@types/fs-extra': ^9.0.13 '@types/node': ^18.11.9 '@typescript-eslint/eslint-plugin': ^5.42.0 '@typescript-eslint/parser': ^5.42.0 @@ -16,6 +17,8 @@ importers: eslint-plugin-eslint-comments: ^3.2.0 eslint-plugin-import: ^2.26.0 eslint-plugin-prettier: ^4.2.1 + execa: ^6.1.0 + fs-extra: ^11.1.0 lint-staged: ^13.0.3 prettier: ^2.7.1 simple-git-hooks: ^2.8.1 @@ -26,6 +29,7 @@ importers: '@changesets/changelog-github': 0.4.7 '@changesets/cli': 2.25.2 '@types/eslint': 8.4.9 + '@types/fs-extra': 9.0.13 '@types/node': 18.11.9 '@typescript-eslint/eslint-plugin': 5.42.0_vbmthgpmzvipd6e4frnw2jsh6y '@typescript-eslint/parser': 5.42.0_vhsckgnokn2tf7m5xkrurmvfv4 @@ -35,6 +39,8 @@ importers: eslint-plugin-eslint-comments: 3.2.0_eslint@8.17.0 eslint-plugin-import: 2.26.0_nus5rdfya7z3ybhfa7bflgfz4a eslint-plugin-prettier: 4.2.1_hsbo72uvra2cjko46y2c4fgzzm + execa: 6.1.0 + fs-extra: 11.1.0 lint-staged: 13.0.3 prettier: 2.7.1 simple-git-hooks: 2.8.1 @@ -45,6 +51,23 @@ importers: packages/chains: specifiers: {} + packages/connectors: + specifiers: + '@coinbase/wallet-sdk': ^3.5.4 + '@wagmi/core': ^0.8.0 + '@walletconnect/ethereum-provider': ^1.8.0 + abitype: ^0.1.8 + ethers: ^5.7.2 + eventemitter3: ^4.0.7 + dependencies: + '@coinbase/wallet-sdk': 3.6.2 + '@walletconnect/ethereum-provider': 1.8.0 + abitype: 0.1.8 + eventemitter3: 4.0.7 + devDependencies: + '@wagmi/core': 0.8.0_egrf7ew7xcibj7pkaydxy7nghq + ethers: 5.7.2 + packages: /@babel/code-frame/7.18.6: @@ -54,10 +77,56 @@ packages: '@babel/highlight': 7.18.6 dev: true + /@babel/compat-data/7.20.5: + resolution: {integrity: sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g==} + engines: {node: '>=6.9.0'} + + /@babel/helper-compilation-targets/7.20.0: + resolution: {integrity: sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/compat-data': 7.20.5 + '@babel/helper-validator-option': 7.18.6 + browserslist: 4.21.4 + semver: 6.3.0 + + /@babel/helper-define-polyfill-provider/0.3.3: + resolution: {integrity: sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==} + peerDependencies: + '@babel/core': ^7.4.0-0 + dependencies: + '@babel/helper-compilation-targets': 7.20.0 + '@babel/helper-plugin-utils': 7.20.2 + debug: 4.3.4 + lodash.debounce: 4.0.8 + resolve: 1.22.1 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + + /@babel/helper-module-imports/7.18.6: + resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.20.5 + + /@babel/helper-plugin-utils/7.20.2: + resolution: {integrity: sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==} + engines: {node: '>=6.9.0'} + + /@babel/helper-string-parser/7.19.4: + resolution: {integrity: sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==} + engines: {node: '>=6.9.0'} + /@babel/helper-validator-identifier/7.19.1: resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} engines: {node: '>=6.9.0'} - dev: true + + /@babel/helper-validator-option/7.18.6: + resolution: {integrity: sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==} + engines: {node: '>=6.9.0'} /@babel/highlight/7.18.6: resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} @@ -68,12 +137,34 @@ packages: js-tokens: 4.0.0 dev: true + /@babel/plugin-transform-runtime/7.19.6: + resolution: {integrity: sha512-PRH37lz4JU156lYFW1p8OxE5i7d6Sl/zV58ooyr+q1J1lnQPyg5tIiXlIwNVhJaY4W3TmOtdc8jqdXQcB1v5Yw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/helper-module-imports': 7.18.6 + '@babel/helper-plugin-utils': 7.20.2 + babel-plugin-polyfill-corejs2: 0.3.3 + babel-plugin-polyfill-corejs3: 0.6.0 + babel-plugin-polyfill-regenerator: 0.4.1 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + /@babel/runtime/7.20.1: resolution: {integrity: sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg==} engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.13.10 - dev: true + + /@babel/types/7.20.5: + resolution: {integrity: sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.19.4 + '@babel/helper-validator-identifier': 7.19.1 + to-fast-properties: 2.0.0 /@changesets/apply-release-plan/6.1.2: resolution: {integrity: sha512-H8TV9E/WtJsDfoDVbrDGPXmkZFSv7W2KLqp4xX4MKZXshb0hsQZUNowUa8pnus9qb/5OZrFFRVsUsDCVHNW/AQ==} @@ -277,6 +368,35 @@ packages: prettier: 2.7.1 dev: true + /@coinbase/wallet-sdk/3.6.2: + resolution: {integrity: sha512-HzxajB+qS+G9//c+th5uJ8KSt+jQ6/U+cgL9Sv89Wx6Mif+Lg5HxGtc6JQcIdHuYk9AFX+nXNSXtTGRdpHkdDg==} + engines: {node: '>= 10.0.0'} + dependencies: + '@metamask/safe-event-emitter': 2.0.0 + '@solana/web3.js': 1.52.0 + bind-decorator: 1.0.11 + bn.js: 5.2.1 + buffer: 6.0.3 + clsx: 1.2.1 + eth-block-tracker: 4.4.3 + eth-json-rpc-filters: 4.2.2 + eth-rpc-errors: 4.0.2 + json-rpc-engine: 6.1.0 + keccak: 3.0.2 + preact: 10.11.3 + qs: 6.11.0 + rxjs: 6.6.7 + sha.js: 2.4.11 + stream-browserify: 3.0.0 + util: 0.12.5 + transitivePeerDependencies: + - '@babel/core' + - bufferutil + - encoding + - react-native + - supports-color + - utf-8-validate + /@esbuild/android-arm/0.15.12: resolution: {integrity: sha512-IC7TqIqiyE0MmvAhWkl/8AEzpOtbhRNDo7aph47We1NbE5w2bt/Q+giAhe0YYeVpYnIhGMcuZY92qDK6dQauvA==} engines: {node: '>=12'} @@ -312,6 +432,318 @@ packages: - supports-color dev: true + /@ethersproject/abi/5.7.0: + resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==} + dependencies: + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: true + + /@ethersproject/abstract-provider/5.7.0: + resolution: {integrity: sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/networks': 5.7.1 + '@ethersproject/properties': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/web': 5.7.1 + dev: true + + /@ethersproject/abstract-signer/5.7.0: + resolution: {integrity: sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==} + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + dev: true + + /@ethersproject/address/5.7.0: + resolution: {integrity: sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/rlp': 5.7.0 + dev: true + + /@ethersproject/base64/5.7.0: + resolution: {integrity: sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==} + dependencies: + '@ethersproject/bytes': 5.7.0 + dev: true + + /@ethersproject/basex/5.7.0: + resolution: {integrity: sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/properties': 5.7.0 + dev: true + + /@ethersproject/bignumber/5.7.0: + resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + bn.js: 5.2.1 + dev: true + + /@ethersproject/bytes/5.7.0: + resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} + dependencies: + '@ethersproject/logger': 5.7.0 + + /@ethersproject/constants/5.7.0: + resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + dev: true + + /@ethersproject/contracts/5.7.0: + resolution: {integrity: sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==} + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/transactions': 5.7.0 + dev: true + + /@ethersproject/hash/5.7.0: + resolution: {integrity: sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==} + dependencies: + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/base64': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: true + + /@ethersproject/hdnode/5.7.0: + resolution: {integrity: sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==} + dependencies: + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/pbkdf2': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/wordlists': 5.7.0 + dev: true + + /@ethersproject/json-wallets/5.7.0: + resolution: {integrity: sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==} + dependencies: + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/hdnode': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/pbkdf2': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/random': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + aes-js: 3.0.0 + scrypt-js: 3.0.1 + dev: true + + /@ethersproject/keccak256/5.7.0: + resolution: {integrity: sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==} + dependencies: + '@ethersproject/bytes': 5.7.0 + js-sha3: 0.8.0 + dev: true + + /@ethersproject/logger/5.7.0: + resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==} + + /@ethersproject/networks/5.7.1: + resolution: {integrity: sha512-n/MufjFYv3yFcUyfhnXotyDlNdFb7onmkSy8aQERi2PjNcnWQ66xXxa3XlS8nCcA8aJKJjIIMNJTC7tu80GwpQ==} + dependencies: + '@ethersproject/logger': 5.7.0 + dev: true + + /@ethersproject/pbkdf2/5.7.0: + resolution: {integrity: sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/sha2': 5.7.0 + dev: true + + /@ethersproject/properties/5.7.0: + resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} + dependencies: + '@ethersproject/logger': 5.7.0 + dev: true + + /@ethersproject/providers/5.7.2: + resolution: {integrity: sha512-g34EWZ1WWAVgr4aptGlVBF8mhl3VWjv+8hoAnzStu8Ah22VHBsuGzP17eb6xDVRzw895G4W7vvx60lFFur/1Rg==} + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/base64': 5.7.0 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/networks': 5.7.1 + '@ethersproject/properties': 5.7.0 + '@ethersproject/random': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/web': 5.7.1 + bech32: 1.1.4 + ws: 7.4.6 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: true + + /@ethersproject/random/5.7.0: + resolution: {integrity: sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + dev: true + + /@ethersproject/rlp/5.7.0: + resolution: {integrity: sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + dev: true + + /@ethersproject/sha2/5.7.0: + resolution: {integrity: sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + hash.js: 1.1.7 + + /@ethersproject/signing-key/5.7.0: + resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + bn.js: 5.2.1 + elliptic: 6.5.4 + hash.js: 1.1.7 + dev: true + + /@ethersproject/solidity/5.7.0: + resolution: {integrity: sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: true + + /@ethersproject/strings/5.7.0: + resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/logger': 5.7.0 + dev: true + + /@ethersproject/transactions/5.7.0: + resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} + dependencies: + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + dev: true + + /@ethersproject/units/5.7.0: + resolution: {integrity: sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/logger': 5.7.0 + dev: true + + /@ethersproject/wallet/5.7.0: + resolution: {integrity: sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==} + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/hdnode': 5.7.0 + '@ethersproject/json-wallets': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/random': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/wordlists': 5.7.0 + dev: true + + /@ethersproject/web/5.7.1: + resolution: {integrity: sha512-Gueu8lSvyjBWL4cYsWsjh6MtMwM0+H4HvqFPZfB6dV8ctbP9zFAO73VG1cMWae0FLPCtz0peKPpZY8/ugJJX2w==} + dependencies: + '@ethersproject/base64': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: true + + /@ethersproject/wordlists/5.7.0: + resolution: {integrity: sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: true + /@humanwhocodes/config-array/0.9.5: resolution: {integrity: sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==} engines: {node: '>=10.10.0'} @@ -327,6 +759,32 @@ packages: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true + /@json-rpc-tools/provider/1.7.6: + resolution: {integrity: sha512-z7D3xvJ33UfCGv77n40lbzOYjZKVM3k2+5cV7xS8G6SCvKTzMkhkUYuD/qzQUNT4cG/lv0e9mRToweEEVLVVmA==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. + dependencies: + '@json-rpc-tools/utils': 1.7.6 + axios: 0.21.4 + safe-json-utils: 1.1.1 + ws: 7.5.9 + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + /@json-rpc-tools/types/1.7.6: + resolution: {integrity: sha512-nDSqmyRNEqEK9TZHtM15uNnDljczhCUdBmRhpNZ95bIPKEDQ+nTDmGMFd2lLin3upc5h2VVVd9tkTDdbXUhDIQ==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. + dependencies: + keyvaluestorage-interface: 1.0.0 + + /@json-rpc-tools/utils/1.7.6: + resolution: {integrity: sha512-HjA8x/U/Q78HRRe19yh8HVKoZ+Iaoo3YZjakJYxR+rw52NHo6jM+VE9b8+7ygkCFXl/EHID5wh/MkXaE/jGyYw==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. + dependencies: + '@json-rpc-tools/types': 1.7.6 + '@pedrouid/environment': 1.0.1 + /@manypkg/find-root/1.1.0: resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} dependencies: @@ -347,6 +805,9 @@ packages: read-yaml-file: 1.1.0 dev: true + /@metamask/safe-event-emitter/2.0.0: + resolution: {integrity: sha512-/kSXhY692qiV1MXu6EeOZvg5nECLclxNXcKCxJ3cXQgYuRymRHpdx/t7JXfsK+JLjwA1e1c1/SBrlQYpusC29Q==} + /@nodelib/fs.scandir/2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -368,6 +829,47 @@ packages: fastq: 1.13.0 dev: true + /@pedrouid/environment/1.0.1: + resolution: {integrity: sha512-HaW78NszGzRZd9SeoI3JD11JqY+lubnaOx7Pewj5pfjqWXOEATpeKIFb9Z4t2WBUK2iryiXX3lzWwmYWgUL0Ug==} + + /@solana/buffer-layout/4.0.0: + resolution: {integrity: sha512-lR0EMP2HC3+Mxwd4YcnZb0smnaDw7Bl2IQWZiTevRH5ZZBZn6VRWn3/92E3qdU4SSImJkA6IDHawOHAnx/qUvQ==} + engines: {node: '>=5.10'} + dependencies: + buffer: 6.0.3 + + /@solana/web3.js/1.52.0: + resolution: {integrity: sha512-oG1+BX4nVYZ0OBzmk6DRrY8oBYMsbXVQEf9N9JOfKm+wXSmjxVEEo8v3IPV8mKwR0JvUWuE8lOn3IUDiMlRLgg==} + engines: {node: '>=12.20.0'} + dependencies: + '@babel/runtime': 7.20.1 + '@ethersproject/sha2': 5.7.0 + '@solana/buffer-layout': 4.0.0 + bigint-buffer: 1.1.5 + bn.js: 5.2.1 + borsh: 0.7.0 + bs58: 4.0.1 + buffer: 6.0.1 + fast-stable-stringify: 1.0.0 + jayson: 3.7.0 + js-sha3: 0.8.0 + node-fetch: 2.6.7 + react-native-url-polyfill: 1.3.0 + rpc-websockets: 7.5.0 + secp256k1: 4.0.3 + superstruct: 0.14.2 + tweetnacl: 1.0.3 + transitivePeerDependencies: + - bufferutil + - encoding + - react-native + - utf-8-validate + + /@types/bn.js/4.11.6: + resolution: {integrity: sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg==} + dependencies: + '@types/node': 18.11.9 + /@types/chai-subset/1.3.3: resolution: {integrity: sha512-frBecisrNGz+F4T6bcc+NLeolfiojh5FxW2klu669+8BARtyQv2C/GkNW6FUodVe4BroGMP/wER/YDGc7rEllw==} dependencies: @@ -378,6 +880,11 @@ packages: resolution: {integrity: sha512-hC7OMnszpxhZPduX+m+nrx+uFoLkWOMiR4oa/AZF3MuSETYTZmFfJAHqZEM8MVlvfG7BEUcgvtwoCTxBp6hm3g==} dev: true + /@types/connect/3.4.35: + resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} + dependencies: + '@types/node': 18.11.9 + /@types/eslint/8.4.9: resolution: {integrity: sha512-jFCSo4wJzlHQLCpceUhUnXdrPuCNOjGFMQ8Eg6JXxlz3QaCKOb7eGi2cephQdM4XTYsNej69P9JDJ1zqNIbncQ==} dependencies: @@ -389,6 +896,12 @@ packages: resolution: {integrity: sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ==} dev: true + /@types/fs-extra/9.0.13: + resolution: {integrity: sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==} + dependencies: + '@types/node': 18.11.9 + dev: true + /@types/is-ci/3.0.0: resolution: {integrity: sha512-Q0Op0hdWbYd1iahB+IFNQcWXFq4O0Q5MwQP7uN0souuQ4rPg1vEYcnIOfr1gY+M+6rc8FGoRaBO1mOOvL29sEQ==} dependencies: @@ -409,16 +922,24 @@ packages: /@types/node/12.20.55: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - dev: true /@types/node/18.11.9: resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==} - dev: true /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true + /@types/pbkdf2/3.1.0: + resolution: {integrity: sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ==} + dependencies: + '@types/node': 18.11.9 + + /@types/secp256k1/4.0.3: + resolution: {integrity: sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w==} + dependencies: + '@types/node': 18.11.9 + /@types/semver/6.2.3: resolution: {integrity: sha512-KQf+QAMWKMrtBMsB8/24w53tEsxllMj6TuA80TT/5igJalLI/zm0L3oXRbIAl4Ohfc85gyHX/jhMwsVkmhLU4A==} dev: true @@ -427,6 +948,11 @@ packages: resolution: {integrity: sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==} dev: true + /@types/ws/7.4.7: + resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} + dependencies: + '@types/node': 18.11.9 + /@typescript-eslint/eslint-plugin/5.42.0_vbmthgpmzvipd6e4frnw2jsh6y: resolution: {integrity: sha512-5TJh2AgL6+wpL8H/GTSjNb4WrjKoR2rqvFxR/DDTqYNk6uXn8BJMEcncLSpMbf/XV1aS0jAjYwn98uvVCiAywQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -556,6 +1082,229 @@ packages: eslint-visitor-keys: 3.3.0 dev: true + /@wagmi/chains/0.1.0: + resolution: {integrity: sha512-seQVLZRHG2id8xqG+VnieFQ2gdavwa5Do+90lxbm/5EqiBo0S9LPFns6BKsSjW8o8T6UnmqzqhZwd4Q6cz8fFg==} + dev: true + + /@wagmi/core/0.8.0_egrf7ew7xcibj7pkaydxy7nghq: + resolution: {integrity: sha512-249Iph7Z289ym2WQGtUHXSzUK4w/n33IYSAAIDpL4/csB7sOoAYAEAOH5bxH/x2KT7gPd1pNSgOWDzfoG3hI4w==} + peerDependencies: + '@coinbase/wallet-sdk': '>=3.6.0' + '@walletconnect/ethereum-provider': '>=1.7.5' + ethers: '>=5.5.1' + peerDependenciesMeta: + '@coinbase/wallet-sdk': + optional: true + '@walletconnect/ethereum-provider': + optional: true + dependencies: + '@coinbase/wallet-sdk': 3.6.2 + '@wagmi/chains': 0.1.0 + '@walletconnect/ethereum-provider': 1.8.0 + abitype: 0.1.8 + ethers: 5.7.2 + eventemitter3: 4.0.7 + zustand: 4.1.5 + transitivePeerDependencies: + - immer + - react + - typescript + dev: true + + /@walletconnect/browser-utils/1.8.0: + resolution: {integrity: sha512-Wcqqx+wjxIo9fv6eBUFHPsW1y/bGWWRboni5dfD8PtOmrihrEpOCmvRJe4rfl7xgJW8Ea9UqKEaq0bIRLHlK4A==} + dependencies: + '@walletconnect/safe-json': 1.0.0 + '@walletconnect/types': 1.8.0 + '@walletconnect/window-getters': 1.0.0 + '@walletconnect/window-metadata': 1.0.0 + detect-browser: 5.2.0 + + /@walletconnect/client/1.8.0: + resolution: {integrity: sha512-svyBQ14NHx6Cs2j4TpkQaBI/2AF4+LXz64FojTjMtV4VMMhl81jSO1vNeg+yYhQzvjcGH/GpSwixjyCW0xFBOQ==} + dependencies: + '@walletconnect/core': 1.8.0 + '@walletconnect/iso-crypto': 1.8.0 + '@walletconnect/types': 1.8.0 + '@walletconnect/utils': 1.8.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + /@walletconnect/core/1.8.0: + resolution: {integrity: sha512-aFTHvEEbXcZ8XdWBw6rpQDte41Rxwnuk3SgTD8/iKGSRTni50gI9S3YEzMj05jozSiOBxQci4pJDMVhIUMtarw==} + dependencies: + '@walletconnect/socket-transport': 1.8.0 + '@walletconnect/types': 1.8.0 + '@walletconnect/utils': 1.8.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + /@walletconnect/crypto/1.0.3: + resolution: {integrity: sha512-+2jdORD7XQs76I2Odgr3wwrtyuLUXD/kprNVsjWRhhhdO9Mt6WqVzOPu0/t7OHSmgal8k7SoBQzUc5hu/8zL/g==} + dependencies: + '@walletconnect/encoding': 1.0.2 + '@walletconnect/environment': 1.0.1 + '@walletconnect/randombytes': 1.0.3 + aes-js: 3.1.2 + hash.js: 1.1.7 + tslib: 1.14.1 + + /@walletconnect/encoding/1.0.2: + resolution: {integrity: sha512-CrwSBrjqJ7rpGQcTL3kU+Ief+Bcuu9PH6JLOb+wM6NITX1GTxR/MfNwnQfhLKK6xpRAyj2/nM04OOH6wS8Imag==} + dependencies: + is-typedarray: 1.0.0 + tslib: 1.14.1 + typedarray-to-buffer: 3.1.5 + + /@walletconnect/environment/1.0.1: + resolution: {integrity: sha512-T426LLZtHj8e8rYnKfzsw1aG6+M0BT1ZxayMdv/p8yM0MU+eJDISqNY3/bccxRr4LrF9csq02Rhqt08Ibl0VRg==} + dependencies: + tslib: 1.14.1 + + /@walletconnect/ethereum-provider/1.8.0: + resolution: {integrity: sha512-Nq9m+oo5P0F+njsROHw9KMWdoc/8iGHYzQdkjJN/1C7DtsqFRg5k5a3hd9rzCLpbPsOC1q8Z5lRs6JQgDvPm6Q==} + dependencies: + '@walletconnect/client': 1.8.0 + '@walletconnect/jsonrpc-http-connection': 1.0.4 + '@walletconnect/jsonrpc-provider': 1.0.6 + '@walletconnect/signer-connection': 1.8.0 + '@walletconnect/types': 1.8.0 + '@walletconnect/utils': 1.8.0 + eip1193-provider: 1.0.1 + eventemitter3: 4.0.7 + transitivePeerDependencies: + - bufferutil + - debug + - encoding + - utf-8-validate + + /@walletconnect/iso-crypto/1.8.0: + resolution: {integrity: sha512-pWy19KCyitpfXb70hA73r9FcvklS+FvO9QUIttp3c2mfW8frxgYeRXfxLRCIQTkaYueRKvdqPjbyhPLam508XQ==} + dependencies: + '@walletconnect/crypto': 1.0.3 + '@walletconnect/types': 1.8.0 + '@walletconnect/utils': 1.8.0 + + /@walletconnect/jsonrpc-http-connection/1.0.4: + resolution: {integrity: sha512-ji79pspdBhmIbTwve383tMaDu5Le9plW+oj5GE2aqzxIl3ib8JvRBZRn5lGEBGqVCvqB3MBJL7gBlEwpyRtoxQ==} + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.4 + '@walletconnect/safe-json': 1.0.1 + cross-fetch: 3.1.5 + tslib: 1.14.1 + transitivePeerDependencies: + - encoding + + /@walletconnect/jsonrpc-provider/1.0.6: + resolution: {integrity: sha512-f5vQxr53vUVQ51/9mRLb1OiNciT/546XZ68Byn9OYnDBGeGJXK2kQWDHp8sPWZbN5x0p7B6asdCWMVFJ6danlw==} + dependencies: + '@walletconnect/jsonrpc-utils': 1.0.4 + '@walletconnect/safe-json': 1.0.1 + tslib: 1.14.1 + + /@walletconnect/jsonrpc-types/1.0.2: + resolution: {integrity: sha512-CZe8tjJX73OWdHjrBHy7HtAapJ2tT0Q3TYhPBhRxi3643lwPIQWC9En45ldY14TZwgSewkbZ0FtGBZK0G7Bbyg==} + dependencies: + keyvaluestorage-interface: 1.0.0 + tslib: 1.14.1 + + /@walletconnect/jsonrpc-utils/1.0.4: + resolution: {integrity: sha512-y0+tDxcTZ9BHBBKBJbjZxLUXb+zQZCylf7y/jTvDPNx76J0hYYc+F9zHzyqBLeorSKepLTk6yI8hw3NXbAQB3g==} + dependencies: + '@walletconnect/environment': 1.0.1 + '@walletconnect/jsonrpc-types': 1.0.2 + tslib: 1.14.1 + + /@walletconnect/mobile-registry/1.4.0: + resolution: {integrity: sha512-ZtKRio4uCZ1JUF7LIdecmZt7FOLnX72RPSY7aUVu7mj7CSfxDwUn6gBuK6WGtH+NZCldBqDl5DenI5fFSvkKYw==} + deprecated: 'Deprecated in favor of dynamic registry available from: https://github.com/walletconnect/walletconnect-registry' + + /@walletconnect/qrcode-modal/1.8.0: + resolution: {integrity: sha512-BueaFefaAi8mawE45eUtztg3ZFbsAH4DDXh1UNwdUlsvFMjqcYzLUG0xZvDd6z2eOpbgDg2N3bl6gF0KONj1dg==} + dependencies: + '@walletconnect/browser-utils': 1.8.0 + '@walletconnect/mobile-registry': 1.4.0 + '@walletconnect/types': 1.8.0 + copy-to-clipboard: 3.3.3 + preact: 10.4.1 + qrcode: 1.4.4 + + /@walletconnect/randombytes/1.0.3: + resolution: {integrity: sha512-35lpzxcHFbTN3ABefC9W+uBpNZl1GC4Wpx0ed30gibfO/y9oLdy1NznbV96HARQKSBV9J9M/rrtIvf6a23jfYw==} + dependencies: + '@walletconnect/encoding': 1.0.2 + '@walletconnect/environment': 1.0.1 + randombytes: 2.1.0 + tslib: 1.14.1 + + /@walletconnect/safe-json/1.0.0: + resolution: {integrity: sha512-QJzp/S/86sUAgWY6eh5MKYmSfZaRpIlmCJdi5uG4DJlKkZrHEF7ye7gA+VtbVzvTtpM/gRwO2plQuiooIeXjfg==} + + /@walletconnect/safe-json/1.0.1: + resolution: {integrity: sha512-Fm7e31oSYY15NQr8SsLJheKAy5L744udZf2lJKcz6wFmPJEzf7hOF0866o/rrldRzJnjZ4H2GJ45pFudsnLW5A==} + dependencies: + tslib: 1.14.1 + + /@walletconnect/signer-connection/1.8.0: + resolution: {integrity: sha512-+YAaTAP52MWZJ2wWnqKClKCPlPHBo6reURFe0cWidLADh9mi/kPWGALZ5AENK22zpem1bbKV466rF5Rzvu0ehA==} + dependencies: + '@walletconnect/client': 1.8.0 + '@walletconnect/jsonrpc-types': 1.0.2 + '@walletconnect/jsonrpc-utils': 1.0.4 + '@walletconnect/qrcode-modal': 1.8.0 + '@walletconnect/types': 1.8.0 + eventemitter3: 4.0.7 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + /@walletconnect/socket-transport/1.8.0: + resolution: {integrity: sha512-5DyIyWrzHXTcVp0Vd93zJ5XMW61iDM6bcWT4p8DTRfFsOtW46JquruMhxOLeCOieM4D73kcr3U7WtyR4JUsGuQ==} + dependencies: + '@walletconnect/types': 1.8.0 + '@walletconnect/utils': 1.8.0 + ws: 7.5.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + /@walletconnect/types/1.8.0: + resolution: {integrity: sha512-Cn+3I0V0vT9ghMuzh1KzZvCkiAxTq+1TR2eSqw5E5AVWfmCtECFkVZBP6uUJZ8YjwLqXheI+rnjqPy7sVM4Fyg==} + + /@walletconnect/utils/1.8.0: + resolution: {integrity: sha512-zExzp8Mj1YiAIBfKNm5u622oNw44WOESzo6hj+Q3apSMIb0Jph9X3GDIdbZmvVZsNPxWDL7uodKgZcCInZv2vA==} + dependencies: + '@walletconnect/browser-utils': 1.8.0 + '@walletconnect/encoding': 1.0.2 + '@walletconnect/jsonrpc-utils': 1.0.4 + '@walletconnect/types': 1.8.0 + bn.js: 4.11.8 + js-sha3: 0.8.0 + query-string: 6.13.5 + + /@walletconnect/window-getters/1.0.0: + resolution: {integrity: sha512-xB0SQsLaleIYIkSsl43vm8EwETpBzJ2gnzk7e0wMF3ktqiTGS6TFHxcprMl5R44KKh4tCcHCJwolMCaDSwtAaA==} + + /@walletconnect/window-metadata/1.0.0: + resolution: {integrity: sha512-9eFvmJxIKCC3YWOL97SgRkKhlyGXkrHwamfechmqszbypFspaSk+t2jQXAEU7YClHF6Qjw5eYOmy1//zFi9/GA==} + dependencies: + '@walletconnect/window-getters': 1.0.0 + + /JSONStream/1.3.5: + resolution: {integrity: sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==} + hasBin: true + dependencies: + jsonparse: 1.3.1 + through: 2.3.8 + + /abitype/0.1.8: + resolution: {integrity: sha512-2pde0KepTzdfu19ZrzYTYVIWo69+6UbBCY4B1RDiwWgo2XZtFSJhF6C+XThuRXbbZ823J0Rw1Y5cP0NXYVcCdQ==} + engines: {pnpm: '>=7'} + peerDependencies: + typescript: '>=4.7.4' + /acorn-jsx/5.3.2_acorn@8.8.1: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: @@ -570,6 +1319,13 @@ packages: hasBin: true dev: true + /aes-js/3.0.0: + resolution: {integrity: sha512-H7wUZRn8WpTq9jocdxQ2c8x2sKo9ZVmzfRE13GiNJXfp7NcKYEdvl3vspKjXox6RIG2VtaRe4JFvxG4rqp2Zuw==} + dev: true + + /aes-js/3.1.2: + resolution: {integrity: sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==} + /aggregate-error/3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} @@ -599,6 +1355,10 @@ packages: type-fest: 0.21.3 dev: true + /ansi-regex/4.1.1: + resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==} + engines: {node: '>=6'} + /ansi-regex/5.0.1: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} @@ -614,7 +1374,6 @@ packages: engines: {node: '>=4'} dependencies: color-convert: 1.9.3 - dev: true /ansi-styles/4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} @@ -690,10 +1449,68 @@ packages: engines: {node: '>=8'} dev: true + /async-mutex/0.2.6: + resolution: {integrity: sha512-Hs4R+4SPgamu6rSGW8C7cV9gaWUKEHykfzCCvIRuaVv636Ju10ZdeUbvb4TBEW0INuq2DHZqXbK4Nd3yG4RaRw==} + dependencies: + tslib: 2.4.1 + + /available-typed-arrays/1.0.5: + resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} + engines: {node: '>= 0.4'} + + /axios/0.21.4: + resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} + dependencies: + follow-redirects: 1.15.2 + transitivePeerDependencies: + - debug + + /babel-plugin-polyfill-corejs2/0.3.3: + resolution: {integrity: sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/compat-data': 7.20.5 + '@babel/helper-define-polyfill-provider': 0.3.3 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + + /babel-plugin-polyfill-corejs3/0.6.0: + resolution: {integrity: sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/helper-define-polyfill-provider': 0.3.3 + core-js-compat: 3.26.1 + transitivePeerDependencies: + - supports-color + + /babel-plugin-polyfill-regenerator/0.4.1: + resolution: {integrity: sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/helper-define-polyfill-provider': 0.3.3 + transitivePeerDependencies: + - supports-color + /balanced-match/1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true + /base-x/3.0.9: + resolution: {integrity: sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==} + dependencies: + safe-buffer: 5.2.1 + + /base64-js/1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + + /bech32/1.1.4: + resolution: {integrity: sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==} + dev: true + /better-path-resolve/1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -701,11 +1518,45 @@ packages: is-windows: 1.0.2 dev: true + /bigint-buffer/1.1.5: + resolution: {integrity: sha512-trfYco6AoZ+rKhKnxA0hgX0HAbVP/s808/EuDSe2JDzUnCp/xAsli35Orvk67UrTEcwuxZqYZDmfA2RXJgxVvA==} + engines: {node: '>= 10.0.0'} + requiresBuild: true + dependencies: + bindings: 1.5.0 + /binary-extensions/2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} dev: true + /bind-decorator/1.0.11: + resolution: {integrity: sha512-yzkH0uog6Vv/vQ9+rhSKxecnqGUZHYncg7qS7voz3Q76+TAi1SGiOKk2mlOvusQnFz9Dc4BC/NMkeXu11YgjJg==} + + /bindings/1.5.0: + resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} + dependencies: + file-uri-to-path: 1.0.0 + + /blakejs/1.2.1: + resolution: {integrity: sha512-QXUSXI3QVc/gJME0dBpXrag1kbzOqCjCX8/b54ntNyW6sjtoqxqRk3LTmXzaJoh71zMsDCjM+47jS7XiwN/+fQ==} + + /bn.js/4.11.8: + resolution: {integrity: sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==} + + /bn.js/4.12.0: + resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + + /bn.js/5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + + /borsh/0.7.0: + resolution: {integrity: sha512-CLCsZGIBCFnPtkNnieW/a8wmreDmfUtjU2m9yHrzPXIlNbqVs0AQrSatSG6vdNYUqdc83tkQi2eHfF98ubzQLA==} + dependencies: + bn.js: 5.2.1 + bs58: 4.0.1 + text-encoding-utf-8: 1.0.2 + /brace-expansion/1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -726,6 +1577,89 @@ packages: wcwidth: 1.0.1 dev: true + /brorand/1.1.0: + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + + /browserify-aes/1.2.0: + resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} + dependencies: + buffer-xor: 1.0.3 + cipher-base: 1.0.4 + create-hash: 1.2.0 + evp_bytestokey: 1.0.3 + inherits: 2.0.4 + safe-buffer: 5.2.1 + + /browserslist/4.21.4: + resolution: {integrity: sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001436 + electron-to-chromium: 1.4.284 + node-releases: 2.0.6 + update-browserslist-db: 1.0.10_browserslist@4.21.4 + + /bs58/4.0.1: + resolution: {integrity: sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw==} + dependencies: + base-x: 3.0.9 + + /bs58check/2.1.2: + resolution: {integrity: sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA==} + dependencies: + bs58: 4.0.1 + create-hash: 1.2.0 + safe-buffer: 5.2.1 + + /btoa/1.2.1: + resolution: {integrity: sha512-SB4/MIGlsiVkMcHmT+pSmIPoNDoHg+7cMzmt3Uxt628MTz2487DKSqK/fuhFBrkuqrYv5UCEnACpF4dTFNKc/g==} + engines: {node: '>= 0.4.0'} + hasBin: true + + /buffer-alloc-unsafe/1.1.0: + resolution: {integrity: sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==} + + /buffer-alloc/1.2.0: + resolution: {integrity: sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==} + dependencies: + buffer-alloc-unsafe: 1.1.0 + buffer-fill: 1.0.0 + + /buffer-fill/1.0.0: + resolution: {integrity: sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ==} + + /buffer-from/1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + + /buffer-xor/1.0.3: + resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} + + /buffer/5.7.1: + resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + /buffer/6.0.1: + resolution: {integrity: sha512-rVAXBwEcEoYtxnHSO5iWyhzV/O1WMtkUYWlfdLS7FjU4PnSJJHEfHXi/uHPI5EwltmOA794gN3bm3/pzuctWjQ==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + /buffer/6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + + /bufferutil/4.0.7: + resolution: {integrity: sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==} + engines: {node: '>=6.14.2'} + requiresBuild: true + dependencies: + node-gyp-build: 4.5.0 + /bundle-require/3.1.0_esbuild@0.15.12: resolution: {integrity: sha512-IIXtAO7fKcwPHNPt9kY/WNVJqy7NDy6YqJvv6ENH0TOZoJ+yjpEsn1w40WKZbR2ibfu5g1rfgJTvmFHpm5aOMA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -746,7 +1680,6 @@ packages: dependencies: function-bind: 1.1.1 get-intrinsic: 1.1.3 - dev: true /callsites/3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} @@ -765,7 +1698,9 @@ packages: /camelcase/5.3.1: resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} engines: {node: '>=6'} - dev: true + + /caniuse-lite/1.0.30001436: + resolution: {integrity: sha512-ZmWkKsnC2ifEPoWUvSAIGyOYwT+keAaaWPHiQ9DfMqS1t6tfuyFYoWR78TeZtznkEQ64+vGXH9cZrElwR2Mrxg==} /chai/4.3.6: resolution: {integrity: sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==} @@ -824,6 +1759,12 @@ packages: resolution: {integrity: sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw==} dev: true + /cipher-base/1.0.4: + resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + /clean-stack/2.2.0: resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==} engines: {node: '>=6'} @@ -852,6 +1793,13 @@ packages: string-width: 5.1.2 dev: true + /cliui/5.0.0: + resolution: {integrity: sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==} + dependencies: + string-width: 3.1.0 + strip-ansi: 5.2.0 + wrap-ansi: 5.1.0 + /cliui/6.0.0: resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} dependencies: @@ -874,11 +1822,18 @@ packages: engines: {node: '>=0.8'} dev: true + /clone/2.1.2: + resolution: {integrity: sha512-3Pe/CF1Nn94hyhIYpjtiLhdCoEoz0DqQ+988E9gmeEdQZlojxnOb74wctFyuwWQHzqyf9X7C7MG8juUpqBJT8w==} + engines: {node: '>=0.8'} + + /clsx/1.2.1: + resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==} + engines: {node: '>=6'} + /color-convert/1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: color-name: 1.1.3 - dev: true /color-convert/2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} @@ -889,7 +1844,6 @@ packages: /color-name/1.1.3: resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} - dev: true /color-name/1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} @@ -899,6 +1853,9 @@ packages: resolution: {integrity: sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==} dev: true + /commander/2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + /commander/4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} @@ -913,6 +1870,42 @@ packages: resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} dev: true + /copy-to-clipboard/3.3.3: + resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==} + dependencies: + toggle-selection: 1.0.6 + + /core-js-compat/3.26.1: + resolution: {integrity: sha512-622/KzTudvXCDLRw70iHW4KKs1aGpcRcowGWyYJr2DEBfRrd6hNJybxSWJFuZYD4ma86xhrwDDHxmDaIq4EA8A==} + dependencies: + browserslist: 4.21.4 + + /create-hash/1.2.0: + resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + dependencies: + cipher-base: 1.0.4 + inherits: 2.0.4 + md5.js: 1.3.5 + ripemd160: 2.0.2 + sha.js: 2.4.11 + + /create-hmac/1.1.7: + resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + dependencies: + cipher-base: 1.0.4 + create-hash: 1.2.0 + inherits: 2.0.4 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + + /cross-fetch/3.1.5: + resolution: {integrity: sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==} + dependencies: + node-fetch: 2.6.7 + transitivePeerDependencies: + - encoding + /cross-spawn/5.1.0: resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} dependencies: @@ -988,7 +1981,6 @@ packages: optional: true dependencies: ms: 2.1.2 - dev: true /decamelize-keys/1.1.1: resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} @@ -1001,7 +1993,10 @@ packages: /decamelize/1.2.0: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} engines: {node: '>=0.10.0'} - dev: true + + /decode-uri-component/0.2.2: + resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==} + engines: {node: '>=0.10'} /deep-eql/3.0.1: resolution: {integrity: sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==} @@ -1028,11 +2023,21 @@ packages: object-keys: 1.1.1 dev: true + /delay/5.0.0: + resolution: {integrity: sha512-ReEBKkIfe4ya47wlPYf/gu5ib6yUG0/Aez0JQZQz94kiWtRQvZIQbTiehsnwHvLSWJnQdhVeqYue7Id1dKr0qw==} + engines: {node: '>=10'} + + /detect-browser/5.2.0: + resolution: {integrity: sha512-tr7XntDAu50BVENgQfajMLzacmSe34D+qZc4zjnniz0ZVuw/TZcLcyxHQjYpJTM36sGEkZZlYLnIM1hH7alTMA==} + /detect-indent/6.1.0: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} dev: true + /dijkstrajs/1.0.2: + resolution: {integrity: sha512-QV6PMaHTCNmKSeP6QoXhVTw9snc9VD8MulTT0Bd99Pacp4SS1cjcrYPgBPmibqKVtMJJfqC6XvOXgPMEEPH/fg==} + /dir-glob/3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -1063,6 +2068,32 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true + /eip1193-provider/1.0.1: + resolution: {integrity: sha512-kSuqwQ26d7CzuS/t3yRXo2Su2cVH0QfvyKbr2H7Be7O5YDyIq4hQGCNTo5wRdP07bt+E2R/8nPCzey4ojBHf7g==} + dependencies: + '@json-rpc-tools/provider': 1.7.6 + transitivePeerDependencies: + - bufferutil + - debug + - utf-8-validate + + /electron-to-chromium/1.4.284: + resolution: {integrity: sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==} + + /elliptic/6.5.4: + resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + + /emoji-regex/7.0.3: + resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==} + /emoji-regex/8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true @@ -1129,6 +2160,14 @@ packages: is-symbol: 1.0.4 dev: true + /es6-promise/4.2.8: + resolution: {integrity: sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==} + + /es6-promisify/5.0.0: + resolution: {integrity: sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==} + dependencies: + es6-promise: 4.2.8 + /esbuild-android-64/0.15.12: resolution: {integrity: sha512-MJKXwvPY9g0rGps0+U65HlTsM1wUs9lbjt5CU19RESqycGFDRijMDQsh68MtbzkqWSRdEtiKS1mtPzKneaAI0Q==} engines: {node: '>=12'} @@ -1342,7 +2381,6 @@ packages: /escalade/3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} - dev: true /escape-string-regexp/1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} @@ -1603,6 +2641,170 @@ packages: engines: {node: '>=0.10.0'} dev: true + /eth-block-tracker/4.4.3: + resolution: {integrity: sha512-A8tG4Z4iNg4mw5tP1Vung9N9IjgMNqpiMoJ/FouSFwNCGHv2X0mmOYwtQOJzki6XN7r7Tyo01S29p7b224I4jw==} + dependencies: + '@babel/plugin-transform-runtime': 7.19.6 + '@babel/runtime': 7.20.1 + eth-query: 2.1.2 + json-rpc-random-id: 1.0.1 + pify: 3.0.0 + safe-event-emitter: 1.0.1 + transitivePeerDependencies: + - '@babel/core' + - supports-color + + /eth-json-rpc-filters/4.2.2: + resolution: {integrity: sha512-DGtqpLU7bBg63wPMWg1sCpkKCf57dJ+hj/k3zF26anXMzkmtSBDExL8IhUu7LUd34f0Zsce3PYNO2vV2GaTzaw==} + dependencies: + '@metamask/safe-event-emitter': 2.0.0 + async-mutex: 0.2.6 + eth-json-rpc-middleware: 6.0.0 + eth-query: 2.1.2 + json-rpc-engine: 6.1.0 + pify: 5.0.0 + transitivePeerDependencies: + - encoding + + /eth-json-rpc-middleware/6.0.0: + resolution: {integrity: sha512-qqBfLU2Uq1Ou15Wox1s+NX05S9OcAEL4JZ04VZox2NS0U+RtCMjSxzXhLFWekdShUPZ+P8ax3zCO2xcPrp6XJQ==} + dependencies: + btoa: 1.2.1 + clone: 2.1.2 + eth-query: 2.1.2 + eth-rpc-errors: 3.0.0 + eth-sig-util: 1.4.2 + ethereumjs-util: 5.2.1 + json-rpc-engine: 5.4.0 + json-stable-stringify: 1.0.2 + node-fetch: 2.6.7 + pify: 3.0.0 + safe-event-emitter: 1.0.1 + transitivePeerDependencies: + - encoding + + /eth-query/2.1.2: + resolution: {integrity: sha512-srES0ZcvwkR/wd5OQBRA1bIJMww1skfGS0s8wlwK3/oNP4+wnds60krvu5R1QbpRQjMmpG5OMIWro5s7gvDPsA==} + dependencies: + json-rpc-random-id: 1.0.1 + xtend: 4.0.2 + + /eth-rpc-errors/3.0.0: + resolution: {integrity: sha512-iPPNHPrLwUlR9xCSYm7HHQjWBasor3+KZfRvwEWxMz3ca0yqnlBeJrnyphkGIXZ4J7AMAaOLmwy4AWhnxOiLxg==} + dependencies: + fast-safe-stringify: 2.1.1 + + /eth-rpc-errors/4.0.2: + resolution: {integrity: sha512-n+Re6Gu8XGyfFy1it0AwbD1x0MUzspQs0D5UiPs1fFPCr6WAwZM+vbIhXheBFrpgosqN9bs5PqlB4Q61U/QytQ==} + dependencies: + fast-safe-stringify: 2.1.1 + + /eth-sig-util/1.4.2: + resolution: {integrity: sha512-iNZ576iTOGcfllftB73cPB5AN+XUQAT/T8xzsILsghXC1o8gJUqe3RHlcDqagu+biFpYQ61KQrZZJza8eRSYqw==} + deprecated: Deprecated in favor of '@metamask/eth-sig-util' + dependencies: + ethereumjs-abi: github.com/ethereumjs/ethereumjs-abi/ee3994657fa7a427238e6ba92a84d0b529bbcde0 + ethereumjs-util: 5.2.1 + + /ethereum-cryptography/0.1.3: + resolution: {integrity: sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==} + dependencies: + '@types/pbkdf2': 3.1.0 + '@types/secp256k1': 4.0.3 + blakejs: 1.2.1 + browserify-aes: 1.2.0 + bs58check: 2.1.2 + create-hash: 1.2.0 + create-hmac: 1.1.7 + hash.js: 1.1.7 + keccak: 3.0.2 + pbkdf2: 3.1.2 + randombytes: 2.1.0 + safe-buffer: 5.2.1 + scrypt-js: 3.0.1 + secp256k1: 4.0.3 + setimmediate: 1.0.5 + + /ethereumjs-util/5.2.1: + resolution: {integrity: sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ==} + dependencies: + bn.js: 4.12.0 + create-hash: 1.2.0 + elliptic: 6.5.4 + ethereum-cryptography: 0.1.3 + ethjs-util: 0.1.6 + rlp: 2.2.7 + safe-buffer: 5.2.1 + + /ethereumjs-util/6.2.1: + resolution: {integrity: sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw==} + dependencies: + '@types/bn.js': 4.11.6 + bn.js: 4.12.0 + create-hash: 1.2.0 + elliptic: 6.5.4 + ethereum-cryptography: 0.1.3 + ethjs-util: 0.1.6 + rlp: 2.2.7 + + /ethers/5.7.2: + resolution: {integrity: sha512-wswUsmWo1aOK8rR7DIKiWSw9DbLWe6x98Jrn8wcTflTVvaXhAMaB5zGAXy0GYQEQp9iO1iSHWVyARQm11zUtyg==} + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/base64': 5.7.0 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/contracts': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/hdnode': 5.7.0 + '@ethersproject/json-wallets': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/networks': 5.7.1 + '@ethersproject/pbkdf2': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/providers': 5.7.2 + '@ethersproject/random': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + '@ethersproject/solidity': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/units': 5.7.0 + '@ethersproject/wallet': 5.7.0 + '@ethersproject/web': 5.7.1 + '@ethersproject/wordlists': 5.7.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + dev: true + + /ethjs-util/0.1.6: + resolution: {integrity: sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w==} + engines: {node: '>=6.5.0', npm: '>=3'} + dependencies: + is-hex-prefixed: 1.0.0 + strip-hex-prefix: 1.0.0 + + /eventemitter3/4.0.7: + resolution: {integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==} + + /events/3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + + /evp_bytestokey/1.0.3: + resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + dependencies: + md5.js: 1.3.5 + safe-buffer: 5.2.1 + /execa/5.1.1: resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} engines: {node: '>=10'} @@ -1646,6 +2848,10 @@ packages: tmp: 0.0.33 dev: true + /eyes/0.1.8: + resolution: {integrity: sha512-GipyPsXO1anza0AOZdy69Im7hGFCNB7Y/NGjDlZGJ3GJJLtwNSb2vrzYrTYJRrRloVx7pl+bhUaTB8yiccPvFQ==} + engines: {node: '> 0.1.90'} + /fast-deep-equal/3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true @@ -1673,6 +2879,12 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true + /fast-safe-stringify/2.1.1: + resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} + + /fast-stable-stringify/1.0.0: + resolution: {integrity: sha512-wpYMUmFu5f00Sm0cj2pfivpmawLZ0NKdviQ4w9zJeR8JVtOpOxHmLaJuj0vxvGqMJQWyP/COUkF75/57OKyRag==} + /fastq/1.13.0: resolution: {integrity: sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==} dependencies: @@ -1686,6 +2898,9 @@ packages: flat-cache: 3.0.4 dev: true + /file-uri-to-path/1.0.0: + resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} + /fill-range/7.0.1: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} @@ -1693,6 +2908,12 @@ packages: to-regex-range: 5.0.1 dev: true + /find-up/3.0.0: + resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} + engines: {node: '>=6'} + dependencies: + locate-path: 3.0.0 + /find-up/4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -1728,6 +2949,29 @@ packages: resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} dev: true + /follow-redirects/1.15.2: + resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + + /for-each/0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + dependencies: + is-callable: 1.2.7 + + /fs-extra/11.1.0: + resolution: {integrity: sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==} + engines: {node: '>=14.14'} + dependencies: + graceful-fs: 4.2.10 + jsonfile: 6.1.0 + universalify: 2.0.0 + dev: true + /fs-extra/7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -1760,7 +3004,6 @@ packages: /function-bind/1.1.1: resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} - dev: true /function.prototype.name/1.1.5: resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} @@ -1783,7 +3026,6 @@ packages: /get-caller-file/2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - dev: true /get-func-name/2.0.0: resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} @@ -1795,7 +3037,6 @@ packages: function-bind: 1.1.1 has: 1.0.3 has-symbols: 1.0.3 - dev: true /get-stream/6.0.1: resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} @@ -1865,6 +3106,11 @@ packages: slash: 3.0.0 dev: true + /gopd/1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + dependencies: + get-intrinsic: 1.1.3 + /graceful-fs/4.2.10: resolution: {integrity: sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==} dev: true @@ -1901,21 +3147,39 @@ packages: /has-symbols/1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} - dev: true /has-tostringtag/1.0.0: resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} engines: {node: '>= 0.4'} dependencies: has-symbols: 1.0.3 - dev: true /has/1.0.3: resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} engines: {node: '>= 0.4.0'} dependencies: function-bind: 1.1.1 - dev: true + + /hash-base/3.1.0: + resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} + engines: {node: '>=4'} + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.0 + safe-buffer: 5.2.1 + + /hash.js/1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + + /hmac-drbg/1.0.1: + resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + dependencies: + hash.js: 1.1.7 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 /hosted-git-info/2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} @@ -1942,6 +3206,9 @@ packages: safer-buffer: 2.1.2 dev: true + /ieee754/1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + /ignore/5.2.0: resolution: {integrity: sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==} engines: {node: '>= 4'} @@ -1974,7 +3241,6 @@ packages: /inherits/2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - dev: true /internal-slot/1.0.3: resolution: {integrity: sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==} @@ -1985,6 +3251,13 @@ packages: side-channel: 1.0.4 dev: true + /is-arguments/1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + /is-arrayish/0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: true @@ -2013,7 +3286,6 @@ packages: /is-callable/1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} - dev: true /is-ci/3.0.1: resolution: {integrity: sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ==} @@ -2026,7 +3298,6 @@ packages: resolution: {integrity: sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==} dependencies: has: 1.0.3 - dev: true /is-date-object/1.0.5: resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} @@ -2040,6 +3311,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /is-fullwidth-code-point/2.0.0: + resolution: {integrity: sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==} + engines: {node: '>=4'} + /is-fullwidth-code-point/3.0.0: resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} engines: {node: '>=8'} @@ -2050,6 +3325,12 @@ packages: engines: {node: '>=12'} dev: true + /is-generator-function/1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + /is-glob/4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -2057,6 +3338,10 @@ packages: is-extglob: 2.1.1 dev: true + /is-hex-prefixed/1.0.0: + resolution: {integrity: sha1-fY035q135dEnFIkTxXPggtd39VQ=} + engines: {node: '>=6.5.0', npm: '>=3'} + /is-negative-zero/2.0.2: resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} engines: {node: '>= 0.4'} @@ -2124,6 +3409,19 @@ packages: has-symbols: 1.0.3 dev: true + /is-typed-array/1.1.10: + resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.0 + + /is-typedarray/1.0.0: + resolution: {integrity: sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==} + /is-weakref/1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: @@ -2135,15 +3433,50 @@ packages: engines: {node: '>=0.10.0'} dev: true + /isarray/2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + /isexe/2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true + /isomorphic-ws/4.0.1_ws@7.5.9: + resolution: {integrity: sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==} + peerDependencies: + ws: '*' + dependencies: + ws: 7.5.9 + + /jayson/3.7.0: + resolution: {integrity: sha512-tfy39KJMrrXJ+mFcMpxwBvFDetS8LAID93+rycFglIQM4kl3uNR3W4lBLE/FFhsoUCEox5Dt2adVpDm/XtebbQ==} + engines: {node: '>=8'} + hasBin: true + dependencies: + '@types/connect': 3.4.35 + '@types/node': 12.20.55 + '@types/ws': 7.4.7 + JSONStream: 1.3.5 + commander: 2.20.3 + delay: 5.0.0 + es6-promisify: 5.0.0 + eyes: 0.1.8 + isomorphic-ws: 4.0.1_ws@7.5.9 + json-stringify-safe: 5.0.1 + lodash: 4.17.21 + uuid: 8.3.2 + ws: 7.5.9 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + /joycon/3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} dev: true + /js-sha3/0.8.0: + resolution: {integrity: sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q==} + /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true @@ -2167,6 +3500,22 @@ packages: resolution: {integrity: sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==} dev: true + /json-rpc-engine/5.4.0: + resolution: {integrity: sha512-rAffKbPoNDjuRnXkecTjnsE3xLLrb00rEkdgalINhaYVYIxDwWtvYBr9UFbhTvPB1B2qUOLoFd/cV6f4Q7mh7g==} + dependencies: + eth-rpc-errors: 3.0.0 + safe-event-emitter: 1.0.1 + + /json-rpc-engine/6.1.0: + resolution: {integrity: sha512-NEdLrtrq1jUZyfjkr9OCz9EzCNhnRyWtt1PAnvnhwy6e8XETS0Dtc+ZNCO2gvuAoKsIn2+vCSowXTYE4CkgnAQ==} + engines: {node: '>=10.0.0'} + dependencies: + '@metamask/safe-event-emitter': 2.0.0 + eth-rpc-errors: 4.0.2 + + /json-rpc-random-id/1.0.1: + resolution: {integrity: sha512-RJ9YYNCkhVDBuP4zN5BBtYAzEl03yq/jIIsyif0JY9qyJuQQZNeDK7anAPKKlyEtLSj2s8h6hNh2F8zO5q7ScA==} + /json-schema-traverse/0.4.1: resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} dev: true @@ -2175,6 +3524,14 @@ packages: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} dev: true + /json-stable-stringify/1.0.2: + resolution: {integrity: sha512-eunSSaEnxV12z+Z73y/j5N37/In40GK4GmsSy+tEHJMxknvqnA7/djeYtAgW0GsWHUfg+847WJjKaEylk2y09g==} + dependencies: + jsonify: 0.0.1 + + /json-stringify-safe/5.0.1: + resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} + /json5/1.0.1: resolution: {integrity: sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==} hasBin: true @@ -2188,6 +3545,33 @@ packages: graceful-fs: 4.2.10 dev: true + /jsonfile/6.1.0: + resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} + dependencies: + universalify: 2.0.0 + optionalDependencies: + graceful-fs: 4.2.10 + dev: true + + /jsonify/0.0.1: + resolution: {integrity: sha512-2/Ki0GcmuqSrgFyelQq9M05y7PS0mEwuIzrf3f1fPqkVDVRvZrPZtVSMHxdgo8Aq0sxAOb/cr2aqqA3LeWHVPg==} + + /jsonparse/1.3.1: + resolution: {integrity: sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==} + engines: {'0': node >= 0.2.0} + + /keccak/3.0.2: + resolution: {integrity: sha512-PyKKjkH53wDMLGrvmRGSNWgmSxZOUqbnXwKL9tmgbFYA1iAYqW21kfR7mZXV0MlESiefxQQE9X9fTa3X+2MPDQ==} + engines: {node: '>=10.0.0'} + requiresBuild: true + dependencies: + node-addon-api: 2.0.2 + node-gyp-build: 4.5.0 + readable-stream: 3.6.0 + + /keyvaluestorage-interface/1.0.0: + resolution: {integrity: sha512-8t6Q3TclQ4uZynJY9IGr2+SsIGwK9JHcO6ootkHCGA0CrQCRy+VkouYNO2xicET6b9al7QKzpebNow+gkpCL8g==} + /kind-of/6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} @@ -2282,6 +3666,13 @@ packages: engines: {node: '>=14'} dev: true + /locate-path/3.0.0: + resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} + engines: {node: '>=6'} + dependencies: + p-locate: 3.0.0 + path-exists: 3.0.0 + /locate-path/5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -2296,6 +3687,9 @@ packages: p-locate: 5.0.0 dev: true + /lodash.debounce/4.0.8: + resolution: {integrity: sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==} + /lodash.merge/4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true @@ -2308,6 +3702,9 @@ packages: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} dev: true + /lodash/4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + /log-update/4.0.0: resolution: {integrity: sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg==} engines: {node: '>=10'} @@ -2348,6 +3745,13 @@ packages: engines: {node: '>=8'} dev: true + /md5.js/1.3.5: + resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 + /meow/6.1.1: resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} engines: {node: '>=8'} @@ -2397,6 +3801,12 @@ packages: engines: {node: '>=4'} dev: true + /minimalistic-assert/1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + + /minimalistic-crypto-utils/1.0.1: + resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + /minimatch/3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} dependencies: @@ -2427,7 +3837,6 @@ packages: /ms/2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} - dev: true /ms/2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -2455,6 +3864,9 @@ packages: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} dev: true + /node-addon-api/2.0.2: + resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} + /node-fetch/2.6.7: resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==} engines: {node: 4.x || >=6.0.0} @@ -2465,7 +3877,13 @@ packages: optional: true dependencies: whatwg-url: 5.0.0 - dev: true + + /node-gyp-build/4.5.0: + resolution: {integrity: sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==} + hasBin: true + + /node-releases/2.0.6: + resolution: {integrity: sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==} /normalize-package-data/2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} @@ -2502,7 +3920,6 @@ packages: /object-inspect/1.12.2: resolution: {integrity: sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==} - dev: true /object-keys/1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} @@ -2581,7 +3998,6 @@ packages: engines: {node: '>=6'} dependencies: p-try: 2.2.0 - dev: true /p-limit/3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} @@ -2590,6 +4006,12 @@ packages: yocto-queue: 0.1.0 dev: true + /p-locate/3.0.0: + resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} + engines: {node: '>=6'} + dependencies: + p-limit: 2.3.0 + /p-locate/4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -2619,7 +4041,6 @@ packages: /p-try/2.2.0: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} - dev: true /parent-module/1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} @@ -2638,6 +4059,10 @@ packages: lines-and-columns: 1.2.4 dev: true + /path-exists/3.0.0: + resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} + engines: {node: '>=4'} + /path-exists/4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -2660,7 +4085,6 @@ packages: /path-parse/1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - dev: true /path-type/4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} @@ -2671,9 +4095,18 @@ packages: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} dev: true + /pbkdf2/3.1.2: + resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} + engines: {node: '>=0.12'} + dependencies: + create-hash: 1.2.0 + create-hmac: 1.1.7 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + /picocolors/1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - dev: true /picomatch/2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} @@ -2686,11 +4119,19 @@ packages: hasBin: true dev: true + /pify/3.0.0: + resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} + engines: {node: '>=4'} + /pify/4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} dev: true + /pify/5.0.0: + resolution: {integrity: sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==} + engines: {node: '>=10'} + /pirates/4.0.5: resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} engines: {node: '>= 6'} @@ -2703,6 +4144,10 @@ packages: find-up: 4.1.0 dev: true + /pngjs/3.4.0: + resolution: {integrity: sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w==} + engines: {node: '>=4.0.0'} + /postcss-load-config/3.1.4: resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} @@ -2728,6 +4173,12 @@ packages: source-map-js: 1.0.2 dev: true + /preact/10.11.3: + resolution: {integrity: sha512-eY93IVpod/zG3uMF22Unl8h9KkrcKIRs2EGar8hwLZZDU1lkjph303V9HZBwufh2s736U6VXuhD109LYqPoffg==} + + /preact/10.4.1: + resolution: {integrity: sha512-WKrRpCSwL2t3tpOOGhf2WfTpcmbpxaWtDbdJdKdjd0aEiTkvOmS4NBkG6kzlaAHI9AkQ3iVqbFWM3Ei7mZ4o1Q==} + /preferred-pm/3.0.3: resolution: {integrity: sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ==} engines: {node: '>=10'} @@ -2763,7 +4214,33 @@ packages: /punycode/2.1.1: resolution: {integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==} engines: {node: '>=6'} - dev: true + + /qrcode/1.4.4: + resolution: {integrity: sha512-oLzEC5+NKFou9P0bMj5+v6Z40evexeE29Z9cummZXZ9QXyMr3lphkURzxjXgPJC5azpxcshoDWV1xE46z+/c3Q==} + engines: {node: '>=4'} + hasBin: true + dependencies: + buffer: 5.7.1 + buffer-alloc: 1.2.0 + buffer-from: 1.1.2 + dijkstrajs: 1.0.2 + isarray: 2.0.5 + pngjs: 3.4.0 + yargs: 13.3.2 + + /qs/6.11.0: + resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} + engines: {node: '>=0.6'} + dependencies: + side-channel: 1.0.4 + + /query-string/6.13.5: + resolution: {integrity: sha512-svk3xg9qHR39P3JlHuD7g3nRnyay5mHbrPctEBDUxUkHRifPHXJDhBUycdCC0NBjXoDf44Gb+IsOZL1Uwn8M/Q==} + engines: {node: '>=6'} + dependencies: + decode-uri-component: 0.2.2 + split-on-first: 1.1.0 + strict-uri-encode: 2.0.0 /queue-microtask/1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -2774,6 +4251,18 @@ packages: engines: {node: '>=8'} dev: true + /randombytes/2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + dependencies: + safe-buffer: 5.2.1 + + /react-native-url-polyfill/1.3.0: + resolution: {integrity: sha512-w9JfSkvpqqlix9UjDvJjm1EjSt652zVQ6iwCIj1cVVkwXf4jQhQgTNXY6EVTwuAmUjg6BC6k9RHCBynoLFo3IQ==} + peerDependencies: + react-native: '*' + dependencies: + whatwg-url-without-unicode: 8.0.0-3 + /read-pkg-up/7.0.1: resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} engines: {node: '>=8'} @@ -2803,6 +4292,14 @@ packages: strip-bom: 3.0.0 dev: true + /readable-stream/3.6.0: + resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + /readdirp/3.6.0: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} @@ -2820,7 +4317,6 @@ packages: /regenerator-runtime/0.13.10: resolution: {integrity: sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw==} - dev: true /regexp.prototype.flags/1.4.3: resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} @@ -2839,11 +4335,9 @@ packages: /require-directory/2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} - dev: true /require-main-filename/2.0.0: resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - dev: true /resolve-from/4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} @@ -2862,7 +4356,6 @@ packages: is-core-module: 2.11.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 - dev: true /restore-cursor/3.1.0: resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==} @@ -2888,6 +4381,18 @@ packages: glob: 7.2.3 dev: true + /ripemd160/2.0.2: + resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + + /rlp/2.2.7: + resolution: {integrity: sha512-d5gdPmgQ0Z+AklL2NVXr/IoSjNZFfTVvQWzL/AM2AOcSzYP2xjlb0AC8YyCLc41MSNf6P6QVtjgPdmVtzb+4lQ==} + hasBin: true + dependencies: + bn.js: 5.2.1 + /rollup/2.79.1: resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} engines: {node: '>=10.0.0'} @@ -2896,18 +4401,47 @@ packages: fsevents: 2.3.2 dev: true + /rpc-websockets/7.5.0: + resolution: {integrity: sha512-9tIRi1uZGy7YmDjErf1Ax3wtqdSSLIlnmL5OtOzgd5eqPKbsPpwDP5whUDO2LQay3Xp0CcHlcNSGzacNRluBaQ==} + dependencies: + '@babel/runtime': 7.20.1 + eventemitter3: 4.0.7 + uuid: 8.3.2 + ws: 8.11.0_3cxu5zja4e2r5wmvge7mdcljwq + optionalDependencies: + bufferutil: 4.0.7 + utf-8-validate: 5.0.10 + /run-parallel/1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: queue-microtask: 1.2.3 dev: true + /rxjs/6.6.7: + resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} + engines: {npm: '>=2.0.0'} + dependencies: + tslib: 1.14.1 + /rxjs/7.5.7: resolution: {integrity: sha512-z9MzKh/UcOqB3i20H6rtrlaE/CgjLOvheWK/9ILrbhROGTweAi1BaFsTT9FbwZi5Trr1qNRs+MXkhmR06awzQA==} dependencies: tslib: 2.4.1 dev: true + /safe-buffer/5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + /safe-event-emitter/1.0.1: + resolution: {integrity: sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg==} + deprecated: Renamed to @metamask/safe-event-emitter + dependencies: + events: 3.3.0 + + /safe-json-utils/1.1.1: + resolution: {integrity: sha512-SAJWGKDs50tAbiDXLf89PDwt9XYkWyANFWVzn4dTXl5QyI8t2o/bW5/OJl3lvc2WVU4MEpTo9Yz5NVFNsp+OJQ==} + /safe-regex-test/1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: @@ -2920,11 +4454,27 @@ packages: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} dev: true + /scrypt-js/3.0.1: + resolution: {integrity: sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA==} + + /secp256k1/4.0.3: + resolution: {integrity: sha512-NLZVf+ROMxwtEj3Xa562qgv2BK5e2WNmXPiOdVIPLgs6lyTzMvBq0aWTYMI5XCP9jZMVKOcqZLw/Wc4vDkuxhA==} + engines: {node: '>=10.0.0'} + requiresBuild: true + dependencies: + elliptic: 6.5.4 + node-addon-api: 2.0.2 + node-gyp-build: 4.5.0 + /semver/5.7.1: resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} hasBin: true dev: true + /semver/6.3.0: + resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} + hasBin: true + /semver/7.3.8: resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} engines: {node: '>=10'} @@ -2935,7 +4485,16 @@ packages: /set-blocking/2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - dev: true + + /setimmediate/1.0.5: + resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + + /sha.js/2.4.11: + resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} + hasBin: true + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 /shebang-command/1.2.0: resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} @@ -2967,7 +4526,6 @@ packages: call-bind: 1.0.2 get-intrinsic: 1.1.3 object-inspect: 1.12.2 - dev: true /signal-exit/3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} @@ -3064,21 +4622,43 @@ packages: resolution: {integrity: sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==} dev: true + /split-on-first/1.1.0: + resolution: {integrity: sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==} + engines: {node: '>=6'} + /sprintf-js/1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} dev: true + /stream-browserify/3.0.0: + resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.0 + /stream-transform/2.1.3: resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} dependencies: mixme: 0.5.4 dev: true + /strict-uri-encode/2.0.0: + resolution: {integrity: sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==} + engines: {node: '>=4'} + /string-argv/0.3.1: resolution: {integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==} engines: {node: '>=0.6.19'} dev: true + /string-width/3.1.0: + resolution: {integrity: sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==} + engines: {node: '>=6'} + dependencies: + emoji-regex: 7.0.3 + is-fullwidth-code-point: 2.0.0 + strip-ansi: 5.2.0 + /string-width/4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -3113,6 +4693,17 @@ packages: es-abstract: 1.20.4 dev: true + /string_decoder/1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + dependencies: + safe-buffer: 5.2.1 + + /strip-ansi/5.2.0: + resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==} + engines: {node: '>=6'} + dependencies: + ansi-regex: 4.1.1 + /strip-ansi/6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -3142,6 +4733,12 @@ packages: engines: {node: '>=12'} dev: true + /strip-hex-prefix/1.0.0: + resolution: {integrity: sha1-DF8VX+8RUTczd96du1iNoFUA428=} + engines: {node: '>=6.5.0', npm: '>=3'} + dependencies: + is-hex-prefixed: 1.0.0 + /strip-indent/3.0.0: resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} engines: {node: '>=8'} @@ -3173,6 +4770,9 @@ packages: ts-interface-checker: 0.1.13 dev: true + /superstruct/0.14.2: + resolution: {integrity: sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ==} + /supports-color/5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -3190,13 +4790,15 @@ packages: /supports-preserve-symlinks-flag/1.0.0: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - dev: true /term-size/2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} dev: true + /text-encoding-utf-8/1.0.2: + resolution: {integrity: sha512-8bw4MY9WjdsD2aMtO0OzOCY3pXGYNx2d2FfHRVUKkiCPDWjKuOlhLVASS+pD7VkLTVjW268LYJHwsnPFlBpbAg==} + /text-table/0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true @@ -3216,7 +4818,6 @@ packages: /through/2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - dev: true /tinybench/2.3.1: resolution: {integrity: sha512-hGYWYBMPr7p4g5IarQE7XhlyWveh1EKhy4wUBS1LrHXCKYgvz+4/jCqgmJqZxxldesn05vccrtME2RLLZNW7iA==} @@ -3239,6 +4840,10 @@ packages: os-tmpdir: 1.0.2 dev: true + /to-fast-properties/2.0.0: + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} + /to-regex-range/5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -3246,9 +4851,11 @@ packages: is-number: 7.0.0 dev: true + /toggle-selection/1.0.6: + resolution: {integrity: sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==} + /tr46/0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - dev: true /tr46/1.0.1: resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} @@ -3281,11 +4888,9 @@ packages: /tslib/1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - dev: true /tslib/2.4.1: resolution: {integrity: sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA==} - dev: true /tsup/6.3.0_typescript@4.8.4: resolution: {integrity: sha512-IaNQO/o1rFgadLhNonVKNCT2cks+vvnWX3DnL8sB87lBDqRvJXHENr5lSPJlqwplUlDxSwZK8dSg87rgBu6Emw==} @@ -3347,6 +4952,9 @@ packages: yargs: 17.6.0 dev: true + /tweetnacl/1.0.3: + resolution: {integrity: sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==} + /type-check/0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} @@ -3384,6 +4992,11 @@ packages: engines: {node: '>=8'} dev: true + /typedarray-to-buffer/3.1.5: + resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} + dependencies: + is-typedarray: 1.0.0 + /typescript/4.8.4: resolution: {integrity: sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==} engines: {node: '>=4.2.0'} @@ -3404,12 +5017,56 @@ packages: engines: {node: '>= 4.0.0'} dev: true + /universalify/2.0.0: + resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} + engines: {node: '>= 10.0.0'} + dev: true + + /update-browserslist-db/1.0.10_browserslist@4.21.4: + resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.21.4 + escalade: 3.1.1 + picocolors: 1.0.0 + /uri-js/4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} dependencies: punycode: 2.1.1 dev: true + /use-sync-external-store/1.2.0: + resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + dev: true + + /utf-8-validate/5.0.10: + resolution: {integrity: sha512-Z6czzLq4u8fPOyx7TU6X3dvUZVvoJmxSQ+IcrlmagKhilxlhZgxPK6C5Jqbkw1IDUmFTM+cz9QDnnLTwDz/2gQ==} + engines: {node: '>=6.14.2'} + requiresBuild: true + dependencies: + node-gyp-build: 4.5.0 + + /util-deprecate/1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + + /util/0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + dependencies: + inherits: 2.0.4 + is-arguments: 1.1.1 + is-generator-function: 1.0.10 + is-typed-array: 1.1.10 + which-typed-array: 1.1.9 + + /uuid/8.3.2: + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + hasBin: true + /v8-compile-cache/2.3.0: resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==} dev: true @@ -3501,18 +5158,28 @@ packages: /webidl-conversions/3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - dev: true /webidl-conversions/4.0.2: resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} dev: true + /webidl-conversions/5.0.0: + resolution: {integrity: sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==} + engines: {node: '>=8'} + + /whatwg-url-without-unicode/8.0.0-3: + resolution: {integrity: sha512-HoKuzZrUlgpz35YO27XgD28uh/WJH4B0+3ttFqRo//lmq+9T/mIOJ6kqmINI9HpUpz1imRC/nR/lxKpJiv0uig==} + engines: {node: '>=10'} + dependencies: + buffer: 5.7.1 + punycode: 2.1.1 + webidl-conversions: 5.0.0 + /whatwg-url/5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: tr46: 0.0.3 webidl-conversions: 3.0.1 - dev: true /whatwg-url/7.1.0: resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} @@ -3534,7 +5201,6 @@ packages: /which-module/2.0.0: resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==} - dev: true /which-pm/2.0.0: resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} @@ -3544,6 +5210,17 @@ packages: path-exists: 4.0.0 dev: true + /which-typed-array/1.1.9: + resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.0 + is-typed-array: 1.1.10 + /which/1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true @@ -3564,6 +5241,14 @@ packages: engines: {node: '>=0.10.0'} dev: true + /wrap-ansi/5.1.0: + resolution: {integrity: sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==} + engines: {node: '>=6'} + dependencies: + ansi-styles: 3.2.1 + string-width: 3.1.0 + strip-ansi: 5.2.0 + /wrap-ansi/6.2.0: resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} engines: {node: '>=8'} @@ -3586,9 +5271,64 @@ packages: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true + /ws/7.4.6: + resolution: {integrity: sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dev: true + + /ws/7.5.3: + resolution: {integrity: sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + /ws/7.5.9: + resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} + engines: {node: '>=8.3.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + + /ws/8.11.0_3cxu5zja4e2r5wmvge7mdcljwq: + resolution: {integrity: sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ^5.0.2 + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + dependencies: + bufferutil: 4.0.7 + utf-8-validate: 5.0.10 + + /xtend/4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + /y18n/4.0.3: resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} - dev: true /y18n/5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} @@ -3613,6 +5353,12 @@ packages: engines: {node: '>= 14'} dev: true + /yargs-parser/13.1.2: + resolution: {integrity: sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==} + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + /yargs-parser/18.1.3: resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} engines: {node: '>=6'} @@ -3626,6 +5372,20 @@ packages: engines: {node: '>=12'} dev: true + /yargs/13.3.2: + resolution: {integrity: sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==} + dependencies: + cliui: 5.0.0 + find-up: 3.0.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 3.1.0 + which-module: 2.0.0 + y18n: 4.0.3 + yargs-parser: 13.1.2 + /yargs/15.4.1: resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} engines: {node: '>=8'} @@ -3660,3 +5420,26 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} dev: true + + /zustand/4.1.5: + resolution: {integrity: sha512-PsdRT8Bvq22Yyh1tvpgdHNE7OAeFKqJXUxtJvj1Ixw2B9O2YZ1M34ImQ+xyZah4wZrR4lENMoDUutKPpyXCQ/Q==} + engines: {node: '>=12.7.0'} + peerDependencies: + immer: '>=9.0' + react: '>=16.8' + peerDependenciesMeta: + immer: + optional: true + react: + optional: true + dependencies: + use-sync-external-store: 1.2.0 + dev: true + + github.com/ethereumjs/ethereumjs-abi/ee3994657fa7a427238e6ba92a84d0b529bbcde0: + resolution: {tarball: https://codeload.github.com/ethereumjs/ethereumjs-abi/tar.gz/ee3994657fa7a427238e6ba92a84d0b529bbcde0} + name: ethereumjs-abi + version: 0.6.8 + dependencies: + bn.js: 4.12.0 + ethereumjs-util: 6.2.1 diff --git a/scripts/tsup.ts b/scripts/tsup.ts index ab7c8ef3..edaad14e 100644 --- a/scripts/tsup.ts +++ b/scripts/tsup.ts @@ -1,7 +1,61 @@ -import { Options } from 'tsup' +import { execa } from 'execa' +import { default as fs } from 'fs-extra' +import type { Options } from 'tsup' -export function getConfig(options: Options): Options { +import path from 'path' + +type GetConfig = Omit< + Options, + 'bundle' | 'clean' | 'dts' | 'entry' | 'format' +> & { + entry?: string[] + exports?: { [key: string]: string | { default: string; types?: string } } + dev?: boolean +} + +export function getConfig({ + dev, + exports = {}, + ...options +}: GetConfig): Options { if (!options.entry?.length) throw new Error('entry is required') + const entry: string[] = options.entry ?? [] + + // Hacks tsup to create Preconstruct-like linked packages for development + // https://github.com/preconstruct/preconstruct + if (dev) + return { + clean: true, + // Only need to generate one file with tsup for development since we will create links in `onSuccess` + entry: [entry[0] as string], + format: ['esm'], + silent: true, + async onSuccess() { + // remove all files in dist + await fs.emptyDir('dist') + // symlink files and type definitions + for (const file of entry) { + const filePath = path.resolve(file) + const distSourceFile = filePath + .replace(file, file.replace('src/', 'dist/')) + .replace(/\.ts$/, '.js') + // Make sure directory exists + await fs.ensureDir(path.dirname(distSourceFile)) + // Create symlink between source and dist file + await fs.symlink(filePath, distSourceFile, 'file') + // Create file linking up type definitions + const srcTypesFile = path + .relative(path.dirname(distSourceFile), filePath) + .replace(/\.ts$/, '') + await fs.outputFile( + distSourceFile.replace(/\.js$/, '.d.ts'), + `export * from '${srcTypesFile}'`, + ) + } + validateExports(exports) + }, + } + return { bundle: true, clean: true, @@ -9,6 +63,29 @@ export function getConfig(options: Options): Options { format: ['esm'], splitting: true, target: 'es2021', + async onSuccess() { + if (typeof options.onSuccess === 'function') await options.onSuccess() + else if (typeof options.onSuccess === 'string') execa(options.onSuccess) + validateExports(exports) + }, ...options, } } + +/** + * Validate exports point to actual files + */ +async function validateExports(exports: { + [key: string]: string | { default: string } +}) { + for (const [key, value] of Object.entries(exports)) { + if (typeof value === 'string') continue + for (const [type, path] of Object.entries(value)) { + const fileExists = await fs.pathExists(path) + if (!fileExists) + throw new Error( + `File does not exist for export "${type}": "${value.default}" in "${key}."`, + ) + } + } +}