import { OfflineSigner } from "@cosmjs/proto-signing"; import { SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate"; import { SigningStargateClient, SigningStargateClientOptions } from "@cosmjs/stargate"; import { TokenItemType } from "./format-types"; import { JsonRpcSigner } from "@ethersproject/providers"; import { TronWeb } from "tronweb"; import { EncodeObject } from "@cosmjs/proto-signing"; import { CosmosChainId, EvmChainId } from "@oraichain/common"; export interface EvmResponse { transactionHash: string; } export declare abstract class CosmosWallet { /** * This method should return the cosmos address in bech32 form given a cosmos chain id * Browsers should make use of the existing methods from the extension to implement this method * @param chainId - Cosmos chain id to parse and return the correct cosmos address */ abstract getKeplrAddr(chainId?: CosmosChainId): Promise; /** * This method creates a new cosmos signer which is responsible for signing cosmos-based transactions. * Browsers should use signers from the extension to implement this method * @param chainId - Cosmos chain id */ abstract createCosmosSigner(chainId: CosmosChainId): Promise; getCosmWasmClient(config: { rpc: string; chainId: CosmosChainId; }, options: SigningStargateClientOptions): Promise<{ wallet: OfflineSigner; client: SigningCosmWasmClient; stargateClient: SigningStargateClient; }>; signAndBroadcast(fromChainId: CosmosChainId, fromRpc: string, options: SigningStargateClientOptions, sender: string, encodedObjects: EncodeObject[]): Promise; } export declare abstract class EvmWallet { tronWeb?: TronWeb; constructor(tronWeb?: TronWeb); /** * Note: Browser only. Return if you dont use the browser. * This method allows switching between different evm networks. * @param chainId - evm chain id */ abstract switchNetwork(chainId: string | number | EvmChainId): Promise; /** * This method should return the evm address of the current operating network */ abstract getEthAddress(): Promise; /** * This method checks if the wallet is handling eth-like networks or not */ abstract checkEthereum(): boolean; /** * This method checks if the wallet is handling tron network or not */ abstract checkTron(): boolean; /** * This method returns an evm signer responsible for signing evm-based transactions. */ abstract getSigner(): JsonRpcSigner; isTron(chainId: string | number): boolean; getFinalEvmAddress(chainId: string, address: { metamaskAddress?: string; tronAddress?: string; }): string | undefined; submitTronSmartContract(address: string, functionSelector: string, options: { feeLimit?: number; }, parameters: any[], issuerAddress: string): Promise; checkOrIncreaseAllowance(token: TokenItemType, owner: string, spender: string, amount: string): Promise; }