import { ISoulDragonMintWalletConnectResp } from '../../events/emitter'; import { EAuthEnv } from '../../utils/const'; import { ethers } from 'ethers'; import { TonConnectUI } from '@tonconnect/ui'; import { WalletWithRequiredFeatures } from '@mysten/wallet-standard'; export declare enum ChainType { ETHEREUM = "ethereum", NERVOS = "nervos", BTC = "bitcoin", BSC = "bnb", FLOW = "flow", SKALE = "skale", B2 = "b2", BASE = "base", TON = "ton", SUI = "sui", OPBNB = "opbnb", SONEIUM = "soneium", MANTLE = "mantle" } export interface INetworkConfig { chainId: string; chainName: string; nativeCurrency: { name: string; symbol: string; decimals: number; }; rpcUrls: string[]; blockExplorerUrls: string[]; } export declare function getActiveChains(): ChainType[]; export declare enum SocialType { TWITTER = "twitter", DISCORD = "discord", TELEGRAM = "telegram", GOOGLE = "google" } export declare enum BTCAddressType { LEGACY = "Legacy", TAPROOT = "Taproot", NESTED_SEGWIT = "Nested SegWit", NATIVE_SEGWIT = "Native SegWit" } export declare const ChainNameMap: Record; export declare enum WalletType { METAMASK_ETHEREUM = "metamask_ethereum", METAMASK_BNB = "metamask_bnb", METAMASK_SKALE = "metamask_skale", METAMASK_B2 = "metamask_b2", METAMASK_BASE = "metamask_base", METAMASK_CCC_NERVOS = "metamask_ccc_nervos", METAMASK_OPBNB = "metamask_opbnb", METAMASK_SONEIUM = "metamask_soneium", METAMASK_MANTLE = "metamask_mantle", OKX_ETHEREUM = "okx_ethereum", OKX_BNB = "okx_bnb", OKX_OPBNB = "okx_opbnb", OKX_SKALE = "okx_skale", OKX_BTC = "okx_bitcoin", OKX_B2 = "okx_b2", OKX_BASE = "okx_base", OKX_TON = "okx_ton", OKX_SUI = "okx_sui", OKX_TG_B2 = "okx_tg_b2", OKX_EVM_CCC_NERVOS = "okx_evm_ccc_nervos", OKX_BTC_CCC_NERVOS = "okx_btc_ccc_nervos", OKX_SONEIUM = "okx_soneium", OKX_MANTLE = "okx_mantle", JOYID_ETHEREUM = "joyid_ethereum", JOYID_BNB = "joyid_bnb", JOYID_NERVOS = "joyid_nervos", JOYID_BTC_TAPROOT = "joyid_bitcoin_taproot", JOYID_BTC_NATIVESEGWIT = "joyid_bitcoin_nativesegwit", UNISAT_BTC = "unisat_bitcoin", UNISAT_CCC_NERVOS = "unisat_ccc_nervos", TRUST_BNB = "trust_bnb", BLOCTO_FLOW = "blocto_flow", FLOW_WALLET_FLOW = "flow_wallet_flow", ENKRYPT_SKALE = "enkrypt_skale", WALLET_CONNECT_ETHEREUM = "wallet_connect_ethereum", TONKEEPER_TON = "tonkeeper_ton", SUIWALLET_SUI = "suiwallet_sui", BINANCEWEB3WALLET_OPBNB = "binanceweb3wallet_opbnb", BINANCEWEB3WALLET_BNB = "binanceweb3wallet_bnb", BINANCEWEB3WALLET_B2 = "binanceweb3wallet_b2", BINANCEWEB3WALLET_BASE = "binanceweb3wallet_base", BINANCEWEB3WALLET_ETHEREUM = "binanceweb3wallet_ethereum", BINANCEWEB3WALLET_SUI = "binanceweb3wallet_sui", BINANCEWEB3WALLET_TON = "binanceweb3wallet_ton", BITGET_ETHEREUM = "bitget_ethereum", GATE_ETHEREUM = "gate_ethereum", GATE_BNB = "gate_bnb" } export declare function getChainTypeFromWalletType(type: WalletType): ChainType; export declare function isCCCWallet(wallet?: WalletType): boolean; export declare function isCCCBtcWallet(wallet: WalletType): boolean; export declare function isBtcJoyIdWallet(wallet: WalletType): boolean; export declare function getWalletInstFromWalletType(type: WalletType): IWallet; export declare const WalletNameMap: Record; interface WalletInfo { address: string; balance: string; chainType: ChainType; networkName: string; walletType: WalletType; } export type IWalletInfo = WalletInfo | undefined; type WalletSignMethod = (reconnect?: boolean) => Promise<{ signature: string; msg: string; address?: string; }>; export type WalletSignMethodMap = Record; export interface IWallet { currentWalletInfo?: IWalletInfo; web3Provider?: ethers.providers.Web3Provider; connect(reconnect?: boolean): Promise; unConnect(): Promise; sign: WalletSignMethod; /** * btc链需要实现该方法 * @returns */ getPubkey?: () => Promise; /** * nervos链需要实现的方法 */ nervosConnectOnly?: () => Promise; /** * 激活特定钱包地址 */ activeAddress?: (address: string) => Promise; /** * ton 链交互实例 */ tonConnectUI?: TonConnectUI; /** * sui 链交互实例 */ suiClient?: WalletWithRequiredFeatures; } export interface IWalletEnv { signMessage: string; currentEnv(): EAuthEnv; } export {};