@@ -376,11 +376,12 @@ func (c *Client) ListFeatures(ctx context.Context) (map[string]*Feature,
376376//
377377// Note: this is part of the Autopilot interface.
378378func (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 ) {
381381
382382 remotePub , err := c .registerSession (
383383 ctx , pubKey , mailboxAddr , devServer , featureConf ,
384+ groupKey , linkSig ,
384385 )
385386 if err != nil {
386387 log .Errorf ("unsuccessful registration of session %x" ,
@@ -425,23 +426,31 @@ func (c *Client) trackClient(pubKey *btcec.PublicKey) {
425426// registerSession attempts to register a session with the given local static
426427// public key with the autopilot server.
427428func (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 ) {
430432
431433 client , cleanup , err := c .getClientConn ()
432434 if err != nil {
433435 return nil , err
434436 }
435437 defer cleanup ()
436438
439+ var groupKey []byte
440+ if groupLocalPub != nil {
441+ groupKey = groupLocalPub .SerializeCompressed ()
442+ }
443+
437444 resp , err := client .RegisterSession (
438445 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 ,
445454 },
446455 )
447456 if err != nil {
0 commit comments