diff --git a/.changeset/khaki-moles-press.md b/.changeset/khaki-moles-press.md new file mode 100644 index 0000000000..3370080efe --- /dev/null +++ b/.changeset/khaki-moles-press.md @@ -0,0 +1,5 @@ +--- +"viem": patch +--- + +Added `name` to `ResourceNotFoundRpcErrorType` diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 378c26158f..23deecf96f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -3225,7 +3225,6 @@ packages: bun@1.1.12: resolution: {integrity: sha512-NZzeZuZk7VwCs8VAXnXUHCPOlTS/IyHCscChtT1M1FLSwhBcVMsGVStYlXaaoqsinBKgp0CGJdhnJw2gR3NkDw==} - cpu: [arm64, x64] os: [darwin, linux, win32] hasBin: true @@ -6765,6 +6764,14 @@ packages: typescript: optional: true + viem@2.19.0: + resolution: {integrity: sha512-3UYVzNHhXW6Fug/di4IpISWDUACFEo4CHR+/BgmiNwzEQ/1mskBAsoTjfF5WdWUMeq0HGTGyzjNKipxsak5Jbw==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + viem@file:src: resolution: {directory: src, type: directory} peerDependencies: @@ -8447,7 +8454,7 @@ snapshots: pino-http: 8.6.1 pino-pretty: 10.3.1 prom-client: 14.2.0 - viem: 2.18.8(typescript@5.5.2)(zod@3.22.4) + viem: 2.19.0(typescript@5.5.2)(zod@3.22.4) yargs: 17.7.2 zod: 3.22.4 zod-validation-error: 1.5.0(zod@3.22.4) @@ -14357,37 +14364,37 @@ snapshots: - utf-8-validate - zod - viem@2.18.8(typescript@5.5.2)(zod@3.22.4): + viem@2.18.8(typescript@5.5.4)(zod@3.22.4): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 '@scure/bip32': 1.4.0 '@scure/bip39': 1.3.0 - abitype: 1.0.5(typescript@5.5.2)(zod@3.22.4) + abitype: 1.0.5(typescript@5.5.4)(zod@3.22.4) isows: 1.0.4(ws@8.17.1) webauthn-p256: 0.0.5 ws: 8.17.1 optionalDependencies: - typescript: 5.5.2 + typescript: 5.5.4 transitivePeerDependencies: - bufferutil - utf-8-validate - zod - viem@2.18.8(typescript@5.5.4)(zod@3.22.4): + viem@2.19.0(typescript@5.5.2)(zod@3.22.4): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 '@scure/bip32': 1.4.0 '@scure/bip39': 1.3.0 - abitype: 1.0.5(typescript@5.5.4)(zod@3.22.4) + abitype: 1.0.5(typescript@5.5.2)(zod@3.22.4) isows: 1.0.4(ws@8.17.1) webauthn-p256: 0.0.5 ws: 8.17.1 optionalDependencies: - typescript: 5.5.4 + typescript: 5.5.2 transitivePeerDependencies: - bufferutil - utf-8-validate diff --git a/src/errors/rpc.ts b/src/errors/rpc.ts index b0e45e7a41..d1e23eb769 100644 --- a/src/errors/rpc.ts +++ b/src/errors/rpc.ts @@ -236,6 +236,7 @@ export class InvalidInputRpcError extends RpcError { */ export type ResourceNotFoundRpcErrorType = ResourceNotFoundRpcError & { code: -32001 + name: 'ResourceNotFoundRpcError' } export class ResourceNotFoundRpcError extends RpcError { override name = 'ResourceNotFoundRpcError'