diff --git a/Sources/Blockchain/Models/Account.swift b/Sources/Blockchain/Models/Account.swift index 14b5d0b..5c49cac 100644 --- a/Sources/Blockchain/Models/Account.swift +++ b/Sources/Blockchain/Models/Account.swift @@ -10,4 +10,9 @@ import Foundation class Account { var id: String var balance: Int + + init(id: String, balance: Int) { + self.id = id + self.balance = balance + } } diff --git a/Sources/Blockchain/Models/Transaction.swift b/Sources/Blockchain/Models/Transaction.swift index 681971f..5390c98 100644 --- a/Sources/Blockchain/Models/Transaction.swift +++ b/Sources/Blockchain/Models/Transaction.swift @@ -12,4 +12,11 @@ class Transaction { var receiver: String var amount: Int var type: String + + init(sender: String, receiver: String, amount: Int, type: String) { + self.sender = sender + self.receiver = receiver + self.amount = amount + self.type = type + } }