From 46477df270fce0d20845d5357fe66a6ebcaa52f2 Mon Sep 17 00:00:00 2001 From: J Date: Thu, 1 Aug 2024 13:16:05 -0300 Subject: [PATCH 1/2] feat: improve path finder request type (#99) --- package.json | 2 +- src/path/index.ts | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 38515e4..ce9e248 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@0xsquid/squid-types", - "version": "0.1.93", + "version": "0.1.94", "description": "JS and TS types relating to 0xsquid related projects.", "main": "dist/index.js", "types": "./dist/index.d.ts", diff --git a/src/path/index.ts b/src/path/index.ts index 374ae13..3b42635 100644 --- a/src/path/index.ts +++ b/src/path/index.ts @@ -80,8 +80,6 @@ export interface PathAction { export interface PathParams { fromChainId: string; toChainId: string; - fromToken: Pick; - toToken: Pick; - maxResults?: number; - subgraphIds?: string[]; + fromToken: string; + toToken: string; } From 7204644689875b641a179110ce95b7e09bafd2a0 Mon Sep 17 00:00:00 2001 From: nnoln <48334589+nnoln@users.noreply.github.com> Date: Thu, 1 Aug 2024 17:46:56 -0300 Subject: [PATCH 2/2] added chainflip types (#100) * added chainflip types * bump version * bump version --- package.json | 2 +- src/bridges/index.ts | 2 ++ src/chains/index.ts | 9 ++++++++- src/fees/index.ts | 1 + src/routes/index.ts | 2 ++ yarn.lock | 7 +------ 6 files changed, 15 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index ce9e248..5113b0c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@0xsquid/squid-types", - "version": "0.1.94", + "version": "0.1.95", "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..cf8c819 100644 --- a/src/bridges/index.ts +++ b/src/bridges/index.ts @@ -4,6 +4,7 @@ export enum BridgeType { CCTP = "cctp", NOBLE_CCTP = "noble-cctp", IBC = "ibc", + CHAINFLIP = "chainflip", } export enum BridgeProvider { @@ -12,6 +13,7 @@ export enum BridgeProvider { NOBLE_CCTP = "Noble CCTP", IBC = "IBC", PFM = "IBC Packet forward middleware", + CHAINFLIP = "Chainflip", } 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/routes/index.ts b/src/routes/index.ts index 43734cf..9d8748c 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -262,6 +262,8 @@ export enum ActionStage { COSMOS_DESTINATION, COSMOS_TRANSIENT, COSMOS_ONLY, + BTC_SOURCE, + BTC_DESTINATION, } export interface StageContext { diff --git a/yarn.lock b/yarn.lock index 81cb159..1a53053 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2083,7 +2083,7 @@ long@^4.0.0: resolved "https://registry.yarnpkg.com/long/-/long-4.0.0.tgz#9a7b71cfb7d361a194ea555241c92f7468d5bf28" integrity sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA== -long@^5.0.0, long@^5.2.0, long@^5.2.3: +long@^5.0.0, long@^5.2.0: version "5.2.3" resolved "https://registry.yarnpkg.com/long/-/long-5.2.3.tgz#a3ba97f3877cf1d778eccbcb048525ebb77499e1" integrity sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q== @@ -2767,11 +2767,6 @@ ws@^8.13.0: resolved "https://registry.yarnpkg.com/ws/-/ws-8.15.1.tgz#271ba33a45ca0cc477940f7f200cd7fba7ee1997" integrity sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ== -ws@^8.18.0: - version "8.18.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.18.0.tgz#0d7505a6eafe2b0e712d232b42279f53bc289bbc" - integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== - ws@~8.11.0: version "8.11.0" resolved "https://registry.yarnpkg.com/ws/-/ws-8.11.0.tgz#6a0d36b8edfd9f96d8b25683db2f8d7de6e8e143"