From c15495625c83b2c76856d8e2229e4ac637f7d40c Mon Sep 17 00:00:00 2001 From: Jonas Daniels Date: Wed, 7 Feb 2024 02:58:15 -0800 Subject: [PATCH] add `/utils` export --- packages/thirdweb/benchmark/contract-read.ts | 78 ------ packages/thirdweb/package.json | 26 +- .../src/extensions/erc20/read/decimals.ts | 2 +- .../detect.ts => bytecode/detectExtension.ts} | 0 .../src/utils/bytecode/extractIPFS.test.ts | 38 +++ .../src/utils/bytecode/extractIPFS.ts | 40 +++ packages/thirdweb/src/utils/index.ts | 13 + pnpm-lock.yaml | 236 +++++++++++++----- 8 files changed, 277 insertions(+), 156 deletions(-) delete mode 100644 packages/thirdweb/benchmark/contract-read.ts rename packages/thirdweb/src/utils/{extensions/detect.ts => bytecode/detectExtension.ts} (100%) create mode 100644 packages/thirdweb/src/utils/bytecode/extractIPFS.test.ts create mode 100644 packages/thirdweb/src/utils/bytecode/extractIPFS.ts create mode 100644 packages/thirdweb/src/utils/index.ts diff --git a/packages/thirdweb/benchmark/contract-read.ts b/packages/thirdweb/benchmark/contract-read.ts deleted file mode 100644 index 576fb089875..00000000000 --- a/packages/thirdweb/benchmark/contract-read.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* eslint-disable better-tree-shaking/no-top-level-side-effects */ -import { Bench } from "tinybench"; -import { Contract, getDefaultProvider } from "ethers6"; -import { - createPublicClient, - http, - getContract as viem_getContract, -} from "viem"; -import { mainnet } from "viem/chains"; -import { ThirdwebSDK } from "@thirdweb-dev/sdk"; -import { createClient, getContract } from "../src"; -import { totalSupply } from "../src/extensions/erc20"; -import { USDC_CONTRACT_ADDRESS } from "../test/src/test-contracts"; - -const bench = new Bench({ iterations: 10, warmupIterations: 1, throws: true }); -bench.add("thirdweb@alpha", async () => { - const client = createClient({ - clientId: "benchmark", - }); - - const contract = getContract({ - client, - chain: 1, - address: USDC_CONTRACT_ADDRESS, - }); - - await totalSupply({ - contract, - }); -}); -bench.add("@thirdweb-dev/sdk", async () => { - const sdk = new ThirdwebSDK(1); - - const c = await sdk.getContract(USDC_CONTRACT_ADDRESS); - - await c.erc20.totalSupply(); -}); -bench.add("viem", async () => { - // the ABI of the contract - const abi = [ - { - inputs: [], - name: "totalSupply", - outputs: [ - { - type: "uint256", - }, - ], - stateMutability: "view", - type: "function", - }, - ] as const; - - const client = createPublicClient({ - chain: mainnet, - transport: http(), - }); - - const contract = viem_getContract({ - address: USDC_CONTRACT_ADDRESS, - abi, - client, - }); - await contract.read.totalSupply(); -}); -bench.add("ethers@6", async () => { - const abi = ["function totalSupply() view returns (uint256)"]; - - const provider = getDefaultProvider(1); - - const c = new Contract(USDC_CONTRACT_ADDRESS, abi, provider); - await c.totalSupply(); -}); - -await bench.warmup(); -await bench.run(); - -console.table(bench.table()); diff --git a/packages/thirdweb/package.json b/packages/thirdweb/package.json index 10674ffc81c..01ec5199fe3 100644 --- a/packages/thirdweb/package.json +++ b/packages/thirdweb/package.json @@ -11,9 +11,6 @@ }, "author": "thirdweb eng ", "type": "module", - "bin": { - "thirdweb": "node_modules/@thirdweb-dev/cli/dist/cli/index.js" - }, "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js", "types": "./dist/types/index.d.ts", @@ -54,6 +51,11 @@ "import": "./dist/esm/wallets/index.js", "default": "./dist/cjs/wallets/index.js" }, + "./utils": { + "types": "./dist/types/utils/index.d.ts", + "import": "./dist/esm/utils/index.js", + "default": "./dist/cjs/utils/index.js" + }, "./wallets/*": { "types": "./dist/types/wallets/*.d.ts", "import": "./dist/esm/wallets/*.js", @@ -91,6 +93,9 @@ "wallets": [ "./dist/types/wallets/index.d.ts" ], + "utils": [ + "./dist/types/utils/index.d.ts" + ], "wallets/*": [ "./dist/types/wallets/*.d.ts" ], @@ -127,30 +132,31 @@ "@radix-ui/react-popover": "^1.0.7", "@radix-ui/react-tabs": "^1.0.4", "@radix-ui/react-tooltip": "^1.0.7", - "@tanstack/react-query": "^5.18.0", - "@walletconnect/ethereum-provider": "^2.11.0", + "@tanstack/react-query": "^5.18.1", + "@walletconnect/ethereum-provider": "^2.11.1", "abitype": "^1.0.0", + "bs58": "^5.0.0", + "cbor-x": "^1.5.8", "fuse.js": "^7.0.0", "mipd": "^0.0.5", "qrcode": "^1.5.3", - "viem": "^2.7.1" + "viem": "^2.7.6" }, "devDependencies": { - "@tanstack/eslint-plugin-query": "^5.18.0", + "@tanstack/eslint-plugin-query": "^5.18.1", "@thirdweb-dev/sdk": "workspace:*", - "@types/bun": "^1.0.4", + "@types/bun": "^1.0.5", "@types/qrcode": "^1.5.5", "@types/react": "18.2.17", "@viem/anvil": "^0.0.7", "@vitest/coverage-v8": "^1.2.2", "eslint-config-thirdweb": "workspace:*", "eslint-plugin-better-tree-shaking": "0.0.4", - "eslint-plugin-jsdoc": "^48.0.4", + "eslint-plugin-jsdoc": "^48.0.6", "ethers5": "npm:ethers@^5.0.0", "ethers6": "npm:ethers@^6.0.0", "react": "^18.2.0", "rimraf": "^5.0.5", - "tinybench": "^2.6.0", "typedoc-gen": "workspace:*", "typescript": "^5.3.3", "vitest": "^1.2.2" diff --git a/packages/thirdweb/src/extensions/erc20/read/decimals.ts b/packages/thirdweb/src/extensions/erc20/read/decimals.ts index a477bc68cf2..8f16579d39f 100644 --- a/packages/thirdweb/src/extensions/erc20/read/decimals.ts +++ b/packages/thirdweb/src/extensions/erc20/read/decimals.ts @@ -1,7 +1,7 @@ import type { ThirdwebContract } from "../../../contract/index.js"; import { readContract } from "../../../transaction/actions/read.js"; import type { TxOpts } from "../../../transaction/transaction.js"; -import { detectMethod } from "../../../utils/extensions/detect.js"; +import { detectMethod } from "../../../utils/bytecode/detectExtension.js"; const cache = new WeakMap, Promise>(); diff --git a/packages/thirdweb/src/utils/extensions/detect.ts b/packages/thirdweb/src/utils/bytecode/detectExtension.ts similarity index 100% rename from packages/thirdweb/src/utils/extensions/detect.ts rename to packages/thirdweb/src/utils/bytecode/detectExtension.ts diff --git a/packages/thirdweb/src/utils/bytecode/extractIPFS.test.ts b/packages/thirdweb/src/utils/bytecode/extractIPFS.test.ts new file mode 100644 index 00000000000..c9cfb9e5bc1 --- /dev/null +++ b/packages/thirdweb/src/utils/bytecode/extractIPFS.test.ts @@ -0,0 +1,38 @@ +import { describe, it, expect } from "vitest"; +import { getByteCode } from "../../contract/index.js"; +import { + DOODLES_CONTRACT, + USDC_CONTRACT, +} from "../../../test/src/test-contracts.js"; +import { extractIPFSUri } from "./extractIPFS.js"; + +describe("extractIPFSUri", () => { + it("works if ipfs is there", async () => { + // get some bytecode + const bytecode = await getByteCode(DOODLES_CONTRACT); + // extract IPFS hash + const ipfsHash = extractIPFSUri(bytecode); + + // DOODLES bytecode contains an IPFS hash + expect(ipfsHash).toMatchInlineSnapshot( + `"ipfs://QmRKWTE2aFc8VZdsHAZ8B7vMStPBFwn4AQr7WGUhjkuJWb"`, + ); + }); + + it("does not work if ipfs is not there", async () => { + // get some bytecode + const bytecode = await getByteCode(USDC_CONTRACT); + // extract IPFS hash + const ipfsHash = extractIPFSUri(bytecode); + + // USDC bytecode does not contain an IPFS hash + expect(ipfsHash).toMatchInlineSnapshot(`undefined`); + }); + + it("works with the weird mumbai contract", async () => { + const ipfsHash = extractIPFSUri( + "0x363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3", + ); + expect(ipfsHash).toMatchInlineSnapshot(`undefined`); + }); +}); diff --git a/packages/thirdweb/src/utils/bytecode/extractIPFS.ts b/packages/thirdweb/src/utils/bytecode/extractIPFS.ts new file mode 100644 index 00000000000..91392cc26f7 --- /dev/null +++ b/packages/thirdweb/src/utils/bytecode/extractIPFS.ts @@ -0,0 +1,40 @@ +import { hexToBytes } from "@noble/hashes/utils"; +import { decode } from "cbor-x"; +import { encode } from "bs58"; + +/** + * Extracts the IPFS URI from the given bytecode. + * @param bytecode - The bytecode to extract the IPFS URI from. + * @returns The IPFS URI if found, otherwise undefined. + * @example + * ```ts + * import { extractIPFSUri } from "thirdweb/utils/bytecode/extractIPFS"; + * const bytecode = "0x363d3d373d3d3d363d30545af43d82803e903d91601857fd5bf3"; + * const ipfsHash = extractIPFSUri(bytecode); + * console.log(ipfsHash); + * ``` + */ +export function extractIPFSUri(bytecode: string): string | undefined { + const numericBytecode = hexToBytes( + bytecode.startsWith("0x") ? bytecode.slice(2) : bytecode, + ); + + const cborLength = + // @ts-expect-error - TS doesn't like this, but it's fine + numericBytecode[numericBytecode.length - 2] * 0x100 + + // @ts-expect-error - TS doesn't like this, but it's fine + numericBytecode[numericBytecode.length - 1]; + const cborStart = numericBytecode.length - 2 - cborLength; + // if the cborStart is invalid, return undefined + if (cborStart < 0 || cborStart > numericBytecode.length) { + return undefined; + } + const bytecodeBuffer = numericBytecode.slice(cborStart, -2); + + const cborData = decode(bytecodeBuffer); + if ("ipfs" in cborData) { + return `ipfs://${encode(cborData["ipfs"])}`; + } + + return undefined; +} diff --git a/packages/thirdweb/src/utils/index.ts b/packages/thirdweb/src/utils/index.ts new file mode 100644 index 00000000000..089fca25811 --- /dev/null +++ b/packages/thirdweb/src/utils/index.ts @@ -0,0 +1,13 @@ +// bytecode +export { extractIPFSUri } from "./bytecode/extractIPFS.js"; +export { detectMethod } from "./bytecode/detectExtension.js"; + +// units +export { + formatEther, + formatGwei, + formatUnits, + parseEther, + parseGwei, + parseUnits, +} from "./units.js"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 46b5b273e49..e5765e3ce15 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1433,14 +1433,20 @@ importers: specifier: ^1.0.7 version: 1.0.7(@types/react-dom@18.2.7)(@types/react@18.2.17)(react-dom@18.2.0)(react@18.2.0) '@tanstack/react-query': - specifier: ^5.18.0 - version: 5.18.0(react@18.2.0) + specifier: ^5.18.1 + version: 5.18.1(react@18.2.0) '@walletconnect/ethereum-provider': - specifier: ^2.11.0 - version: 2.11.0(@types/react@18.2.17)(react@18.2.0) + specifier: ^2.11.1 + version: 2.11.1(@types/react@18.2.17)(react@18.2.0) abitype: specifier: ^1.0.0 version: 1.0.0(typescript@5.3.3) + bs58: + specifier: ^5.0.0 + version: 5.0.0 + cbor-x: + specifier: ^1.5.8 + version: 1.5.8 ethers: specifier: ^5 || ^6 version: 5.7.2 @@ -1454,18 +1460,18 @@ importers: specifier: ^1.5.3 version: 1.5.3 viem: - specifier: ^2.7.1 - version: 2.7.1(typescript@5.3.3) + specifier: ^2.7.6 + version: 2.7.6(typescript@5.3.3) devDependencies: '@tanstack/eslint-plugin-query': - specifier: ^5.18.0 - version: 5.18.0(eslint@8.56.0)(typescript@5.3.3) + specifier: ^5.18.1 + version: 5.18.1(eslint@8.56.0)(typescript@5.3.3) '@thirdweb-dev/sdk': specifier: workspace:* version: link:../sdk '@types/bun': - specifier: ^1.0.4 - version: 1.0.4 + specifier: ^1.0.5 + version: 1.0.5 '@types/qrcode': specifier: ^1.5.5 version: 1.5.5 @@ -1485,8 +1491,8 @@ importers: specifier: 0.0.4 version: 0.0.4(eslint@8.56.0) eslint-plugin-jsdoc: - specifier: ^48.0.4 - version: 48.0.4(eslint@8.56.0) + specifier: ^48.0.6 + version: 48.0.6(eslint@8.56.0) ethers5: specifier: npm:ethers@^5.0.0 version: /ethers@5.7.2 @@ -1499,9 +1505,6 @@ importers: rimraf: specifier: ^5.0.5 version: 5.0.5 - tinybench: - specifier: ^2.6.0 - version: 2.6.0 typedoc-gen: specifier: workspace:* version: link:../typedoc-gen @@ -6603,6 +6606,54 @@ packages: - utf-8-validate dev: false + /@cbor-extract/cbor-extract-darwin-arm64@2.2.0: + resolution: {integrity: sha512-P7swiOAdF7aSi0H+tHtHtr6zrpF3aAq/W9FXx5HektRvLTM2O89xCyXF3pk7pLc7QpaY7AoaE8UowVf9QBdh3w==} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@cbor-extract/cbor-extract-darwin-x64@2.2.0: + resolution: {integrity: sha512-1liF6fgowph0JxBbYnAS7ZlqNYLf000Qnj4KjqPNW4GViKrEql2MgZnAsExhY9LSy8dnvA4C0qHEBgPrll0z0w==} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: false + optional: true + + /@cbor-extract/cbor-extract-linux-arm64@2.2.0: + resolution: {integrity: sha512-rQvhNmDuhjTVXSPFLolmQ47/ydGOFXtbR7+wgkSY0bdOxCFept1hvg59uiLPT2fVDuJFuEy16EImo5tE2x3RsQ==} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@cbor-extract/cbor-extract-linux-arm@2.2.0: + resolution: {integrity: sha512-QeBcBXk964zOytiedMPQNZr7sg0TNavZeuUCD6ON4vEOU/25+pLhNN6EDIKJ9VLTKaZ7K7EaAriyYQ1NQ05s/Q==} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@cbor-extract/cbor-extract-linux-x64@2.2.0: + resolution: {integrity: sha512-cWLAWtT3kNLHSvP4RKDzSTX9o0wvQEEAj4SKvhWuOVZxiDAeQazr9A+PSiRILK1VYMLeDml89ohxCnUNQNQNCw==} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: false + optional: true + + /@cbor-extract/cbor-extract-win32-x64@2.2.0: + resolution: {integrity: sha512-l2M+Z8DO2vbvADOBNLbbh9y5ST1RY5sqkWOg/58GkUPBYou/cuNZ68SGQ644f1CvZ8kcOxyZtw06+dxWHIoN/w==} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: false + optional: true + /@chainlink/contracts@0.6.1(ethers@5.7.2): resolution: {integrity: sha512-EuwijGexttw0UjfrW+HygwhQIrGAbqpf1ue28R55HhWMHBzphEH0PhWm8DQmFfj5OZNy8Io66N4L0nStkZ3QKQ==} dependencies: @@ -7128,8 +7179,8 @@ packages: resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} dev: false - /@es-joy/jsdoccomment@0.41.0: - resolution: {integrity: sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw==} + /@es-joy/jsdoccomment@0.42.0: + resolution: {integrity: sha512-R1w57YlVA6+YE01wch3GPYn6bCsrOV3YW/5oGGE2tmX6JcL9Nr+b5IikrjMPF+v9CV3ay+obImEdsDhovhJrzw==} engines: {node: '>=16'} dependencies: comment-parser: 1.4.1 @@ -12218,8 +12269,8 @@ packages: defer-to-connect: 2.0.1 dev: false - /@tanstack/eslint-plugin-query@5.18.0(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-R7x4YV304oduB9IYi660pfNpeO4XcFntkmIG0QV9/IaLeUq+H6M1C+5Th/092ScIrDtU6XgngY2YsS6bwt4vAg==} + /@tanstack/eslint-plugin-query@5.18.1(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-pLHqd2RYSbGxhFXdjVxo5Gmi1aJfcXDpZQsjLHEkGEXFb65WzX6LMCz7n2rW3wBElDerRLFZNVLC61Pg/TlYsA==} peerDependencies: eslint: ^8.0.0 dependencies: @@ -12234,8 +12285,8 @@ packages: resolution: {integrity: sha512-qYu73ptvnzRh6se2nyBIDHGBQvPY1XXl3yR769B7B6mIDD7s+EZhdlWHQ67JI6UOTFRaI7wupnTnwJ3gE0Mr/g==} dev: false - /@tanstack/query-core@5.18.0: - resolution: {integrity: sha512-8c6nxeAnGHxIDZIyDmHdmgFt4D+LprAQaJmjsnM4szcIjsWOyFlzxdqQUuQ/XuQRvUgqYaqlJTtDADlSS7pTPQ==} + /@tanstack/query-core@5.18.1: + resolution: {integrity: sha512-fYhrG7bHgSNbnkIJF2R4VUXb4lF7EBiQjKkDc5wOlB7usdQOIN4LxxHpDxyE3qjqIst1WBGvDtL48T0sHJGKCw==} dev: false /@tanstack/react-query@4.33.0(react-dom@18.2.0)(react@18.2.0): @@ -12274,12 +12325,12 @@ packages: use-sync-external-store: 1.2.0(react@18.2.0) dev: false - /@tanstack/react-query@5.18.0(react@18.2.0): - resolution: {integrity: sha512-7FKxNfxxKEL7n3ADpwp81Fy4FX85hNkYVzQQVQsF0JAPl93c3d1gmNZMIbEtOqgYfom1/ontGh3FiZGYj3xyWA==} + /@tanstack/react-query@5.18.1(react@18.2.0): + resolution: {integrity: sha512-PdI07BbsahZ+04PxSuDQsQvBWe008eWFk/YYWzt8fvzt2sALUM0TpAJa/DFpqa7+SSo7j1EQR6Jx6znXNHyaXw==} peerDependencies: react: ^18.0.0 dependencies: - '@tanstack/query-core': 5.18.0 + '@tanstack/query-core': 5.18.1 react: 18.2.0 dev: false @@ -12439,10 +12490,10 @@ packages: '@types/node': 18.17.1 dev: true - /@types/bun@1.0.4: - resolution: {integrity: sha512-2DO7sqwtpko3d3XP2kLpJsOkV12sSRt8cFR955JVB60m1DiXE56T+gJq+DcCczQ5khxgCDQKkyBRlgg5VH33Dw==} + /@types/bun@1.0.5: + resolution: {integrity: sha512-c14fs5QLLanldcZpX/GjIEKeo++NDzOlixUZ7IUWzN7AoBTisYyWxaxdXNhpAP5I1mPcd92Zagq8sdgTnUXWjg==} dependencies: - bun-types: 1.0.25 + bun-types: 1.0.26 dev: true /@types/cacheable-request@6.0.3: @@ -12699,6 +12750,12 @@ packages: /@types/node@18.17.1: resolution: {integrity: sha512-xlR1jahfizdplZYRU59JlUx9uzF1ARa8jbhM11ccpCJya8kvos5jwdm2ZAgxSCwOl0fq21svP18EVwPBXMQudw==} + /@types/node@20.11.16: + resolution: {integrity: sha512-gKb0enTmRCzXSSUJDq6/sPcqrfCv2mkkG6Jt/clpn5eiCbKTY+SgZUxo+p8ZKMof5dCp9vHQUAB7wOUTod22wQ==} + dependencies: + undici-types: 5.26.5 + dev: true + /@types/normalize-package-data@2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -12857,8 +12914,8 @@ packages: dependencies: '@types/node': 18.17.1 - /@types/ws@8.5.4: - resolution: {integrity: sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==} + /@types/ws@8.5.10: + resolution: {integrity: sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==} dependencies: '@types/node': 18.17.1 dev: true @@ -13363,8 +13420,8 @@ packages: - utf-8-validate dev: false - /@walletconnect/core@2.11.0: - resolution: {integrity: sha512-2Tjp5BCevI7dbmqo/OrCjX4tqgMqwJNQLlQAlphqPfvwlF9+tIu6pGcVbSN3U9zyXzWIZCeleqEaWUeSeET4Ew==} + /@walletconnect/core@2.11.1: + resolution: {integrity: sha512-T57Vd7YdbHPsy3tthBuwrhaZNafN0+PqjISFRNeJy/bsKdXxpJg2hGSARuOTpCO7V6VcaatqlaSMuG3DrnG5rA==} dependencies: '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-provider': 1.0.13 @@ -13377,8 +13434,8 @@ packages: '@walletconnect/relay-auth': 1.0.4 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.11.0 - '@walletconnect/utils': 2.11.0 + '@walletconnect/types': 2.11.1 + '@walletconnect/utils': 2.11.1 events: 3.3.0 isomorphic-unfetch: 3.1.0 lodash.isequal: 4.5.0 @@ -13434,18 +13491,18 @@ packages: tslib: 1.14.1 dev: false - /@walletconnect/ethereum-provider@2.11.0(@types/react@18.2.17)(react@18.2.0): - resolution: {integrity: sha512-YrTeHVjuSuhlUw7SQ6xBJXDuJ6iAC+RwINm9nVhoKYJSHAy3EVSJZOofMKrnecL0iRMtD29nj57mxAInIBRuZA==} + /@walletconnect/ethereum-provider@2.11.1(@types/react@18.2.17)(react@18.2.0): + resolution: {integrity: sha512-UfQH0ho24aa2M1xYmanbJv2ggQPebKmQytp2j20QEvURJ2R0v7YKWZ+0PfwOs6o6cuGw6gGxy/0WQXQRZSAsfg==} dependencies: '@walletconnect/jsonrpc-http-connection': 1.0.7 '@walletconnect/jsonrpc-provider': 1.0.13 '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/modal': 2.6.2(@types/react@18.2.17)(react@18.2.0) - '@walletconnect/sign-client': 2.11.0 - '@walletconnect/types': 2.11.0 - '@walletconnect/universal-provider': 2.11.0 - '@walletconnect/utils': 2.11.0 + '@walletconnect/sign-client': 2.11.1 + '@walletconnect/types': 2.11.1 + '@walletconnect/universal-provider': 2.11.1 + '@walletconnect/utils': 2.11.1 events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -13711,17 +13768,17 @@ packages: tslib: 1.14.1 dev: false - /@walletconnect/sign-client@2.11.0: - resolution: {integrity: sha512-H2ukscibBS+6WrzQWh+WyVBqO5z4F5et12JcwobdwgHnJSlqIoZxqnUYYWNCI5rUR5UKsKWaUyto4AE9N5dw4Q==} + /@walletconnect/sign-client@2.11.1: + resolution: {integrity: sha512-s3oKSx6/F5X2WmkV1jfJImBFACf9Km5HpTb+n5q+mobJVpUQw/clvoVyIrNNppLhm1V1S/ylHXh0qCrDppDpCA==} dependencies: - '@walletconnect/core': 2.11.0 + '@walletconnect/core': 2.11.1 '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.1 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.0.1 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.11.0 - '@walletconnect/utils': 2.11.0 + '@walletconnect/types': 2.11.1 + '@walletconnect/utils': 2.11.1 events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -13781,8 +13838,8 @@ packages: - lokijs dev: false - /@walletconnect/types@2.11.0: - resolution: {integrity: sha512-AB5b1lrEbCGHxqS2vqfCkIoODieH+ZAUp9rA1O2ftrhnqDJiJK983Df87JhYhECsQUBHHfALphA8ydER0q+9sw==} + /@walletconnect/types@2.11.1: + resolution: {integrity: sha512-UbdbX+d6MOK0AXKxt5imV3KvAcLVpZUHylaRDIP5ffwVylM/p4DHnKppil1Qq5N+IGDr3RsUwLGFkKjqsQYRKw==} dependencies: '@walletconnect/events': 1.0.1 '@walletconnect/heartbeat': 1.2.1 @@ -13820,17 +13877,17 @@ packages: - lokijs dev: false - /@walletconnect/universal-provider@2.11.0: - resolution: {integrity: sha512-zgJv8jDvIMP4Qse/D9oIRXGdfoNqonsrjPZanQ/CHNe7oXGOBiQND2IIeX+tS0H7uNA0TPvctljCLiIN9nw4eA==} + /@walletconnect/universal-provider@2.11.1: + resolution: {integrity: sha512-BJvPYByIfbBYF4x8mqDV79ebQX0tD54pp8itsqrHWn0qKZeJyIH8sQ69yY0GnbJrzoFS3ZLULdC0yDxWDeuRGw==} dependencies: '@walletconnect/jsonrpc-http-connection': 1.0.7 '@walletconnect/jsonrpc-provider': 1.0.13 '@walletconnect/jsonrpc-types': 1.0.3 '@walletconnect/jsonrpc-utils': 1.0.8 '@walletconnect/logger': 2.0.1 - '@walletconnect/sign-client': 2.11.0 - '@walletconnect/types': 2.11.0 - '@walletconnect/utils': 2.11.0 + '@walletconnect/sign-client': 2.11.1 + '@walletconnect/types': 2.11.1 + '@walletconnect/utils': 2.11.1 events: 3.3.0 transitivePeerDependencies: - '@azure/app-configuration' @@ -13893,8 +13950,8 @@ packages: - lokijs dev: false - /@walletconnect/utils@2.11.0: - resolution: {integrity: sha512-hxkHPlTlDQILHfIKXlmzgNJau/YcSBC3XHUSuZuKZbNEw3duFT6h6pm3HT/1+j1a22IG05WDsNBuTCRkwss+BQ==} + /@walletconnect/utils@2.11.1: + resolution: {integrity: sha512-wRFDHN86dZ05mCET1H3912odIeQa8j7cZKxl1FlWRpV2YsILj9HCYSX6Uq2brwO02Kv2vryke44G1r8XI/LViA==} dependencies: '@stablelib/chacha20poly1305': 1.0.1 '@stablelib/hkdf': 1.0.1 @@ -13904,7 +13961,7 @@ packages: '@walletconnect/relay-api': 1.0.9 '@walletconnect/safe-json': 1.0.2 '@walletconnect/time': 1.0.2 - '@walletconnect/types': 2.11.0 + '@walletconnect/types': 2.11.1 '@walletconnect/window-getters': 1.0.1 '@walletconnect/window-metadata': 1.0.1 detect-browser: 5.3.0 @@ -15567,12 +15624,11 @@ packages: semver: 7.5.4 dev: false - /bun-types@1.0.25: - resolution: {integrity: sha512-9lxeUR/OJsvlZH4GOWteiAdx7ikrSxCUX7Rr0JJux+DrR3LejouVLxIZnTeQ3UPAZovvSgKivWeHPJ2wlo7/Kg==} + /bun-types@1.0.26: + resolution: {integrity: sha512-VcSj+SCaWIcMb0uSGIAtr8P92zq9q+unavcQmx27fk6HulCthXHBVrdGuXxAZbFtv7bHVjizRzR2mk9r/U8Nkg==} dependencies: - '@types/node': 18.17.1 - '@types/ws': 8.5.4 - undici-types: 5.28.2 + '@types/node': 20.11.16 + '@types/ws': 8.5.10 dev: true /bundle-require@4.0.1(esbuild@0.17.11): @@ -15790,6 +15846,28 @@ packages: lodash: 4.17.21 dev: false + /cbor-extract@2.2.0: + resolution: {integrity: sha512-Ig1zM66BjLfTXpNgKpvBePq271BPOvu8MR0Jl080yG7Jsl+wAZunfrwiwA+9ruzm/WEdIV5QF/bjDZTqyAIVHA==} + hasBin: true + requiresBuild: true + dependencies: + node-gyp-build-optional-packages: 5.1.1 + optionalDependencies: + '@cbor-extract/cbor-extract-darwin-arm64': 2.2.0 + '@cbor-extract/cbor-extract-darwin-x64': 2.2.0 + '@cbor-extract/cbor-extract-linux-arm': 2.2.0 + '@cbor-extract/cbor-extract-linux-arm64': 2.2.0 + '@cbor-extract/cbor-extract-linux-x64': 2.2.0 + '@cbor-extract/cbor-extract-win32-x64': 2.2.0 + dev: false + optional: true + + /cbor-x@1.5.8: + resolution: {integrity: sha512-gc3bHBsvG6GClCY6c0/iip+ghlqizkVp+TtaL927lwvP4VP9xBdi1HmqPR5uj/Mj/0TOlngMkIYa25wKg+VNrQ==} + optionalDependencies: + cbor-extract: 2.2.0 + dev: false + /chai@4.3.7: resolution: {integrity: sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==} engines: {node: '>=4'} @@ -16905,6 +16983,13 @@ packages: hasBin: true dev: false + /detect-libc@2.0.2: + resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} + engines: {node: '>=8'} + requiresBuild: true + dev: false + optional: true + /detect-newline@3.1.0: resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==} engines: {node: '>=8'} @@ -17881,13 +17966,13 @@ packages: - typescript dev: true - /eslint-plugin-jsdoc@48.0.4(eslint@8.56.0): - resolution: {integrity: sha512-A0cH+5svWPXzGZszBjXA1t0aAqVGS+/x3i02KFmb73rU0iMLnadEcVWcD/dGBZHIfAMKr3YpWh58f6wn4N909w==} + /eslint-plugin-jsdoc@48.0.6(eslint@8.56.0): + resolution: {integrity: sha512-LgwXOX6TWxxFYcbdVe+BJ94Kl/pgjSPYHLzqEdAMXTA1BH9WDx7iJ+9/iDajPF64LtzWX8C1mCfpbMZjJGhAOw==} engines: {node: '>=18'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 dependencies: - '@es-joy/jsdoccomment': 0.41.0 + '@es-joy/jsdoccomment': 0.42.0 are-docs-informative: 0.0.2 comment-parser: 1.4.1 debug: 4.3.4(supports-color@8.1.1) @@ -17895,7 +17980,7 @@ packages: eslint: 8.56.0 esquery: 1.5.0 is-builtin-module: 3.2.1 - semver: 7.5.4 + semver: 7.6.0 spdx-expression-parse: 4.0.0 transitivePeerDependencies: - supports-color @@ -23647,6 +23732,15 @@ packages: engines: {node: '>= 6.13.0'} dev: false + /node-gyp-build-optional-packages@5.1.1: + resolution: {integrity: sha512-+P72GAjVAbTxjjwUmwjVrqrdZROD4nf8KgpBoDxqXXTiYZZt/ud60dE5yvCSr9lRO8e8yv6kgJIC0K0PfZFVQw==} + hasBin: true + requiresBuild: true + dependencies: + detect-libc: 2.0.2 + dev: false + optional: true + /node-gyp-build@4.6.0: resolution: {integrity: sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ==} hasBin: true @@ -26111,6 +26205,14 @@ packages: dependencies: lru-cache: 6.0.0 + /semver@7.6.0: + resolution: {integrity: sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + dev: true + /send@0.18.0: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} engines: {node: '>= 0.8.0'} @@ -27895,8 +27997,8 @@ packages: resolution: {integrity: sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==} dev: false - /undici-types@5.28.2: - resolution: {integrity: sha512-W71OLwDqzIO0d3k07qg1xc7d4cX8SsSwuCO4bQ4V7ITwduXXie/lcImofabP5VV+NvuvSe8ovKvHVJcizVc1JA==} + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: true /undici@5.21.0: @@ -28408,8 +28510,8 @@ packages: - utf-8-validate - zod - /viem@2.7.1(typescript@5.3.3): - resolution: {integrity: sha512-izAX2KedTFnI2l0ZshtnlK2ZuDvSlKeuaanWyNwC4ffDgrCGtwX1bvVXO3Krh53lZgqvjd8UGpjGaBl3WqJ4yQ==} + /viem@2.7.6(typescript@5.3.3): + resolution: {integrity: sha512-43TF0VYcTeNef9dax1/BhqlRLXpAo6HAiQ68hrJ8XRhDOou73nHZEjeFl8Eai4UFFodKhu+PbRUFzuuoixOUfg==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: