@swapper-finance/sdk
Version:
JavaScript SDK form Swapper
58 lines (50 loc) • 1.1 kB
text/typescript
import { Web3Environment } from "./Web3Environment";
import { BigNumber } from "ethers";
export type Chain = {
ecosystem: string;
chainId: string;
name: string;
displayName: string;
image: string;
web3Environment: Web3Environment;
tokenSymbol: string;
ccipChainId: string;
transactionExplorer: string;
tokens: Token[];
publicRpcUrls: string[];
privateRpcUrls?: string[];
shift4Pk: string;
};
export type Token = {
address: string;
name: string;
symbol: string;
tokenId: string;
decimals: number;
image?: string;
priority: number;
quickPick?: boolean;
supported?: boolean;
chainlinkFunctionSupport?: boolean;
};
export type TokenWithChain = Token & {
chainId: string;
isCustom?: boolean;
};
export type Prices = {
blockchainId: string;
updatedAt: Date;
prices: TokenPrices;
};
export type TokenPrices = {
[tokenAddress: string]: string;
};
export type TokenBalances = {
[tokenAddress: string]: BigNumber | undefined;
};
export type ImportedTokenData = {
address: string;
symbol: string;
name: string;
decimals: number;
};