Skip to content

Commit

Permalink
add/fix encoding types
Browse files Browse the repository at this point in the history
  • Loading branch information
corysquid committed Aug 5, 2024
1 parent ca26741 commit 4b9fb2d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/bridges/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export enum BridgeType {
CCTP = "cctp",
NOBLE_CCTP = "noble-cctp",
IBC = "ibc",
RFQ = "rfq",
}

export enum BridgeProvider {
Expand All @@ -12,6 +13,7 @@ export enum BridgeProvider {
NOBLE_CCTP = "Noble CCTP",
IBC = "IBC",
PFM = "IBC Packet forward middleware",
RFQ = "RFQ",
}

export type BridgeConfig = Record<string, string>;
1 change: 1 addition & 0 deletions src/path/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export interface ActionBaseData {
// bridges
name: string;
provider: string;
liquidityProvider: string;
}

export interface PathAction {
Expand Down
24 changes: 21 additions & 3 deletions src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,27 @@ export interface Route {
export interface RouteActionResponse extends Omit<RouteAction, "fromChain" | "toChain" | "data"> {
fromChain: string;
toChain: string;
data: _SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails | FeeDetails | LiquidityProviderDetails;
data:
| _SwapDetails
| WrapDetails
| BridgeDetails
| CustomCallDetails
| FeeDetails
| LiquidityProviderDetails;
}

export interface RouteAction extends QuoteAction {
provider?: string;
description?: string;
logoURI?: string;
estimatedDuration?: number;
data: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails | FeeDetails | LiquidityProviderDetails;
data:
| SwapDetails
| WrapDetails
| BridgeDetails
| CustomCallDetails
| FeeDetails
| LiquidityProviderDetails;
}

export enum ActionType {
Expand All @@ -98,7 +110,7 @@ export enum ActionType {
IBC_TRANSFER = "ibc-transfer",
CUSTOM = "custom",
FEE = "fee",
LP = "lp",
RFQ = "rfq",
}

export interface WrapDetails {
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions src/squid/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 4b9fb2d

Please sign in to comment.