Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@0xsquid/squid-types

Package Overview
Dependencies
Maintainers
2
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsquid/squid-types - npm Package Compare versions

Comparing version 0.1.26 to 0.1.27

dist/path/index.d.ts

2

dist/fees/index.d.ts

@@ -1,2 +0,2 @@

import { Token } from "tokens";
import { Token } from "../tokens";
export declare enum FeeType {

@@ -3,0 +3,0 @@ AXELAR_FEE = "Axelar Fee",

@@ -11,1 +11,2 @@ export * from "./chains";

export * from "./wrappers";
export * from "./path";

@@ -27,2 +27,3 @@ "use strict";

__exportStar(require("./wrappers"), exports);
__exportStar(require("./path"), exports);
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import { ActionStage, ActionType, BridgeDetails, ChainType, CustomCallDetails, SwapDetails, IbcTransferDetails, Token } from "../index";
import { ActionStage, BridgeDetails, CustomCallDetails, SwapDetails, PathAction, WrapDetails } from "../index";
export interface Quote {

@@ -15,11 +15,10 @@ actions: QuoteAction[];

}
export interface QuoteAction {
type: ActionType;
chainType: ChainType;
fromChainId: string;
toChainId: string;
fromToken: Token;
toToken: Token;
export interface QuoteAction extends Omit<PathAction, "data"> {
fromAmount: string;
toAmount: string;
toAmountMin: string;
exchangeRate: string;
priceImpact: string;
stage?: ActionStage;
details: SwapDetails | BridgeDetails | CustomCallDetails | IbcTransferDetails;
data: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails;
}

@@ -1,24 +0,15 @@

import { ChainData, ChainType } from "chains";
import { Dex, DexName } from "dexes";
import { FeeCost, GasCost } from "fees";
import { ChainCall, EvmContractCall, SlippageMode, SquidData } from "squid";
import { Token } from "tokens";
import { WrapDirection, WrapperType } from "wrappers";
export declare enum ActionType {
SWAP = "swap",
WRAP = "wrap",
BRIDGE = "bridge",
IBC_TRANSFER = "ibc-transfer",
CUSTOM = "custom"
import { ChainData, ChainType } from "../chains";
import { Dex, DexName } from "../dexes";
import { FeeCost, GasCost } from "../fees";
import { QuoteAction } from "../quote";
import { ChainCall, EvmContractCall, SlippageMode, SquidData } from "../squid";
import { Token } from "../tokens";
import { WrapDirection, WrapperType } from "../wrappers";
export interface RouteResponse {
route: {
estimate: Estimate;
transactionRequest: SquidData;
params: RouteRequest;
};
}
export declare enum ActionStage {
EVM_SOURCE = 0,
EVM_DESTINATION = 1,
EVM_TRANSIENT = 2,
EVM_ONLY = 3,
COSMOS_SOURCE = 4,
COSMOS_DESTINATION = 5,
COSMOS_TRANSIENT = 6,
COSMOS_ONLY = 7
}
export interface RouteRequest {

@@ -43,35 +34,2 @@ fromChain: string;

}
export interface Route {
actions: RouteAction[];
fromToken: Token;
toToken: Token;
fromAmount: string;
toAmount: string;
toAmountMin: string;
sendAmount: string;
exchangeRate: string;
aggregatePriceImpact: string;
estimatedRouteDuration: number;
fromAmountUSD?: string;
toAmountUSD?: string;
isBoostSupported: boolean;
gasCosts: GasCost[];
feeCosts: FeeCost[];
}
export interface StageContext {
stage: ActionStage;
isSourceNative: boolean;
isDestinationNative: boolean;
isEvm: boolean;
isCosmos: boolean;
toAddress: string;
receiver: string;
isFirstAction?: boolean;
isLastAction?: boolean;
hasDestinationCalls?: boolean;
hasSourceCalls?: boolean;
multicall?: string;
preHook: boolean;
postHook: boolean;
}
export interface RouteRequestPopulated {

@@ -96,62 +54,57 @@ fromChain: ChainData;

}
export interface RouteResponse {
route: {
estimate: Estimate;
transactionRequest: SquidData;
params: RouteRequest;
};
}
export interface Estimate extends Route {
actions: SimpleRouteAction[];
actions: RouteAction[];
}
export interface RouteAction {
type: ActionType;
chainType: ChainType;
fromChainId: string;
toChainId: string;
export interface Route {
actions: RouteAction[];
fromToken: Token;
toToken: Token;
fromAmount: string;
toAmount: string;
toAmountMin: string;
sendAmount: string;
exchangeRate: string;
aggregatePriceImpact: string;
estimatedRouteDuration: number;
fromAmountUSD?: string;
toAmountUSD?: string;
isBoostSupported: boolean;
gasCosts: GasCost[];
feeCosts: FeeCost[];
}
export interface RouteAction extends QuoteAction {
provider?: string;
description?: string;
stage?: ActionStage;
details: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails | IbcTransferDetails;
data: SwapDetails | WrapDetails | BridgeDetails | CustomCallDetails;
}
export interface SimpleRouteAction extends RouteAction {
details: SimpleSwapDetails | SimpleWrapDetails | BridgeDetails | CustomCallDetails | IbcTransferDetails;
export declare enum ActionType {
SWAP = "swap",
WRAP = "wrap",
BRIDGE = "bridge",
IBC_TRANSFER = "ibc-transfer",
CUSTOM = "custom"
}
export interface BaseSwapDetails {
export interface WrapDetails {
target: string;
path: string[];
swapType: string;
fromAmount: string;
toAmount: string;
toAmountMin: string;
exchangeRate: string;
priceImpact: string;
isWrappedNative?: boolean;
dynamicSlippage?: number;
}
export interface WrapDetails extends SimpleWrapDetails {
type: WrapperType;
address: string;
wrapper: string;
coinAddresses: string[];
direction: WrapDirection;
calls: ChainCall[];
custom?: Record<string, any>;
}
export interface SimpleWrapDetails {
export interface SwapDetails {
target: string;
path: string[];
wrapType: WrapperType;
direction: WrapDirection;
fromAmount: string;
toAmount: string;
exchangeRate: string;
priceImpact: string;
}
export interface SwapDetails extends BaseSwapDetails {
dex: Dex;
calls: ChainCall[];
pools: string[];
poolFees: string[];
coinAddresses: string[];
exchangeId?: string;
exchangeProvider?: string;
custom?: Record<string, any>;
pools?: string[];
}
export interface SimpleSwapDetails extends BaseSwapDetails {
dexName: DexName;
}
export interface BridgeDetails {

@@ -161,5 +114,2 @@ target: string;

name: string;
sendAmount: string;
receiveAmount: string;
exchangeRate: string;
}

@@ -170,4 +120,2 @@ export interface CustomCallDetails {

}
export interface IbcTransferDetails {
}
export interface Hook {

@@ -179,1 +127,27 @@ chainType: ChainType;

}
export declare enum ActionStage {
EVM_SOURCE = 0,
EVM_DESTINATION = 1,
EVM_TRANSIENT = 2,
EVM_ONLY = 3,
COSMOS_SOURCE = 4,
COSMOS_DESTINATION = 5,
COSMOS_TRANSIENT = 6,
COSMOS_ONLY = 7
}
export interface StageContext {
stage: ActionStage;
isSourceNative: boolean;
isDestinationNative: boolean;
isEvm: boolean;
isCosmos: boolean;
toAddress: string;
receiver: string;
isFirstAction?: boolean;
isLastAction?: boolean;
hasDestinationCalls?: boolean;
hasSourceCalls?: boolean;
multicall?: string;
preHook: boolean;
postHook: boolean;
}

@@ -1,2 +0,2 @@

import { ChainType } from "chains";
import { ChainType } from "../chains";
export declare enum SquidRouteType {

@@ -3,0 +3,0 @@ CALL_BRIDGE_CALL = "CALL_BRIDGE_CALL",

import { BlockTag } from "@ethersproject/providers";
import { GMPError } from "@axelar-network/axelarjs-sdk";
import { ChainData } from "chains";
import { ChainData } from "../chains";
export type StatusRequest = {

@@ -5,0 +5,0 @@ transactionId: string;

{
"name": "@0xsquid/squid-types",
"version": "0.1.26",
"version": "0.1.27",
"description": "JS and TS types relating to 0xsquid related projects.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc