Make liblogosdelivery and wakunode2 compile, remove waku/api.nim as it was just a import orchestrator

This commit is contained in:
NagyZoltanPeter 2026-06-23 17:00:28 +02:00
parent dd231c4c9f
commit c2ceaf0035
No known key found for this signature in database
GPG Key ID: 3E1F97CF4A7B6F42
7 changed files with 15 additions and 1044 deletions

View File

@ -5,7 +5,7 @@ import
logos_delivery/waku/common/base64,
logos_delivery/waku/waku,
logos_delivery/waku/waku_core/topics/content_topic,
logos_delivery/waku/api/[api, types],
logos_delivery/api/types,
../declare_lib
proc logosdelivery_subscribe(
@ -20,7 +20,7 @@ proc logosdelivery_subscribe(
# ContentTopic is just a string type alias
let contentTopic = ContentTopic($contentTopicStr)
(await api.subscribe(ctx.myLib[].waku, contentTopic)).isOkOr:
(await ctx.myLib[].messagingClient.subscribe(contentTopic)).isOkOr:
let errMsg = $error
return err("Subscribe failed: " & errMsg)
@ -38,7 +38,7 @@ proc logosdelivery_unsubscribe(
# ContentTopic is just a string type alias
let contentTopic = ContentTopic($contentTopicStr)
api.unsubscribe(ctx.myLib[].waku, contentTopic).isOkOr:
ctx.myLib[].messagingClient.unsubscribe(contentTopic).isOkOr:
let errMsg = $error
return err("Unsubscribe failed: " & errMsg)

View File

@ -3,7 +3,8 @@ import chronos, chronicles, results, ffi
import
logos_delivery,
logos_delivery/waku/node/waku_node,
logos_delivery/waku/api/[api, types],
logos_delivery/waku/events/message_events,
logos_delivery/api/types,
logos_delivery/waku/events/[message_events, health_events],
tools/confutils/conf_from_json,
../declare_lib,

View File

@ -8,6 +8,8 @@ import logos_delivery/waku/utils/requests as request_utils
import logos_delivery/waku/waku_core/[topics/content_topic, message/message, time]
import logos_delivery/waku/requests/requests
export content_topic, message
type
MessageEnvelope* = object
contentTopic*: ContentTopic

View File

@ -11,8 +11,6 @@
import results, chronos, chronicles
import logos_delivery/waku/api
export api
import logos_delivery/waku/waku
export waku
import logos_delivery/messaging/messaging_client
@ -22,6 +20,8 @@ export reliable_channel_manager
import logos_delivery/waku/factory/waku_conf
import logos_delivery/waku/factory/app_callbacks
import tools/confutils/cli_args
import logos_delivery/waku/node/health_monitor/online_monitor
logScope:
topics = "logosdelivery"

View File

@ -1,4 +0,0 @@
import ./events/message_events
import tools/confutils/entry_nodes
export entry_nodes, message_events

File diff suppressed because it is too large Load Diff

View File

@ -11,6 +11,7 @@ import
libp2p/wire,
libp2p/crypto/crypto,
libp2p/protocols/pubsub/gossipsub,
libp2p/protocols/ping,
libp2p/services/autorelayservice,
libp2p/services/hpservice,
libp2p/peerid,
@ -49,6 +50,9 @@ import
factory/app_callbacks,
persistency/persistency,
factory/validator_signed,
waku_lightpush/client,
waku_lightpush_legacy/client,
waku_store/client,
],
./factory/waku_conf,
./factory/waku_state_info
@ -59,6 +63,8 @@ logScope:
# Git version in git describe format (defined at compile time)
const git_version* {.strdefine.} = "n/a"
const FilterOpTimeout = 5.seconds
type Waku* = ref object
stateInfo*: WakuStateInfo
conf*: WakuConf