|
|
|
@ -8,6 +8,8 @@ import TrustKeystore |
|
|
|
|
|
|
|
|
|
class CreateRedeem { |
|
|
|
|
|
|
|
|
|
//TODO make for decimal |
|
|
|
|
|
|
|
|
|
private let keyStore = try! EtherKeystore() |
|
|
|
|
|
|
|
|
|
func generateRedeem(ticketIndices: [UInt16], account: Account) -> [Data] { |
|
|
|
@ -32,11 +34,6 @@ class CreateRedeem { |
|
|
|
|
return messageAndSignature |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//optimised for decimal |
|
|
|
|
func parseToQR(_ data: Data) -> BigInt { |
|
|
|
|
return BigInt.init(data.hexString, radix: 16)! |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
func generateTimeStamp() -> [UInt8] { |
|
|
|
|
let time = Date().timeIntervalSince1970.binade |
|
|
|
|
let minsTime = (time / 30).binade |
|
|
|
|