2019-10-18 11:45:19 -07:00
|
|
|
// DO NOT EDIT.
|
2020-09-23 11:39:00 -07:00
|
|
|
// swift-format-ignore-file
|
2019-10-18 11:45:19 -07:00
|
|
|
//
|
|
|
|
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
|
|
|
// Source: compact_formats.proto
|
|
|
|
//
|
2020-04-09 15:25:43 -07:00
|
|
|
// For information on using the generated types, please see the documentation:
|
2019-10-18 11:45:19 -07:00
|
|
|
// https://github.com/apple/swift-protobuf/
|
|
|
|
|
2020-04-06 08:54:31 -07:00
|
|
|
// Copyright (c) 2019-2020 The Zcash developers
|
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or https://www.opensource.org/licenses/mit-license.php .
|
|
|
|
|
2019-10-18 11:45:19 -07:00
|
|
|
import Foundation
|
|
|
|
import SwiftProtobuf
|
|
|
|
|
|
|
|
// If the compiler emits an error on this type, it is because this file
|
|
|
|
// was generated by a version of the `protoc` Swift plug-in that is
|
|
|
|
// incompatible with the version of SwiftProtobuf to which you are linking.
|
2020-04-09 15:25:43 -07:00
|
|
|
// Please ensure that you are building against the same version of the API
|
2019-10-18 11:45:19 -07:00
|
|
|
// that was used to generate this file.
|
|
|
|
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
|
|
|
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
|
|
|
typealias Version = _2
|
|
|
|
}
|
|
|
|
|
|
|
|
/// CompactBlock is a packaging of ONLY the data from a block that's needed to:
|
|
|
|
/// 1. Detect a payment to your shielded Sapling address
|
|
|
|
/// 2. Detect a spend of your shielded Sapling notes
|
|
|
|
/// 3. Update your witnesses to generate new Sapling spend proofs.
|
|
|
|
struct CompactBlock {
|
|
|
|
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
|
|
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
|
|
// methods supported on all messages.
|
|
|
|
|
|
|
|
/// the version of this wire format, for storage
|
|
|
|
var protoVersion: UInt32 = 0
|
|
|
|
|
|
|
|
/// the height of this block
|
|
|
|
var height: UInt64 = 0
|
|
|
|
|
2020-06-03 16:18:57 -07:00
|
|
|
/// the ID (hash) of this block, same as in block explorers
|
2022-06-16 08:37:16 -07:00
|
|
|
var hash: Data = SwiftProtobuf.Internal.emptyData
|
2019-10-18 11:45:19 -07:00
|
|
|
|
2020-06-03 16:18:57 -07:00
|
|
|
/// the ID (hash) of this block's predecessor
|
2022-06-16 08:37:16 -07:00
|
|
|
var prevHash: Data = SwiftProtobuf.Internal.emptyData
|
2019-10-18 11:45:19 -07:00
|
|
|
|
2020-06-03 16:18:57 -07:00
|
|
|
/// Unix epoch time when the block was mined
|
2019-10-18 11:45:19 -07:00
|
|
|
var time: UInt32 = 0
|
|
|
|
|
|
|
|
/// (hash, prevHash, and time) OR (full header)
|
2022-06-16 08:37:16 -07:00
|
|
|
var header: Data = SwiftProtobuf.Internal.emptyData
|
2019-10-18 11:45:19 -07:00
|
|
|
|
2020-06-03 16:18:57 -07:00
|
|
|
/// zero or more compact transactions from this block
|
2019-10-18 11:45:19 -07:00
|
|
|
var vtx: [CompactTx] = []
|
|
|
|
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
|
|
|
|
init() {}
|
|
|
|
}
|
|
|
|
|
2020-06-03 16:18:57 -07:00
|
|
|
/// CompactTx contains the minimum information for a wallet to know if this transaction
|
|
|
|
/// is relevant to it (either pays to it or spends from it) via shielded elements
|
|
|
|
/// only. This message will not encode a transparent-to-transparent transaction.
|
2019-10-18 11:45:19 -07:00
|
|
|
struct CompactTx {
|
|
|
|
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
|
|
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
|
|
// methods supported on all messages.
|
|
|
|
|
2020-06-03 16:18:57 -07:00
|
|
|
/// the index within the full block
|
2019-10-18 11:45:19 -07:00
|
|
|
var index: UInt64 = 0
|
|
|
|
|
2020-06-03 16:18:57 -07:00
|
|
|
/// the ID (hash) of this transaction, same as in block explorers
|
2022-06-16 08:37:16 -07:00
|
|
|
var hash: Data = SwiftProtobuf.Internal.emptyData
|
2019-10-18 11:45:19 -07:00
|
|
|
|
|
|
|
/// The transaction fee: present if server can provide. In the case of a
|
|
|
|
/// stateless server and a transaction with transparent inputs, this will be
|
|
|
|
/// unset because the calculation requires reference to prior transactions.
|
|
|
|
/// in a pure-Sapling context, the fee will be calculable as:
|
|
|
|
/// valueBalance + (sum(vPubNew) - sum(vPubOld) - sum(tOut))
|
|
|
|
var fee: UInt32 = 0
|
|
|
|
|
2020-06-03 16:18:57 -07:00
|
|
|
/// inputs
|
2022-04-27 12:19:25 -07:00
|
|
|
var spends: [CompactSaplingSpend] = []
|
2019-10-18 11:45:19 -07:00
|
|
|
|
2020-06-03 16:18:57 -07:00
|
|
|
/// outputs
|
2022-04-27 12:19:25 -07:00
|
|
|
var outputs: [CompactSaplingOutput] = []
|
|
|
|
|
|
|
|
var actions: [CompactOrchardAction] = []
|
2019-10-18 11:45:19 -07:00
|
|
|
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
|
|
|
|
init() {}
|
|
|
|
}
|
|
|
|
|
2022-04-27 12:19:25 -07:00
|
|
|
/// CompactSaplingSpend is a Sapling Spend Description as described in 7.3 of the Zcash
|
2020-06-03 16:18:57 -07:00
|
|
|
/// protocol specification.
|
2022-04-27 12:19:25 -07:00
|
|
|
struct CompactSaplingSpend {
|
2019-10-18 11:45:19 -07:00
|
|
|
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
|
|
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
|
|
// methods supported on all messages.
|
|
|
|
|
2020-06-03 16:18:57 -07:00
|
|
|
/// nullifier (see the Zcash protocol specification)
|
2022-06-16 08:37:16 -07:00
|
|
|
var nf: Data = SwiftProtobuf.Internal.emptyData
|
2019-10-18 11:45:19 -07:00
|
|
|
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
|
|
|
|
init() {}
|
|
|
|
}
|
|
|
|
|
2020-06-03 16:18:57 -07:00
|
|
|
/// output is a Sapling Output Description as described in section 7.4 of the
|
|
|
|
/// Zcash protocol spec. Total size is 948.
|
2022-04-27 12:19:25 -07:00
|
|
|
struct CompactSaplingOutput {
|
2019-10-18 11:45:19 -07:00
|
|
|
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
|
|
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
|
|
// methods supported on all messages.
|
|
|
|
|
2020-06-03 16:18:57 -07:00
|
|
|
/// note commitment u-coordinate
|
2022-06-16 08:37:16 -07:00
|
|
|
var cmu: Data = SwiftProtobuf.Internal.emptyData
|
2019-10-18 11:45:19 -07:00
|
|
|
|
2020-06-03 16:18:57 -07:00
|
|
|
/// ephemeral public key
|
2022-06-16 08:37:16 -07:00
|
|
|
var epk: Data = SwiftProtobuf.Internal.emptyData
|
2019-10-18 11:45:19 -07:00
|
|
|
|
2022-04-27 12:19:25 -07:00
|
|
|
/// first 52 bytes of ciphertext
|
|
|
|
var ciphertext: Data = SwiftProtobuf.Internal.emptyData
|
|
|
|
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
|
|
|
|
init() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// https://github.com/zcash/zips/blob/main/zip-0225.rst#orchard-action-description-orchardaction
|
|
|
|
/// (but not all fields are needed)
|
|
|
|
struct CompactOrchardAction {
|
|
|
|
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
|
|
|
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
|
|
|
// methods supported on all messages.
|
|
|
|
|
|
|
|
/// [32] The nullifier of the input note
|
|
|
|
var nullifier: Data = SwiftProtobuf.Internal.emptyData
|
|
|
|
|
|
|
|
/// [32] The x-coordinate of the note commitment for the output note
|
|
|
|
var cmx: Data = SwiftProtobuf.Internal.emptyData
|
|
|
|
|
|
|
|
/// [32] An encoding of an ephemeral Pallas public key
|
|
|
|
var ephemeralKey: Data = SwiftProtobuf.Internal.emptyData
|
|
|
|
|
|
|
|
/// [52] The note plaintext component of the encCiphertext field
|
2022-06-16 08:37:16 -07:00
|
|
|
var ciphertext: Data = SwiftProtobuf.Internal.emptyData
|
2019-10-18 11:45:19 -07:00
|
|
|
|
|
|
|
var unknownFields = SwiftProtobuf.UnknownStorage()
|
|
|
|
|
|
|
|
init() {}
|
|
|
|
}
|
|
|
|
|
|
|
|
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
|
|
|
|
|
|
|
fileprivate let _protobuf_package = "cash.z.wallet.sdk.rpc"
|
|
|
|
|
|
|
|
extension CompactBlock: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
|
|
static let protoMessageName: String = _protobuf_package + ".CompactBlock"
|
|
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
|
|
1: .same(proto: "protoVersion"),
|
|
|
|
2: .same(proto: "height"),
|
|
|
|
3: .same(proto: "hash"),
|
|
|
|
4: .same(proto: "prevHash"),
|
|
|
|
5: .same(proto: "time"),
|
|
|
|
6: .same(proto: "header"),
|
|
|
|
7: .same(proto: "vtx"),
|
|
|
|
]
|
|
|
|
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
|
|
switch fieldNumber {
|
2022-06-16 08:37:16 -07:00
|
|
|
case 1: try decoder.decodeSingularUInt32Field(value: &self.protoVersion)
|
|
|
|
case 2: try decoder.decodeSingularUInt64Field(value: &self.height)
|
|
|
|
case 3: try decoder.decodeSingularBytesField(value: &self.hash)
|
|
|
|
case 4: try decoder.decodeSingularBytesField(value: &self.prevHash)
|
|
|
|
case 5: try decoder.decodeSingularUInt32Field(value: &self.time)
|
|
|
|
case 6: try decoder.decodeSingularBytesField(value: &self.header)
|
|
|
|
case 7: try decoder.decodeRepeatedMessageField(value: &self.vtx)
|
2019-10-18 11:45:19 -07:00
|
|
|
default: break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
|
|
if self.protoVersion != 0 {
|
|
|
|
try visitor.visitSingularUInt32Field(value: self.protoVersion, fieldNumber: 1)
|
|
|
|
}
|
|
|
|
if self.height != 0 {
|
|
|
|
try visitor.visitSingularUInt64Field(value: self.height, fieldNumber: 2)
|
|
|
|
}
|
|
|
|
if !self.hash.isEmpty {
|
|
|
|
try visitor.visitSingularBytesField(value: self.hash, fieldNumber: 3)
|
|
|
|
}
|
|
|
|
if !self.prevHash.isEmpty {
|
|
|
|
try visitor.visitSingularBytesField(value: self.prevHash, fieldNumber: 4)
|
|
|
|
}
|
|
|
|
if self.time != 0 {
|
|
|
|
try visitor.visitSingularUInt32Field(value: self.time, fieldNumber: 5)
|
|
|
|
}
|
|
|
|
if !self.header.isEmpty {
|
|
|
|
try visitor.visitSingularBytesField(value: self.header, fieldNumber: 6)
|
|
|
|
}
|
|
|
|
if !self.vtx.isEmpty {
|
|
|
|
try visitor.visitRepeatedMessageField(value: self.vtx, fieldNumber: 7)
|
|
|
|
}
|
|
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
|
|
}
|
|
|
|
|
|
|
|
static func ==(lhs: CompactBlock, rhs: CompactBlock) -> Bool {
|
|
|
|
if lhs.protoVersion != rhs.protoVersion {return false}
|
|
|
|
if lhs.height != rhs.height {return false}
|
|
|
|
if lhs.hash != rhs.hash {return false}
|
|
|
|
if lhs.prevHash != rhs.prevHash {return false}
|
|
|
|
if lhs.time != rhs.time {return false}
|
|
|
|
if lhs.header != rhs.header {return false}
|
|
|
|
if lhs.vtx != rhs.vtx {return false}
|
|
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
extension CompactTx: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
|
|
static let protoMessageName: String = _protobuf_package + ".CompactTx"
|
|
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
|
|
1: .same(proto: "index"),
|
|
|
|
2: .same(proto: "hash"),
|
|
|
|
3: .same(proto: "fee"),
|
|
|
|
4: .same(proto: "spends"),
|
|
|
|
5: .same(proto: "outputs"),
|
2022-04-27 12:19:25 -07:00
|
|
|
6: .same(proto: "actions"),
|
2019-10-18 11:45:19 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
|
|
switch fieldNumber {
|
2022-06-16 08:37:16 -07:00
|
|
|
case 1: try decoder.decodeSingularUInt64Field(value: &self.index)
|
|
|
|
case 2: try decoder.decodeSingularBytesField(value: &self.hash)
|
|
|
|
case 3: try decoder.decodeSingularUInt32Field(value: &self.fee)
|
|
|
|
case 4: try decoder.decodeRepeatedMessageField(value: &self.spends)
|
|
|
|
case 5: try decoder.decodeRepeatedMessageField(value: &self.outputs)
|
2022-04-27 12:19:25 -07:00
|
|
|
case 6: try decoder.decodeRepeatedMessageField(value: &self.actions)
|
2019-10-18 11:45:19 -07:00
|
|
|
default: break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
|
|
if self.index != 0 {
|
|
|
|
try visitor.visitSingularUInt64Field(value: self.index, fieldNumber: 1)
|
|
|
|
}
|
|
|
|
if !self.hash.isEmpty {
|
|
|
|
try visitor.visitSingularBytesField(value: self.hash, fieldNumber: 2)
|
|
|
|
}
|
|
|
|
if self.fee != 0 {
|
|
|
|
try visitor.visitSingularUInt32Field(value: self.fee, fieldNumber: 3)
|
|
|
|
}
|
|
|
|
if !self.spends.isEmpty {
|
|
|
|
try visitor.visitRepeatedMessageField(value: self.spends, fieldNumber: 4)
|
|
|
|
}
|
|
|
|
if !self.outputs.isEmpty {
|
|
|
|
try visitor.visitRepeatedMessageField(value: self.outputs, fieldNumber: 5)
|
|
|
|
}
|
2022-04-27 12:19:25 -07:00
|
|
|
if !self.actions.isEmpty {
|
|
|
|
try visitor.visitRepeatedMessageField(value: self.actions, fieldNumber: 6)
|
|
|
|
}
|
2019-10-18 11:45:19 -07:00
|
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
|
|
}
|
|
|
|
|
|
|
|
static func ==(lhs: CompactTx, rhs: CompactTx) -> Bool {
|
|
|
|
if lhs.index != rhs.index {return false}
|
|
|
|
if lhs.hash != rhs.hash {return false}
|
|
|
|
if lhs.fee != rhs.fee {return false}
|
|
|
|
if lhs.spends != rhs.spends {return false}
|
|
|
|
if lhs.outputs != rhs.outputs {return false}
|
2022-04-27 12:19:25 -07:00
|
|
|
if lhs.actions != rhs.actions {return false}
|
2019-10-18 11:45:19 -07:00
|
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-27 12:19:25 -07:00
|
|
|
extension CompactSaplingSpend: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
|
|
static let protoMessageName: String = _protobuf_package + ".CompactSaplingSpend"
|
2019-10-18 11:45:19 -07:00
|
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
|
|
1: .same(proto: "nf"),
|
|
|
|
]
|
|
|
|
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
|
|
switch fieldNumber {
|
2022-06-16 08:37:16 -07:00
|
|
|
case 1: try decoder.decodeSingularBytesField(value: &self.nf)
|
2019-10-18 11:45:19 -07:00
|
|
|
default: break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
|
|
if !self.nf.isEmpty {
|
|
|
|
try visitor.visitSingularBytesField(value: self.nf, fieldNumber: 1)
|
|
|
|
}
|
|
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
|
|
}
|
|
|
|
|
2022-04-27 12:19:25 -07:00
|
|
|
static func ==(lhs: CompactSaplingSpend, rhs: CompactSaplingSpend) -> Bool {
|
2019-10-18 11:45:19 -07:00
|
|
|
if lhs.nf != rhs.nf {return false}
|
|
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-04-27 12:19:25 -07:00
|
|
|
extension CompactSaplingOutput: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
|
|
static let protoMessageName: String = _protobuf_package + ".CompactSaplingOutput"
|
2019-10-18 11:45:19 -07:00
|
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
|
|
1: .same(proto: "cmu"),
|
|
|
|
2: .same(proto: "epk"),
|
|
|
|
3: .same(proto: "ciphertext"),
|
|
|
|
]
|
|
|
|
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
|
|
switch fieldNumber {
|
2022-06-16 08:37:16 -07:00
|
|
|
case 1: try decoder.decodeSingularBytesField(value: &self.cmu)
|
|
|
|
case 2: try decoder.decodeSingularBytesField(value: &self.epk)
|
|
|
|
case 3: try decoder.decodeSingularBytesField(value: &self.ciphertext)
|
2019-10-18 11:45:19 -07:00
|
|
|
default: break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
|
|
if !self.cmu.isEmpty {
|
|
|
|
try visitor.visitSingularBytesField(value: self.cmu, fieldNumber: 1)
|
|
|
|
}
|
|
|
|
if !self.epk.isEmpty {
|
|
|
|
try visitor.visitSingularBytesField(value: self.epk, fieldNumber: 2)
|
|
|
|
}
|
|
|
|
if !self.ciphertext.isEmpty {
|
|
|
|
try visitor.visitSingularBytesField(value: self.ciphertext, fieldNumber: 3)
|
|
|
|
}
|
|
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
|
|
}
|
|
|
|
|
2022-04-27 12:19:25 -07:00
|
|
|
static func ==(lhs: CompactSaplingOutput, rhs: CompactSaplingOutput) -> Bool {
|
2019-10-18 11:45:19 -07:00
|
|
|
if lhs.cmu != rhs.cmu {return false}
|
|
|
|
if lhs.epk != rhs.epk {return false}
|
|
|
|
if lhs.ciphertext != rhs.ciphertext {return false}
|
|
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
2022-04-27 12:19:25 -07:00
|
|
|
|
|
|
|
extension CompactOrchardAction: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
|
|
|
static let protoMessageName: String = _protobuf_package + ".CompactOrchardAction"
|
|
|
|
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
|
|
|
1: .same(proto: "nullifier"),
|
|
|
|
2: .same(proto: "cmx"),
|
|
|
|
3: .same(proto: "ephemeralKey"),
|
|
|
|
4: .same(proto: "ciphertext"),
|
|
|
|
]
|
|
|
|
|
|
|
|
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
|
|
|
while let fieldNumber = try decoder.nextFieldNumber() {
|
|
|
|
switch fieldNumber {
|
|
|
|
case 1: try decoder.decodeSingularBytesField(value: &self.nullifier)
|
|
|
|
case 2: try decoder.decodeSingularBytesField(value: &self.cmx)
|
|
|
|
case 3: try decoder.decodeSingularBytesField(value: &self.ephemeralKey)
|
|
|
|
case 4: try decoder.decodeSingularBytesField(value: &self.ciphertext)
|
|
|
|
default: break
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
|
|
|
if !self.nullifier.isEmpty {
|
|
|
|
try visitor.visitSingularBytesField(value: self.nullifier, fieldNumber: 1)
|
|
|
|
}
|
|
|
|
if !self.cmx.isEmpty {
|
|
|
|
try visitor.visitSingularBytesField(value: self.cmx, fieldNumber: 2)
|
|
|
|
}
|
|
|
|
if !self.ephemeralKey.isEmpty {
|
|
|
|
try visitor.visitSingularBytesField(value: self.ephemeralKey, fieldNumber: 3)
|
|
|
|
}
|
|
|
|
if !self.ciphertext.isEmpty {
|
|
|
|
try visitor.visitSingularBytesField(value: self.ciphertext, fieldNumber: 4)
|
|
|
|
}
|
|
|
|
try unknownFields.traverse(visitor: &visitor)
|
|
|
|
}
|
|
|
|
|
|
|
|
static func ==(lhs: CompactOrchardAction, rhs: CompactOrchardAction) -> Bool {
|
|
|
|
if lhs.nullifier != rhs.nullifier {return false}
|
|
|
|
if lhs.cmx != rhs.cmx {return false}
|
|
|
|
if lhs.ephemeralKey != rhs.ephemeralKey {return false}
|
|
|
|
if lhs.ciphertext != rhs.ciphertext {return false}
|
|
|
|
if lhs.unknownFields != rhs.unknownFields {return false}
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|