func NewNodeIdentity() (LocalNode, error) {
	priv, pub, err := p2pcrypto.GenerateKeyPair()
	if err != nil {
		return emptyNode, err
	}
	return LocalNode{
		publicKey: pub,
		privKey:   priv,
	}, nil
}
NewNodeIdentity creates a new local node without attempting to restore node from local store.
package node
import (
	"github.com/libonomy/libonomy-p2p/p2p/p2pcrypto"
)
type LocalNode struct {
	publicKey p2pcrypto.PublicKey
	privKey   p2pcrypto.PrivateKey
}
func (n LocalNode) PublicKey() p2pcrypto.PublicKey {
	return n.publicKey
}
func (n LocalNode) PrivateKey() p2pcrypto.PrivateKey {
	return n.privKey
}
var emptyNode LocalNode