@overcast-xyz/evm-client
Classes
| Class | Description |
|---|---|
| EvmChainlinkLayer | EVM's oracle settlement layer, priced off Chainlink Data Feeds: the config binds an asset pair to one feed per leg plus a staleness bound and a resolution style, and that whole binding determines the layer's address. |
| EvmChainSigner | EVM implementation of OvercastChainSigner: takes the { to, data, value } an EvmWriter builds and turns it into a mined, status-checked receipt. |
| EvmFactory | The EVM ProtocolFactory: a single EvmConfig is all the SDK needs to build every per-layer piece — the EvmProvider the clients run on, the calldata-encoding EvmWriter, the EvmReader, the EvmIndexerClient and (when there is key material) the EvmChainSigner. Hand it to OvercastApp.create and the rest of the SDK stays chain-agnostic. Protocol-payload signing is chain-agnostic and lives in core — see createProtocolSigner. |
| EvmIndexerClient | EVM implementation of OvercastIndexerClient. |
| EvmPhysicalLayer | EVM's physical settlement layer: settlement happens in the option's own assets, so the layer carries no metadata and commits to the ExerciseMode.Full layer by default. |
| EvmProvider | Everything an EvmConfig says about how to reach the chain, resolved once and shared: the Chain the clients are bound to, the Transport they speak over, the read-only PublicClient the reader / writer / indexer all run on, and — only when the config carries something to sign with — the Account and WalletClient the EvmChainSigner submits through. |
| EvmReader | EVM implementation of OvercastReader: the read-only side of the protocol. It needs only a viem PublicClient (no account), so it serves read-only clients too. |
| EvmUtils | EVM's OvercastUtils: the whole boundary between 0x… addresses and the canonical 32-byte slots core works in. |
| EvmWriter | EVM implementation of OvercastWriter: the write side of the protocol, yielding built-but-unsubmitted EvmLayer.txs that the caller signs and sends (or hands to SigningWriter, which does both). |
Interfaces
| Interface | Description |
|---|---|
| EvmConfig | - |
| EvmLayer | - |
Type Aliases
| Type Alias | Description |
|---|---|
| EvmEscrowKey | One entry in core's escrow ledgers, see EvmReader.escrowBalances. |
| EvmFinality | How a deployment's chain settles, i.e. what Commitment: "finalized" resolves to for everything that reads a canonical head — today the indexer's canonical tier and its backfill ceiling. |
| EvmTxDetails | The raw material one transaction's events were decoded from, as the IndexedEvents.tx the store archives. |
| OracleSettlementConfig | Decoded EvmChainlinkLayer config, mirroring the contract's ChainlinkSettlementConfig: the two assets, the feed each is priced off, and the settlement policy. Every field is a constructor argument, so all of it lands in the layer's address — the address alone says exactly which assets settle against which feeds under which policy. |
| PhysicalSettlementConfig | Decoded EvmPhysicalLayer config. Physical settlement is fully described by its exercise mode — everything else about the trade lives on the option itself — and that one byte is the layer contract's only constructor argument, so it alone determines the address. |
Variables
| Variable | Description |
|---|---|
| anvil | - |
| DEFAULT_CHAIN_ID | anvil's chain id — the default deployment target when none is supplied. |
| DEFAULT_CHAINLINK_FEEDS | CHAINLINK_FEEDS as the per-chain lookup tables, built once. |
| DEFAULT_CHAINLINK_PARAMETERS | The policy fields EvmChainlinkLayer.defaultConfig fills in. |
| DEFAULT_FINALITY | Default EvmConfig.finality. |
| DEFAULT_LOG_BLOCK_RANGE | Default EvmConfig.logBlockRange. |
| DEFAULT_RECEIPT_POLL_INTERVAL | Default EvmConfig.receiptPollInterval, in milliseconds. |
| DEFAULT_RPC_URL | Local anvil node — the default RPC endpoint when none is supplied. |
| DEFAULT_TX_CONFIRMATIONS | Default EvmConfig.txConfirmations: mined, and nothing beyond it. See the field for why this is not EvmConfig.finality. |
| EVM_CONFIG_SCHEMA | How an EVM deployment is configured from strings — a --flag, an environment variable, a secret manager — for any host that has to read one: the CLI's global flags, a backend's per-chain environment. |
| evmUtils | Shared, stateless EvmUtils — address conversion needs no config. |
Functions
| Function | Description |
|---|---|
| chainlinkFeedMap | A feed table from [asset, feed] address pairs — the shape EvmChainlinkLayer looks assets up in. |
| chainlinkFeedsFor | The default feeds for chainId, or an empty table when none are known. |
| evmAddress | A 20-byte EVM address. |
| evmConfig | Build a complete EvmConfig from a partial one. |
| evmFinality | See EvmFinality: the block tag by name, or a confirmation depth. |
| evmHex | 0x-prefixed hex of exactly bytes bytes. |
| fromMarketOption | The core domain's MarketOption as the contract struct — what every write against a live option submits, since core stores only the id and rebuilds the option from the terms handed in. |
| fromOffer | The core domain's Offer as the contract struct — what EvmWriter submits to createOffer. |
| fromOptionDetails | The core domain's OptionDetails as the contract struct. |
| fromSide | The core domain's OptionSide as the contract's numeric enum. |
| fromSignedOperation | Core's SignedOperation as the authorization envelope every *Signed entry point takes. |
| resolveEvmAccount | The account a config signs as, or undefined for a read-only one. |
| resolveEvmChain | The viem Chain for a config: the explicit EvmConfig.chain if supplied, otherwise a minimal definition synthesized from chainId + rpcUrl. |
| toEvmSide | A decoded uint8 narrowed to the contract's OptionSide. |
| toMarketOption | The contract's MarketOption as the core domain shape. |
| toOffer | The contract's Offer as the core domain shape. |
| toOptionDetails | The contract's OptionDetails as the core domain shape. |
| toPrivateKeyHex | Key material from an OvercastConfig as the 32-byte hex secp256k1 key viem wants. Accepts a 0x-prefixed hex string or a raw byte array. |
| toProtocolConfig | The contract's ProtocolConfig as the core domain shape — what the ProtocolInitialized and ProtocolConfigUpdated logs carry. |
| toSide | The contract's numeric OptionSide as the core domain union. |
| toSlot | Widen anything up to 32 bytes into a canonical slot — the padding primitive EvmUtils.toBytes32 is built on. |