Versions in this module Expand all Collapse all v0 v0.0.1 Jul 10, 2026 Changes in this version + var EnableGenericHub = func(cfg *Config) error + var FallbackDefaults libp2p.Option = func(cfg *libp2p.Config) error + func DiscoveryService(s ...ServiceDiscovery) func(cfg *Config) error + func ExchangeKeys(s string) func(cfg *Config) error + func FromBase64(enablemDNS, enableDHT bool, bb string, d *discovery.DHT, m *discovery.MDNS) func(cfg *Config) error + func FromYaml(enablemDNS, enableDHT bool, path string, d *discovery.DHT, m *discovery.MDNS) func(cfg *Config) error + func GenPrivKey(seed int64) (crypto.PrivKey, error) + func GenericChannelHandlers(h ...Handler) func(cfg *Config) error + func Handlers(h ...Handler) func(cfg *Config) error + func Insecure(b bool) func(cfg *Config) error + func LibP2PLogLevel(l log.LogLevel) func(cfg *Config) error + func ListenAddresses(ss ...string) func(cfg *Config) error + func Logger(l log.StandardLogger) func(cfg *Config) error + func MaxMessageSize(i int) func(cfg *Config) error + func RoomName(s string) func(cfg *Config) error + func SealKeyInterval(i int) func(cfg *Config) error + func SealKeyLength(i int) func(cfg *Config) error + func WithBlacklist(i ...string) func(cfg *Config) error + func WithDiscoveryBootstrapPeers(a discovery.AddrList) func(cfg *Config) error + func WithDiscoveryInterval(t time.Duration) func(cfg *Config) error + func WithInterfaceAddress(i string) func(cfg *Config) error + func WithLedgerAnnounceTime(t time.Duration) func(cfg *Config) error + func WithLedgerInterval(t time.Duration) func(cfg *Config) error + func WithLibp2pAdditionalOptions(i ...libp2p.Option) func(cfg *Config) error + func WithLibp2pOptions(i ...libp2p.Option) func(cfg *Config) error + func WithNetworkService(ns ...NetworkService) func(cfg *Config) error + func WithOwnership(mode blockchain.OwnershipMode, ttl time.Duration) func(cfg *Config) error + func WithPrivKey(b []byte) func(cfg *Config) error + func WithStaticPeer(ip string, p peer.ID) func(cfg *Config) error + func WithStore(s blockchain.Store) func(cfg *Config) error + func WithStreamHandler(id protocol.Protocol, h StreamHandler) func(cfg *Config) error + type Config struct + AdditionalOptions []libp2p.Option + Blacklist []string + DiscoveryBootstrapPeers discovery.AddrList + DiscoveryInterval time.Duration + ExchangeKey string + GenericChannelHandler []Handler + GenericHub bool + Handle func(bool, *hub.Message) + Handlers []Handler + Insecure bool + InterfaceAddress string + LedgerAnnounceTime time.Duration + LedgerSyncronizationTime time.Duration + ListenAddresses []discovery.AddrList + Logger log.StandardLogger + MaxMessageSize int + NetworkServices []NetworkService + Options []libp2p.Option + OwnershipMode blockchain.OwnershipMode + OwnershipTTL time.Duration + PeerGater Gater + PeerTable map[string]peer.ID + PrivateKey []byte + RoomName string + SealKeyInterval int + SealKeyLength int + Sealer Sealer + ServiceDiscovery []ServiceDiscovery + Store blockchain.Store + StreamHandlers map[protocol.Protocol]StreamHandler + Whitelist []string + func (cfg *Config) Apply(opts ...Option) error + type Gater interface + Disable func() + Enable func() + Enabled func() bool + Gate func(*Node, peer.ID) bool + type Handler func(*blockchain.Ledger, *hub.Message, chan *hub.Message) error + type NetworkService func(context.Context, Config, *Node, *blockchain.Ledger) error + type Node struct + MessageHub *hub.MessageHub + func New(p ...Option) (*Node, error) + func (e *Node) BlockSubnet(cidr string) error + func (e *Node) ConnectionGater() *conngater.BasicConnectionGater + func (e *Node) Host() host.Host + func (e *Node) Ledger() (*blockchain.Ledger, error) + func (e *Node) PeerGater() Gater + func (e *Node) PublishMessage(m *hub.Message) error + func (e *Node) Start(ctx context.Context) error + type OTP struct + Crypto OTPConfig + DHT OTPConfig + type OTPConfig struct + Interval int + Key string + Length int + type Option func(cfg *Config) error + func WithPeerGater(d Gater) Option + func WithSealer(i Sealer) Option + type Sealer interface + Seal func(string, string) (string, error) + Unseal func(string, string) (string, error) + type ServiceDiscovery interface + Option func(context.Context) func(c *libp2p.Config) error + Run func(log.StandardLogger, context.Context, host.Host) error + type StreamHandler func(*Node, *blockchain.Ledger) func(stream network.Stream) + type YAMLConnectionConfig struct + MDNS string + MaxMessageSize int + OTP OTP + Rendezvous string + RoomName string + func GenerateNewConnectionData(i ...int) *YAMLConnectionConfig + func (y YAMLConnectionConfig) Base64() string + func (y YAMLConnectionConfig) YAML() string