From 68af570a55e86079e6d77a4bd452c5b0961bd942 Mon Sep 17 00:00:00 2001 From: Andrew Min Date: Tue, 16 Jan 2024 17:19:42 -0500 Subject: [PATCH] bump viem --- .changeset/thin-mayflies-destroy.md | 5 +++ examples/with-viem/src/advanced.ts | 2 +- examples/with-viem/src/index.ts | 2 +- examples/with-viem/src/legacy/index.ts | 2 +- packages/viem/package.json | 4 +-- packages/viem/src/__tests__/index-test.ts | 2 +- pnpm-lock.yaml | 38 ++++++++++++----------- 7 files changed, 31 insertions(+), 24 deletions(-) create mode 100644 .changeset/thin-mayflies-destroy.md diff --git a/.changeset/thin-mayflies-destroy.md b/.changeset/thin-mayflies-destroy.md new file mode 100644 index 000000000..1df4b4db8 --- /dev/null +++ b/.changeset/thin-mayflies-destroy.md @@ -0,0 +1,5 @@ +--- +"@turnkey/viem": patch +--- + +Updated dependencies diff --git a/examples/with-viem/src/advanced.ts b/examples/with-viem/src/advanced.ts index 2e3ad468d..a7b51165f 100644 --- a/examples/with-viem/src/advanced.ts +++ b/examples/with-viem/src/advanced.ts @@ -104,7 +104,7 @@ async function main() { } as const; const typedData = { - account: turnkeyAccount, + account: turnkeyAccount.address, domain, types, primaryType: "Mail", diff --git a/examples/with-viem/src/index.ts b/examples/with-viem/src/index.ts index c95894533..905ebe86b 100644 --- a/examples/with-viem/src/index.ts +++ b/examples/with-viem/src/index.ts @@ -36,7 +36,7 @@ async function main() { }); const client = createWalletClient({ - account: turnkeyAccount, + account: turnkeyAccount.address, chain: sepolia, transport: http( `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY!}` diff --git a/examples/with-viem/src/legacy/index.ts b/examples/with-viem/src/legacy/index.ts index c0030163d..a238cb5fc 100644 --- a/examples/with-viem/src/legacy/index.ts +++ b/examples/with-viem/src/legacy/index.ts @@ -36,7 +36,7 @@ async function main() { }); const client = createWalletClient({ - account: turnkeyAccount, + account: turnkeyAccount.address, chain: sepolia, transport: http( `https://sepolia.infura.io/v3/${process.env.INFURA_API_KEY!}` diff --git a/packages/viem/package.json b/packages/viem/package.json index 905090731..a1ad0efeb 100644 --- a/packages/viem/package.json +++ b/packages/viem/package.json @@ -52,7 +52,7 @@ "compile:contracts": "hardhat compile" }, "peerDependencies": { - "viem": "^1.16.6" + "viem": "^2.1.1" }, "dependencies": { "@turnkey/api-key-stamper": "workspace:*", @@ -63,7 +63,7 @@ "devDependencies": { "@types/jest": "^29.5.3", "jest": "^29.3.1", - "viem": "^1.16.6" + "viem": "^2.1.1" }, "engines": { "node": ">=18.0.0" diff --git a/packages/viem/src/__tests__/index-test.ts b/packages/viem/src/__tests__/index-test.ts index 81240551e..160ffa5dd 100644 --- a/packages/viem/src/__tests__/index-test.ts +++ b/packages/viem/src/__tests__/index-test.ts @@ -337,7 +337,7 @@ describe("TurnkeyAccount", () => { const contract = getContract({ address: contractAddress, abi, - walletClient, + client: walletClient, }); // Mint diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0c34af317..50075c4fa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -676,8 +676,8 @@ importers: specifier: ^29.3.1 version: 29.4.3(@types/node@18.18.2) viem: - specifier: ^1.16.6 - version: 1.16.6(typescript@5.1.5) + specifier: ^2.1.1 + version: 2.1.1(typescript@5.1.5) packages/webauthn-stamper: dependencies: @@ -695,8 +695,13 @@ packages: engines: {node: '>=0.10.0'} dev: false + /@adraffy/ens-normalize@1.10.0: + resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} + dev: true + /@adraffy/ens-normalize@1.9.4: resolution: {integrity: sha512-UK0bHA7hh9cR39V+4gl2/NnBBjoXIxkuWAPCaY4X7fbH4L/azIi7ilWOCjMUYfpJgraLUAqkRi2BqrjME8Rynw==} + dev: false /@ampproject/remapping@2.2.0: resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} @@ -4458,9 +4463,6 @@ packages: - utf-8-validate dev: false - /@scure/base@1.1.1: - resolution: {integrity: sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==} - /@scure/base@1.1.3: resolution: {integrity: sha512-/+SgoRjLq7Xlf0CWuLHq2LUZeL/w65kfzAPG5NH9pcmBhs+nunQTn4gvdwgMTIXnt9b2C/1SeL2XiysZEyIC9Q==} @@ -4488,7 +4490,7 @@ packages: resolution: {integrity: sha512-Z3/Fsz1yr904dduJD0NpiyRHhRYHdcnyh73FZWiV+/qhWi83wNJ3NWolYqCEN+ZWsUz2TWwajJggcRE9r1zUYg==} dependencies: '@noble/hashes': 1.3.2 - '@scure/base': 1.1.1 + '@scure/base': 1.1.3 /@sentry/core@5.30.0: resolution: {integrity: sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg==} @@ -5007,21 +5009,21 @@ packages: through: 2.3.8 dev: false - /abitype@0.9.8(typescript@5.1.3): - resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==} + /abitype@0.10.0(typescript@5.1.5): + resolution: {integrity: sha512-QvMHEUzgI9nPj9TWtUGnS2scas80/qaL5PBxGdwWhhvzqXfOph+IEiiiWrzuisu3U3JgDQVruW9oLbJoQ3oZ3A==} peerDependencies: typescript: '>=5.0.4' - zod: ^3 >=3.19.1 + zod: ^3 >=3.22.0 peerDependenciesMeta: typescript: optional: true zod: optional: true dependencies: - typescript: 5.1.3 - dev: false + typescript: 5.1.5 + dev: true - /abitype@0.9.8(typescript@5.1.5): + /abitype@0.9.8(typescript@5.1.3): resolution: {integrity: sha512-puLifILdm+8sjyss4S+fsUN09obiT1g2YW6CtcQF+QDzxR0euzgEB29MZujC6zMk2a6SVmtttq1fc6+YFA7WYQ==} peerDependencies: typescript: '>=5.0.4' @@ -5032,8 +5034,8 @@ packages: zod: optional: true dependencies: - typescript: 5.1.5 - dev: true + typescript: 5.1.3 + dev: false /abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} @@ -10278,20 +10280,20 @@ packages: - zod dev: false - /viem@1.16.6(typescript@5.1.5): - resolution: {integrity: sha512-jcWcFQ+xzIfDwexwPJRvCuCRJKEkK9iHTStG7mpU5MmuSBpACs4nATBDyXNFtUiyYTFzLlVEwWkt68K0nCSImg==} + /viem@2.1.1(typescript@5.1.5): + resolution: {integrity: sha512-gJiwYceD7Dsjioglr+85GQS3u5Gp9XGG8oJqGsauBaEPFlkmbRx7cxD2Q5RZXFToVvEbarOWtITZtGHBsGv4MQ==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: typescript: optional: true dependencies: - '@adraffy/ens-normalize': 1.9.4 + '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.2.0 '@noble/hashes': 1.3.2 '@scure/bip32': 1.3.2 '@scure/bip39': 1.2.1 - abitype: 0.9.8(typescript@5.1.5) + abitype: 0.10.0(typescript@5.1.5) isows: 1.0.3(ws@8.13.0) typescript: 5.1.5 ws: 8.13.0(bufferutil@4.0.7)(utf-8-validate@5.0.10)