@hdwallet/core
Version:
A complete Hierarchical Deterministic (HD) Wallet generator for 200+ cryptocurrencies, built with TypeScript.
17 lines • 613 B
JavaScript
// SPDX-License-Identifier: MIT
import { Seed } from './seed';
import { AlgorandMnemonic } from '../mnemonics';
import { MnemonicError } from '../exceptions';
export class AlgorandSeed extends Seed {
static getName() {
return 'Algorand';
}
static fromMnemonic(mnemonic) {
const phrase = typeof mnemonic === 'string' ? mnemonic : mnemonic.getMnemonic();
if (!AlgorandMnemonic.isValid(phrase)) {
throw new MnemonicError(`Invalid ${this.getName()} mnemonic words`);
}
return AlgorandMnemonic.decode(phrase);
}
}
//# sourceMappingURL=algorand.js.map