diff --git a/package.json b/package.json index ce9e248..9973ce8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@0xsquid/squid-types", - "version": "0.1.94", + "version": "0.1.96", "description": "JS and TS types relating to 0xsquid related projects.", "main": "dist/index.js", "types": "./dist/index.d.ts", diff --git a/src/bridges/index.ts b/src/bridges/index.ts index c351af6..94c5f17 100644 --- a/src/bridges/index.ts +++ b/src/bridges/index.ts @@ -4,6 +4,8 @@ export enum BridgeType { CCTP = "cctp", NOBLE_CCTP = "noble-cctp", IBC = "ibc", + CHAINFLIP = "chainflip", + RFQ = "rfq", } export enum BridgeProvider { @@ -12,6 +14,8 @@ export enum BridgeProvider { NOBLE_CCTP = "Noble CCTP", IBC = "IBC", PFM = "IBC Packet forward middleware", + CHAINFLIP = "Chainflip", + RFQ = "RFQ", } export type BridgeConfig = Record; diff --git a/src/chains/index.ts b/src/chains/index.ts index 8b1751a..2d8861d 100644 --- a/src/chains/index.ts +++ b/src/chains/index.ts @@ -3,6 +3,7 @@ import { BridgeConfig } from "bridges"; export enum ChainType { EVM = "evm", COSMOS = "cosmos", + BTC = "bitcoin", } export type BaseChain = { @@ -99,7 +100,7 @@ export type CosmosGasType = { high: number; }; -export type ChainData = EvmChain | CosmosChain; +export type ChainData = BaseChain | EvmChain | CosmosChain; export enum ChainName { ARBITRUM = "Arbitrum", @@ -189,6 +190,9 @@ export enum ChainName { CHAIN4ENERGY = "c4e", SAGA = "saga", NIBIRU = "nibiru", + + // BTC + BITCOIN = "bitcoin", } export enum NetworkIdentifier { @@ -274,6 +278,9 @@ export enum NetworkIdentifier { CHAIN4ENERGY = "c4e", SAGA = "saga", NIBIRU = "nibiru", + + // BTC + BITCOIN = "bitcoin", } export type ChainIBCInfo = { diff --git a/src/fees/index.ts b/src/fees/index.ts index 0cec662..b70e491 100644 --- a/src/fees/index.ts +++ b/src/fees/index.ts @@ -5,6 +5,7 @@ export enum FeeType { GAS_RECEIVER_FEE = "Gas receiver fee", BOOST_FEE = "Boost fee", INTEGRATOR_FEE = "Integrator fee", + CHAINFLIP_FEE = "Chainflip fee", } export enum GasCostType { diff --git a/src/path/index.ts b/src/path/index.ts index 374ae13..75c8947 100644 --- a/src/path/index.ts +++ b/src/path/index.ts @@ -65,6 +65,7 @@ export interface ActionBaseData { // bridges name: string; provider: string; + liquidityProvider: string; } export interface PathAction { @@ -80,8 +81,6 @@ export interface PathAction { export interface PathParams { fromChainId: string; toChainId: string; - fromToken: Pick; - toToken: Pick; - maxResults?: number; - subgraphIds?: string[]; + fromToken: string; + toToken: string; } diff --git a/src/routes/index.ts b/src/routes/index.ts index 4b524c4..238976d 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -80,7 +80,13 @@ export interface Route { export interface RouteActionResponse extends Omit { fromChain: string; toChain: string; - data: _SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails | FeeDetails | LiquidityProviderDetails; + data: + | _SwapDetails + | WrapDetails + | BridgeDetails + | CustomCallDetails + | FeeDetails + | LiquidityProviderDetails; } export interface RouteAction extends QuoteAction { @@ -88,7 +94,13 @@ export interface RouteAction extends QuoteAction { description?: string; logoURI?: string; estimatedDuration?: number; - data: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails | FeeDetails | LiquidityProviderDetails; + data: + | SwapDetails + | WrapDetails + | BridgeDetails + | CustomCallDetails + | FeeDetails + | LiquidityProviderDetails; } export enum ActionType { @@ -98,7 +110,7 @@ export enum ActionType { IBC_TRANSFER = "ibc-transfer", CUSTOM = "custom", FEE = "fee", - LP = "lp", + RFQ = "rfq", } export interface WrapDetails { @@ -160,7 +172,13 @@ export interface CustomCallDetails { } export interface LiquidityProviderDetails { + liquidityProvider: string; + target: string; provider: string; + type: BridgeType; + name: string; + logoURI?: string; + calls?: ChainCall[]; } export interface Integrator { @@ -267,6 +285,8 @@ export enum ActionStage { COSMOS_DESTINATION, COSMOS_TRANSIENT, COSMOS_ONLY, + BTC_SOURCE, + BTC_DESTINATION, } export interface StageContext { diff --git a/src/squid/index.ts b/src/squid/index.ts index b61fdd7..3cdea63 100644 --- a/src/squid/index.ts +++ b/src/squid/index.ts @@ -8,6 +8,8 @@ export enum SquidRouteType { BRIDGE = "BRIDGE", EVM_ONLY = "EVM_ONLY", COSMOS_ONLY = "COSMOS_ONLY", + RFQ = "RFQ", + FUND_AND_RUN_MULTICALL = "FUND_AND_RUN_MULTICALL", } export interface SquidData {