// // CreateWalletService.swift // Malinka // // Created by Juraldinio on 8/26/22. // Copyright © 2022 NUT.Tech. All rights reserved. // import Foundation import WalletKit struct CreateWalletService { // MARK: - Properties private let village: Village private let device: Device private let walletCase: WalletCase // MARK: - Init init(village: Village, device: Device, walletCase: WalletCase) { self.village = village self.device = device self.walletCase = walletCase } // MARK: - Methods func create(for password: String) async throws -> WalletKit.Wallet { let bank = self.village.createBank(with: password, on: self.device) return try await bank.add(using: self.walletCase) } }