feat: add NodeId helper

This commit is contained in:
Derrick Hammer 2024-01-29 14:33:40 -05:00
parent 57ab0f36f9
commit ca41aee245
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,7 @@ package node
import (
"git.lumeweb.com/LumeWeb/libs5-go/config"
"git.lumeweb.com/LumeWeb/libs5-go/encoding"
"git.lumeweb.com/LumeWeb/libs5-go/protocol"
"git.lumeweb.com/LumeWeb/libs5-go/protocol/signed"
"git.lumeweb.com/LumeWeb/libs5-go/service"
@ -66,6 +67,10 @@ func (n *Node) NetworkId() string {
return n.services.P2P().NetworkId()
}
func (n *Node) NodeId() *encoding.NodeId {
return n.services.P2P().NodeId()
}
func DefaultNode(config *config.NodeConfig) *Node {
params := service.ServiceParams{
Logger: config.Logger,