import { SecretUtils } from "secretjs/types/enigmautils" ; import { Keplr } from "@keplr-wallet/types" ; /**
 * KeplrEnigmaUtils duplicates the public methods that are supported on secretjs's EnigmaUtils class.
 */ export class KeplrEnigmaUtils implements SecretUtils { constructor ( protected readonly chainId , protected readonly keplr ) { } async getPubkey ( ) { return await this . keplr . getEnigmaPubKey ( this . chainId ) ; } async getTxEncryptionKey ( nonce ) { return await this . keplr . getEnigmaTxEncryptionKey ( this . chainId , nonce ) ; } async encrypt ( contractCodeHash , msg ) { return await this . keplr . enigmaEncrypt ( this . chainId , contractCodeHash , msg ) ; } async decrypt ( ciphertext , nonce ) { return await this . keplr . enigmaDecrypt ( this . chainId , ciphertext , nonce ) ; } }