From c0d77fe4ff59fc35fb2adbd691cfa0d30f751656 Mon Sep 17 00:00:00 2001 From: nnoln Date: Tue, 30 Jul 2024 17:57:07 -0300 Subject: [PATCH] added chainflip types --- 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 fac222e..9754486 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@0xsquid/squid-types", - "version": "0.1.91", + "version": "0.1.92", "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 8b933b2..67ef1e0 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -268,6 +268,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"