Installation
Install seismic-viem and configure viem peer dependency
Prerequisites
viem
2.x
Peer dependency -- installed alongside seismic-viem
Install
Install seismic-viem alongside its viem peer dependency using your preferred package manager:
npm install seismic-viem viemyarn add seismic-viem viempnpm add seismic-viem viembun add seismic-viem viemDependencies
seismic-viem has a single peer dependency:
viem
2.x
Core Ethereum client library (transports, chains, ABIs)
The following cryptographic libraries are bundled internally and do not need to be installed separately:
@noble/hashes
SHA-256, HKDF, and other hash functions
@noble/curves
Elliptic curve operations (secp256k1, ECDH)
@noble/ciphers
AES-GCM encryption and decryption
Module Format
seismic-viem ships as both ESM and CJS with a single export entry point. TypeScript type declarations (.d.ts) are included -- no separate @types/ package is needed.
Minimal Working Example
Create a new project and verify the installation:
Create index.ts:
Run it:
If you see a block number printed, the installation is working correctly.
TypeScript
seismic-viem is written in TypeScript and ships its own type declarations. No additional configuration is required beyond a standard tsconfig.json:
Troubleshooting
Peer Dependency Warning
If you see a peer dependency warning for viem, ensure you have viem 2.x installed:
Node.js Version
seismic-viem requires Node.js 18 or newer for native fetch and crypto support:
ESM/CJS Interop
If you encounter module resolution issues, ensure your tsconfig.json uses "moduleResolution": "bundler" or "node16", and that your package.json has "type": "module" if using ESM.
See Also
Chains -- Configure network connections
Seismic Viem Overview -- Full SDK overview and architecture
seismic-react -- React hooks layer built on seismic-viem
Last updated

