sdk-config 0.3.0-pr-642-b7654bb7.0
Install from the command line:
Learn more about npm packages
$ npm install @cowprotocol/sdk-config@0.3.0-pr-642-b7654bb7.0
Install via package.json:
"@cowprotocol/sdk-config": "0.3.0-pr-642-b7654bb7.0"
About this version
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.
- 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
pnpm add @cowprotocol/sdk-configimport {
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,
}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-sdkpackage or specific feature packages.
Details
- sdk-config
-
cowprotocol
- 1 day ago
- MIT
- 6 dependencies
Assets
- sdk-config-0.3.0-pr-642-b7654bb7.0.tgz
Download activity
- Total downloads 0
- Last 30 days 0
- Last week 0
- Today 0
