added AsDestination()

This commit is contained in:
Haris Khan
2024-11-17 21:44:32 -05:00
parent b72ed0a37d
commit cbe4af8459

View File

@@ -3,6 +3,7 @@ package router_identity
import (
"github.com/go-i2p/go-i2p/lib/common/certificate"
"github.com/go-i2p/go-i2p/lib/common/destination"
"github.com/go-i2p/go-i2p/lib/common/key_certificate"
. "github.com/go-i2p/go-i2p/lib/common/keys_and_cert"
"github.com/go-i2p/go-i2p/lib/crypto"
@@ -77,3 +78,9 @@ func NewRouterIdentity(publicKey crypto.PublicKey, signingPublicKey crypto.Signi
return &routerIdentity, nil
}
func (router_identity *RouterIdentity) AsDestination() destination.Destination {
return destination.Destination{
KeysAndCert: router_identity.KeysAndCert,
}
}