Types

Environment

enum Environment {
LOCAL = "local", // not supported outside Squid local devs
TESTNET = "testnet",
MAINNET = "mainnet"
}

ChainName

enum ChainName {
ETHEREUM = "Ethereum",
AVALANCHE = "Avalanche",
MOONBEAM = "Moonbeam"
}

Config

type Config = {
apiKey?: string
environment: Environment
baseUrl?: string
executionSettings?: {
infiniteApproval?: boolean
}
}

GetRoute

type GetRoute = {
sourceChainId: number
destinationChainId: number
sourceTokenAddress: string
destinationTokenAddress: string
sourceAmount: string
recipientAddress: string
slippage: number
}

RouteResponse

type RouteResponse = {
routeData: RouteData,
transactionRequest: TransactionRequest,
route: Route
}
type RouteData = {
sourceAmount: string
destinationAmount: string
destinationAmountOutMin: string
exchangeRate: string
sourceTokenUsdPrice: number
destinationTokenUsdPrice: number
}
type TransactionRequest = {
routeType: string
gasReceiver: boolean
data: string
destinationChainGas: string
}
type Route = {
routeData: RouteData
transactionRequest: TransactionRequest
params: GetRoute
}

ExecuteRoute

type ExecuteRoute = {
signer: ethers.Wallet
route: Route // return by getRoute method
executionSettings?: {
infiniteApproval?: boolean
}
}

TokenData

type TokenData = {
chainId: number
address: string
name: string
symbol: string
decimals: number
crosschain: boolean
commonKey: string
logoURI: string
coingeackoId: string
}

ChainData

type ChainData = {
chainType: string
chainId: number
networkName: string
rpc: string
blockExplorerUrls: string[]
nativeCurrency: {
name: string
symbol: string
decimals: number
icon: string
}
squidConfig: squidConfig[]
chainNativeContracts: {
wrappedNativeToken: string
distributionEnsExecutable: string
ensRegistry: string
multicall: string
}
axelarContracts: {
gateway: string
forecallable: string
}
squidContracts: {
squidMain: string
defaultCrosschainToken: string
}
integrationContracts: {
dexUniswapV2: string
dexCurve: string
}
}
type ChainsData = {
[ChainName.ETHEREUM]: ChainData
[ChainName.AVALANCHE]: ChainData
[ChainName.MOONBEAM]: ChainData
}

Approve

type Approve = {
signer: ethers.Wallet
spender: string
tokenAddress: string
amount?: string
}

ApproveRoute

type ApproveRoute = {
route: Route
signer: ethers.Wallet | ethers.Signer
}

GetStatus

type GetStatus = {
transactionId: string
routeType: string
destinationAddress?: string
destinationChainId?: number
fromBlock?: number
toBlock?: number
}

StatusResponse

type StatusResponse = {
id: string
status: string
gasStatus: string
destinationTransactionId: string
blockNumber: number
}
Copy link
On this page
Environment
ChainName
Config
GetRoute
RouteResponse
ExecuteRoute
TokenData
ChainData
Approve
ApproveRoute
GetStatus
StatusResponse