Changelog
v1.3.3
- Fix:
getHistory()no longer throwsSteelSwapValidationErrorwhen the API returnstvl: null— the Zod schema and TypeScript type now acceptnullin addition tonumber[]andundefined
v1.3.2
- Fix: Added
User-Agentheader toSteelSwapV2ClientandC3PriceClientto prevent Cloudflare 403 blocks oncicdapi.steelswap.io - Fix:
C3PriceClient.getTokenLogo()now bypassesrequest()and handles binary responses correctly (returns URL string on success,nullon 404) - Fix:
SymbolInfoResponsefield names corrected to match API (hyphenated:exchange-listed,exchange-traded,session-regular,has-intraday,has-daily,has-weekly-and-monthly,ticker, etc.) - Fix:
HistoryResponseis now a discriminated union ons('ok'|'no_data'|'error') instead of a flat object - Fix:
GroupListResponse.d.groupsis now{ id: string }[](wasstring[]) - Fix:
has-intraday,has-daily,has-weekly-and-monthlyinSymbolInfoResponseare nowboolean[] | null(API may returnnull) - Fix:
C3PriceClient.getGroups()now sends auth header (API requires it despite being documented as unauthenticated) - Fix: Zod schemas for
SymbolInfoResponse,HistoryResponse, andGroupListResponseupdated to match real API - Added integration tests for
getWalletHistory()andgetWalletPending()(v1) - Added integration tests for all
C3PriceClientmethods - Added integration test scaffolding for
SteelSwapV2Client(skipped until v2 auth is available)
v1.3.1
- Fix:
estimateSwap()withhop: trueno longer throwsSteelSwapValidationError— the Zod schema now correctly treats the top-levelpoolsfield as optional for hop responses (the API only includes pools insidesplitGroupentries) - Fix: All
SteelSwapV2ClientandC3PriceClientendpoints now use the correct/api/v2/path prefix - Fix: Partner management endpoints now include the
/auth/path segment (/api/v2/auth/partner/addresses) - Fix:
C3PriceClient.getGroups()now calls/api/v2/data/groups(was/data/group_list/) HopSplitOutput.poolsis now typed as optional (pools?: PoolOutput<F>[])
v1.3.0
- New: Zod-based runtime response validation for all API endpoints (v1, v2, and C3 clients)
- Every API response is validated against a Zod schema before being returned
- Invalid responses throw
SteelSwapValidationError(extendsSteelSwapError) with the endpoint, validation error, and raw data SteelSwapValidationErroris exported from the package- Skipped endpoints:
getTokenIcon(binary PNG),notifySubmitted(void response),getTokenLogo(string/null with 404 handling) - Added
zodas a runtime dependency
v1.2.0
- New:
SteelSwapV2Clientfor v2 Orders and Partner Management endpoints - New:
C3PriceClientfor token prices, logos, and TradingView-compatible chart data - v2 API uses Bearer token auth (
Authorization: Bearer <token>) instead of v1's customtokenheader - v2 API uses snake_case field names (v1 uses camelCase)
- v2 API base URL:
https://cicdapi.steelswap.io SteelSwapV2Clientmethods:getOpenOrders(),getOrderHistory(),getOrderDetails(),getPartnerAddresses(),addPartnerAddress(),removePartnerAddress()C3PriceClientmethods:getCurrentPrice(),getTokenLogo(),getHistory(),getSymbolInfo(),getGroups(),healthCheck()healthCheck()is unauthenticated (skips Bearer header)- All v2 and C3 types exported from the package
- Reuses
SteelSwapErrorfrom v1 client for error handling
v1.1.0
- Breaking: All response types rewritten to match the live API (OpenAPI v1.18.0)
SplitOutput: ReplacedtotalOutput/minOutputwithtokenA,quantityA,tokenB,quantityB,totalFee,totalDeposit,steelswapFee,bonusOut,priceHopSplitOutput: Now extendsSplitOutputwithsplitGroup: SplitOutput[][](replaceshop1/hop2/intermediateToken)PoolOutput: ReplacedliquidityA/liquidityB/fee/outputwithpoolId,quantityA,quantityB,batcherFee,deposit,volumeFeeOrderStatus: ReplacedtxHash/tokenA/tokenB/inputAmount/outputAmount/status/timestampwithsource,firstObserved,lastUpdated,totalSubmitted,totalRequested,totalReceivedSwapStatus: Complete rewrite —dex,orderType,txStatus,submitTxHash,submitTxIndex,submitTime,submitAssets,requestAssets,executeTxHash,executeTxIndex,executeTime,receivedAssetsOrderStatusResponse: Replacedtotalwithpage+lastPagePoolSummary: Replaceddex/reserveA/reserveB/fee/poolIdwithliquidity,priceNumerator,priceDenominator,poolCountPoolSummaryResponse: Changed from{ pools: PoolSummary[] }toRecord<string, PoolSummary>TokenSummary: Removed generic<F>, removedprice/logo, added requiredsources: string[];priceNumerator/priceDenominatornow requiredSteelSwapStatistics: Addedservice: stringfieldTxListItem: RenamedindextotxIndexBuildSwapRequest: RenamedfeeAdjusttofeeAdust(matches API typo)findTradingPairs(): RemovedignoreDexesparameter (not in API spec)- Removed
FindPairsRequestexport - Added new types:
OrderType,Assets
v1.0.1
- Breaking:
TokenSummary.assetNamerenamed toTokenSummary.policyName - Added
TokenSummary.priceNumerator,TokenSummary.priceDenominatorfields NumericInputnow acceptsnumberin addition tostring | bigint | Big
v1.0.0
- Initial release
- Full v1 API coverage (14 endpoints)
- Generic
NumericFormatsupport ('string','number','bigint','Big') - Partner auto-injection for swap requests
- Custom fetch support
- Configurable request timeout