UNPKG

cngn-typescript-library

Version:

A lightweight Typescript library to give you the best experience with managing your cNGN merchant account

16 lines (13 loc) 569 B
import {GeneratedWalletAddress, IResponse, Network} from "../utils/types"; import {CryptoWallet} from "../utils/crypto.wallet"; export class WalletManager { public static async generateWalletAddress(network: Network): Promise<IResponse<GeneratedWalletAddress>> { try { const response = CryptoWallet.generateWalletWithMnemonicDetails(network); return { success: true, data: response }; } catch (error: any) { throw new Error(`Error generating wallet: ${error.message}`); } } }