2021-04-08 10:18:16 -07:00
|
|
|
//
|
|
|
|
// WalletTypes.swift
|
2022-07-12 12:36:12 -07:00
|
|
|
//
|
2021-04-08 10:18:16 -07:00
|
|
|
//
|
|
|
|
// Created by Francisco Gindre on 4/6/21.
|
|
|
|
//
|
|
|
|
|
2022-06-28 15:02:02 -07:00
|
|
|
/**
|
|
|
|
A ZIP 316 Unified Full Viewing Key.
|
|
|
|
*/
|
|
|
|
public protocol UnifiedFullViewingKey {
|
2022-06-28 14:40:52 -07:00
|
|
|
var account: UInt32 { get set }
|
|
|
|
var encoding: String { get set }
|
2021-04-08 10:18:16 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
public typealias TransparentAddress = String
|
|
|
|
public typealias SaplingShieldedAddress = String
|
|
|
|
|
|
|
|
public protocol UnifiedAddress {
|
2022-06-28 14:40:52 -07:00
|
|
|
var encoding: String { get }
|
2021-04-08 10:18:16 -07:00
|
|
|
}
|
|
|
|
|
2022-07-15 12:54:25 -07:00
|
|
|
public struct WalletBalance: Equatable {
|
2022-06-22 12:45:37 -07:00
|
|
|
public var verified: Zatoshi
|
|
|
|
public var total: Zatoshi
|
2022-06-27 08:51:13 -07:00
|
|
|
|
|
|
|
public init(verified: Zatoshi, total: Zatoshi) {
|
|
|
|
self.verified = verified
|
|
|
|
self.total = total
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public extension WalletBalance {
|
|
|
|
static var zero: WalletBalance {
|
|
|
|
Self(verified: .zero, total: .zero)
|
|
|
|
}
|
2021-04-08 10:18:16 -07:00
|
|
|
}
|