diff --git a/Sources/Transaction.swift b/Sources/Transaction.swift index d4d36a2..ab4a5eb 100644 --- a/Sources/Transaction.swift +++ b/Sources/Transaction.swift @@ -5,13 +5,20 @@ public typealias TransactionId = String public typealias Base64EncodedString = String public extension Transaction { + struct PriceRequest { var bytes: Int = 0 var target: Address? } + struct Tag: Codable { - let name: String - let value: String + public let name: String + public let value: String + + public init(name: String, value: String) { + self.name = name + self.value = value + } } } diff --git a/Sources/Wallet.swift b/Sources/Wallet.swift index 0c3ee95..d7d98a1 100644 --- a/Sources/Wallet.swift +++ b/Sources/Wallet.swift @@ -56,6 +56,10 @@ public struct Wallet { public struct Address: Equatable, CustomStringConvertible { public let address: String public var description: String { address } + + public init(address: String) { + self.address = address + } } extension Address { @@ -71,8 +75,8 @@ extension Address { public typealias Amount = Measurement public final class ARUnit: Dimension { - static let AR = ARUnit(symbol: "AR", converter: UnitConverterLinear(coefficient: 1e12)) - static let winston = ARUnit(symbol: "winston", converter: UnitConverterLinear(coefficient: 1.0)) + public static let AR = ARUnit(symbol: "AR", converter: UnitConverterLinear(coefficient: 1e12)) + public static let winston = ARUnit(symbol: "winston", converter: UnitConverterLinear(coefficient: 1.0)) override public class func baseUnit() -> Self { return winston as! Self