UNPKG

@interchainjs/injective

Version:

<p align="center"> <img src="https://user-images.githubusercontent.com/545047/188804067-28e67e5e-0214-4449-ab04-2e0c564a6885.svg" width="80"> </p>

23 lines (22 loc) 775 B
import { defaultSignerOptions, defaultWalletOptions } from '../defaults'; import { HDWallet, } from '@interchainjs/cosmos/wallets/secp256k1hd'; /** * Cosmos HD Wallet for secp256k1 */ export class EthSecp256k1HDWallet extends HDWallet { constructor(accounts, options) { const opts = { ...defaultSignerOptions.Cosmos, ...options }; super(accounts, opts); } /** * Create a new HD wallet from mnemonic * @param mnemonic * @param derivations infos for derivate addresses * @param options wallet options * @returns HD wallet */ static fromMnemonic(mnemonic, derivations, options) { const opts = { ...defaultWalletOptions, ...options }; return super.fromMnemonic(mnemonic, derivations, opts); } }