downloadInstallation

Install seismic-viem and configure viem peer dependency

Prerequisites

Requirement
Version
Notes

Node.js

18+

LTS recommended; install via nvmarrow-up-right or nodejs.orgarrow-up-right

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 viem

Dependencies

seismic-viem has a single peer dependency:

Package
Version
Role

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:

Package
Purpose

@noble/hashes

SHA-256, HKDF, and other hash functions

@noble/curves

Elliptic curve operations (secp256k1, ECDH)

@noble/ciphers

AES-GCM encryption and decryption

circle-info

The @noble/* packages handle all client-side cryptographic operations including ECDH key exchange with the TEE and AES-GCM calldata encryption. They are bundled as direct dependencies of seismic-viem, so you never need to install or import them yourself.

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:

circle-info

All exported types, interfaces, and function signatures are fully typed. Your editor will provide autocompletion and type checking for all seismic-viem APIs out of the box.

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

Last updated