import { ChainInfo } from "../chain-info" ; import { BroadcastMode , AminoSignResponse , StdSignDoc , StdTx , OfflineSigner , StdSignature , } from "@cosmjs/launchpad" ; import { DirectSignResponse , OfflineDirectSigner } from "@cosmjs/proto-signing" ; import { SecretUtils } from "secretjs/types/enigmautils" ; import Long from "long" ; export interface Key { readonly name : string ; readonly algo : string ; readonly pubKey : Uint8Array ; readonly address : Uint8Array ; readonly bech32Address : string ; readonly isNanoLedger : boolean ; } export type KeplrMode = "core" | "extension" | "mobile-web" | "walletconnect" ; export interface KeplrIntereactionOptions { readonly sign ? : KeplrSignOptions ; } export interface KeplrSignOptions { readonly preferNoSetFee ? : boolean ; readonly preferNoSetMemo ? : boolean ; readonly disableBalanceCheck ? : boolean ; } export interface Keplr { readonly version : string ; /**
     * mode means that how Keplr is connected.
     * If the connected Keplr is browser's extension, the mode should be "extension".
     * If the connected Keplr is on the mobile app with the embeded web browser, the mode should be "mobile-web".
     */ readonly mode : KeplrMode ; defaultOptions : KeplrIntereactionOptions ; experimentalSuggestChain ( chainInfo ) : Promise < void > ; enable ( chainIds ) : Promise < void > ; getKey ( chainId ) : Promise < Key > ; signAmino ( chainId , signer , signDoc , signOptions ? ) : Promise < AminoSignResponse > ; signDirect ( chainId , signer , signDoc , signOptions ? ) : Promise < DirectSignResponse > ; sendTx ( chainId , tx , mode ) : Promise < Uint8Array > ; signArbitrary ( chainId , signer , data ) : Promise < StdSignature > ; verifyArbitrary ( chainId , signer , data , signature ) : Promise < boolean > ; getOfflineSigner ( chainId ) : OfflineSigner & OfflineDirectSigner ; getOfflineSignerOnlyAmino ( chainId ) : OfflineSigner ; getOfflineSignerAuto ( chainId ) : Promise < OfflineSigner | OfflineDirectSigner > ; suggestToken ( chainId , contractAddress , viewingKey ? ) : Promise < void > ; getSecret20ViewingKey ( chainId , contractAddress ) : Promise < string > ; getEnigmaUtils ( chainId ) : SecretUtils ; getEnigmaPubKey ( chainId ) : Promise < Uint8Array > ; getEnigmaTxEncryptionKey ( chainId , nonce ) : Promise < Uint8Array > ; enigmaEncrypt ( chainId , contractCodeHash , msg ) : Promise < Uint8Array > ; enigmaDecrypt ( chainId , ciphertext , nonce ) : Promise < Uint8Array > ; }