UNPKG

@oko-wallet/oko-sdk-cosmos

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