@@ -376,11 +376,12 @@ func (c *Client) ListFeatures(ctx context.Context) (map[string]*Feature,
376
376
//
377
377
// Note: this is part of the Autopilot interface.
378
378
func (c * Client ) RegisterSession (ctx context.Context , pubKey * btcec.PublicKey ,
379
- mailboxAddr string , devServer bool , featureConf map [string ][]byte ) (
380
- * btcec.PublicKey , error ) {
379
+ mailboxAddr string , devServer bool , featureConf map [string ][]byte ,
380
+ groupKey * btcec. PublicKey , linkSig [] byte ) ( * btcec.PublicKey , error ) {
381
381
382
382
remotePub , err := c .registerSession (
383
383
ctx , pubKey , mailboxAddr , devServer , featureConf ,
384
+ groupKey , linkSig ,
384
385
)
385
386
if err != nil {
386
387
log .Errorf ("unsuccessful registration of session %x" ,
@@ -425,23 +426,31 @@ func (c *Client) trackClient(pubKey *btcec.PublicKey) {
425
426
// registerSession attempts to register a session with the given local static
426
427
// public key with the autopilot server.
427
428
func (c * Client ) registerSession (ctx context.Context , pubKey * btcec.PublicKey ,
428
- mailboxAddr string , devServer bool ,
429
- featureConfig map [string ][]byte ) (* btcec.PublicKey , error ) {
429
+ mailboxAddr string , devServer bool , featureConfig map [string ][]byte ,
430
+ groupLocalPub * btcec.PublicKey , linkSig []byte ) (* btcec.PublicKey ,
431
+ error ) {
430
432
431
433
client , cleanup , err := c .getClientConn ()
432
434
if err != nil {
433
435
return nil , err
434
436
}
435
437
defer cleanup ()
436
438
439
+ var groupKey []byte
440
+ if groupLocalPub != nil {
441
+ groupKey = groupLocalPub .SerializeCompressed ()
442
+ }
443
+
437
444
resp , err := client .RegisterSession (
438
445
ctx , & autopilotserverrpc.RegisterSessionRequest {
439
- ResponderPubKey : pubKey .SerializeCompressed (),
440
- MailboxAddr : mailboxAddr ,
441
- DevServer : devServer ,
442
- FeatureConfigs : featureConfig ,
443
- LitVersion : marshalVersion (c .cfg .LitVersion ),
444
- LndVersion : marshalVersion (c .cfg .LndVersion ),
446
+ ResponderPubKey : pubKey .SerializeCompressed (),
447
+ MailboxAddr : mailboxAddr ,
448
+ DevServer : devServer ,
449
+ FeatureConfigs : featureConfig ,
450
+ LitVersion : marshalVersion (c .cfg .LitVersion ),
451
+ LndVersion : marshalVersion (c .cfg .LndVersion ),
452
+ GroupResponderKey : groupKey ,
453
+ GroupResponderSig : linkSig ,
445
454
},
446
455
)
447
456
if err != nil {
0 commit comments