UNPKG

@cryptovarna/tedex-api

Version:

TEDEX API

114 lines (113 loc) 3.25 kB
import { INodeInfo } from "@cryptovarna/tron-web-api"; import { utils } from "ethers"; export declare const ABI_TOKEN_BRIDGE: ({ inputs: { internalType: string; name: string; type: string; }[]; stateMutability: string; type: string; anonymous?: undefined; name?: undefined; outputs?: undefined; } | { anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string; }[]; name: string; type: string; stateMutability?: undefined; outputs?: undefined; } | { inputs: { internalType: string; name: string; type: string; }[]; name: string; outputs: { internalType: string; name: string; type: string; }[]; stateMutability: string; type: string; anonymous?: undefined; })[]; export declare const ABI_BRIDGE: ({ inputs: { internalType: string; name: string; type: string; }[]; stateMutability: string; type: string; anonymous?: undefined; name?: undefined; outputs?: undefined; } | { anonymous: boolean; inputs: { indexed: boolean; internalType: string; name: string; type: string; }[]; name: string; type: string; stateMutability?: undefined; outputs?: undefined; } | { inputs: { internalType: string; name: string; type: string; }[]; name: string; outputs: { internalType: string; name: string; type: string; }[]; stateMutability: string; type: string; anonymous?: undefined; })[]; export declare function toHex(address: string): string; export declare function fromHex(address: string): string; export declare function without0x(bytes: string): string; export declare function with0x(bytes: string): string; export declare function addressToBytes32(address: string): string; export declare function txDecoder(abi: any, bytesData: any): utils.Result; export declare function getNodeInfoById(nodeHash: string): INodeInfo; export declare function validateAddress(address: string): void; export declare function validateAddressToNetwork(address: string, networkHash: string): void; export declare enum NetworkType { Tron = 0, ETH = 1 } export declare function decodeNetworkHash(networkHash: string): Promise<{ networkType: NetworkType; node: INodeInfo; }>; export declare const BLOCK_SPEED: Map<string, number>; export declare const GAS_THRESHOLD: Map<string, number>; export declare const CURRENCY_THRESHOLD: Map<string, number>; export declare const DEADLINE_MAX = 172800000; export interface ITokenPreset { name: string; networkMapping: Map<INodeInfo, string>; } export declare const DEFAULT_TOKEN_PRESETS: ITokenPreset[]; export declare const TOKEN_API: Map<string, { url: string; key: string; }>; export declare const API_EVENT_LIMIT: Map<string, number>; export declare const CONTRACT_CREATION_BLOCKS: Map<string, number>; export declare const DEFAULT_BRIDGE_ADDRESSES: Map<string, string>;