import { IReadWriteWallet } from "./contracts"; /** * Defines the options needed to generate a wallet. * * @interface IGenerateOptions */ export interface IGenerateOptions { coin: string; network: string; locale?: string; wordCount?: number; } /** * Defines the options for an import with a mnemonic. * * @interface IMnemonicOptions */ export interface IMnemonicOptions { coin: string; network: string; mnemonic: string; password?: string; } /** * Defines the options for an import with an address. * * @interface IAddressOptions */ export interface IAddressOptions { coin: string; network: string; address: string; } /** * Defines the options for an import with a public key. * * @interface IPublicKeyOptions */ export interface IPublicKeyOptions { coin: string; network: string; publicKey: string; } /** * Defines the options for an import with a private key. * * @interface IPrivateKeyOptions */ export interface IPrivateKeyOptions { coin: string; network: string; privateKey: string; } /** * Defines the options for an import with a BIP44 path. * * @interface IAddressWithDerivationPathOptions */ export interface IAddressWithDerivationPathOptions { coin: string; network: string; address: string; path: string; } /** * Defines the options for an import with a secret. * * @interface ISecretOptions */ export interface ISecretOptions { coin: string; network: string; secret: string; password?: string; } /** * Defines the options for an import with a WIF. * * @interface IWifOptions */ export interface IWifOptions { coin: string; network: string; wif: string; password?: string; } /** * Defines the implementation contract for the wallet factory. * * @export * @interface IWalletFactory */ export interface IWalletFactory { /** * Generates a wallet from a mnemonic. * * @param {IGenerateOptions} options * @return {Promise<{ mnemonic: string; wallet: IReadWriteWallet }>} * @memberof IWalletFactory */ generate(options: IGenerateOptions): Promise<{ mnemonic: string; wallet: IReadWriteWallet; }>; /** * Imports a wallet from a mnemonic, using the BIP39 proposal. * * @param {IMnemonicOptions} options * @return {Promise} * @memberof IWalletFactory */ fromMnemonicWithBIP39(options: IMnemonicOptions): Promise; /** * Imports a wallet from a mnemonic, using the BIP44 proposal. * * @param {IMnemonicOptions} options * @return {Promise} * @memberof IWalletFactory */ fromMnemonicWithBIP44(options: IMnemonicOptions): Promise; /** * Imports a wallet from a mnemonic, using the BIP49 proposal. * * @param {IMnemonicOptions} options * @return {Promise} * @memberof IWalletFactory */ fromMnemonicWithBIP49(options: IMnemonicOptions): Promise; /** * Imports a wallet from a mnemonic, using the BIP84 proposal. * * @param {IMnemonicOptions} options * @return {Promise} * @memberof IWalletFactory */ fromMnemonicWithBIP84(options: IMnemonicOptions): Promise; /** * Imports a wallet from an address. * * @param {IAddressOptions} options * @return {Promise} * @memberof IWalletFactory */ fromAddress(options: IAddressOptions): Promise; /** * Imports a wallet from a public key. * * @param {IPublicKeyOptions} options * @return {Promise} * @memberof IWalletFactory */ fromPublicKey(options: IPublicKeyOptions): Promise; /** * Imports a wallet from a private key. * * @param {IPrivateKeyOptions} options * @return {Promise} * @memberof IWalletFactory */ fromPrivateKey(options: IPrivateKeyOptions): Promise; /** * Imports a wallet from a BIP44 path. * * @param {IAddressWithDerivationPathOptions} options * @return {Promise} * @memberof IWalletFactory */ fromAddressWithDerivationPath(options: IAddressWithDerivationPathOptions): Promise; /** * Imports a wallet from a secret. * * @param {ISecretOptions} options * @return {Promise} * @memberof IWalletFactory */ fromSecret(options: ISecretOptions): Promise; /** * Imports a wallet from a WIF. * * @param {IWifOptions} options * @return {Promise} * @memberof IWalletFactory */ fromWIF(options: IWifOptions): Promise; }