@@ -82,7 +82,7 @@ func (m *Manager) NewAddress(ctx context.Context) (*btcutil.AddressTaproot,
8282
8383 m .Unlock ()
8484
85- return m .getTaprootAddress (clientPubKey , serverPubKey , expiry )
85+ return m .GetTaprootAddress (clientPubKey , serverPubKey , expiry )
8686 }
8787 m .Unlock ()
8888
@@ -166,14 +166,15 @@ func (m *Manager) NewAddress(ctx context.Context) (*btcutil.AddressTaproot,
166166 log .Infof ("Imported static address taproot script to lnd wallet: %v" ,
167167 addr )
168168
169- return m .getTaprootAddress (
169+ return m .GetTaprootAddress (
170170 clientPubKey .PubKey , serverPubKey , int64 (serverParams .Expiry ),
171171 )
172172}
173173
174- func (m * Manager ) getTaprootAddress (clientPubkey ,
175- serverPubkey * btcec.PublicKey , expiry int64 ) (* btcutil.AddressTaproot ,
176- error ) {
174+ // GetTaprootAddress returns a taproot address for the given client and server
175+ // public keys and expiry.
176+ func (m * Manager ) GetTaprootAddress (clientPubkey , serverPubkey * btcec.PublicKey ,
177+ expiry int64 ) (* btcutil.AddressTaproot , error ) {
177178
178179 staticAddress , err := script .NewStaticAddress (
179180 input .MuSig2Version100RC2 , expiry , clientPubkey , serverPubkey ,
@@ -224,7 +225,7 @@ func (m *Manager) ListUnspentRaw(ctx context.Context, minConfs,
224225 }
225226 }
226227
227- taprootAddress , err := m .getTaprootAddress (
228+ taprootAddress , err := m .GetTaprootAddress (
228229 staticAddress .ClientPubkey , staticAddress .ServerPubkey ,
229230 int64 (staticAddress .Expiry ),
230231 )
0 commit comments