@shroud-fi/transport
v0.1.4
Published
Pluggable viem-based transport + canonical Base mainnet deployment manifest for the ShroudFi privacy SDK.
Downloads
952
Maintainers
Readme
@shroud-fi/transport
Pluggable viem-based transport + canonical Base mainnet deployment manifest.
npm i @shroud-fi/transport viemWhat it does
@shroud-fi/transport is the I/O layer for the ShroudFi SDK. It wraps viem clients for RPC reads, contract calls, and event subscription — and ships the canonical Base mainnet deployment manifest (ShroudFiStealth, ShroudFiRegistrar, relayer addresses, deploy block heights).
You can swap your own RPC URL or a private mempool transport in without touching the rest of the SDK.
Quick start
import { createTransport, getDeployment } from '@shroud-fi/transport';
import { base } from 'viem/chains';
const transport = createTransport({
chain: base,
rpcUrl: process.env.BASE_RPC_URL!,
});
const deployment = getDeployment(8453);
console.log(deployment.shroudfiStealth);
// → 0x4BC88813b09dDD6Ab530261200D706B397EcD0ABExports
| Symbol | Purpose |
|---|---|
| createTransport(cfg) | Build a transport from chain, rpcUrl, or an existing viem client. |
| getDeployment(chainId) | Lookup verified contract addresses + deploy blocks by chain ID. Base mainnet = 8453. |
| ShroudFiStealthAbi · RegistrarAbi · RelayerAbi · EthRelayerAbi | Typed ABIs for every deployed contract. |
| DeploymentManifest | Type for the manifest. |
| getEip3009Token(chainId, addr) | v0.1.1 — look up an EIP-3009 token by chain + address (case-insensitive). Returns {symbol, address, decimals, domain} or undefined. |
| getEip3009TokenBySymbol(chainId, symbol) | v0.1.1 — same lookup by symbol ('USDC', 'EURC'). |
| listEip3009Tokens(chainId) | v0.1.1 — enumerate all EIP-3009 tokens for a chain. |
Full API reference: shroudfi.live/sdk#transport
Supported chains
- Base mainnet (8453) — production, contracts verified on Blockscout.
Other chains can be added by extending the manifest at deploy time; the SDK is chain-agnostic by design.
License
MIT — see LICENSE.
Part of the ShroudFi privacy SDK for AI agents on Base.
