Skip to content

sdk-config 0.3.0-pr-678-c0125d66.0

Install from the command line:
Learn more about npm packages
$ npm install @cowprotocol/sdk-config@0.3.0-pr-678-c0125d66.0
Install via package.json:
"@cowprotocol/sdk-config": "0.3.0-pr-678-c0125d66.0"

About this version

SDK Config

This package contains configuration constants, chain definitions, and settings for the CoW Protocol SDK. It provides essential configuration utilities and types that are used across all SDK packages.

What's included

  • Supported Chains - Definitions for all blockchains supported by CoW Protocol
  • Environment Configuration - Production and staging environment settings
  • Contract Addresses - Smart contract addresses for each supported chain
  • API Configuration - Base URLs and configuration options for CoW Protocol APIs
  • Chain Information - Detailed chain metadata, native currencies, and RPC endpoints

Installation

pnpm add @cowprotocol/sdk-config

Usage

import {
  SupportedChainId,
  ALL_SUPPORTED_CHAINS_MAP,
  CowEnv,
  ApiContext,
  ChainInfo,
  COW_PROTOCOL_SETTLEMENT_CONTRACT_ADDRESS,
} from '@cowprotocol/sdk-config'

// Use supported chain IDs
const chainId = SupportedChainId.MAINNET // 1
const gnosisChain = SupportedChainId.GNOSIS_CHAIN // 100

// Get chain information
const mainnetInfo: ChainInfo = ALL_SUPPORTED_CHAINS_MAP[SupportedChainId.MAINNET]
console.log(mainnetInfo.label) // "Ethereum"
console.log(mainnetInfo.nativeCurrency.symbol) // "ETH"

// Get contract addresses
const settlementAddress = COW_PROTOCOL_SETTLEMENT_CONTRACT_ADDRESS[SupportedChainId.MAINNET]

// Configure API context
const apiContext: ApiContext = {
  chainId: SupportedChainId.SEPOLIA,
  env: 'staging' as CowEnv,
}

Usage with CoW SDK

import { CowSdk, SupportedChainId, ALL_SUPPORTED_CHAINS_MAP, CowEnv, ApiContext, ChainInfo } from '@cowprotocol/cow-sdk'

const sdk = new CowSdk({
  chainId: SupportedChainId.MAINNET, // From config package
  adapter,
  env: 'prod', // From config package
})

Note: This package is primarily designed to provide configuration constants and is rarely used standalone. Most developers should use @cowprotocol/cow-sdk package or specific feature packages.

Details


Assets

  • sdk-config-0.3.0-pr-678-c0125d66.0.tgz

Download activity

  • Total downloads 6
  • Last 30 days 6
  • Last week 6
  • Today 0