diff --git a/packages/ensjs/package.json b/packages/ensjs/package.json index 7a6eb80b..bce7e3d8 100644 --- a/packages/ensjs/package.json +++ b/packages/ensjs/package.json @@ -143,10 +143,10 @@ "typedoc": "^0.24.8", "typedoc-plugin-markdown": "^4.0.0-next.16", "typescript": "^5.1.6", - "viem": "^1.12.2", + "viem": "^1.16.4", "wait-on": "^6.0.1" }, "peerDependencies": { - "viem": "^1.12.2" + "viem": "^1.16.4" } } diff --git a/packages/ensjs/src/clients/public.ts b/packages/ensjs/src/clients/public.ts index b12fd9d1..7ffcb798 100644 --- a/packages/ensjs/src/clients/public.ts +++ b/packages/ensjs/src/clients/public.ts @@ -3,6 +3,7 @@ import { type Chain, type Client, type ClientConfig, + type PublicRpcSchema, type Transport, } from 'viem' import { addEnsContracts } from '../contracts/addEnsContracts.js' @@ -32,7 +33,7 @@ export type EnsPublicClient< TTransport, TChain, undefined, - undefined, + PublicRpcSchema, EnsPublicActions & EnsSubgraphActions > > diff --git a/packages/ensjs/src/clients/subgraph.ts b/packages/ensjs/src/clients/subgraph.ts index b7442266..0bab8117 100644 --- a/packages/ensjs/src/clients/subgraph.ts +++ b/packages/ensjs/src/clients/subgraph.ts @@ -3,6 +3,7 @@ import { type Chain, type Client, type ClientConfig, + type PublicRpcSchema, type Transport, } from 'viem' import { addEnsContracts } from '../contracts/addEnsContracts.js' @@ -27,7 +28,7 @@ export type EnsSubgraphClient< TTransport extends Transport = Transport, TChain extends ChainWithEns = ChainWithEns, > = Prettify< - Client + Client > /** diff --git a/packages/ensjs/src/types.ts b/packages/ensjs/src/types.ts index 4ea05112..c0da91df 100644 --- a/packages/ensjs/src/types.ts +++ b/packages/ensjs/src/types.ts @@ -11,9 +11,12 @@ export type Prettify = { [K in keyof T]: T[K] } & {} -export type SimpleTransactionRequest = Prettify< - Required> -> +export type SimpleTransactionRequest = { + [P in keyof Pick]-?: Exclude< + TransactionRequest[P], + null + > +} export type TransactionRequestWithPassthrough = SimpleTransactionRequest & { passthrough?: any diff --git a/packages/ensjs/tsconfig.json b/packages/ensjs/tsconfig.json index ac75fdac..9e43dfa9 100644 --- a/packages/ensjs/tsconfig.json +++ b/packages/ensjs/tsconfig.json @@ -15,7 +15,8 @@ "types": ["jest"], "resolveJsonModule": true, "paths": { - "abitype": ["./node_modules/abitype/dist"] + "abitype": ["./node_modules/abitype/dist"], + "viem": ["./node_modules/viem/_types"] } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8eca56c9..ff904d6d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -141,7 +141,7 @@ importers: typedoc: ^0.24.8 typedoc-plugin-markdown: ^4.0.0-next.16 typescript: ^5.1.6 - viem: ^1.12.2 + viem: ^1.16.4 wait-on: ^6.0.1 dependencies: '@adraffy/ens-normalize': 1.9.0 @@ -189,7 +189,7 @@ importers: typedoc: 0.24.8_typescript@5.1.6 typedoc-plugin-markdown: 4.0.0-next.16_typedoc@0.24.8 typescript: 5.1.6 - viem: 1.12.2_typescript@5.1.6 + viem: 1.16.4_typescript@5.1.6 wait-on: 6.0.1 packages: @@ -2489,12 +2489,6 @@ packages: resolution: {integrity: sha512-RBz2uRZVCXuMg93WD//aTS5B120QlT4lR/gL+935QtGsKHLS6sCtZBaKfWjIfk7ZXv/r8mtGbwjVIee6/3XTow==} dev: true - /@types/ws/8.5.5: - resolution: {integrity: sha512-lwhs8hktwxSjf9UaZ9tG5M03PGogvFaH8gUgLNbN9HKIg0dvv6q+gkSuJ8HN4/VbyxkuLzCjlN7GquQ0gUJfIg==} - dependencies: - '@types/node': 20.3.3 - dev: true - /@types/yargs-parser/21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} dev: true @@ -6335,8 +6329,8 @@ packages: ws: 8.12.0 dev: false - /isomorphic-ws/5.0.0_ws@8.13.0: - resolution: {integrity: sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==} + /isows/1.0.3_ws@8.13.0: + resolution: {integrity: sha512-2cKei4vlmg2cxEjm3wVSqn8pcoRF/LX/wpifuuNquFO4SQmPwarClT+SUCA2lt+l581tTeZIPIZuIDo2jWN1fg==} peerDependencies: ws: '*' dependencies: @@ -9558,8 +9552,8 @@ packages: extsprintf: 1.3.0 dev: true - /viem/1.12.2_typescript@5.1.6: - resolution: {integrity: sha512-aCaUCyg72ES+jK4s6tVYOMnOt4if71RwzgiUAUpAuaCgvHFfh9DCnwuEfwkxEZLE2vafOsirgJ3fcn7nsDVQoQ==} + /viem/1.16.4_typescript@5.1.6: + resolution: {integrity: sha512-T9ziN3EERXz0BtQSS2VJM+P1EJ2W7K7PviobFrmvWCEYmNQ/vJDhfFqGjvq0ZL9LVz9HvevCbenEy8oIdMEZ+w==} peerDependencies: typescript: '>=5.0.4' peerDependenciesMeta: @@ -9571,9 +9565,8 @@ packages: '@noble/hashes': 1.3.2 '@scure/bip32': 1.3.2 '@scure/bip39': 1.2.1 - '@types/ws': 8.5.5 abitype: 0.9.8_typescript@5.1.6 - isomorphic-ws: 5.0.0_ws@8.13.0 + isows: 1.0.3_ws@8.13.0 typescript: 5.1.6 ws: 8.13.0 transitivePeerDependencies: