Add LND test wallet
This commit is contained in:
389
wallet/Lightning/rpc/autopilotrpc/autopilot.pb.swift
Normal file
389
wallet/Lightning/rpc/autopilotrpc/autopilot.pb.swift
Normal file
@ -0,0 +1,389 @@
|
||||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: autopilotrpc/autopilot.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
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.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
struct Autopilotrpc_StatusRequest {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Autopilotrpc_StatusResponse {
|
||||
// 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.
|
||||
|
||||
/// Indicates whether the autopilot is active or not.
|
||||
var active: Bool = false
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Autopilotrpc_ModifyStatusRequest {
|
||||
// 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.
|
||||
|
||||
/// Whether the autopilot agent should be enabled or not.
|
||||
var enable: Bool = false
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Autopilotrpc_ModifyStatusResponse {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Autopilotrpc_QueryScoresRequest {
|
||||
// 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.
|
||||
|
||||
var pubkeys: [String] = []
|
||||
|
||||
/// If set, we will ignore the local channel state when calculating scores.
|
||||
var ignoreLocalState: Bool = false
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Autopilotrpc_QueryScoresResponse {
|
||||
// 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.
|
||||
|
||||
var results: [Autopilotrpc_QueryScoresResponse.HeuristicResult] = []
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
struct HeuristicResult {
|
||||
// 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.
|
||||
|
||||
var heuristic: String = String()
|
||||
|
||||
var scores: Dictionary<String,Double> = [:]
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Autopilotrpc_SetScoresRequest {
|
||||
// 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 name of the heuristic to provide scores to.
|
||||
var heuristic: String = String()
|
||||
|
||||
///
|
||||
///A map from hex-encoded public keys to scores. Scores must be in the range
|
||||
///[0.0, 1.0].
|
||||
var scores: Dictionary<String,Double> = [:]
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Autopilotrpc_SetScoresResponse {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "autopilotrpc"
|
||||
|
||||
extension Autopilotrpc_StatusRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".StatusRequest"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Autopilotrpc_StatusRequest, rhs: Autopilotrpc_StatusRequest) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Autopilotrpc_StatusResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".StatusResponse"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "active"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularBoolField(value: &self.active)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.active != false {
|
||||
try visitor.visitSingularBoolField(value: self.active, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Autopilotrpc_StatusResponse, rhs: Autopilotrpc_StatusResponse) -> Bool {
|
||||
if lhs.active != rhs.active {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Autopilotrpc_ModifyStatusRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".ModifyStatusRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "enable"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularBoolField(value: &self.enable)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.enable != false {
|
||||
try visitor.visitSingularBoolField(value: self.enable, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Autopilotrpc_ModifyStatusRequest, rhs: Autopilotrpc_ModifyStatusRequest) -> Bool {
|
||||
if lhs.enable != rhs.enable {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Autopilotrpc_ModifyStatusResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".ModifyStatusResponse"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Autopilotrpc_ModifyStatusResponse, rhs: Autopilotrpc_ModifyStatusResponse) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Autopilotrpc_QueryScoresRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".QueryScoresRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "pubkeys"),
|
||||
2: .standard(proto: "ignore_local_state"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeRepeatedStringField(value: &self.pubkeys)
|
||||
case 2: try decoder.decodeSingularBoolField(value: &self.ignoreLocalState)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.pubkeys.isEmpty {
|
||||
try visitor.visitRepeatedStringField(value: self.pubkeys, fieldNumber: 1)
|
||||
}
|
||||
if self.ignoreLocalState != false {
|
||||
try visitor.visitSingularBoolField(value: self.ignoreLocalState, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Autopilotrpc_QueryScoresRequest, rhs: Autopilotrpc_QueryScoresRequest) -> Bool {
|
||||
if lhs.pubkeys != rhs.pubkeys {return false}
|
||||
if lhs.ignoreLocalState != rhs.ignoreLocalState {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Autopilotrpc_QueryScoresResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".QueryScoresResponse"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "results"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeRepeatedMessageField(value: &self.results)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.results.isEmpty {
|
||||
try visitor.visitRepeatedMessageField(value: self.results, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Autopilotrpc_QueryScoresResponse, rhs: Autopilotrpc_QueryScoresResponse) -> Bool {
|
||||
if lhs.results != rhs.results {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Autopilotrpc_QueryScoresResponse.HeuristicResult: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = Autopilotrpc_QueryScoresResponse.protoMessageName + ".HeuristicResult"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "heuristic"),
|
||||
2: .same(proto: "scores"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularStringField(value: &self.heuristic)
|
||||
case 2: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufDouble>.self, value: &self.scores)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.heuristic.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.heuristic, fieldNumber: 1)
|
||||
}
|
||||
if !self.scores.isEmpty {
|
||||
try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufDouble>.self, value: self.scores, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Autopilotrpc_QueryScoresResponse.HeuristicResult, rhs: Autopilotrpc_QueryScoresResponse.HeuristicResult) -> Bool {
|
||||
if lhs.heuristic != rhs.heuristic {return false}
|
||||
if lhs.scores != rhs.scores {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Autopilotrpc_SetScoresRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SetScoresRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "heuristic"),
|
||||
2: .same(proto: "scores"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularStringField(value: &self.heuristic)
|
||||
case 2: try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufDouble>.self, value: &self.scores)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.heuristic.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.heuristic, fieldNumber: 1)
|
||||
}
|
||||
if !self.scores.isEmpty {
|
||||
try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufDouble>.self, value: self.scores, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Autopilotrpc_SetScoresRequest, rhs: Autopilotrpc_SetScoresRequest) -> Bool {
|
||||
if lhs.heuristic != rhs.heuristic {return false}
|
||||
if lhs.scores != rhs.scores {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Autopilotrpc_SetScoresResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SetScoresResponse"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Autopilotrpc_SetScoresResponse, rhs: Autopilotrpc_SetScoresResponse) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
681
wallet/Lightning/rpc/chainrpc/chainnotifier.pb.swift
Normal file
681
wallet/Lightning/rpc/chainrpc/chainnotifier.pb.swift
Normal file
@ -0,0 +1,681 @@
|
||||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: chainrpc/chainnotifier.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
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.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
struct Chainrpc_ConfRequest {
|
||||
// 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 transaction hash for which we should request a confirmation notification
|
||||
///for. If set to a hash of all zeros, then the confirmation notification will
|
||||
///be requested for the script instead.
|
||||
var txid: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///An output script within a transaction with the hash above which will be used
|
||||
///by light clients to match block filters. If the transaction hash is set to a
|
||||
///hash of all zeros, then a confirmation notification will be requested for
|
||||
///this script instead.
|
||||
var script: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///The number of desired confirmations the transaction/output script should
|
||||
///reach before dispatching a confirmation notification.
|
||||
var numConfs: UInt32 = 0
|
||||
|
||||
///
|
||||
///The earliest height in the chain for which the transaction/output script
|
||||
///could have been included in a block. This should in most cases be set to the
|
||||
///broadcast height of the transaction/output script.
|
||||
var heightHint: UInt32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Chainrpc_ConfDetails {
|
||||
// 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 raw bytes of the confirmed transaction.
|
||||
var rawTx: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// The hash of the block in which the confirmed transaction was included in.
|
||||
var blockHash: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// The height of the block in which the confirmed transaction was included
|
||||
/// in.
|
||||
var blockHeight: UInt32 = 0
|
||||
|
||||
/// The index of the confirmed transaction within the transaction.
|
||||
var txIndex: UInt32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
/// TODO(wilmer): need to know how the client will use this first.
|
||||
struct Chainrpc_Reorg {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Chainrpc_ConfEvent {
|
||||
// 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.
|
||||
|
||||
var event: Chainrpc_ConfEvent.OneOf_Event? = nil
|
||||
|
||||
///
|
||||
///An event that includes the confirmation details of the request
|
||||
///(txid/ouput script).
|
||||
var conf: Chainrpc_ConfDetails {
|
||||
get {
|
||||
if case .conf(let v)? = event {return v}
|
||||
return Chainrpc_ConfDetails()
|
||||
}
|
||||
set {event = .conf(newValue)}
|
||||
}
|
||||
|
||||
///
|
||||
///An event send when the transaction of the request is reorged out of the
|
||||
///chain.
|
||||
var reorg: Chainrpc_Reorg {
|
||||
get {
|
||||
if case .reorg(let v)? = event {return v}
|
||||
return Chainrpc_Reorg()
|
||||
}
|
||||
set {event = .reorg(newValue)}
|
||||
}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
enum OneOf_Event: Equatable {
|
||||
///
|
||||
///An event that includes the confirmation details of the request
|
||||
///(txid/ouput script).
|
||||
case conf(Chainrpc_ConfDetails)
|
||||
///
|
||||
///An event send when the transaction of the request is reorged out of the
|
||||
///chain.
|
||||
case reorg(Chainrpc_Reorg)
|
||||
|
||||
#if !swift(>=4.1)
|
||||
static func ==(lhs: Chainrpc_ConfEvent.OneOf_Event, rhs: Chainrpc_ConfEvent.OneOf_Event) -> Bool {
|
||||
switch (lhs, rhs) {
|
||||
case (.conf(let l), .conf(let r)): return l == r
|
||||
case (.reorg(let l), .reorg(let r)): return l == r
|
||||
default: return false
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Chainrpc_Outpoint {
|
||||
// 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 hash of the transaction.
|
||||
var hash: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// The index of the output within the transaction.
|
||||
var index: UInt32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Chainrpc_SpendRequest {
|
||||
// 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 outpoint for which we should request a spend notification for. If set to
|
||||
///a zero outpoint, then the spend notification will be requested for the
|
||||
///script instead.
|
||||
var outpoint: Chainrpc_Outpoint {
|
||||
get {return _outpoint ?? Chainrpc_Outpoint()}
|
||||
set {_outpoint = newValue}
|
||||
}
|
||||
/// Returns true if `outpoint` has been explicitly set.
|
||||
var hasOutpoint: Bool {return self._outpoint != nil}
|
||||
/// Clears the value of `outpoint`. Subsequent reads from it will return its default value.
|
||||
mutating func clearOutpoint() {self._outpoint = nil}
|
||||
|
||||
///
|
||||
///The output script for the outpoint above. This will be used by light clients
|
||||
///to match block filters. If the outpoint is set to a zero outpoint, then a
|
||||
///spend notification will be requested for this script instead.
|
||||
var script: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///The earliest height in the chain for which the outpoint/output script could
|
||||
///have been spent. This should in most cases be set to the broadcast height of
|
||||
///the outpoint/output script.
|
||||
var heightHint: UInt32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _outpoint: Chainrpc_Outpoint? = nil
|
||||
}
|
||||
|
||||
struct Chainrpc_SpendDetails {
|
||||
// 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 outpoint was that spent.
|
||||
var spendingOutpoint: Chainrpc_Outpoint {
|
||||
get {return _spendingOutpoint ?? Chainrpc_Outpoint()}
|
||||
set {_spendingOutpoint = newValue}
|
||||
}
|
||||
/// Returns true if `spendingOutpoint` has been explicitly set.
|
||||
var hasSpendingOutpoint: Bool {return self._spendingOutpoint != nil}
|
||||
/// Clears the value of `spendingOutpoint`. Subsequent reads from it will return its default value.
|
||||
mutating func clearSpendingOutpoint() {self._spendingOutpoint = nil}
|
||||
|
||||
/// The raw bytes of the spending transaction.
|
||||
var rawSpendingTx: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// The hash of the spending transaction.
|
||||
var spendingTxHash: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// The input of the spending transaction that fulfilled the spend request.
|
||||
var spendingInputIndex: UInt32 = 0
|
||||
|
||||
/// The height at which the spending transaction was included in a block.
|
||||
var spendingHeight: UInt32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _spendingOutpoint: Chainrpc_Outpoint? = nil
|
||||
}
|
||||
|
||||
struct Chainrpc_SpendEvent {
|
||||
// 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.
|
||||
|
||||
var event: Chainrpc_SpendEvent.OneOf_Event? = nil
|
||||
|
||||
///
|
||||
///An event that includes the details of the spending transaction of the
|
||||
///request (outpoint/output script).
|
||||
var spend: Chainrpc_SpendDetails {
|
||||
get {
|
||||
if case .spend(let v)? = event {return v}
|
||||
return Chainrpc_SpendDetails()
|
||||
}
|
||||
set {event = .spend(newValue)}
|
||||
}
|
||||
|
||||
///
|
||||
///An event sent when the spending transaction of the request was
|
||||
///reorged out of the chain.
|
||||
var reorg: Chainrpc_Reorg {
|
||||
get {
|
||||
if case .reorg(let v)? = event {return v}
|
||||
return Chainrpc_Reorg()
|
||||
}
|
||||
set {event = .reorg(newValue)}
|
||||
}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
enum OneOf_Event: Equatable {
|
||||
///
|
||||
///An event that includes the details of the spending transaction of the
|
||||
///request (outpoint/output script).
|
||||
case spend(Chainrpc_SpendDetails)
|
||||
///
|
||||
///An event sent when the spending transaction of the request was
|
||||
///reorged out of the chain.
|
||||
case reorg(Chainrpc_Reorg)
|
||||
|
||||
#if !swift(>=4.1)
|
||||
static func ==(lhs: Chainrpc_SpendEvent.OneOf_Event, rhs: Chainrpc_SpendEvent.OneOf_Event) -> Bool {
|
||||
switch (lhs, rhs) {
|
||||
case (.spend(let l), .spend(let r)): return l == r
|
||||
case (.reorg(let l), .reorg(let r)): return l == r
|
||||
default: return false
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Chainrpc_BlockEpoch {
|
||||
// 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 hash of the block.
|
||||
var hash: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// The height of the block.
|
||||
var height: UInt32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "chainrpc"
|
||||
|
||||
extension Chainrpc_ConfRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".ConfRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "txid"),
|
||||
2: .same(proto: "script"),
|
||||
3: .standard(proto: "num_confs"),
|
||||
4: .standard(proto: "height_hint"),
|
||||
]
|
||||
|
||||
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.txid)
|
||||
case 2: try decoder.decodeSingularBytesField(value: &self.script)
|
||||
case 3: try decoder.decodeSingularUInt32Field(value: &self.numConfs)
|
||||
case 4: try decoder.decodeSingularUInt32Field(value: &self.heightHint)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.txid.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.txid, fieldNumber: 1)
|
||||
}
|
||||
if !self.script.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.script, fieldNumber: 2)
|
||||
}
|
||||
if self.numConfs != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.numConfs, fieldNumber: 3)
|
||||
}
|
||||
if self.heightHint != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.heightHint, fieldNumber: 4)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Chainrpc_ConfRequest, rhs: Chainrpc_ConfRequest) -> Bool {
|
||||
if lhs.txid != rhs.txid {return false}
|
||||
if lhs.script != rhs.script {return false}
|
||||
if lhs.numConfs != rhs.numConfs {return false}
|
||||
if lhs.heightHint != rhs.heightHint {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Chainrpc_ConfDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".ConfDetails"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "raw_tx"),
|
||||
2: .standard(proto: "block_hash"),
|
||||
3: .standard(proto: "block_height"),
|
||||
4: .standard(proto: "tx_index"),
|
||||
]
|
||||
|
||||
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.rawTx)
|
||||
case 2: try decoder.decodeSingularBytesField(value: &self.blockHash)
|
||||
case 3: try decoder.decodeSingularUInt32Field(value: &self.blockHeight)
|
||||
case 4: try decoder.decodeSingularUInt32Field(value: &self.txIndex)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.rawTx.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.rawTx, fieldNumber: 1)
|
||||
}
|
||||
if !self.blockHash.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.blockHash, fieldNumber: 2)
|
||||
}
|
||||
if self.blockHeight != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.blockHeight, fieldNumber: 3)
|
||||
}
|
||||
if self.txIndex != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.txIndex, fieldNumber: 4)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Chainrpc_ConfDetails, rhs: Chainrpc_ConfDetails) -> Bool {
|
||||
if lhs.rawTx != rhs.rawTx {return false}
|
||||
if lhs.blockHash != rhs.blockHash {return false}
|
||||
if lhs.blockHeight != rhs.blockHeight {return false}
|
||||
if lhs.txIndex != rhs.txIndex {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Chainrpc_Reorg: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Reorg"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Chainrpc_Reorg, rhs: Chainrpc_Reorg) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Chainrpc_ConfEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".ConfEvent"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "conf"),
|
||||
2: .same(proto: "reorg"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1:
|
||||
var v: Chainrpc_ConfDetails?
|
||||
if let current = self.event {
|
||||
try decoder.handleConflictingOneOf()
|
||||
if case .conf(let m) = current {v = m}
|
||||
}
|
||||
try decoder.decodeSingularMessageField(value: &v)
|
||||
if let v = v {self.event = .conf(v)}
|
||||
case 2:
|
||||
var v: Chainrpc_Reorg?
|
||||
if let current = self.event {
|
||||
try decoder.handleConflictingOneOf()
|
||||
if case .reorg(let m) = current {v = m}
|
||||
}
|
||||
try decoder.decodeSingularMessageField(value: &v)
|
||||
if let v = v {self.event = .reorg(v)}
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
switch self.event {
|
||||
case .conf(let v)?:
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
||||
case .reorg(let v)?:
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
case nil: break
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Chainrpc_ConfEvent, rhs: Chainrpc_ConfEvent) -> Bool {
|
||||
if lhs.event != rhs.event {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Chainrpc_Outpoint: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Outpoint"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "hash"),
|
||||
2: .same(proto: "index"),
|
||||
]
|
||||
|
||||
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.hash)
|
||||
case 2: try decoder.decodeSingularUInt32Field(value: &self.index)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.hash.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.hash, fieldNumber: 1)
|
||||
}
|
||||
if self.index != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.index, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Chainrpc_Outpoint, rhs: Chainrpc_Outpoint) -> Bool {
|
||||
if lhs.hash != rhs.hash {return false}
|
||||
if lhs.index != rhs.index {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Chainrpc_SpendRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SpendRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "outpoint"),
|
||||
2: .same(proto: "script"),
|
||||
3: .standard(proto: "height_hint"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularMessageField(value: &self._outpoint)
|
||||
case 2: try decoder.decodeSingularBytesField(value: &self.script)
|
||||
case 3: try decoder.decodeSingularUInt32Field(value: &self.heightHint)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if let v = self._outpoint {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
||||
}
|
||||
if !self.script.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.script, fieldNumber: 2)
|
||||
}
|
||||
if self.heightHint != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.heightHint, fieldNumber: 3)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Chainrpc_SpendRequest, rhs: Chainrpc_SpendRequest) -> Bool {
|
||||
if lhs._outpoint != rhs._outpoint {return false}
|
||||
if lhs.script != rhs.script {return false}
|
||||
if lhs.heightHint != rhs.heightHint {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Chainrpc_SpendDetails: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SpendDetails"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "spending_outpoint"),
|
||||
2: .standard(proto: "raw_spending_tx"),
|
||||
3: .standard(proto: "spending_tx_hash"),
|
||||
4: .standard(proto: "spending_input_index"),
|
||||
5: .standard(proto: "spending_height"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularMessageField(value: &self._spendingOutpoint)
|
||||
case 2: try decoder.decodeSingularBytesField(value: &self.rawSpendingTx)
|
||||
case 3: try decoder.decodeSingularBytesField(value: &self.spendingTxHash)
|
||||
case 4: try decoder.decodeSingularUInt32Field(value: &self.spendingInputIndex)
|
||||
case 5: try decoder.decodeSingularUInt32Field(value: &self.spendingHeight)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if let v = self._spendingOutpoint {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
||||
}
|
||||
if !self.rawSpendingTx.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.rawSpendingTx, fieldNumber: 2)
|
||||
}
|
||||
if !self.spendingTxHash.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.spendingTxHash, fieldNumber: 3)
|
||||
}
|
||||
if self.spendingInputIndex != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.spendingInputIndex, fieldNumber: 4)
|
||||
}
|
||||
if self.spendingHeight != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.spendingHeight, fieldNumber: 5)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Chainrpc_SpendDetails, rhs: Chainrpc_SpendDetails) -> Bool {
|
||||
if lhs._spendingOutpoint != rhs._spendingOutpoint {return false}
|
||||
if lhs.rawSpendingTx != rhs.rawSpendingTx {return false}
|
||||
if lhs.spendingTxHash != rhs.spendingTxHash {return false}
|
||||
if lhs.spendingInputIndex != rhs.spendingInputIndex {return false}
|
||||
if lhs.spendingHeight != rhs.spendingHeight {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Chainrpc_SpendEvent: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SpendEvent"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "spend"),
|
||||
2: .same(proto: "reorg"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1:
|
||||
var v: Chainrpc_SpendDetails?
|
||||
if let current = self.event {
|
||||
try decoder.handleConflictingOneOf()
|
||||
if case .spend(let m) = current {v = m}
|
||||
}
|
||||
try decoder.decodeSingularMessageField(value: &v)
|
||||
if let v = v {self.event = .spend(v)}
|
||||
case 2:
|
||||
var v: Chainrpc_Reorg?
|
||||
if let current = self.event {
|
||||
try decoder.handleConflictingOneOf()
|
||||
if case .reorg(let m) = current {v = m}
|
||||
}
|
||||
try decoder.decodeSingularMessageField(value: &v)
|
||||
if let v = v {self.event = .reorg(v)}
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
switch self.event {
|
||||
case .spend(let v)?:
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
||||
case .reorg(let v)?:
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
case nil: break
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Chainrpc_SpendEvent, rhs: Chainrpc_SpendEvent) -> Bool {
|
||||
if lhs.event != rhs.event {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Chainrpc_BlockEpoch: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".BlockEpoch"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "hash"),
|
||||
2: .same(proto: "height"),
|
||||
]
|
||||
|
||||
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.hash)
|
||||
case 2: try decoder.decodeSingularUInt32Field(value: &self.height)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.hash.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.hash, fieldNumber: 1)
|
||||
}
|
||||
if self.height != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.height, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Chainrpc_BlockEpoch, rhs: Chainrpc_BlockEpoch) -> Bool {
|
||||
if lhs.hash != rhs.hash {return false}
|
||||
if lhs.height != rhs.height {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
393
wallet/Lightning/rpc/invoicesrpc/invoices.pb.swift
Normal file
393
wallet/Lightning/rpc/invoicesrpc/invoices.pb.swift
Normal file
@ -0,0 +1,393 @@
|
||||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: invoicesrpc/invoices.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
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.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
struct Invoicesrpc_CancelInvoiceMsg {
|
||||
// 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.
|
||||
|
||||
/// Hash corresponding to the (hold) invoice to cancel.
|
||||
var paymentHash: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Invoicesrpc_CancelInvoiceResp {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Invoicesrpc_AddHoldInvoiceRequest {
|
||||
// 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.
|
||||
|
||||
///
|
||||
///An optional memo to attach along with the invoice. Used for record keeping
|
||||
///purposes for the invoice's creator, and will also be set in the description
|
||||
///field of the encoded payment request if the description_hash field is not
|
||||
///being used.
|
||||
var memo: String = String()
|
||||
|
||||
/// The hash of the preimage
|
||||
var hash: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///The value of this invoice in satoshis
|
||||
///
|
||||
///The fields value and value_msat are mutually exclusive.
|
||||
var value: Int64 = 0
|
||||
|
||||
///
|
||||
///The value of this invoice in millisatoshis
|
||||
///
|
||||
///The fields value and value_msat are mutually exclusive.
|
||||
var valueMsat: Int64 = 0
|
||||
|
||||
///
|
||||
///Hash (SHA-256) of a description of the payment. Used if the description of
|
||||
///payment (memo) is too long to naturally fit within the description field
|
||||
///of an encoded payment request.
|
||||
var descriptionHash: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// Payment request expiry time in seconds. Default is 3600 (1 hour).
|
||||
var expiry: Int64 = 0
|
||||
|
||||
/// Fallback on-chain address.
|
||||
var fallbackAddr: String = String()
|
||||
|
||||
/// Delta to use for the time-lock of the CLTV extended to the final hop.
|
||||
var cltvExpiry: UInt64 = 0
|
||||
|
||||
///
|
||||
///Route hints that can each be individually used to assist in reaching the
|
||||
///invoice's destination.
|
||||
var routeHints: [Lnrpc_RouteHint] = []
|
||||
|
||||
/// Whether this invoice should include routing hints for private channels.
|
||||
var `private`: Bool = false
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Invoicesrpc_AddHoldInvoiceResp {
|
||||
// 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.
|
||||
|
||||
///
|
||||
///A bare-bones invoice for a payment within the Lightning Network. With the
|
||||
///details of the invoice, the sender has all the data necessary to send a
|
||||
///payment to the recipient.
|
||||
var paymentRequest: String = String()
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Invoicesrpc_SettleInvoiceMsg {
|
||||
// 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.
|
||||
|
||||
/// Externally discovered pre-image that should be used to settle the hold
|
||||
/// invoice.
|
||||
var preimage: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Invoicesrpc_SettleInvoiceResp {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Invoicesrpc_SubscribeSingleInvoiceRequest {
|
||||
// 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.
|
||||
|
||||
/// Hash corresponding to the (hold) invoice to subscribe to.
|
||||
var rHash: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "invoicesrpc"
|
||||
|
||||
extension Invoicesrpc_CancelInvoiceMsg: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".CancelInvoiceMsg"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "payment_hash"),
|
||||
]
|
||||
|
||||
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.paymentHash)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.paymentHash.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.paymentHash, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Invoicesrpc_CancelInvoiceMsg, rhs: Invoicesrpc_CancelInvoiceMsg) -> Bool {
|
||||
if lhs.paymentHash != rhs.paymentHash {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Invoicesrpc_CancelInvoiceResp: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".CancelInvoiceResp"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Invoicesrpc_CancelInvoiceResp, rhs: Invoicesrpc_CancelInvoiceResp) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Invoicesrpc_AddHoldInvoiceRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".AddHoldInvoiceRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "memo"),
|
||||
2: .same(proto: "hash"),
|
||||
3: .same(proto: "value"),
|
||||
10: .standard(proto: "value_msat"),
|
||||
4: .standard(proto: "description_hash"),
|
||||
5: .same(proto: "expiry"),
|
||||
6: .standard(proto: "fallback_addr"),
|
||||
7: .standard(proto: "cltv_expiry"),
|
||||
8: .standard(proto: "route_hints"),
|
||||
9: .same(proto: "private"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularStringField(value: &self.memo)
|
||||
case 2: try decoder.decodeSingularBytesField(value: &self.hash)
|
||||
case 3: try decoder.decodeSingularInt64Field(value: &self.value)
|
||||
case 4: try decoder.decodeSingularBytesField(value: &self.descriptionHash)
|
||||
case 5: try decoder.decodeSingularInt64Field(value: &self.expiry)
|
||||
case 6: try decoder.decodeSingularStringField(value: &self.fallbackAddr)
|
||||
case 7: try decoder.decodeSingularUInt64Field(value: &self.cltvExpiry)
|
||||
case 8: try decoder.decodeRepeatedMessageField(value: &self.routeHints)
|
||||
case 9: try decoder.decodeSingularBoolField(value: &self.`private`)
|
||||
case 10: try decoder.decodeSingularInt64Field(value: &self.valueMsat)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.memo.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.memo, fieldNumber: 1)
|
||||
}
|
||||
if !self.hash.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.hash, fieldNumber: 2)
|
||||
}
|
||||
if self.value != 0 {
|
||||
try visitor.visitSingularInt64Field(value: self.value, fieldNumber: 3)
|
||||
}
|
||||
if !self.descriptionHash.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.descriptionHash, fieldNumber: 4)
|
||||
}
|
||||
if self.expiry != 0 {
|
||||
try visitor.visitSingularInt64Field(value: self.expiry, fieldNumber: 5)
|
||||
}
|
||||
if !self.fallbackAddr.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.fallbackAddr, fieldNumber: 6)
|
||||
}
|
||||
if self.cltvExpiry != 0 {
|
||||
try visitor.visitSingularUInt64Field(value: self.cltvExpiry, fieldNumber: 7)
|
||||
}
|
||||
if !self.routeHints.isEmpty {
|
||||
try visitor.visitRepeatedMessageField(value: self.routeHints, fieldNumber: 8)
|
||||
}
|
||||
if self.`private` != false {
|
||||
try visitor.visitSingularBoolField(value: self.`private`, fieldNumber: 9)
|
||||
}
|
||||
if self.valueMsat != 0 {
|
||||
try visitor.visitSingularInt64Field(value: self.valueMsat, fieldNumber: 10)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Invoicesrpc_AddHoldInvoiceRequest, rhs: Invoicesrpc_AddHoldInvoiceRequest) -> Bool {
|
||||
if lhs.memo != rhs.memo {return false}
|
||||
if lhs.hash != rhs.hash {return false}
|
||||
if lhs.value != rhs.value {return false}
|
||||
if lhs.valueMsat != rhs.valueMsat {return false}
|
||||
if lhs.descriptionHash != rhs.descriptionHash {return false}
|
||||
if lhs.expiry != rhs.expiry {return false}
|
||||
if lhs.fallbackAddr != rhs.fallbackAddr {return false}
|
||||
if lhs.cltvExpiry != rhs.cltvExpiry {return false}
|
||||
if lhs.routeHints != rhs.routeHints {return false}
|
||||
if lhs.`private` != rhs.`private` {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Invoicesrpc_AddHoldInvoiceResp: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".AddHoldInvoiceResp"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "payment_request"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularStringField(value: &self.paymentRequest)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.paymentRequest.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.paymentRequest, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Invoicesrpc_AddHoldInvoiceResp, rhs: Invoicesrpc_AddHoldInvoiceResp) -> Bool {
|
||||
if lhs.paymentRequest != rhs.paymentRequest {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Invoicesrpc_SettleInvoiceMsg: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SettleInvoiceMsg"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "preimage"),
|
||||
]
|
||||
|
||||
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.preimage)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.preimage.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.preimage, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Invoicesrpc_SettleInvoiceMsg, rhs: Invoicesrpc_SettleInvoiceMsg) -> Bool {
|
||||
if lhs.preimage != rhs.preimage {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Invoicesrpc_SettleInvoiceResp: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SettleInvoiceResp"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Invoicesrpc_SettleInvoiceResp, rhs: Invoicesrpc_SettleInvoiceResp) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Invoicesrpc_SubscribeSingleInvoiceRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SubscribeSingleInvoiceRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
2: .standard(proto: "r_hash"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 2: try decoder.decodeSingularBytesField(value: &self.rHash)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.rHash.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.rHash, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Invoicesrpc_SubscribeSingleInvoiceRequest, rhs: Invoicesrpc_SubscribeSingleInvoiceRequest) -> Bool {
|
||||
if lhs.rHash != rhs.rHash {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
93
wallet/Lightning/rpc/lnclipb/lncli.pb.swift
Normal file
93
wallet/Lightning/rpc/lnclipb/lncli.pb.swift
Normal file
@ -0,0 +1,93 @@
|
||||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: lnclipb/lncli.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
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.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
struct Lnclipb_VersionResponse {
|
||||
// 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 information for lncli.
|
||||
var lncli: Verrpc_Version {
|
||||
get {return _lncli ?? Verrpc_Version()}
|
||||
set {_lncli = newValue}
|
||||
}
|
||||
/// Returns true if `lncli` has been explicitly set.
|
||||
var hasLncli: Bool {return self._lncli != nil}
|
||||
/// Clears the value of `lncli`. Subsequent reads from it will return its default value.
|
||||
mutating func clearLncli() {self._lncli = nil}
|
||||
|
||||
/// The version information for lnd.
|
||||
var lnd: Verrpc_Version {
|
||||
get {return _lnd ?? Verrpc_Version()}
|
||||
set {_lnd = newValue}
|
||||
}
|
||||
/// Returns true if `lnd` has been explicitly set.
|
||||
var hasLnd: Bool {return self._lnd != nil}
|
||||
/// Clears the value of `lnd`. Subsequent reads from it will return its default value.
|
||||
mutating func clearLnd() {self._lnd = nil}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _lncli: Verrpc_Version? = nil
|
||||
fileprivate var _lnd: Verrpc_Version? = nil
|
||||
}
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "lnclipb"
|
||||
|
||||
extension Lnclipb_VersionResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".VersionResponse"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "lncli"),
|
||||
2: .same(proto: "lnd"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularMessageField(value: &self._lncli)
|
||||
case 2: try decoder.decodeSingularMessageField(value: &self._lnd)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if let v = self._lncli {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
||||
}
|
||||
if let v = self._lnd {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Lnclipb_VersionResponse, rhs: Lnclipb_VersionResponse) -> Bool {
|
||||
if lhs._lncli != rhs._lncli {return false}
|
||||
if lhs._lnd != rhs._lnd {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
2392
wallet/Lightning/rpc/routerrpc/router.pb.swift
Normal file
2392
wallet/Lightning/rpc/routerrpc/router.pb.swift
Normal file
File diff suppressed because it is too large
Load Diff
13584
wallet/Lightning/rpc/rpc.pb.swift
Normal file
13584
wallet/Lightning/rpc/rpc.pb.swift
Normal file
File diff suppressed because it is too large
Load Diff
833
wallet/Lightning/rpc/signrpc/signer.pb.swift
Normal file
833
wallet/Lightning/rpc/signrpc/signer.pb.swift
Normal file
@ -0,0 +1,833 @@
|
||||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: signrpc/signer.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
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.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
struct Signrpc_KeyLocator {
|
||||
// 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 family of key being identified.
|
||||
var keyFamily: Int32 = 0
|
||||
|
||||
/// The precise index of the key being identified.
|
||||
var keyIndex: Int32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Signrpc_KeyDescriptor {
|
||||
// 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 raw bytes of the key being identified. Either this or the KeyLocator
|
||||
///must be specified.
|
||||
var rawKeyBytes: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///The key locator that identifies which key to use for signing. Either this
|
||||
///or the raw bytes of the target key must be specified.
|
||||
var keyLoc: Signrpc_KeyLocator {
|
||||
get {return _keyLoc ?? Signrpc_KeyLocator()}
|
||||
set {_keyLoc = newValue}
|
||||
}
|
||||
/// Returns true if `keyLoc` has been explicitly set.
|
||||
var hasKeyLoc: Bool {return self._keyLoc != nil}
|
||||
/// Clears the value of `keyLoc`. Subsequent reads from it will return its default value.
|
||||
mutating func clearKeyLoc() {self._keyLoc = nil}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _keyLoc: Signrpc_KeyLocator? = nil
|
||||
}
|
||||
|
||||
struct Signrpc_TxOut {
|
||||
// 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 value of the output being spent.
|
||||
var value: Int64 = 0
|
||||
|
||||
/// The script of the output being spent.
|
||||
var pkScript: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Signrpc_SignDescriptor {
|
||||
// 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.
|
||||
|
||||
///
|
||||
///A descriptor that precisely describes *which* key to use for signing. This
|
||||
///may provide the raw public key directly, or require the Signer to re-derive
|
||||
///the key according to the populated derivation path.
|
||||
///
|
||||
///Note that if the key descriptor was obtained through walletrpc.DeriveKey,
|
||||
///then the key locator MUST always be provided, since the derived keys are not
|
||||
///persisted unlike with DeriveNextKey.
|
||||
var keyDesc: Signrpc_KeyDescriptor {
|
||||
get {return _keyDesc ?? Signrpc_KeyDescriptor()}
|
||||
set {_keyDesc = newValue}
|
||||
}
|
||||
/// Returns true if `keyDesc` has been explicitly set.
|
||||
var hasKeyDesc: Bool {return self._keyDesc != nil}
|
||||
/// Clears the value of `keyDesc`. Subsequent reads from it will return its default value.
|
||||
mutating func clearKeyDesc() {self._keyDesc = nil}
|
||||
|
||||
///
|
||||
///A scalar value that will be added to the private key corresponding to the
|
||||
///above public key to obtain the private key to be used to sign this input.
|
||||
///This value is typically derived via the following computation:
|
||||
///
|
||||
/// derivedKey = privkey + sha256(perCommitmentPoint || pubKey) mod N
|
||||
var singleTweak: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///A private key that will be used in combination with its corresponding
|
||||
///private key to derive the private key that is to be used to sign the target
|
||||
///input. Within the Lightning protocol, this value is typically the
|
||||
///commitment secret from a previously revoked commitment transaction. This
|
||||
///value is in combination with two hash values, and the original private key
|
||||
///to derive the private key to be used when signing.
|
||||
///
|
||||
/// k = (privKey*sha256(pubKey || tweakPub) +
|
||||
///tweakPriv*sha256(tweakPub || pubKey)) mod N
|
||||
var doubleTweak: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///The full script required to properly redeem the output. This field will
|
||||
///only be populated if a p2wsh or a p2sh output is being signed.
|
||||
var witnessScript: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///A description of the output being spent. The value and script MUST be
|
||||
///provided.
|
||||
var output: Signrpc_TxOut {
|
||||
get {return _output ?? Signrpc_TxOut()}
|
||||
set {_output = newValue}
|
||||
}
|
||||
/// Returns true if `output` has been explicitly set.
|
||||
var hasOutput: Bool {return self._output != nil}
|
||||
/// Clears the value of `output`. Subsequent reads from it will return its default value.
|
||||
mutating func clearOutput() {self._output = nil}
|
||||
|
||||
///
|
||||
///The target sighash type that should be used when generating the final
|
||||
///sighash, and signature.
|
||||
var sighash: UInt32 = 0
|
||||
|
||||
///
|
||||
///The target input within the transaction that should be signed.
|
||||
var inputIndex: Int32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _keyDesc: Signrpc_KeyDescriptor? = nil
|
||||
fileprivate var _output: Signrpc_TxOut? = nil
|
||||
}
|
||||
|
||||
struct Signrpc_SignReq {
|
||||
// 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 raw bytes of the transaction to be signed.
|
||||
var rawTxBytes: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// A set of sign descriptors, for each input to be signed.
|
||||
var signDescs: [Signrpc_SignDescriptor] = []
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Signrpc_SignResp {
|
||||
// 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.
|
||||
|
||||
///
|
||||
///A set of signatures realized in a fixed 64-byte format ordered in ascending
|
||||
///input order.
|
||||
var rawSigs: [Data] = []
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Signrpc_InputScript {
|
||||
// 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 serializes witness stack for the specified input.
|
||||
var witness: [Data] = []
|
||||
|
||||
///
|
||||
///The optional sig script for the specified witness that will only be set if
|
||||
///the input specified is a nested p2sh witness program.
|
||||
var sigScript: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Signrpc_InputScriptResp {
|
||||
// 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 set of fully valid input scripts requested.
|
||||
var inputScripts: [Signrpc_InputScript] = []
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Signrpc_SignMessageReq {
|
||||
// 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 message to be signed.
|
||||
var msg: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// The key locator that identifies which key to use for signing.
|
||||
var keyLoc: Signrpc_KeyLocator {
|
||||
get {return _keyLoc ?? Signrpc_KeyLocator()}
|
||||
set {_keyLoc = newValue}
|
||||
}
|
||||
/// Returns true if `keyLoc` has been explicitly set.
|
||||
var hasKeyLoc: Bool {return self._keyLoc != nil}
|
||||
/// Clears the value of `keyLoc`. Subsequent reads from it will return its default value.
|
||||
mutating func clearKeyLoc() {self._keyLoc = nil}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _keyLoc: Signrpc_KeyLocator? = nil
|
||||
}
|
||||
|
||||
struct Signrpc_SignMessageResp {
|
||||
// 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 signature for the given message in the fixed-size LN wire format.
|
||||
var signature: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Signrpc_VerifyMessageReq {
|
||||
// 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 message over which the signature is to be verified.
|
||||
var msg: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///The fixed-size LN wire encoded signature to be verified over the given
|
||||
///message.
|
||||
var signature: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// The public key the signature has to be valid for.
|
||||
var pubkey: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Signrpc_VerifyMessageResp {
|
||||
// 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.
|
||||
|
||||
/// Whether the signature was valid over the given message.
|
||||
var valid: Bool = false
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Signrpc_SharedKeyRequest {
|
||||
// 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 ephemeral public key to use for the DH key derivation.
|
||||
var ephemeralPubkey: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///The optional key locator of the local key that should be used. If this
|
||||
///parameter is not set then the node's identity private key will be used.
|
||||
var keyLoc: Signrpc_KeyLocator {
|
||||
get {return _keyLoc ?? Signrpc_KeyLocator()}
|
||||
set {_keyLoc = newValue}
|
||||
}
|
||||
/// Returns true if `keyLoc` has been explicitly set.
|
||||
var hasKeyLoc: Bool {return self._keyLoc != nil}
|
||||
/// Clears the value of `keyLoc`. Subsequent reads from it will return its default value.
|
||||
mutating func clearKeyLoc() {self._keyLoc = nil}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _keyLoc: Signrpc_KeyLocator? = nil
|
||||
}
|
||||
|
||||
struct Signrpc_SharedKeyResponse {
|
||||
// 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 shared public key, hashed with sha256.
|
||||
var sharedKey: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "signrpc"
|
||||
|
||||
extension Signrpc_KeyLocator: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".KeyLocator"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "key_family"),
|
||||
2: .standard(proto: "key_index"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularInt32Field(value: &self.keyFamily)
|
||||
case 2: try decoder.decodeSingularInt32Field(value: &self.keyIndex)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.keyFamily != 0 {
|
||||
try visitor.visitSingularInt32Field(value: self.keyFamily, fieldNumber: 1)
|
||||
}
|
||||
if self.keyIndex != 0 {
|
||||
try visitor.visitSingularInt32Field(value: self.keyIndex, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_KeyLocator, rhs: Signrpc_KeyLocator) -> Bool {
|
||||
if lhs.keyFamily != rhs.keyFamily {return false}
|
||||
if lhs.keyIndex != rhs.keyIndex {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Signrpc_KeyDescriptor: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".KeyDescriptor"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "raw_key_bytes"),
|
||||
2: .standard(proto: "key_loc"),
|
||||
]
|
||||
|
||||
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.rawKeyBytes)
|
||||
case 2: try decoder.decodeSingularMessageField(value: &self._keyLoc)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.rawKeyBytes.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.rawKeyBytes, fieldNumber: 1)
|
||||
}
|
||||
if let v = self._keyLoc {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_KeyDescriptor, rhs: Signrpc_KeyDescriptor) -> Bool {
|
||||
if lhs.rawKeyBytes != rhs.rawKeyBytes {return false}
|
||||
if lhs._keyLoc != rhs._keyLoc {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Signrpc_TxOut: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".TxOut"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "value"),
|
||||
2: .standard(proto: "pk_script"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularInt64Field(value: &self.value)
|
||||
case 2: try decoder.decodeSingularBytesField(value: &self.pkScript)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.value != 0 {
|
||||
try visitor.visitSingularInt64Field(value: self.value, fieldNumber: 1)
|
||||
}
|
||||
if !self.pkScript.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.pkScript, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_TxOut, rhs: Signrpc_TxOut) -> Bool {
|
||||
if lhs.value != rhs.value {return false}
|
||||
if lhs.pkScript != rhs.pkScript {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Signrpc_SignDescriptor: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SignDescriptor"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "key_desc"),
|
||||
2: .standard(proto: "single_tweak"),
|
||||
3: .standard(proto: "double_tweak"),
|
||||
4: .standard(proto: "witness_script"),
|
||||
5: .same(proto: "output"),
|
||||
7: .same(proto: "sighash"),
|
||||
8: .standard(proto: "input_index"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularMessageField(value: &self._keyDesc)
|
||||
case 2: try decoder.decodeSingularBytesField(value: &self.singleTweak)
|
||||
case 3: try decoder.decodeSingularBytesField(value: &self.doubleTweak)
|
||||
case 4: try decoder.decodeSingularBytesField(value: &self.witnessScript)
|
||||
case 5: try decoder.decodeSingularMessageField(value: &self._output)
|
||||
case 7: try decoder.decodeSingularUInt32Field(value: &self.sighash)
|
||||
case 8: try decoder.decodeSingularInt32Field(value: &self.inputIndex)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if let v = self._keyDesc {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 1)
|
||||
}
|
||||
if !self.singleTweak.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.singleTweak, fieldNumber: 2)
|
||||
}
|
||||
if !self.doubleTweak.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.doubleTweak, fieldNumber: 3)
|
||||
}
|
||||
if !self.witnessScript.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.witnessScript, fieldNumber: 4)
|
||||
}
|
||||
if let v = self._output {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
|
||||
}
|
||||
if self.sighash != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.sighash, fieldNumber: 7)
|
||||
}
|
||||
if self.inputIndex != 0 {
|
||||
try visitor.visitSingularInt32Field(value: self.inputIndex, fieldNumber: 8)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_SignDescriptor, rhs: Signrpc_SignDescriptor) -> Bool {
|
||||
if lhs._keyDesc != rhs._keyDesc {return false}
|
||||
if lhs.singleTweak != rhs.singleTweak {return false}
|
||||
if lhs.doubleTweak != rhs.doubleTweak {return false}
|
||||
if lhs.witnessScript != rhs.witnessScript {return false}
|
||||
if lhs._output != rhs._output {return false}
|
||||
if lhs.sighash != rhs.sighash {return false}
|
||||
if lhs.inputIndex != rhs.inputIndex {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Signrpc_SignReq: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SignReq"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "raw_tx_bytes"),
|
||||
2: .standard(proto: "sign_descs"),
|
||||
]
|
||||
|
||||
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.rawTxBytes)
|
||||
case 2: try decoder.decodeRepeatedMessageField(value: &self.signDescs)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.rawTxBytes.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.rawTxBytes, fieldNumber: 1)
|
||||
}
|
||||
if !self.signDescs.isEmpty {
|
||||
try visitor.visitRepeatedMessageField(value: self.signDescs, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_SignReq, rhs: Signrpc_SignReq) -> Bool {
|
||||
if lhs.rawTxBytes != rhs.rawTxBytes {return false}
|
||||
if lhs.signDescs != rhs.signDescs {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Signrpc_SignResp: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SignResp"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "raw_sigs"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeRepeatedBytesField(value: &self.rawSigs)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.rawSigs.isEmpty {
|
||||
try visitor.visitRepeatedBytesField(value: self.rawSigs, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_SignResp, rhs: Signrpc_SignResp) -> Bool {
|
||||
if lhs.rawSigs != rhs.rawSigs {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Signrpc_InputScript: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".InputScript"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "witness"),
|
||||
2: .standard(proto: "sig_script"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeRepeatedBytesField(value: &self.witness)
|
||||
case 2: try decoder.decodeSingularBytesField(value: &self.sigScript)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.witness.isEmpty {
|
||||
try visitor.visitRepeatedBytesField(value: self.witness, fieldNumber: 1)
|
||||
}
|
||||
if !self.sigScript.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.sigScript, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_InputScript, rhs: Signrpc_InputScript) -> Bool {
|
||||
if lhs.witness != rhs.witness {return false}
|
||||
if lhs.sigScript != rhs.sigScript {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Signrpc_InputScriptResp: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".InputScriptResp"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "input_scripts"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeRepeatedMessageField(value: &self.inputScripts)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.inputScripts.isEmpty {
|
||||
try visitor.visitRepeatedMessageField(value: self.inputScripts, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_InputScriptResp, rhs: Signrpc_InputScriptResp) -> Bool {
|
||||
if lhs.inputScripts != rhs.inputScripts {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Signrpc_SignMessageReq: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SignMessageReq"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "msg"),
|
||||
2: .standard(proto: "key_loc"),
|
||||
]
|
||||
|
||||
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.msg)
|
||||
case 2: try decoder.decodeSingularMessageField(value: &self._keyLoc)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.msg.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.msg, fieldNumber: 1)
|
||||
}
|
||||
if let v = self._keyLoc {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_SignMessageReq, rhs: Signrpc_SignMessageReq) -> Bool {
|
||||
if lhs.msg != rhs.msg {return false}
|
||||
if lhs._keyLoc != rhs._keyLoc {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Signrpc_SignMessageResp: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SignMessageResp"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "signature"),
|
||||
]
|
||||
|
||||
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.signature)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.signature.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_SignMessageResp, rhs: Signrpc_SignMessageResp) -> Bool {
|
||||
if lhs.signature != rhs.signature {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Signrpc_VerifyMessageReq: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".VerifyMessageReq"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "msg"),
|
||||
2: .same(proto: "signature"),
|
||||
3: .same(proto: "pubkey"),
|
||||
]
|
||||
|
||||
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.msg)
|
||||
case 2: try decoder.decodeSingularBytesField(value: &self.signature)
|
||||
case 3: try decoder.decodeSingularBytesField(value: &self.pubkey)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.msg.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.msg, fieldNumber: 1)
|
||||
}
|
||||
if !self.signature.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.signature, fieldNumber: 2)
|
||||
}
|
||||
if !self.pubkey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.pubkey, fieldNumber: 3)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_VerifyMessageReq, rhs: Signrpc_VerifyMessageReq) -> Bool {
|
||||
if lhs.msg != rhs.msg {return false}
|
||||
if lhs.signature != rhs.signature {return false}
|
||||
if lhs.pubkey != rhs.pubkey {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Signrpc_VerifyMessageResp: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".VerifyMessageResp"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "valid"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularBoolField(value: &self.valid)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.valid != false {
|
||||
try visitor.visitSingularBoolField(value: self.valid, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_VerifyMessageResp, rhs: Signrpc_VerifyMessageResp) -> Bool {
|
||||
if lhs.valid != rhs.valid {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Signrpc_SharedKeyRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SharedKeyRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "ephemeral_pubkey"),
|
||||
2: .standard(proto: "key_loc"),
|
||||
]
|
||||
|
||||
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.ephemeralPubkey)
|
||||
case 2: try decoder.decodeSingularMessageField(value: &self._keyLoc)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.ephemeralPubkey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.ephemeralPubkey, fieldNumber: 1)
|
||||
}
|
||||
if let v = self._keyLoc {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_SharedKeyRequest, rhs: Signrpc_SharedKeyRequest) -> Bool {
|
||||
if lhs.ephemeralPubkey != rhs.ephemeralPubkey {return false}
|
||||
if lhs._keyLoc != rhs._keyLoc {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Signrpc_SharedKeyResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".SharedKeyResponse"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "shared_key"),
|
||||
]
|
||||
|
||||
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.sharedKey)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.sharedKey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.sharedKey, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Signrpc_SharedKeyResponse, rhs: Signrpc_SharedKeyResponse) -> Bool {
|
||||
if lhs.sharedKey != rhs.sharedKey {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
168
wallet/Lightning/rpc/verrpc/verrpc.pb.swift
Normal file
168
wallet/Lightning/rpc/verrpc/verrpc.pb.swift
Normal file
@ -0,0 +1,168 @@
|
||||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: verrpc/verrpc.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
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.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
struct Verrpc_VersionRequest {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Verrpc_Version {
|
||||
// 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.
|
||||
|
||||
/// A verbose description of the daemon's commit.
|
||||
var commit: String = String()
|
||||
|
||||
/// The SHA1 commit hash that the daemon is compiled with.
|
||||
var commitHash: String = String()
|
||||
|
||||
/// The semantic version.
|
||||
var version: String = String()
|
||||
|
||||
/// The major application version.
|
||||
var appMajor: UInt32 = 0
|
||||
|
||||
/// The minor application version.
|
||||
var appMinor: UInt32 = 0
|
||||
|
||||
/// The application patch number.
|
||||
var appPatch: UInt32 = 0
|
||||
|
||||
/// The application pre-release modifier, possibly empty.
|
||||
var appPreRelease: String = String()
|
||||
|
||||
/// The list of build tags that were supplied during compilation.
|
||||
var buildTags: [String] = []
|
||||
|
||||
/// The version of go that compiled the executable.
|
||||
var goVersion: String = String()
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "verrpc"
|
||||
|
||||
extension Verrpc_VersionRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".VersionRequest"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Verrpc_VersionRequest, rhs: Verrpc_VersionRequest) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Verrpc_Version: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Version"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "commit"),
|
||||
2: .standard(proto: "commit_hash"),
|
||||
3: .same(proto: "version"),
|
||||
4: .standard(proto: "app_major"),
|
||||
5: .standard(proto: "app_minor"),
|
||||
6: .standard(proto: "app_patch"),
|
||||
7: .standard(proto: "app_pre_release"),
|
||||
8: .standard(proto: "build_tags"),
|
||||
9: .standard(proto: "go_version"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularStringField(value: &self.commit)
|
||||
case 2: try decoder.decodeSingularStringField(value: &self.commitHash)
|
||||
case 3: try decoder.decodeSingularStringField(value: &self.version)
|
||||
case 4: try decoder.decodeSingularUInt32Field(value: &self.appMajor)
|
||||
case 5: try decoder.decodeSingularUInt32Field(value: &self.appMinor)
|
||||
case 6: try decoder.decodeSingularUInt32Field(value: &self.appPatch)
|
||||
case 7: try decoder.decodeSingularStringField(value: &self.appPreRelease)
|
||||
case 8: try decoder.decodeRepeatedStringField(value: &self.buildTags)
|
||||
case 9: try decoder.decodeSingularStringField(value: &self.goVersion)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.commit.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.commit, fieldNumber: 1)
|
||||
}
|
||||
if !self.commitHash.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.commitHash, fieldNumber: 2)
|
||||
}
|
||||
if !self.version.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.version, fieldNumber: 3)
|
||||
}
|
||||
if self.appMajor != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.appMajor, fieldNumber: 4)
|
||||
}
|
||||
if self.appMinor != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.appMinor, fieldNumber: 5)
|
||||
}
|
||||
if self.appPatch != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.appPatch, fieldNumber: 6)
|
||||
}
|
||||
if !self.appPreRelease.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.appPreRelease, fieldNumber: 7)
|
||||
}
|
||||
if !self.buildTags.isEmpty {
|
||||
try visitor.visitRepeatedStringField(value: self.buildTags, fieldNumber: 8)
|
||||
}
|
||||
if !self.goVersion.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.goVersion, fieldNumber: 9)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Verrpc_Version, rhs: Verrpc_Version) -> Bool {
|
||||
if lhs.commit != rhs.commit {return false}
|
||||
if lhs.commitHash != rhs.commitHash {return false}
|
||||
if lhs.version != rhs.version {return false}
|
||||
if lhs.appMajor != rhs.appMajor {return false}
|
||||
if lhs.appMinor != rhs.appMinor {return false}
|
||||
if lhs.appPatch != rhs.appPatch {return false}
|
||||
if lhs.appPreRelease != rhs.appPreRelease {return false}
|
||||
if lhs.buildTags != rhs.buildTags {return false}
|
||||
if lhs.goVersion != rhs.goVersion {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
1484
wallet/Lightning/rpc/walletrpc/walletkit.pb.swift
Normal file
1484
wallet/Lightning/rpc/walletrpc/walletkit.pb.swift
Normal file
File diff suppressed because it is too large
Load Diff
473
wallet/Lightning/rpc/walletunlocker.pb.swift
Normal file
473
wallet/Lightning/rpc/walletunlocker.pb.swift
Normal file
@ -0,0 +1,473 @@
|
||||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: walletunlocker.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
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.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
struct Lnrpc_GenSeedRequest {
|
||||
// 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.
|
||||
|
||||
///
|
||||
///aezeed_passphrase is an optional user provided passphrase that will be used
|
||||
///to encrypt the generated aezeed cipher seed. When using REST, this field
|
||||
///must be encoded as base64.
|
||||
var aezeedPassphrase: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///seed_entropy is an optional 16-bytes generated via CSPRNG. If not
|
||||
///specified, then a fresh set of randomness will be used to create the seed.
|
||||
///When using REST, this field must be encoded as base64.
|
||||
var seedEntropy: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Lnrpc_GenSeedResponse {
|
||||
// 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.
|
||||
|
||||
///
|
||||
///cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed
|
||||
///cipher seed obtained by the user. This field is optional, as if not
|
||||
///provided, then the daemon will generate a new cipher seed for the user.
|
||||
///Otherwise, then the daemon will attempt to recover the wallet state linked
|
||||
///to this cipher seed.
|
||||
var cipherSeedMnemonic: [String] = []
|
||||
|
||||
///
|
||||
///enciphered_seed are the raw aezeed cipher seed bytes. This is the raw
|
||||
///cipher text before run through our mnemonic encoding scheme.
|
||||
var encipheredSeed: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Lnrpc_InitWalletRequest {
|
||||
// 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.
|
||||
|
||||
///
|
||||
///wallet_password is the passphrase that should be used to encrypt the
|
||||
///wallet. This MUST be at least 8 chars in length. After creation, this
|
||||
///password is required to unlock the daemon. When using REST, this field
|
||||
///must be encoded as base64.
|
||||
var walletPassword: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///cipher_seed_mnemonic is a 24-word mnemonic that encodes a prior aezeed
|
||||
///cipher seed obtained by the user. This may have been generated by the
|
||||
///GenSeed method, or be an existing seed.
|
||||
var cipherSeedMnemonic: [String] = []
|
||||
|
||||
///
|
||||
///aezeed_passphrase is an optional user provided passphrase that will be used
|
||||
///to encrypt the generated aezeed cipher seed. When using REST, this field
|
||||
///must be encoded as base64.
|
||||
var aezeedPassphrase: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///recovery_window is an optional argument specifying the address lookahead
|
||||
///when restoring a wallet seed. The recovery window applies to each
|
||||
///individual branch of the BIP44 derivation paths. Supplying a recovery
|
||||
///window of zero indicates that no addresses should be recovered, such after
|
||||
///the first initialization of the wallet.
|
||||
var recoveryWindow: Int32 = 0
|
||||
|
||||
///
|
||||
///channel_backups is an optional argument that allows clients to recover the
|
||||
///settled funds within a set of channels. This should be populated if the
|
||||
///user was unable to close out all channels and sweep funds before partial or
|
||||
///total data loss occurred. If specified, then after on-chain recovery of
|
||||
///funds, lnd begin to carry out the data loss recovery protocol in order to
|
||||
///recover the funds in each channel from a remote force closed transaction.
|
||||
var channelBackups: Lnrpc_ChanBackupSnapshot {
|
||||
get {return _channelBackups ?? Lnrpc_ChanBackupSnapshot()}
|
||||
set {_channelBackups = newValue}
|
||||
}
|
||||
/// Returns true if `channelBackups` has been explicitly set.
|
||||
var hasChannelBackups: Bool {return self._channelBackups != nil}
|
||||
/// Clears the value of `channelBackups`. Subsequent reads from it will return its default value.
|
||||
mutating func clearChannelBackups() {self._channelBackups = nil}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _channelBackups: Lnrpc_ChanBackupSnapshot? = nil
|
||||
}
|
||||
|
||||
struct Lnrpc_InitWalletResponse {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Lnrpc_UnlockWalletRequest {
|
||||
// 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.
|
||||
|
||||
///
|
||||
///wallet_password should be the current valid passphrase for the daemon. This
|
||||
///will be required to decrypt on-disk material that the daemon requires to
|
||||
///function properly. When using REST, this field must be encoded as base64.
|
||||
var walletPassword: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///recovery_window is an optional argument specifying the address lookahead
|
||||
///when restoring a wallet seed. The recovery window applies to each
|
||||
///individual branch of the BIP44 derivation paths. Supplying a recovery
|
||||
///window of zero indicates that no addresses should be recovered, such after
|
||||
///the first initialization of the wallet.
|
||||
var recoveryWindow: Int32 = 0
|
||||
|
||||
///
|
||||
///channel_backups is an optional argument that allows clients to recover the
|
||||
///settled funds within a set of channels. This should be populated if the
|
||||
///user was unable to close out all channels and sweep funds before partial or
|
||||
///total data loss occurred. If specified, then after on-chain recovery of
|
||||
///funds, lnd begin to carry out the data loss recovery protocol in order to
|
||||
///recover the funds in each channel from a remote force closed transaction.
|
||||
var channelBackups: Lnrpc_ChanBackupSnapshot {
|
||||
get {return _channelBackups ?? Lnrpc_ChanBackupSnapshot()}
|
||||
set {_channelBackups = newValue}
|
||||
}
|
||||
/// Returns true if `channelBackups` has been explicitly set.
|
||||
var hasChannelBackups: Bool {return self._channelBackups != nil}
|
||||
/// Clears the value of `channelBackups`. Subsequent reads from it will return its default value.
|
||||
mutating func clearChannelBackups() {self._channelBackups = nil}
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
|
||||
fileprivate var _channelBackups: Lnrpc_ChanBackupSnapshot? = nil
|
||||
}
|
||||
|
||||
struct Lnrpc_UnlockWalletResponse {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Lnrpc_ChangePasswordRequest {
|
||||
// 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.
|
||||
|
||||
///
|
||||
///current_password should be the current valid passphrase used to unlock the
|
||||
///daemon. When using REST, this field must be encoded as base64.
|
||||
var currentPassword: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///new_password should be the new passphrase that will be needed to unlock the
|
||||
///daemon. When using REST, this field must be encoded as base64.
|
||||
var newPassword: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Lnrpc_ChangePasswordResponse {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "lnrpc"
|
||||
|
||||
extension Lnrpc_GenSeedRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".GenSeedRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "aezeed_passphrase"),
|
||||
2: .standard(proto: "seed_entropy"),
|
||||
]
|
||||
|
||||
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.aezeedPassphrase)
|
||||
case 2: try decoder.decodeSingularBytesField(value: &self.seedEntropy)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.aezeedPassphrase.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.aezeedPassphrase, fieldNumber: 1)
|
||||
}
|
||||
if !self.seedEntropy.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.seedEntropy, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Lnrpc_GenSeedRequest, rhs: Lnrpc_GenSeedRequest) -> Bool {
|
||||
if lhs.aezeedPassphrase != rhs.aezeedPassphrase {return false}
|
||||
if lhs.seedEntropy != rhs.seedEntropy {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Lnrpc_GenSeedResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".GenSeedResponse"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "cipher_seed_mnemonic"),
|
||||
2: .standard(proto: "enciphered_seed"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeRepeatedStringField(value: &self.cipherSeedMnemonic)
|
||||
case 2: try decoder.decodeSingularBytesField(value: &self.encipheredSeed)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.cipherSeedMnemonic.isEmpty {
|
||||
try visitor.visitRepeatedStringField(value: self.cipherSeedMnemonic, fieldNumber: 1)
|
||||
}
|
||||
if !self.encipheredSeed.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.encipheredSeed, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Lnrpc_GenSeedResponse, rhs: Lnrpc_GenSeedResponse) -> Bool {
|
||||
if lhs.cipherSeedMnemonic != rhs.cipherSeedMnemonic {return false}
|
||||
if lhs.encipheredSeed != rhs.encipheredSeed {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Lnrpc_InitWalletRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".InitWalletRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "wallet_password"),
|
||||
2: .standard(proto: "cipher_seed_mnemonic"),
|
||||
3: .standard(proto: "aezeed_passphrase"),
|
||||
4: .standard(proto: "recovery_window"),
|
||||
5: .standard(proto: "channel_backups"),
|
||||
]
|
||||
|
||||
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.walletPassword)
|
||||
case 2: try decoder.decodeRepeatedStringField(value: &self.cipherSeedMnemonic)
|
||||
case 3: try decoder.decodeSingularBytesField(value: &self.aezeedPassphrase)
|
||||
case 4: try decoder.decodeSingularInt32Field(value: &self.recoveryWindow)
|
||||
case 5: try decoder.decodeSingularMessageField(value: &self._channelBackups)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.walletPassword.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.walletPassword, fieldNumber: 1)
|
||||
}
|
||||
if !self.cipherSeedMnemonic.isEmpty {
|
||||
try visitor.visitRepeatedStringField(value: self.cipherSeedMnemonic, fieldNumber: 2)
|
||||
}
|
||||
if !self.aezeedPassphrase.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.aezeedPassphrase, fieldNumber: 3)
|
||||
}
|
||||
if self.recoveryWindow != 0 {
|
||||
try visitor.visitSingularInt32Field(value: self.recoveryWindow, fieldNumber: 4)
|
||||
}
|
||||
if let v = self._channelBackups {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 5)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Lnrpc_InitWalletRequest, rhs: Lnrpc_InitWalletRequest) -> Bool {
|
||||
if lhs.walletPassword != rhs.walletPassword {return false}
|
||||
if lhs.cipherSeedMnemonic != rhs.cipherSeedMnemonic {return false}
|
||||
if lhs.aezeedPassphrase != rhs.aezeedPassphrase {return false}
|
||||
if lhs.recoveryWindow != rhs.recoveryWindow {return false}
|
||||
if lhs._channelBackups != rhs._channelBackups {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Lnrpc_InitWalletResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".InitWalletResponse"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Lnrpc_InitWalletResponse, rhs: Lnrpc_InitWalletResponse) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Lnrpc_UnlockWalletRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".UnlockWalletRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "wallet_password"),
|
||||
2: .standard(proto: "recovery_window"),
|
||||
3: .standard(proto: "channel_backups"),
|
||||
]
|
||||
|
||||
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.walletPassword)
|
||||
case 2: try decoder.decodeSingularInt32Field(value: &self.recoveryWindow)
|
||||
case 3: try decoder.decodeSingularMessageField(value: &self._channelBackups)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.walletPassword.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.walletPassword, fieldNumber: 1)
|
||||
}
|
||||
if self.recoveryWindow != 0 {
|
||||
try visitor.visitSingularInt32Field(value: self.recoveryWindow, fieldNumber: 2)
|
||||
}
|
||||
if let v = self._channelBackups {
|
||||
try visitor.visitSingularMessageField(value: v, fieldNumber: 3)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Lnrpc_UnlockWalletRequest, rhs: Lnrpc_UnlockWalletRequest) -> Bool {
|
||||
if lhs.walletPassword != rhs.walletPassword {return false}
|
||||
if lhs.recoveryWindow != rhs.recoveryWindow {return false}
|
||||
if lhs._channelBackups != rhs._channelBackups {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Lnrpc_UnlockWalletResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".UnlockWalletResponse"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Lnrpc_UnlockWalletResponse, rhs: Lnrpc_UnlockWalletResponse) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Lnrpc_ChangePasswordRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".ChangePasswordRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "current_password"),
|
||||
2: .standard(proto: "new_password"),
|
||||
]
|
||||
|
||||
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.currentPassword)
|
||||
case 2: try decoder.decodeSingularBytesField(value: &self.newPassword)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.currentPassword.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.currentPassword, fieldNumber: 1)
|
||||
}
|
||||
if !self.newPassword.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.newPassword, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Lnrpc_ChangePasswordRequest, rhs: Lnrpc_ChangePasswordRequest) -> Bool {
|
||||
if lhs.currentPassword != rhs.currentPassword {return false}
|
||||
if lhs.newPassword != rhs.newPassword {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Lnrpc_ChangePasswordResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".ChangePasswordResponse"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Lnrpc_ChangePasswordResponse, rhs: Lnrpc_ChangePasswordResponse) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
114
wallet/Lightning/rpc/watchtowerrpc/watchtower.pb.swift
Normal file
114
wallet/Lightning/rpc/watchtowerrpc/watchtower.pb.swift
Normal file
@ -0,0 +1,114 @@
|
||||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: watchtowerrpc/watchtower.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
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.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
struct Watchtowerrpc_GetInfoRequest {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Watchtowerrpc_GetInfoResponse {
|
||||
// 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 public key of the watchtower.
|
||||
var pubkey: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// The listening addresses of the watchtower.
|
||||
var listeners: [String] = []
|
||||
|
||||
/// The URIs of the watchtower.
|
||||
var uris: [String] = []
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "watchtowerrpc"
|
||||
|
||||
extension Watchtowerrpc_GetInfoRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".GetInfoRequest"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Watchtowerrpc_GetInfoRequest, rhs: Watchtowerrpc_GetInfoRequest) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Watchtowerrpc_GetInfoResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".GetInfoResponse"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "pubkey"),
|
||||
2: .same(proto: "listeners"),
|
||||
3: .same(proto: "uris"),
|
||||
]
|
||||
|
||||
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.pubkey)
|
||||
case 2: try decoder.decodeRepeatedStringField(value: &self.listeners)
|
||||
case 3: try decoder.decodeRepeatedStringField(value: &self.uris)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.pubkey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.pubkey, fieldNumber: 1)
|
||||
}
|
||||
if !self.listeners.isEmpty {
|
||||
try visitor.visitRepeatedStringField(value: self.listeners, fieldNumber: 2)
|
||||
}
|
||||
if !self.uris.isEmpty {
|
||||
try visitor.visitRepeatedStringField(value: self.uris, fieldNumber: 3)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Watchtowerrpc_GetInfoResponse, rhs: Watchtowerrpc_GetInfoResponse) -> Bool {
|
||||
if lhs.pubkey != rhs.pubkey {return false}
|
||||
if lhs.listeners != rhs.listeners {return false}
|
||||
if lhs.uris != rhs.uris {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
673
wallet/Lightning/rpc/wtclientrpc/wtclient.pb.swift
Normal file
673
wallet/Lightning/rpc/wtclientrpc/wtclient.pb.swift
Normal file
@ -0,0 +1,673 @@
|
||||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: wtclientrpc/wtclient.proto
|
||||
//
|
||||
// For information on using the generated types, please see the documentation:
|
||||
// https://github.com/apple/swift-protobuf/
|
||||
|
||||
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.
|
||||
// Please ensure that you are building against the same version of the API
|
||||
// that was used to generate this file.
|
||||
fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAPIVersionCheck {
|
||||
struct _2: SwiftProtobuf.ProtobufAPIVersion_2 {}
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
struct Wtclientrpc_AddTowerRequest {
|
||||
// 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 identifying public key of the watchtower to add.
|
||||
var pubkey: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// A network address the watchtower is reachable over.
|
||||
var address: String = String()
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Wtclientrpc_AddTowerResponse {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Wtclientrpc_RemoveTowerRequest {
|
||||
// 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 identifying public key of the watchtower to remove.
|
||||
var pubkey: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
///
|
||||
///If set, then the record for this address will be removed, indicating that is
|
||||
///is stale. Otherwise, the watchtower will no longer be used for future
|
||||
///session negotiations and backups.
|
||||
var address: String = String()
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Wtclientrpc_RemoveTowerResponse {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Wtclientrpc_GetTowerInfoRequest {
|
||||
// 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 identifying public key of the watchtower to retrieve information for.
|
||||
var pubkey: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// Whether we should include sessions with the watchtower in the response.
|
||||
var includeSessions: Bool = false
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Wtclientrpc_TowerSession {
|
||||
// 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 total number of successful backups that have been made to the
|
||||
///watchtower session.
|
||||
var numBackups: UInt32 = 0
|
||||
|
||||
///
|
||||
///The total number of backups in the session that are currently pending to be
|
||||
///acknowledged by the watchtower.
|
||||
var numPendingBackups: UInt32 = 0
|
||||
|
||||
/// The maximum number of backups allowed by the watchtower session.
|
||||
var maxBackups: UInt32 = 0
|
||||
|
||||
///
|
||||
///The fee rate, in satoshis per vbyte, that will be used by the watchtower for
|
||||
///the justice transaction in the event of a channel breach.
|
||||
var sweepSatPerByte: UInt32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Wtclientrpc_Tower {
|
||||
// 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 identifying public key of the watchtower.
|
||||
var pubkey: Data = SwiftProtobuf.Internal.emptyData
|
||||
|
||||
/// The list of addresses the watchtower is reachable over.
|
||||
var addresses: [String] = []
|
||||
|
||||
/// Whether the watchtower is currently a candidate for new sessions.
|
||||
var activeSessionCandidate: Bool = false
|
||||
|
||||
/// The number of sessions that have been negotiated with the watchtower.
|
||||
var numSessions: UInt32 = 0
|
||||
|
||||
/// The list of sessions that have been negotiated with the watchtower.
|
||||
var sessions: [Wtclientrpc_TowerSession] = []
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Wtclientrpc_ListTowersRequest {
|
||||
// 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.
|
||||
|
||||
/// Whether we should include sessions with the watchtower in the response.
|
||||
var includeSessions: Bool = false
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Wtclientrpc_ListTowersResponse {
|
||||
// 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 list of watchtowers available for new backups.
|
||||
var towers: [Wtclientrpc_Tower] = []
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Wtclientrpc_StatsRequest {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Wtclientrpc_StatsResponse {
|
||||
// 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 total number of backups made to all active and exhausted watchtower
|
||||
///sessions.
|
||||
var numBackups: UInt32 = 0
|
||||
|
||||
///
|
||||
///The total number of backups that are pending to be acknowledged by all
|
||||
///active and exhausted watchtower sessions.
|
||||
var numPendingBackups: UInt32 = 0
|
||||
|
||||
///
|
||||
///The total number of backups that all active and exhausted watchtower
|
||||
///sessions have failed to acknowledge.
|
||||
var numFailedBackups: UInt32 = 0
|
||||
|
||||
/// The total number of new sessions made to watchtowers.
|
||||
var numSessionsAcquired: UInt32 = 0
|
||||
|
||||
/// The total number of watchtower sessions that have been exhausted.
|
||||
var numSessionsExhausted: UInt32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Wtclientrpc_PolicyRequest {
|
||||
// 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.
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
struct Wtclientrpc_PolicyResponse {
|
||||
// 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 maximum number of updates each session we negotiate with watchtowers
|
||||
///should allow.
|
||||
var maxUpdates: UInt32 = 0
|
||||
|
||||
///
|
||||
///The fee rate, in satoshis per vbyte, that will be used by watchtowers for
|
||||
///justice transactions in response to channel breaches.
|
||||
var sweepSatPerByte: UInt32 = 0
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
init() {}
|
||||
}
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "wtclientrpc"
|
||||
|
||||
extension Wtclientrpc_AddTowerRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".AddTowerRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "pubkey"),
|
||||
2: .same(proto: "address"),
|
||||
]
|
||||
|
||||
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.pubkey)
|
||||
case 2: try decoder.decodeSingularStringField(value: &self.address)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.pubkey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.pubkey, fieldNumber: 1)
|
||||
}
|
||||
if !self.address.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.address, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Wtclientrpc_AddTowerRequest, rhs: Wtclientrpc_AddTowerRequest) -> Bool {
|
||||
if lhs.pubkey != rhs.pubkey {return false}
|
||||
if lhs.address != rhs.address {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Wtclientrpc_AddTowerResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".AddTowerResponse"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Wtclientrpc_AddTowerResponse, rhs: Wtclientrpc_AddTowerResponse) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Wtclientrpc_RemoveTowerRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".RemoveTowerRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "pubkey"),
|
||||
2: .same(proto: "address"),
|
||||
]
|
||||
|
||||
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.pubkey)
|
||||
case 2: try decoder.decodeSingularStringField(value: &self.address)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.pubkey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.pubkey, fieldNumber: 1)
|
||||
}
|
||||
if !self.address.isEmpty {
|
||||
try visitor.visitSingularStringField(value: self.address, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Wtclientrpc_RemoveTowerRequest, rhs: Wtclientrpc_RemoveTowerRequest) -> Bool {
|
||||
if lhs.pubkey != rhs.pubkey {return false}
|
||||
if lhs.address != rhs.address {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Wtclientrpc_RemoveTowerResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".RemoveTowerResponse"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Wtclientrpc_RemoveTowerResponse, rhs: Wtclientrpc_RemoveTowerResponse) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Wtclientrpc_GetTowerInfoRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".GetTowerInfoRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "pubkey"),
|
||||
2: .standard(proto: "include_sessions"),
|
||||
]
|
||||
|
||||
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.pubkey)
|
||||
case 2: try decoder.decodeSingularBoolField(value: &self.includeSessions)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.pubkey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.pubkey, fieldNumber: 1)
|
||||
}
|
||||
if self.includeSessions != false {
|
||||
try visitor.visitSingularBoolField(value: self.includeSessions, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Wtclientrpc_GetTowerInfoRequest, rhs: Wtclientrpc_GetTowerInfoRequest) -> Bool {
|
||||
if lhs.pubkey != rhs.pubkey {return false}
|
||||
if lhs.includeSessions != rhs.includeSessions {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Wtclientrpc_TowerSession: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".TowerSession"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "num_backups"),
|
||||
2: .standard(proto: "num_pending_backups"),
|
||||
3: .standard(proto: "max_backups"),
|
||||
4: .standard(proto: "sweep_sat_per_byte"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularUInt32Field(value: &self.numBackups)
|
||||
case 2: try decoder.decodeSingularUInt32Field(value: &self.numPendingBackups)
|
||||
case 3: try decoder.decodeSingularUInt32Field(value: &self.maxBackups)
|
||||
case 4: try decoder.decodeSingularUInt32Field(value: &self.sweepSatPerByte)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.numBackups != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.numBackups, fieldNumber: 1)
|
||||
}
|
||||
if self.numPendingBackups != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.numPendingBackups, fieldNumber: 2)
|
||||
}
|
||||
if self.maxBackups != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.maxBackups, fieldNumber: 3)
|
||||
}
|
||||
if self.sweepSatPerByte != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.sweepSatPerByte, fieldNumber: 4)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Wtclientrpc_TowerSession, rhs: Wtclientrpc_TowerSession) -> Bool {
|
||||
if lhs.numBackups != rhs.numBackups {return false}
|
||||
if lhs.numPendingBackups != rhs.numPendingBackups {return false}
|
||||
if lhs.maxBackups != rhs.maxBackups {return false}
|
||||
if lhs.sweepSatPerByte != rhs.sweepSatPerByte {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Wtclientrpc_Tower: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Tower"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "pubkey"),
|
||||
2: .same(proto: "addresses"),
|
||||
3: .standard(proto: "active_session_candidate"),
|
||||
4: .standard(proto: "num_sessions"),
|
||||
5: .same(proto: "sessions"),
|
||||
]
|
||||
|
||||
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.pubkey)
|
||||
case 2: try decoder.decodeRepeatedStringField(value: &self.addresses)
|
||||
case 3: try decoder.decodeSingularBoolField(value: &self.activeSessionCandidate)
|
||||
case 4: try decoder.decodeSingularUInt32Field(value: &self.numSessions)
|
||||
case 5: try decoder.decodeRepeatedMessageField(value: &self.sessions)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.pubkey.isEmpty {
|
||||
try visitor.visitSingularBytesField(value: self.pubkey, fieldNumber: 1)
|
||||
}
|
||||
if !self.addresses.isEmpty {
|
||||
try visitor.visitRepeatedStringField(value: self.addresses, fieldNumber: 2)
|
||||
}
|
||||
if self.activeSessionCandidate != false {
|
||||
try visitor.visitSingularBoolField(value: self.activeSessionCandidate, fieldNumber: 3)
|
||||
}
|
||||
if self.numSessions != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.numSessions, fieldNumber: 4)
|
||||
}
|
||||
if !self.sessions.isEmpty {
|
||||
try visitor.visitRepeatedMessageField(value: self.sessions, fieldNumber: 5)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Wtclientrpc_Tower, rhs: Wtclientrpc_Tower) -> Bool {
|
||||
if lhs.pubkey != rhs.pubkey {return false}
|
||||
if lhs.addresses != rhs.addresses {return false}
|
||||
if lhs.activeSessionCandidate != rhs.activeSessionCandidate {return false}
|
||||
if lhs.numSessions != rhs.numSessions {return false}
|
||||
if lhs.sessions != rhs.sessions {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Wtclientrpc_ListTowersRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".ListTowersRequest"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "include_sessions"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularBoolField(value: &self.includeSessions)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.includeSessions != false {
|
||||
try visitor.visitSingularBoolField(value: self.includeSessions, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Wtclientrpc_ListTowersRequest, rhs: Wtclientrpc_ListTowersRequest) -> Bool {
|
||||
if lhs.includeSessions != rhs.includeSessions {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Wtclientrpc_ListTowersResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".ListTowersResponse"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "towers"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeRepeatedMessageField(value: &self.towers)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if !self.towers.isEmpty {
|
||||
try visitor.visitRepeatedMessageField(value: self.towers, fieldNumber: 1)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Wtclientrpc_ListTowersResponse, rhs: Wtclientrpc_ListTowersResponse) -> Bool {
|
||||
if lhs.towers != rhs.towers {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Wtclientrpc_StatsRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".StatsRequest"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Wtclientrpc_StatsRequest, rhs: Wtclientrpc_StatsRequest) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Wtclientrpc_StatsResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".StatsResponse"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "num_backups"),
|
||||
2: .standard(proto: "num_pending_backups"),
|
||||
3: .standard(proto: "num_failed_backups"),
|
||||
4: .standard(proto: "num_sessions_acquired"),
|
||||
5: .standard(proto: "num_sessions_exhausted"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularUInt32Field(value: &self.numBackups)
|
||||
case 2: try decoder.decodeSingularUInt32Field(value: &self.numPendingBackups)
|
||||
case 3: try decoder.decodeSingularUInt32Field(value: &self.numFailedBackups)
|
||||
case 4: try decoder.decodeSingularUInt32Field(value: &self.numSessionsAcquired)
|
||||
case 5: try decoder.decodeSingularUInt32Field(value: &self.numSessionsExhausted)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.numBackups != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.numBackups, fieldNumber: 1)
|
||||
}
|
||||
if self.numPendingBackups != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.numPendingBackups, fieldNumber: 2)
|
||||
}
|
||||
if self.numFailedBackups != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.numFailedBackups, fieldNumber: 3)
|
||||
}
|
||||
if self.numSessionsAcquired != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.numSessionsAcquired, fieldNumber: 4)
|
||||
}
|
||||
if self.numSessionsExhausted != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.numSessionsExhausted, fieldNumber: 5)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Wtclientrpc_StatsResponse, rhs: Wtclientrpc_StatsResponse) -> Bool {
|
||||
if lhs.numBackups != rhs.numBackups {return false}
|
||||
if lhs.numPendingBackups != rhs.numPendingBackups {return false}
|
||||
if lhs.numFailedBackups != rhs.numFailedBackups {return false}
|
||||
if lhs.numSessionsAcquired != rhs.numSessionsAcquired {return false}
|
||||
if lhs.numSessionsExhausted != rhs.numSessionsExhausted {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Wtclientrpc_PolicyRequest: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".PolicyRequest"
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap()
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let _ = try decoder.nextFieldNumber() {
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Wtclientrpc_PolicyRequest, rhs: Wtclientrpc_PolicyRequest) -> Bool {
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension Wtclientrpc_PolicyResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".PolicyResponse"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "max_updates"),
|
||||
2: .standard(proto: "sweep_sat_per_byte"),
|
||||
]
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
switch fieldNumber {
|
||||
case 1: try decoder.decodeSingularUInt32Field(value: &self.maxUpdates)
|
||||
case 2: try decoder.decodeSingularUInt32Field(value: &self.sweepSatPerByte)
|
||||
default: break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
|
||||
if self.maxUpdates != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.maxUpdates, fieldNumber: 1)
|
||||
}
|
||||
if self.sweepSatPerByte != 0 {
|
||||
try visitor.visitSingularUInt32Field(value: self.sweepSatPerByte, fieldNumber: 2)
|
||||
}
|
||||
try unknownFields.traverse(visitor: &visitor)
|
||||
}
|
||||
|
||||
static func ==(lhs: Wtclientrpc_PolicyResponse, rhs: Wtclientrpc_PolicyResponse) -> Bool {
|
||||
if lhs.maxUpdates != rhs.maxUpdates {return false}
|
||||
if lhs.sweepSatPerByte != rhs.sweepSatPerByte {return false}
|
||||
if lhs.unknownFields != rhs.unknownFields {return false}
|
||||
return true
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user