• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 13211764208

08 Feb 2025 03:08AM UTC coverage: 49.288% (-9.5%) from 58.815%
13211764208

Pull #9489

github

calvinrzachman
itest: verify switchrpc server enforces send then track

We prevent the rpc server from allowing onion dispatches for
attempt IDs which have already been tracked by rpc clients.

This helps protect the client from leaking a duplicate onion
attempt. NOTE: This is not the only method for solving this
issue! The issue could be addressed via careful client side
programming which accounts for the uncertainty and async
nature of dispatching onions to a remote process via RPC.
This would require some lnd ChannelRouter changes for how
we intend to use these RPCs though.
Pull Request #9489: multi: add BuildOnion, SendOnion, and TrackOnion RPCs

474 of 990 new or added lines in 11 files covered. (47.88%)

27321 existing lines in 435 files now uncovered.

101192 of 205306 relevant lines covered (49.29%)

1.54 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

23.06
/lnrpc/switchrpc/switch.pb.go
1
// Code generated by protoc-gen-go. DO NOT EDIT.
2
// versions:
3
//         protoc-gen-go v1.33.0
4
//         protoc        v3.21.12
5
// source: switchrpc/switch.proto
6

7
package switchrpc
8

9
import (
10
        lnrpc "github.com/lightningnetwork/lnd/lnrpc"
11
        protoreflect "google.golang.org/protobuf/reflect/protoreflect"
12
        protoimpl "google.golang.org/protobuf/runtime/protoimpl"
13
        reflect "reflect"
14
        sync "sync"
15
)
16

17
const (
18
        // Verify that this generated code is sufficiently up-to-date.
19
        _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
20
        // Verify that runtime/protoimpl is sufficiently up-to-date.
21
        _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
22
)
23

24
type ErrorCode int32
25

26
const (
27
        ErrorCode_ERROR_CODE_UNSPECIFIED                ErrorCode = 0 // Default value for unset errors.
28
        ErrorCode_ERROR_CODE_PAYMENT_ID_NOT_FOUND       ErrorCode = 1 // Payment ID was not found.
29
        ErrorCode_ERROR_CODE_FORWARDING_ERROR           ErrorCode = 2 // Error occurred during forwarding.
30
        ErrorCode_ERROR_CODE_CLEAR_TEXT_ERROR           ErrorCode = 3 // Clear text error.
31
        ErrorCode_ERROR_CODE_UNREADABLE_FAILURE_MESSAGE ErrorCode = 4 // Failure message could not be read.
32
        ErrorCode_ERROR_CODE_DUPLICATE_HTLC             ErrorCode = 5 // HTLC with same ID currently in flight.
33
        ErrorCode_ERROR_CODE_NO_LINK                    ErrorCode = 6 // No link available for payment.
34
        ErrorCode_ERROR_CODE_SWITCH_EXITING             ErrorCode = 7 // HTLC switch is exiting.
35
        ErrorCode_ERROR_CODE_INTERNAL                   ErrorCode = 8 // Opaque internal server error.
36
)
37

38
// Enum value maps for ErrorCode.
39
var (
40
        ErrorCode_name = map[int32]string{
41
                0: "ERROR_CODE_UNSPECIFIED",
42
                1: "ERROR_CODE_PAYMENT_ID_NOT_FOUND",
43
                2: "ERROR_CODE_FORWARDING_ERROR",
44
                3: "ERROR_CODE_CLEAR_TEXT_ERROR",
45
                4: "ERROR_CODE_UNREADABLE_FAILURE_MESSAGE",
46
                5: "ERROR_CODE_DUPLICATE_HTLC",
47
                6: "ERROR_CODE_NO_LINK",
48
                7: "ERROR_CODE_SWITCH_EXITING",
49
                8: "ERROR_CODE_INTERNAL",
50
        }
51
        ErrorCode_value = map[string]int32{
52
                "ERROR_CODE_UNSPECIFIED":                0,
53
                "ERROR_CODE_PAYMENT_ID_NOT_FOUND":       1,
54
                "ERROR_CODE_FORWARDING_ERROR":           2,
55
                "ERROR_CODE_CLEAR_TEXT_ERROR":           3,
56
                "ERROR_CODE_UNREADABLE_FAILURE_MESSAGE": 4,
57
                "ERROR_CODE_DUPLICATE_HTLC":             5,
58
                "ERROR_CODE_NO_LINK":                    6,
59
                "ERROR_CODE_SWITCH_EXITING":             7,
60
                "ERROR_CODE_INTERNAL":                   8,
61
        }
62
)
63

NEW
64
func (x ErrorCode) Enum() *ErrorCode {
×
NEW
65
        p := new(ErrorCode)
×
NEW
66
        *p = x
×
NEW
67
        return p
×
NEW
68
}
×
69

NEW
70
func (x ErrorCode) String() string {
×
NEW
71
        return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
×
NEW
72
}
×
73

NEW
74
func (ErrorCode) Descriptor() protoreflect.EnumDescriptor {
×
NEW
75
        return file_switchrpc_switch_proto_enumTypes[0].Descriptor()
×
NEW
76
}
×
77

NEW
78
func (ErrorCode) Type() protoreflect.EnumType {
×
NEW
79
        return &file_switchrpc_switch_proto_enumTypes[0]
×
NEW
80
}
×
81

NEW
82
func (x ErrorCode) Number() protoreflect.EnumNumber {
×
NEW
83
        return protoreflect.EnumNumber(x)
×
NEW
84
}
×
85

86
// Deprecated: Use ErrorCode.Descriptor instead.
NEW
87
func (ErrorCode) EnumDescriptor() ([]byte, []int) {
×
NEW
88
        return file_switchrpc_switch_proto_rawDescGZIP(), []int{0}
×
NEW
89
}
×
90

91
type SendOnionRequest struct {
92
        state         protoimpl.MessageState
93
        sizeCache     protoimpl.SizeCache
94
        unknownFields protoimpl.UnknownFields
95

96
        // The raw onion packet to be sent across the network.
97
        OnionBlob []byte `protobuf:"bytes,1,opt,name=onion_blob,json=onionBlob,proto3" json:"onion_blob,omitempty"`
98
        // The first hop's public key where the onion will be sent.
99
        FirstHopPubkey []byte `protobuf:"bytes,2,opt,name=first_hop_pubkey,json=firstHopPubkey,proto3" json:"first_hop_pubkey,omitempty"`
100
        // The total amount in millisatoshis required to complete a payment over
101
        // this route. This value includes the cumulative fees at each hop. The HTLC
102
        // extended to the first-hop in the route will need to have at least this
103
        // many (milli)satoshis.
104
        Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
105
        // The absolute timelock or CLTV value that should be extended to the first
106
        // hop in the route. All other hops will decrement the time-lock as
107
        // described by the onion.
108
        Timelock uint32 `protobuf:"varint,4,opt,name=timelock,proto3" json:"timelock,omitempty"`
109
        // The payment hash associated with the HTLC. This is needed for tracking
110
        // and debugging purposes.
111
        PaymentHash []byte `protobuf:"bytes,5,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
112
        // The attempt ID uniquely identifying this payment attempt. The caller can
113
        // expect to track results for the payment via this attempt ID.
114
        AttemptId uint64 `protobuf:"varint,6,opt,name=attempt_id,json=attemptId,proto3" json:"attempt_id,omitempty"`
115
}
116

117
func (x *SendOnionRequest) Reset() {
3✔
118
        *x = SendOnionRequest{}
3✔
119
        if protoimpl.UnsafeEnabled {
6✔
120
                mi := &file_switchrpc_switch_proto_msgTypes[0]
3✔
121
                ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
3✔
122
                ms.StoreMessageInfo(mi)
3✔
123
        }
3✔
124
}
125

NEW
126
func (x *SendOnionRequest) String() string {
×
NEW
127
        return protoimpl.X.MessageStringOf(x)
×
NEW
128
}
×
129

NEW
130
func (*SendOnionRequest) ProtoMessage() {}
×
131

132
func (x *SendOnionRequest) ProtoReflect() protoreflect.Message {
3✔
133
        mi := &file_switchrpc_switch_proto_msgTypes[0]
3✔
134
        if protoimpl.UnsafeEnabled && x != nil {
6✔
135
                ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
3✔
136
                if ms.LoadMessageInfo() == nil {
3✔
NEW
137
                        ms.StoreMessageInfo(mi)
×
NEW
138
                }
×
139
                return ms
3✔
140
        }
NEW
141
        return mi.MessageOf(x)
×
142
}
143

144
// Deprecated: Use SendOnionRequest.ProtoReflect.Descriptor instead.
NEW
145
func (*SendOnionRequest) Descriptor() ([]byte, []int) {
×
NEW
146
        return file_switchrpc_switch_proto_rawDescGZIP(), []int{0}
×
NEW
147
}
×
148

NEW
149
func (x *SendOnionRequest) GetOnionBlob() []byte {
×
NEW
150
        if x != nil {
×
NEW
151
                return x.OnionBlob
×
NEW
152
        }
×
NEW
153
        return nil
×
154
}
155

NEW
156
func (x *SendOnionRequest) GetFirstHopPubkey() []byte {
×
NEW
157
        if x != nil {
×
NEW
158
                return x.FirstHopPubkey
×
NEW
159
        }
×
NEW
160
        return nil
×
161
}
162

NEW
163
func (x *SendOnionRequest) GetAmount() int64 {
×
NEW
164
        if x != nil {
×
NEW
165
                return x.Amount
×
NEW
166
        }
×
NEW
167
        return 0
×
168
}
169

NEW
170
func (x *SendOnionRequest) GetTimelock() uint32 {
×
NEW
171
        if x != nil {
×
NEW
172
                return x.Timelock
×
NEW
173
        }
×
NEW
174
        return 0
×
175
}
176

NEW
177
func (x *SendOnionRequest) GetPaymentHash() []byte {
×
NEW
178
        if x != nil {
×
NEW
179
                return x.PaymentHash
×
NEW
180
        }
×
NEW
181
        return nil
×
182
}
183

NEW
184
func (x *SendOnionRequest) GetAttemptId() uint64 {
×
NEW
185
        if x != nil {
×
NEW
186
                return x.AttemptId
×
NEW
187
        }
×
NEW
188
        return 0
×
189
}
190

191
type SendOnionResponse struct {
192
        state         protoimpl.MessageState
193
        sizeCache     protoimpl.SizeCache
194
        unknownFields protoimpl.UnknownFields
195

196
        // Indicates if the onion was successfully sent or not.
197
        Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
198
        // In case of failure, this field will provide more information about the
199
        // error.
200
        ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
201
        // A code representing the type of error that occurred. This can be used
202
        // to programmatically distinguish between different kinds of errors.
203
        ErrorCode ErrorCode `protobuf:"varint,3,opt,name=error_code,json=errorCode,proto3,enum=switchrpc.ErrorCode" json:"error_code,omitempty"`
204
}
205

NEW
206
func (x *SendOnionResponse) Reset() {
×
NEW
207
        *x = SendOnionResponse{}
×
NEW
208
        if protoimpl.UnsafeEnabled {
×
NEW
209
                mi := &file_switchrpc_switch_proto_msgTypes[1]
×
NEW
210
                ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
×
NEW
211
                ms.StoreMessageInfo(mi)
×
NEW
212
        }
×
213
}
214

NEW
215
func (x *SendOnionResponse) String() string {
×
NEW
216
        return protoimpl.X.MessageStringOf(x)
×
NEW
217
}
×
218

NEW
219
func (*SendOnionResponse) ProtoMessage() {}
×
220

221
func (x *SendOnionResponse) ProtoReflect() protoreflect.Message {
3✔
222
        mi := &file_switchrpc_switch_proto_msgTypes[1]
3✔
223
        if protoimpl.UnsafeEnabled && x != nil {
6✔
224
                ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
3✔
225
                if ms.LoadMessageInfo() == nil {
6✔
226
                        ms.StoreMessageInfo(mi)
3✔
227
                }
3✔
228
                return ms
3✔
229
        }
NEW
230
        return mi.MessageOf(x)
×
231
}
232

233
// Deprecated: Use SendOnionResponse.ProtoReflect.Descriptor instead.
NEW
234
func (*SendOnionResponse) Descriptor() ([]byte, []int) {
×
NEW
235
        return file_switchrpc_switch_proto_rawDescGZIP(), []int{1}
×
NEW
236
}
×
237

NEW
238
func (x *SendOnionResponse) GetSuccess() bool {
×
NEW
239
        if x != nil {
×
NEW
240
                return x.Success
×
NEW
241
        }
×
NEW
242
        return false
×
243
}
244

NEW
245
func (x *SendOnionResponse) GetErrorMessage() string {
×
NEW
246
        if x != nil {
×
NEW
247
                return x.ErrorMessage
×
NEW
248
        }
×
NEW
249
        return ""
×
250
}
251

NEW
252
func (x *SendOnionResponse) GetErrorCode() ErrorCode {
×
NEW
253
        if x != nil {
×
NEW
254
                return x.ErrorCode
×
NEW
255
        }
×
NEW
256
        return ErrorCode_ERROR_CODE_UNSPECIFIED
×
257
}
258

259
type TrackOnionRequest struct {
260
        state         protoimpl.MessageState
261
        sizeCache     protoimpl.SizeCache
262
        unknownFields protoimpl.UnknownFields
263

264
        // The payment hash associated with the HTLC. This is needed for tracking
265
        // and debugging purposes.
266
        PaymentHash []byte `protobuf:"bytes,1,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
267
        // The attempt ID uniquely identifying this payment attempt. The caller can
268
        // expect to track results for the payment via this attempt ID.
269
        AttemptId uint64 `protobuf:"varint,2,opt,name=attempt_id,json=attemptId,proto3" json:"attempt_id,omitempty"`
270
        // Optional: Session key used to generate the onion/sphinx packet.
271
        SessionKey []byte `protobuf:"bytes,3,opt,name=session_key,json=sessionKey,proto3" json:"session_key,omitempty"`
272
        // Optional: Public keys of nodes along the route, used with session_key.
273
        HopPubkeys [][]byte `protobuf:"bytes,4,rep,name=hop_pubkeys,json=hopPubkeys,proto3" json:"hop_pubkeys,omitempty"`
274
        // Optional: list of shared secrets for deobfuscating errors server side.
275
        // If not included, then it will be the caller's responsibility to decrypt
276
        // any errors from the SendOnion attempt.
277
        SharedSecrets [][]byte `protobuf:"bytes,5,rep,name=shared_secrets,json=sharedSecrets,proto3" json:"shared_secrets,omitempty"`
278
}
279

280
func (x *TrackOnionRequest) Reset() {
3✔
281
        *x = TrackOnionRequest{}
3✔
282
        if protoimpl.UnsafeEnabled {
6✔
283
                mi := &file_switchrpc_switch_proto_msgTypes[2]
3✔
284
                ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
3✔
285
                ms.StoreMessageInfo(mi)
3✔
286
        }
3✔
287
}
288

NEW
289
func (x *TrackOnionRequest) String() string {
×
NEW
290
        return protoimpl.X.MessageStringOf(x)
×
NEW
291
}
×
292

NEW
293
func (*TrackOnionRequest) ProtoMessage() {}
×
294

295
func (x *TrackOnionRequest) ProtoReflect() protoreflect.Message {
3✔
296
        mi := &file_switchrpc_switch_proto_msgTypes[2]
3✔
297
        if protoimpl.UnsafeEnabled && x != nil {
6✔
298
                ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
3✔
299
                if ms.LoadMessageInfo() == nil {
3✔
NEW
300
                        ms.StoreMessageInfo(mi)
×
NEW
301
                }
×
302
                return ms
3✔
303
        }
NEW
304
        return mi.MessageOf(x)
×
305
}
306

307
// Deprecated: Use TrackOnionRequest.ProtoReflect.Descriptor instead.
NEW
308
func (*TrackOnionRequest) Descriptor() ([]byte, []int) {
×
NEW
309
        return file_switchrpc_switch_proto_rawDescGZIP(), []int{2}
×
NEW
310
}
×
311

NEW
312
func (x *TrackOnionRequest) GetPaymentHash() []byte {
×
NEW
313
        if x != nil {
×
NEW
314
                return x.PaymentHash
×
NEW
315
        }
×
NEW
316
        return nil
×
317
}
318

NEW
319
func (x *TrackOnionRequest) GetAttemptId() uint64 {
×
NEW
320
        if x != nil {
×
NEW
321
                return x.AttemptId
×
NEW
322
        }
×
NEW
323
        return 0
×
324
}
325

NEW
326
func (x *TrackOnionRequest) GetSessionKey() []byte {
×
NEW
327
        if x != nil {
×
NEW
328
                return x.SessionKey
×
NEW
329
        }
×
NEW
330
        return nil
×
331
}
332

NEW
333
func (x *TrackOnionRequest) GetHopPubkeys() [][]byte {
×
NEW
334
        if x != nil {
×
NEW
335
                return x.HopPubkeys
×
NEW
336
        }
×
NEW
337
        return nil
×
338
}
339

NEW
340
func (x *TrackOnionRequest) GetSharedSecrets() [][]byte {
×
NEW
341
        if x != nil {
×
NEW
342
                return x.SharedSecrets
×
NEW
343
        }
×
NEW
344
        return nil
×
345
}
346

347
type TrackOnionResponse struct {
348
        state         protoimpl.MessageState
349
        sizeCache     protoimpl.SizeCache
350
        unknownFields protoimpl.UnknownFields
351

352
        // Indicates if the onion was successfully sent or not.
353
        Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
354
        // The preimage obtained by making the payment.
355
        Preimage []byte `protobuf:"bytes,2,opt,name=preimage,proto3" json:"preimage,omitempty"`
356
        // In case of failure, this field will provide more information about the
357
        // error.
358
        ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
359
        // A code representing the type of error that occurred. This can be used
360
        // to programmatically distinguish between different kinds of errors.
361
        ErrorCode ErrorCode `protobuf:"varint,4,opt,name=error_code,json=errorCode,proto3,enum=switchrpc.ErrorCode" json:"error_code,omitempty"`
362
        // If the caller provides no means to decrypt the error then we'll defer
363
        // error decryption on the server and return the encrypted error blob.
364
        EncryptedError []byte `protobuf:"bytes,5,opt,name=encrypted_error,json=encryptedError,proto3" json:"encrypted_error,omitempty"`
365
}
366

NEW
367
func (x *TrackOnionResponse) Reset() {
×
NEW
368
        *x = TrackOnionResponse{}
×
NEW
369
        if protoimpl.UnsafeEnabled {
×
NEW
370
                mi := &file_switchrpc_switch_proto_msgTypes[3]
×
NEW
371
                ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
×
NEW
372
                ms.StoreMessageInfo(mi)
×
NEW
373
        }
×
374
}
375

NEW
376
func (x *TrackOnionResponse) String() string {
×
NEW
377
        return protoimpl.X.MessageStringOf(x)
×
NEW
378
}
×
379

NEW
380
func (*TrackOnionResponse) ProtoMessage() {}
×
381

382
func (x *TrackOnionResponse) ProtoReflect() protoreflect.Message {
3✔
383
        mi := &file_switchrpc_switch_proto_msgTypes[3]
3✔
384
        if protoimpl.UnsafeEnabled && x != nil {
6✔
385
                ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
3✔
386
                if ms.LoadMessageInfo() == nil {
6✔
387
                        ms.StoreMessageInfo(mi)
3✔
388
                }
3✔
389
                return ms
3✔
390
        }
NEW
391
        return mi.MessageOf(x)
×
392
}
393

394
// Deprecated: Use TrackOnionResponse.ProtoReflect.Descriptor instead.
NEW
395
func (*TrackOnionResponse) Descriptor() ([]byte, []int) {
×
NEW
396
        return file_switchrpc_switch_proto_rawDescGZIP(), []int{3}
×
NEW
397
}
×
398

NEW
399
func (x *TrackOnionResponse) GetSuccess() bool {
×
NEW
400
        if x != nil {
×
NEW
401
                return x.Success
×
NEW
402
        }
×
NEW
403
        return false
×
404
}
405

NEW
406
func (x *TrackOnionResponse) GetPreimage() []byte {
×
NEW
407
        if x != nil {
×
NEW
408
                return x.Preimage
×
NEW
409
        }
×
NEW
410
        return nil
×
411
}
412

NEW
413
func (x *TrackOnionResponse) GetErrorMessage() string {
×
NEW
414
        if x != nil {
×
NEW
415
                return x.ErrorMessage
×
NEW
416
        }
×
NEW
417
        return ""
×
418
}
419

NEW
420
func (x *TrackOnionResponse) GetErrorCode() ErrorCode {
×
NEW
421
        if x != nil {
×
NEW
422
                return x.ErrorCode
×
NEW
423
        }
×
NEW
424
        return ErrorCode_ERROR_CODE_UNSPECIFIED
×
425
}
426

NEW
427
func (x *TrackOnionResponse) GetEncryptedError() []byte {
×
NEW
428
        if x != nil {
×
NEW
429
                return x.EncryptedError
×
NEW
430
        }
×
NEW
431
        return nil
×
432
}
433

434
// BuildOnionRequest includes the necessary information to construct a Sphinx
435
// onion packet.
436
type BuildOnionRequest struct {
437
        state         protoimpl.MessageState
438
        sizeCache     protoimpl.SizeCache
439
        unknownFields protoimpl.UnknownFields
440

441
        // The route for which the onion packet should be built.
442
        Route *lnrpc.Route `protobuf:"bytes,1,opt,name=route,proto3" json:"route,omitempty"`
443
        // The payment hash associated with the HTLC.
444
        PaymentHash []byte `protobuf:"bytes,2,opt,name=payment_hash,json=paymentHash,proto3" json:"payment_hash,omitempty"`
445
        // A session key for onion packet construction, if not provided, a new one
446
        // will be generated.
447
        SessionKey []byte `protobuf:"bytes,3,opt,name=session_key,json=sessionKey,proto3" json:"session_key,omitempty"`
448
}
449

450
func (x *BuildOnionRequest) Reset() {
3✔
451
        *x = BuildOnionRequest{}
3✔
452
        if protoimpl.UnsafeEnabled {
6✔
453
                mi := &file_switchrpc_switch_proto_msgTypes[4]
3✔
454
                ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
3✔
455
                ms.StoreMessageInfo(mi)
3✔
456
        }
3✔
457
}
458

NEW
459
func (x *BuildOnionRequest) String() string {
×
NEW
460
        return protoimpl.X.MessageStringOf(x)
×
NEW
461
}
×
462

NEW
463
func (*BuildOnionRequest) ProtoMessage() {}
×
464

465
func (x *BuildOnionRequest) ProtoReflect() protoreflect.Message {
3✔
466
        mi := &file_switchrpc_switch_proto_msgTypes[4]
3✔
467
        if protoimpl.UnsafeEnabled && x != nil {
6✔
468
                ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
3✔
469
                if ms.LoadMessageInfo() == nil {
3✔
NEW
470
                        ms.StoreMessageInfo(mi)
×
NEW
471
                }
×
472
                return ms
3✔
473
        }
NEW
474
        return mi.MessageOf(x)
×
475
}
476

477
// Deprecated: Use BuildOnionRequest.ProtoReflect.Descriptor instead.
NEW
478
func (*BuildOnionRequest) Descriptor() ([]byte, []int) {
×
NEW
479
        return file_switchrpc_switch_proto_rawDescGZIP(), []int{4}
×
NEW
480
}
×
481

NEW
482
func (x *BuildOnionRequest) GetRoute() *lnrpc.Route {
×
NEW
483
        if x != nil {
×
NEW
484
                return x.Route
×
NEW
485
        }
×
NEW
486
        return nil
×
487
}
488

NEW
489
func (x *BuildOnionRequest) GetPaymentHash() []byte {
×
NEW
490
        if x != nil {
×
NEW
491
                return x.PaymentHash
×
NEW
492
        }
×
NEW
493
        return nil
×
494
}
495

NEW
496
func (x *BuildOnionRequest) GetSessionKey() []byte {
×
NEW
497
        if x != nil {
×
NEW
498
                return x.SessionKey
×
NEW
499
        }
×
NEW
500
        return nil
×
501
}
502

503
// BuildOnionResponse contains the constructed onion packet.
504
type BuildOnionResponse struct {
505
        state         protoimpl.MessageState
506
        sizeCache     protoimpl.SizeCache
507
        unknownFields protoimpl.UnknownFields
508

509
        // The constructed onion packet in bytes.
510
        OnionBlob []byte `protobuf:"bytes,1,opt,name=onion_blob,json=onionBlob,proto3" json:"onion_blob,omitempty"`
511
        // The session key used for building the onion packet.
512
        SessionKey []byte `protobuf:"bytes,2,opt,name=session_key,json=sessionKey,proto3" json:"session_key,omitempty"`
513
        // The serialized public keys of all nodes along the route for the
514
        // constructed onion.
515
        HopPubkeys [][]byte `protobuf:"bytes,3,rep,name=hop_pubkeys,json=hopPubkeys,proto3" json:"hop_pubkeys,omitempty"`
516
}
517

NEW
518
func (x *BuildOnionResponse) Reset() {
×
NEW
519
        *x = BuildOnionResponse{}
×
NEW
520
        if protoimpl.UnsafeEnabled {
×
NEW
521
                mi := &file_switchrpc_switch_proto_msgTypes[5]
×
NEW
522
                ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
×
NEW
523
                ms.StoreMessageInfo(mi)
×
NEW
524
        }
×
525
}
526

NEW
527
func (x *BuildOnionResponse) String() string {
×
NEW
528
        return protoimpl.X.MessageStringOf(x)
×
NEW
529
}
×
530

NEW
531
func (*BuildOnionResponse) ProtoMessage() {}
×
532

533
func (x *BuildOnionResponse) ProtoReflect() protoreflect.Message {
3✔
534
        mi := &file_switchrpc_switch_proto_msgTypes[5]
3✔
535
        if protoimpl.UnsafeEnabled && x != nil {
6✔
536
                ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
3✔
537
                if ms.LoadMessageInfo() == nil {
6✔
538
                        ms.StoreMessageInfo(mi)
3✔
539
                }
3✔
540
                return ms
3✔
541
        }
NEW
542
        return mi.MessageOf(x)
×
543
}
544

545
// Deprecated: Use BuildOnionResponse.ProtoReflect.Descriptor instead.
NEW
546
func (*BuildOnionResponse) Descriptor() ([]byte, []int) {
×
NEW
547
        return file_switchrpc_switch_proto_rawDescGZIP(), []int{5}
×
NEW
548
}
×
549

NEW
550
func (x *BuildOnionResponse) GetOnionBlob() []byte {
×
NEW
551
        if x != nil {
×
NEW
552
                return x.OnionBlob
×
NEW
553
        }
×
NEW
554
        return nil
×
555
}
556

NEW
557
func (x *BuildOnionResponse) GetSessionKey() []byte {
×
NEW
558
        if x != nil {
×
NEW
559
                return x.SessionKey
×
NEW
560
        }
×
NEW
561
        return nil
×
562
}
563

NEW
564
func (x *BuildOnionResponse) GetHopPubkeys() [][]byte {
×
NEW
565
        if x != nil {
×
NEW
566
                return x.HopPubkeys
×
NEW
567
        }
×
NEW
568
        return nil
×
569
}
570

571
var File_switchrpc_switch_proto protoreflect.FileDescriptor
572

573
var file_switchrpc_switch_proto_rawDesc = []byte{
574
        0x0a, 0x16, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x77, 0x69, 0x74,
575
        0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68,
576
        0x72, 0x70, 0x63, 0x1a, 0x0f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70,
577
        0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x01, 0x0a, 0x10, 0x53, 0x65, 0x6e, 0x64, 0x4f, 0x6e, 0x69,
578
        0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x6e, 0x69,
579
        0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6f,
580
        0x6e, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x28, 0x0a, 0x10, 0x66, 0x69, 0x72, 0x73,
581
        0x74, 0x5f, 0x68, 0x6f, 0x70, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01,
582
        0x28, 0x0c, 0x52, 0x0e, 0x66, 0x69, 0x72, 0x73, 0x74, 0x48, 0x6f, 0x70, 0x50, 0x75, 0x62, 0x6b,
583
        0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01,
584
        0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x69,
585
        0x6d, 0x65, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x74, 0x69,
586
        0x6d, 0x65, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e,
587
        0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x61,
588
        0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x74, 0x74,
589
        0x65, 0x6d, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x61,
590
        0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x49, 0x64, 0x22, 0x87, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x6e,
591
        0x64, 0x4f, 0x6e, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18,
592
        0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
593
        0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f,
594
        0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
595
        0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a,
596
        0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
597
        0x0e, 0x32, 0x14, 0x2e, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72,
598
        0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f,
599
        0x64, 0x65, 0x22, 0xbe, 0x01, 0x0a, 0x11, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x4f, 0x6e, 0x69, 0x6f,
600
        0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d,
601
        0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b,
602
        0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x61,
603
        0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52,
604
        0x09, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65,
605
        0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52,
606
        0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x68,
607
        0x6f, 0x70, 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c,
608
        0x52, 0x0a, 0x68, 0x6f, 0x70, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x25, 0x0a, 0x0e,
609
        0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x05,
610
        0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72,
611
        0x65, 0x74, 0x73, 0x22, 0xcd, 0x01, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x4f, 0x6e, 0x69,
612
        0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75,
613
        0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63,
614
        0x63, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65,
615
        0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x70, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65,
616
        0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
617
        0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65,
618
        0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x33, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63,
619
        0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x73, 0x77, 0x69, 0x74,
620
        0x63, 0x68, 0x72, 0x70, 0x63, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x52,
621
        0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x6e,
622
        0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20,
623
        0x01, 0x28, 0x0c, 0x52, 0x0e, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x45, 0x72,
624
        0x72, 0x6f, 0x72, 0x22, 0x7b, 0x0a, 0x11, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4f, 0x6e, 0x69, 0x6f,
625
        0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x05, 0x72, 0x6f, 0x75, 0x74,
626
        0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x6c, 0x6e, 0x72, 0x70, 0x63, 0x2e,
627
        0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x21, 0x0a, 0x0c,
628
        0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01,
629
        0x28, 0x0c, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12,
630
        0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03,
631
        0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79,
632
        0x22, 0x75, 0x0a, 0x12, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4f, 0x6e, 0x69, 0x6f, 0x6e, 0x52, 0x65,
633
        0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x6e, 0x69, 0x6f, 0x6e, 0x5f,
634
        0x62, 0x6c, 0x6f, 0x62, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x6f, 0x6e, 0x69, 0x6f,
635
        0x6e, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
636
        0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x73, 0x65, 0x73, 0x73,
637
        0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x6f, 0x70, 0x5f, 0x70, 0x75,
638
        0x62, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x68, 0x6f, 0x70,
639
        0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x73, 0x2a, 0xa8, 0x02, 0x0a, 0x09, 0x45, 0x72, 0x72, 0x6f,
640
        0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43,
641
        0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
642
        0x00, 0x12, 0x23, 0x0a, 0x1f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f,
643
        0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x49, 0x44, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46,
644
        0x4f, 0x55, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f,
645
        0x43, 0x4f, 0x44, 0x45, 0x5f, 0x46, 0x4f, 0x52, 0x57, 0x41, 0x52, 0x44, 0x49, 0x4e, 0x47, 0x5f,
646
        0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x52, 0x52, 0x4f, 0x52,
647
        0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x43, 0x4c, 0x45, 0x41, 0x52, 0x5f, 0x54, 0x45, 0x58, 0x54,
648
        0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x29, 0x0a, 0x25, 0x45, 0x52, 0x52, 0x4f,
649
        0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x52, 0x45, 0x41, 0x44, 0x41, 0x42, 0x4c,
650
        0x45, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47,
651
        0x45, 0x10, 0x04, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44,
652
        0x45, 0x5f, 0x44, 0x55, 0x50, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x45, 0x5f, 0x48, 0x54, 0x4c, 0x43,
653
        0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45,
654
        0x5f, 0x4e, 0x4f, 0x5f, 0x4c, 0x49, 0x4e, 0x4b, 0x10, 0x06, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x52,
655
        0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x57, 0x49, 0x54, 0x43, 0x48, 0x5f,
656
        0x45, 0x58, 0x49, 0x54, 0x49, 0x4e, 0x47, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, 0x45, 0x52, 0x52,
657
        0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4e, 0x41, 0x4c,
658
        0x10, 0x08, 0x32, 0xe6, 0x01, 0x0a, 0x06, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x12, 0x46, 0x0a,
659
        0x09, 0x53, 0x65, 0x6e, 0x64, 0x4f, 0x6e, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x2e, 0x73, 0x77, 0x69,
660
        0x74, 0x63, 0x68, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4f, 0x6e, 0x69, 0x6f, 0x6e,
661
        0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68,
662
        0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x4f, 0x6e, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73,
663
        0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x4f, 0x6e,
664
        0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x2e, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x72, 0x70, 0x63, 0x2e,
665
        0x54, 0x72, 0x61, 0x63, 0x6b, 0x4f, 0x6e, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
666
        0x74, 0x1a, 0x1d, 0x2e, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x72,
667
        0x61, 0x63, 0x6b, 0x4f, 0x6e, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
668
        0x12, 0x49, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4f, 0x6e, 0x69, 0x6f, 0x6e, 0x12, 0x1c,
669
        0x2e, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64,
670
        0x4f, 0x6e, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x73,
671
        0x77, 0x69, 0x74, 0x63, 0x68, 0x72, 0x70, 0x63, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4f, 0x6e,
672
        0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x31, 0x5a, 0x2f, 0x67,
673
        0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e,
674
        0x69, 0x6e, 0x67, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x6c, 0x6e, 0x64, 0x2f, 0x6c,
675
        0x6e, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x72, 0x70, 0x63, 0x62, 0x06,
676
        0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
677
}
678

679
var (
680
        file_switchrpc_switch_proto_rawDescOnce sync.Once
681
        file_switchrpc_switch_proto_rawDescData = file_switchrpc_switch_proto_rawDesc
682
)
683

NEW
684
func file_switchrpc_switch_proto_rawDescGZIP() []byte {
×
NEW
685
        file_switchrpc_switch_proto_rawDescOnce.Do(func() {
×
NEW
686
                file_switchrpc_switch_proto_rawDescData = protoimpl.X.CompressGZIP(file_switchrpc_switch_proto_rawDescData)
×
NEW
687
        })
×
NEW
688
        return file_switchrpc_switch_proto_rawDescData
×
689
}
690

691
var file_switchrpc_switch_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
692
var file_switchrpc_switch_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
693
var file_switchrpc_switch_proto_goTypes = []interface{}{
694
        (ErrorCode)(0),             // 0: switchrpc.ErrorCode
695
        (*SendOnionRequest)(nil),   // 1: switchrpc.SendOnionRequest
696
        (*SendOnionResponse)(nil),  // 2: switchrpc.SendOnionResponse
697
        (*TrackOnionRequest)(nil),  // 3: switchrpc.TrackOnionRequest
698
        (*TrackOnionResponse)(nil), // 4: switchrpc.TrackOnionResponse
699
        (*BuildOnionRequest)(nil),  // 5: switchrpc.BuildOnionRequest
700
        (*BuildOnionResponse)(nil), // 6: switchrpc.BuildOnionResponse
701
        (*lnrpc.Route)(nil),        // 7: lnrpc.Route
702
}
703
var file_switchrpc_switch_proto_depIdxs = []int32{
704
        0, // 0: switchrpc.SendOnionResponse.error_code:type_name -> switchrpc.ErrorCode
705
        0, // 1: switchrpc.TrackOnionResponse.error_code:type_name -> switchrpc.ErrorCode
706
        7, // 2: switchrpc.BuildOnionRequest.route:type_name -> lnrpc.Route
707
        1, // 3: switchrpc.Switch.SendOnion:input_type -> switchrpc.SendOnionRequest
708
        3, // 4: switchrpc.Switch.TrackOnion:input_type -> switchrpc.TrackOnionRequest
709
        5, // 5: switchrpc.Switch.BuildOnion:input_type -> switchrpc.BuildOnionRequest
710
        2, // 6: switchrpc.Switch.SendOnion:output_type -> switchrpc.SendOnionResponse
711
        4, // 7: switchrpc.Switch.TrackOnion:output_type -> switchrpc.TrackOnionResponse
712
        6, // 8: switchrpc.Switch.BuildOnion:output_type -> switchrpc.BuildOnionResponse
713
        6, // [6:9] is the sub-list for method output_type
714
        3, // [3:6] is the sub-list for method input_type
715
        3, // [3:3] is the sub-list for extension type_name
716
        3, // [3:3] is the sub-list for extension extendee
717
        0, // [0:3] is the sub-list for field type_name
718
}
719

720
func init() { file_switchrpc_switch_proto_init() }
3✔
721
func file_switchrpc_switch_proto_init() {
3✔
722
        if File_switchrpc_switch_proto != nil {
3✔
NEW
723
                return
×
NEW
724
        }
×
725
        if !protoimpl.UnsafeEnabled {
3✔
NEW
726
                file_switchrpc_switch_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
×
NEW
727
                        switch v := v.(*SendOnionRequest); i {
×
NEW
728
                        case 0:
×
NEW
729
                                return &v.state
×
NEW
730
                        case 1:
×
NEW
731
                                return &v.sizeCache
×
NEW
732
                        case 2:
×
NEW
733
                                return &v.unknownFields
×
NEW
734
                        default:
×
NEW
735
                                return nil
×
736
                        }
737
                }
NEW
738
                file_switchrpc_switch_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
×
NEW
739
                        switch v := v.(*SendOnionResponse); i {
×
NEW
740
                        case 0:
×
NEW
741
                                return &v.state
×
NEW
742
                        case 1:
×
NEW
743
                                return &v.sizeCache
×
NEW
744
                        case 2:
×
NEW
745
                                return &v.unknownFields
×
NEW
746
                        default:
×
NEW
747
                                return nil
×
748
                        }
749
                }
NEW
750
                file_switchrpc_switch_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
×
NEW
751
                        switch v := v.(*TrackOnionRequest); i {
×
NEW
752
                        case 0:
×
NEW
753
                                return &v.state
×
NEW
754
                        case 1:
×
NEW
755
                                return &v.sizeCache
×
NEW
756
                        case 2:
×
NEW
757
                                return &v.unknownFields
×
NEW
758
                        default:
×
NEW
759
                                return nil
×
760
                        }
761
                }
NEW
762
                file_switchrpc_switch_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
×
NEW
763
                        switch v := v.(*TrackOnionResponse); i {
×
NEW
764
                        case 0:
×
NEW
765
                                return &v.state
×
NEW
766
                        case 1:
×
NEW
767
                                return &v.sizeCache
×
NEW
768
                        case 2:
×
NEW
769
                                return &v.unknownFields
×
NEW
770
                        default:
×
NEW
771
                                return nil
×
772
                        }
773
                }
NEW
774
                file_switchrpc_switch_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
×
NEW
775
                        switch v := v.(*BuildOnionRequest); i {
×
NEW
776
                        case 0:
×
NEW
777
                                return &v.state
×
NEW
778
                        case 1:
×
NEW
779
                                return &v.sizeCache
×
NEW
780
                        case 2:
×
NEW
781
                                return &v.unknownFields
×
NEW
782
                        default:
×
NEW
783
                                return nil
×
784
                        }
785
                }
NEW
786
                file_switchrpc_switch_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
×
NEW
787
                        switch v := v.(*BuildOnionResponse); i {
×
NEW
788
                        case 0:
×
NEW
789
                                return &v.state
×
NEW
790
                        case 1:
×
NEW
791
                                return &v.sizeCache
×
NEW
792
                        case 2:
×
NEW
793
                                return &v.unknownFields
×
NEW
794
                        default:
×
NEW
795
                                return nil
×
796
                        }
797
                }
798
        }
799
        type x struct{}
3✔
800
        out := protoimpl.TypeBuilder{
3✔
801
                File: protoimpl.DescBuilder{
3✔
802
                        GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
3✔
803
                        RawDescriptor: file_switchrpc_switch_proto_rawDesc,
3✔
804
                        NumEnums:      1,
3✔
805
                        NumMessages:   6,
3✔
806
                        NumExtensions: 0,
3✔
807
                        NumServices:   1,
3✔
808
                },
3✔
809
                GoTypes:           file_switchrpc_switch_proto_goTypes,
3✔
810
                DependencyIndexes: file_switchrpc_switch_proto_depIdxs,
3✔
811
                EnumInfos:         file_switchrpc_switch_proto_enumTypes,
3✔
812
                MessageInfos:      file_switchrpc_switch_proto_msgTypes,
3✔
813
        }.Build()
3✔
814
        File_switchrpc_switch_proto = out.File
3✔
815
        file_switchrpc_switch_proto_rawDesc = nil
3✔
816
        file_switchrpc_switch_proto_goTypes = nil
3✔
817
        file_switchrpc_switch_proto_depIdxs = nil
3✔
818
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc