Skip to content
This repository was archived by the owner on Mar 4, 2026. It is now read-only.
This repository was archived by the owner on Mar 4, 2026. It is now read-only.

Public API enhancements #30

Description

@brothercorvo

2. Core Object

Implement:

struct Node - internal runtime - command channel - event broadcast
channel - state tracking

Public API:

  • new() -> Node
  • start(config: NodeConfig)
  • stop()
  • restart(config: NodeConfig)
  • get_status() -> NodeStatus
  • send(destination, data, options) -> SendReceipt
  • broadcast(data, options) -> SendReceipt
  • set_log_level(level)
  • subscribe_events() -> EventSubscription

3. Event System

NodeEvent union:

  • StatusChanged
  • PeerChanged
  • PacketReceived
  • PacketSent
  • Log
  • Error

EventSubscription:

  • next(timeout_ms) -> NodeEvent?
  • close()

Ensure: - Thread safe - No panics across FFI boundary - Structured error
types

4. Error Types

NodeError enum:

  • InvalidConfig
  • IoError
  • NetworkError
  • ReticulumError
  • AlreadyRunning
  • NotRunning
  • Timeout
  • InternalError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions