UNPKG

@keplr-ewallet/ewallet-sdk-cosmos

Version:
18 lines (14 loc) 510 B
import type { KeplrSignOptions } from "@keplr-wallet/types"; import type { OfflineDirectSigner } from "@cosmjs/proto-signing"; import { type CosmosEWallet } from "@keplr-ewallet-sdk-cosmos/cosmos_ewallet"; export function getOfflineSigner( this: CosmosEWallet, chainId: string, signOptions?: KeplrSignOptions, ): OfflineDirectSigner { return { getAccounts: this.getAccounts, signDirect: (signerAddress, signDoc) => this.signDirect(chainId, signerAddress, signDoc, signOptions), }; }