@shroudfi/core
v0.1.0
Published
ShroudFi core types, constants, and utilities for MEV protection across 14+ chains
Maintainers
Readme
@shroudfi/core
Core types, constants, and utilities for the ShroudFi MEV protection protocol.
Installation
npm install @shroudfi/coreWhat's Included
- Chain types —
ChainIdenum for 14 supported chains (10 EVM + Solana + Cosmos + Sui + Aptos) - Chain configs — RPC URLs, block times, native currencies, explorer URLs
- DEX router registry — Known router addresses for transaction detection across all chains
- EIP-712 types — Typed data structures for intent signing
- Zod schemas — Runtime validation for intents, API requests, and configs
Supported Chains
| Chain | ID | Status | |---|---|---| | Ethereum | 1 | Live | | Base | 8453 | Live | | Arbitrum | 42161 | Live | | Optimism | 10 | Live | | Polygon | 137 | Live | | BNB Chain | 56 | Live | | Avalanche | 43114 | Live | | zkSync Era | 324 | Live | | Linea | 59144 | Live | | Scroll | 534352 | Live | | Solana | — | Beta | | Cosmos | — | Coming Soon | | Sui | — | Coming Soon | | Aptos | — | Coming Soon |
Usage
import { ChainId, getChainConfig, isDexRouter } from '@shroudfi/core';
// Get chain configuration
const ethConfig = getChainConfig(ChainId.ETHEREUM);
console.log(ethConfig.rpcUrl); // https://eth.llamarpc.com
// Check if an address is a known DEX router
const isRouter = isDexRouter('0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D');
console.log(isRouter); // true (Uniswap V2 Router)License
MIT — Astra Fintech Labs Pvt. Ltd.
