@dynamic-labs/zerodev-extension
package to create a ZeroDev kernel client for a wallet.
Here is how you can set up and create a kernel client.
@dynamic-labs/zerodev-extension
depends on the Viem Extension, so before going through this setup, make sure to have the Viem Extension set up and working. Viem Extension SetuppaymasterClient.js
file. This issue occurs because Metro tries to load paymasterClient.js
, but the actual file is named paymasterClient.ts
.
To fix this, you need to customize Metro’s resolver in your metro.config.js
file to handle TypeScript file extensions properly.
metro.config.js
file in your project, you can generate one using the following command:
metro.config.js
file to instruct Metro to resolve .ts
files when it cannot find the corresponding .js
files:
.ts
files when it fails to find .js
files, which fixes the resolution error for the paymasterClient
file.
dynamicClient.zeroDev.createKernelClient
method. Here is an example: