@swapper-finance/sdk
Version:
JavaScript SDK form Swapper
61 lines (53 loc) • 1.16 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;
bridgeSupported: boolean;
swapSupported: boolean;
tokens: Token[];
publicRpcUrls: string[];
privateRpcUrls?: string[];
scanApiURL?: string;
shift4Pk: string;
};
export type Token = {
address: string;
name: string;
symbol: string;
tokenId: string;
decimals: number;
image?: string;
priority: number;
quickPick?: boolean;
supported?: 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 TokenOption = Token & {
chainId: string;
disabled?: boolean;
balance?: BigNumber;
};
export type ImportedTokenData = {
address: string;
symbol: string;
name: string;
decimals: number;
};