chore: clarify api folders (#3637)

* Rename waku_api to rest_api and underlying rest to endpoint for clearity
* Rename node/api to node/kernel_api to suggest that it is an internal accessor to node interface + make everything compile after renaming
* make waku api a top level import
* fix use of relative path imports and use default to root rather in case of waku and tools modules
This commit is contained in:
NagyZoltanPeter 2025-11-15 23:31:09 +01:00 committed by GitHub
parent 262d33e394
commit 1762548741
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
92 changed files with 162 additions and 147 deletions

View File

@ -240,7 +240,7 @@ proc stop*(cmb: Chat2MatterBridge) {.async: (raises: [Exception]).} =
{.pop.}
# @TODO confutils.nim(775, 17) Error: can raise an unlisted exception: ref IOError
when isMainModule:
import waku/common/utils/nat, waku/waku_api/message_cache
import waku/common/utils/nat, waku/rest_api/message_cache
let
rng = newRng()

View File

@ -14,7 +14,7 @@ import
libp2p/wire
import
../../tools/confutils/cli_args,
tools/confutils/cli_args,
waku/[
node/peer_manager,
waku_lightpush/common,

View File

@ -11,7 +11,7 @@ import
confutils
import
../../tools/confutils/cli_args,
tools/confutils/cli_args,
waku/[
common/enr,
common/logging,

View File

@ -77,7 +77,7 @@ proc maintainSubscription(
some(filterPubsubTopic), filterContentTopic, actualFilterPeer
)
).errorOr:
await sleepAsync(subscriptionMaintenanceMs)
await sleepAsync(SubscriptionMaintenanceMs)
if noFailedSubscribes > 0:
noFailedSubscribes -= 1
notice "subscribe request successful."

View File

@ -11,7 +11,7 @@ import
libp2p/wire
import
../wakunode2/cli_args,
tools/confutils/cli_args,
waku/[
common/enr,
waku_node,

View File

@ -8,6 +8,8 @@ import
results,
libp2p/peerid
from std/sugar import `=>`
import ./tester_message, ./lpt_metrics
type

View File

@ -6,7 +6,7 @@ import
json_serialization/std/options,
json_serialization/lexer
import ../../waku/waku_api/rest/serdes
import waku/rest_api/endpoint/serdes
type ProtocolTesterMessage* = object
sender*: string

View File

@ -14,7 +14,7 @@ import
common/logging,
factory/waku,
node/health_monitor,
waku_api/rest/builder as rest_server_builder,
rest_api/endpoint/builder as rest_server_builder,
waku_core/message/default_values,
]

View File

@ -1,6 +1,6 @@
{.push raises: [].}
import ../../apps/wakunode2/cli_args
import tools/confutils/cli_args
import waku/[common/logging, factory/[waku, networks_config]]
import
std/[options, strutils, os, sequtils],

View File

@ -6,7 +6,7 @@ import
../../../waku/discovery/waku_discv5,
../../../waku/waku_core/peers,
../../../waku/node/waku_node,
../../../waku/node/api,
../../../waku/node/kernel_api,
../../alloc
type DiscoveryMsgType* = enum

View File

@ -2,13 +2,15 @@ import std/[options, json, strutils, net]
import chronos, chronicles, results, confutils, confutils/std/net
import
../../../waku/node/peer_manager/peer_manager,
../../../tools/confutils/cli_args,
../../../waku/factory/waku,
../../../waku/factory/node_factory,
../../../waku/factory/networks_config,
../../../waku/factory/app_callbacks,
../../../waku/waku_api/rest/builder,
waku/node/peer_manager/peer_manager,
tools/confutils/cli_args,
waku/factory/waku,
waku/factory/node_factory,
waku/factory/networks_config,
waku/factory/app_callbacks,
waku/rest_api/endpoint/builder
import
../../alloc
type NodeLifecycleMsgType* = enum

View File

@ -8,7 +8,7 @@ import
../../../../waku/waku_core/subscription/push_handler,
../../../../waku/node/peer_manager/peer_manager,
../../../../waku/node/waku_node,
../../../../waku/node/api,
../../../../waku/node/kernel_api,
../../../../waku/waku_core/topics/pubsub_topic,
../../../../waku/waku_core/topics/content_topic,
../../../alloc

View File

@ -1,16 +1,18 @@
import std/[net, sequtils, strutils]
import chronicles, chronos, stew/byteutils, results
import
../../../../waku/waku_core/message/message,
../../../../waku/factory/[validator_signed, waku],
../../../../tools/confutils/cli_args,
../../../../waku/waku_node,
../../../../waku/waku_core/message,
../../../../waku/waku_core/time, # Timestamp
../../../../waku/waku_core/topics/pubsub_topic,
../../../../waku/waku_core/topics,
../../../../waku/waku_relay/protocol,
../../../../waku/node/peer_manager,
waku/waku_core/message/message,
waku/factory/[validator_signed, waku],
tools/confutils/cli_args,
waku/waku_node,
waku/waku_core/message,
waku/waku_core/time, # Timestamp
waku/waku_core/topics/pubsub_topic,
waku/waku_core/topics,
waku/waku_relay/protocol,
waku/node/peer_manager
import
../../../alloc
type RelayMsgType* = enum

View File

@ -12,7 +12,7 @@ import
waku_core,
node/peer_manager,
node/waku_node,
node/api,
node/kernel_api,
waku_filter_v2,
waku_filter_v2/client,
waku_filter_v2/subscriptions,

View File

@ -12,7 +12,7 @@ import
waku_core,
node/peer_manager,
node/waku_node,
node/api,
node/kernel_api,
waku_lightpush_legacy,
waku_lightpush_legacy/common,
waku_lightpush_legacy/protocol_metrics,

View File

@ -6,7 +6,7 @@ import
waku/[
common/paging,
node/waku_node,
node/api,
node/kernel_api,
node/peer_manager,
waku_core,
waku_store_legacy,
@ -446,7 +446,7 @@ suite "Waku Store - End to End - Sorted Archive":
await otherServer.start()
let otherServerRemotePeerInfo = otherServer.peerInfo.toRemotePeerInfo()
# When making a history query to the first server node
# When making a history query to the first server node
let queryResponse = await client.query(historyQuery, serverRemotePeerInfo)
# Then the response contains the messages

View File

@ -12,7 +12,7 @@ import
waku_core,
node/peer_manager,
node/waku_node,
node/api,
node/kernel_api,
waku_lightpush,
waku_rln_relay,
],

View File

@ -14,7 +14,7 @@ import
import
waku/[
waku_node,
node/api,
node/kernel_api,
discovery/waku_discv5,
waku_peer_exchange,
node/peer_manager,

View File

@ -17,7 +17,7 @@ import
waku_core,
node/peer_manager,
node/waku_node,
node/api,
node/kernel_api,
discovery/waku_discv5,
waku_filter_v2/common,
waku_relay/protocol,

View File

@ -17,7 +17,7 @@ import
node/peer_manager,
waku_core,
waku_node,
node/api,
node/kernel_api,
common/error_handling,
waku_rln_relay,
waku_rln_relay/rln,
@ -514,7 +514,7 @@ suite "Waku RlnRelay - End to End - OnChain":
## Issues
### TreeIndex
For some reason the calls to `getWakuRlnConfigOnChain` need to be made with `treeIndex` = 0 and 1, in that order.
But the registration needs to be made with 1 and 2.
But the registration needs to be made with 1 and 2.
#### Solutions
Requires investigation
### Monkeypatching

View File

@ -16,7 +16,7 @@ import
waku_core/topics/sharding,
waku_store_legacy/common,
node/waku_node,
node/api,
node/kernel_api,
common/paging,
waku_core,
waku_store/common,

View File

@ -6,7 +6,7 @@ import
waku/[
common/paging,
node/waku_node,
node/api,
node/kernel_api,
node/peer_manager,
waku_core,
waku_core/message/digest,
@ -486,7 +486,7 @@ suite "Waku Store - End to End - Sorted Archive":
await otherServer.start()
let otherServerRemotePeerInfo = otherServer.peerInfo.toRemotePeerInfo()
# When making a history query to the first server node
# When making a history query to the first server node
let queryResponse = await client.query(storeQuery, serverRemotePeerInfo)
# Then the response contains the messages

View File

@ -1,7 +1,7 @@
{.used.}
import std/[sets, random], results, stew/byteutils, testutils/unittests
import waku/waku_core, waku/waku_api/message_cache, ./testlib/wakucore
import waku/waku_core, waku/rest_api/message_cache, ./testlib/wakucore
randomize()

View File

@ -22,7 +22,7 @@ import
factory/conf_builder/conf_builder,
factory/waku,
node/waku_node,
node/api,
node/kernel_api,
node/peer_manager,
],
../testlib/[wakucore, testasync, assertions, futures, wakunode, testutils],

View File

@ -3,7 +3,7 @@
import std/[options, sequtils, json], testutils/unittests, results, chronos
import
waku/node/[peer_manager, waku_node, api],
waku/node/[peer_manager, waku_node, kernel_api],
waku/waku_core,
waku/waku_filter_v2/[common, client, subscriptions, protocol, rpc_codec],
../testlib/[wakucore, testasync, testutils, futures, sequtils, wakunode],

View File

@ -14,12 +14,12 @@ import
waku_node,
waku_filter_v2/client,
node/peer_manager,
waku_api/rest/server,
waku_api/rest/client,
waku_api/rest/responses,
waku_api/rest/admin/types,
waku_api/rest/admin/handlers as admin_api,
waku_api/rest/admin/client as admin_api_client,
rest_api/endpoint/server,
rest_api/endpoint/client,
rest_api/endpoint/responses,
rest_api/endpoint/admin/types,
rest_api/endpoint/admin/handlers as admin_rest_interface,
rest_api/endpoint/admin/client as admin_rest_client,
waku_relay,
waku_peer_exchange,
],

View File

@ -11,8 +11,8 @@ import
waku/[
waku_node,
node/waku_node as waku_node2,
waku_api/rest/server,
waku_api/rest/debug/handlers as debug_api,
rest_api/endpoint/server,
rest_api/endpoint/debug/handlers as debug_rest_interface,
],
../testlib/common,
../testlib/wakucore,

View File

@ -12,11 +12,11 @@ import
waku_node,
node/waku_node as waku_node2,
# TODO: Remove after moving `git_version` to the app code.
waku_api/rest/server,
waku_api/rest/client,
waku_api/rest/responses,
waku_api/rest/debug/handlers as debug_api,
waku_api/rest/debug/client as debug_api_client,
rest_api/endpoint/server,
rest_api/endpoint/client,
rest_api/endpoint/responses,
rest_api/endpoint/debug/handlers as debug_rest_interface,
rest_api/endpoint/debug/client as debug_rest_client,
],
../testlib/common,
../testlib/wakucore,

View File

@ -1,7 +1,7 @@
{.used.}
import results, stew/byteutils, testutils/unittests, json_serialization
import waku/waku_api/rest/serdes, waku/waku_api/rest/debug/types
import waku/rest_api/endpoint/serdes, waku/rest_api/endpoint/debug/types
suite "Waku v2 REST API - Debug - serialization":
suite "DebugWakuInfo - decode":

View File

@ -9,21 +9,21 @@ import
libp2p/crypto/crypto
import
waku/[
waku_api/message_cache,
rest_api/message_cache,
waku_core,
waku_node,
node/peer_manager,
waku_api/rest/server,
waku_api/rest/client,
waku_api/rest/responses,
waku_api/rest/filter/types,
waku_api/rest/filter/handlers as filter_api,
waku_api/rest/filter/client as filter_api_client,
rest_api/endpoint/server,
rest_api/endpoint/client,
rest_api/endpoint/responses,
rest_api/endpoint/filter/types,
rest_api/endpoint/filter/handlers as filter_rest_interface,
rest_api/endpoint/filter/client as filter_rest_client,
waku_relay,
waku_filter_v2/subscriptions,
waku_filter_v2/common,
waku_api/rest/relay/handlers as relay_api,
waku_api/rest/relay/client as relay_api_client,
rest_api/endpoint/relay/handlers as relay_rest_interface,
rest_api/endpoint/relay/client as relay_rest_client,
],
../testlib/wakucore,
../testlib/wakunode

View File

@ -13,11 +13,11 @@ import
waku_node,
node/waku_node as waku_node2,
# TODO: Remove after moving `git_version` to the app code.
waku_api/rest/server,
waku_api/rest/client,
waku_api/rest/responses,
waku_api/rest/health/handlers as health_api,
waku_api/rest/health/client as health_api_client,
rest_api/endpoint/server,
rest_api/endpoint/client,
rest_api/endpoint/responses,
rest_api/endpoint/health/handlers as health_rest_interface,
rest_api/endpoint/health/client as health_rest_client,
waku_rln_relay,
node/health_monitor,
],

View File

@ -10,17 +10,17 @@ import
import
waku/[
waku_api/message_cache,
rest_api/message_cache,
waku_core,
waku_node,
node/peer_manager,
waku_lightpush/common,
waku_api/rest/server,
waku_api/rest/client,
waku_api/rest/responses,
waku_api/rest/lightpush/types,
waku_api/rest/lightpush/handlers as lightpush_api,
waku_api/rest/lightpush/client as lightpush_api_client,
rest_api/endpoint/server,
rest_api/endpoint/client,
rest_api/endpoint/responses,
rest_api/endpoint/lightpush/types,
rest_api/endpoint/lightpush/handlers as lightpush_rest_interface,
rest_api/endpoint/lightpush/client as lightpush_rest_client,
waku_relay,
common/rate_limit/setting,
],

View File

@ -10,17 +10,17 @@ import
import
waku/[
waku_api/message_cache,
rest_api/message_cache,
waku_core,
waku_node,
node/peer_manager,
waku_lightpush_legacy/common,
waku_api/rest/server,
waku_api/rest/client,
waku_api/rest/responses,
waku_api/rest/legacy_lightpush/types,
waku_api/rest/legacy_lightpush/handlers as lightpush_api,
waku_api/rest/legacy_lightpush/client as lightpush_api_client,
rest_api/endpoint/server,
rest_api/endpoint/client,
rest_api/endpoint/responses,
rest_api/endpoint/legacy_lightpush/types,
rest_api/endpoint/legacy_lightpush/handlers as lightpush_rest_interface,
rest_api/endpoint/legacy_lightpush/client as lightpush_rest_client,
waku_relay,
common/rate_limit/setting,
],

View File

@ -12,13 +12,13 @@ import
common/base64,
waku_core,
waku_node,
waku_api/message_cache,
waku_api/rest/server,
waku_api/rest/client,
waku_api/rest/responses,
waku_api/rest/relay/types,
waku_api/rest/relay/handlers as relay_api,
waku_api/rest/relay/client as relay_api_client,
rest_api/message_cache,
rest_api/endpoint/server,
rest_api/endpoint/client,
rest_api/endpoint/responses,
rest_api/endpoint/relay/types,
rest_api/endpoint/relay/handlers as relay_rest_interface,
rest_api/endpoint/relay/client as relay_rest_client,
waku_relay,
waku_rln_relay,
],
@ -263,7 +263,7 @@ suite "Waku v2 Rest API - Relay":
await node.mountRlnRelay(wakuRlnConfig)
await node.start()
# Registration is mandatory before sending messages with rln-relay
# Registration is mandatory before sending messages with rln-relay
let manager = cast[OnchainGroupManager](node.wakuRlnRelay.groupManager)
let idCredentials = generateCredentials()
@ -514,7 +514,7 @@ suite "Waku v2 Rest API - Relay":
await node.mountRlnRelay(wakuRlnConfig)
await node.start()
# Registration is mandatory before sending messages with rln-relay
# Registration is mandatory before sending messages with rln-relay
let manager = cast[OnchainGroupManager](node.wakuRlnRelay.groupManager)
let idCredentials = generateCredentials()
@ -586,7 +586,7 @@ suite "Waku v2 Rest API - Relay":
await node.mountRlnRelay(wakuRlnConfig)
await node.start()
# Registration is mandatory before sending messages with rln-relay
# Registration is mandatory before sending messages with rln-relay
let manager = cast[OnchainGroupManager](node.wakuRlnRelay.groupManager)
let idCredentials = generateCredentials()
@ -648,7 +648,7 @@ suite "Waku v2 Rest API - Relay":
await node.mountRlnRelay(wakuRlnConfig)
await node.start()
# Registration is mandatory before sending messages with rln-relay
# Registration is mandatory before sending messages with rln-relay
let manager = cast[OnchainGroupManager](node.wakuRlnRelay.groupManager)
let idCredentials = generateCredentials()
@ -723,7 +723,7 @@ suite "Waku v2 Rest API - Relay":
await node.mountRlnRelay(wakuRlnConfig)
await node.start()
# Registration is mandatory before sending messages with rln-relay
# Registration is mandatory before sending messages with rln-relay
let manager = cast[OnchainGroupManager](node.wakuRlnRelay.groupManager)
let idCredentials = generateCredentials()

View File

@ -1,7 +1,9 @@
{.used.}
import results, stew/byteutils, unittest2, json_serialization
import waku/[common/base64, waku_api/rest/serdes, waku_api/rest/relay/types, waku_core]
import
waku/
[common/base64, rest_api/endpoint/serdes, rest_api/endpoint/relay/types, waku_core]
suite "Waku v2 Rest API - Relay - serialization":
suite "RelayWakuMessage - decode":

View File

@ -1,9 +1,9 @@
{.used.}
import results, stew/byteutils, chronicles, unittest2, json_serialization
import waku/waku_api/rest/serdes, waku/waku_api/rest/debug/types
import waku/rest_api/endpoint/serdes, waku/rest_api/endpoint/debug/types
# TODO: Decouple this test suite from the `debug_api` module by defining
# TODO: Decouple this test suite from the `debug_rest_interface` module by defining
# private custom types for this test suite module
suite "Waku v2 Rest API - Serdes":
suite "decode":

View File

@ -17,12 +17,12 @@ import
waku_core/time,
waku_node,
node/peer_manager,
waku_api/rest/server,
waku_api/rest/client,
waku_api/rest/responses,
waku_api/rest/store/handlers as store_api,
waku_api/rest/store/client as store_api_client,
waku_api/rest/store/types,
rest_api/endpoint/server,
rest_api/endpoint/client,
rest_api/endpoint/responses,
rest_api/endpoint/store/handlers as store_rest_interface,
rest_api/endpoint/store/client as store_rest_client,
rest_api/endpoint/store/types,
waku_archive,
waku_archive/driver/queue_driver,
waku_archive/driver/sqlite_driver,
@ -34,7 +34,7 @@ import
../testlib/wakunode
logScope:
topics = "waku node rest store_api test"
topics = "waku node rest store_rest_interface test"
proc put(
store: ArchiveDriver, pubsubTopic: PubsubTopic, message: WakuMessage

View File

@ -34,7 +34,9 @@ import
import ./envvar as confEnvvarDefs, ./envvar_net as confEnvvarNet
export confTomlDefs, confTomlNet, confEnvvarDefs, confEnvvarNet, ProtectedShard
export
confTomlDefs, confTomlNet, confEnvvarDefs, confEnvvarNet, ProtectedShard,
DefaultMaxWakuMessageSizeStr
logScope:
topics = "waku cli args"

3
waku/api.nim Normal file
View File

@ -0,0 +1,3 @@
import ./api/[api, api_conf, entry_nodes]
export api, api_conf, entry_nodes

View File

@ -28,9 +28,9 @@ import
../node/health_monitor,
../node/waku_metrics,
../node/delivery_monitor/delivery_monitor,
../waku_api/message_cache,
../waku_api/rest/server,
../waku_api/rest/builder as rest_server_builder,
../rest_api/message_cache,
../rest_api/endpoint/server,
../rest_api/endpoint/builder as rest_server_builder,
../waku_archive,
../waku_relay/protocol,
../discovery/waku_dnsdisc,

View File

@ -9,7 +9,7 @@ import
import
../waku_rln_relay/rln_relay,
../waku_api/rest/builder,
../rest_api/endpoint/builder,
../discovery/waku_discv5,
../node/waku_metrics,
../common/logging,
@ -38,7 +38,7 @@ type ProtectedShard* {.requiresInit.} = object
type DnsDiscoveryConf* {.requiresInit.} = object
enrTreeUrl*: string
# TODO: should probably only have one set of name servers (see dnsaddrs)
# TODO: should probably only have one set of name servers (see dnsaddrs)
nameServers*: seq[IpAddress]
type StoreSyncConf* {.requiresInit.} = object

View File

@ -1,9 +0,0 @@
import
./api/filter as filter_api,
./api/lightpush as lightpush_api,
./api/store as store_api,
./api/relay as relay_api,
./api/peer_exchange as peer_exchange_api,
./api/ping as ping_api
export filter_api, lightpush_api, store_api, relay_api, peer_exchange_api, ping_api

View File

@ -8,7 +8,7 @@ import
import
../waku_node,
../api,
../kernel_api,
../../waku_rln_relay,
../../waku_relay,
../peer_manager,

9
waku/node/kernel_api.nim Normal file
View File

@ -0,0 +1,9 @@
import
./kernel_api/filter as filter_api,
./kernel_api/lightpush as lightpush_api,
./kernel_api/store as store_api,
./kernel_api/relay as relay_api,
./kernel_api/peer_exchange as peer_exchange_api,
./kernel_api/ping as ping_api
export filter_api, lightpush_api, store_api, relay_api, peer_exchange_api, ping_api

View File

@ -5,18 +5,18 @@ import presto
import
waku/waku_node,
waku/discovery/waku_discv5,
waku/waku_api/message_cache,
waku/waku_api/handlers,
waku/waku_api/rest/server,
waku/waku_api/rest/debug/handlers as rest_debug_api,
waku/waku_api/rest/relay/handlers as rest_relay_api,
waku/waku_api/rest/filter/handlers as rest_filter_api,
waku/waku_api/rest/legacy_lightpush/handlers as rest_legacy_lightpush_api,
waku/waku_api/rest/lightpush/handlers as rest_lightpush_api,
waku/waku_api/rest/store/handlers as rest_store_api,
waku/waku_api/rest/legacy_store/handlers as rest_store_legacy_api,
waku/waku_api/rest/health/handlers as rest_health_api,
waku/waku_api/rest/admin/handlers as rest_admin_api,
waku/rest_api/message_cache,
waku/rest_api/handlers,
waku/rest_api/endpoint/server,
waku/rest_api/endpoint/debug/handlers as rest_debug_endpoint,
waku/rest_api/endpoint/relay/handlers as rest_relay_endpoint,
waku/rest_api/endpoint/filter/handlers as rest_filter_endpoint,
waku/rest_api/endpoint/legacy_lightpush/handlers as rest_legacy_lightpush_endpoint,
waku/rest_api/endpoint/lightpush/handlers as rest_lightpush_endpoint,
waku/rest_api/endpoint/store/handlers as rest_store_endpoint,
waku/rest_api/endpoint/legacy_store/handlers as rest_store_legacy_endpoint,
waku/rest_api/endpoint/health/handlers as rest_health_endpoint,
waku/rest_api/endpoint/admin/handlers as rest_admin_endpoint,
waku/waku_core/topics,
waku/waku_relay/protocol
@ -180,7 +180,7 @@ proc startRestServerProtocolSupport*(
else:
none(DiscoveryHandler)
rest_filter_api.installFilterRestApiHandlers(
rest_filter_endpoint.installFilterRestApiHandlers(
router, node, filterCache, filterDiscoHandler
)
else:
@ -193,8 +193,8 @@ proc startRestServerProtocolSupport*(
else:
none(DiscoveryHandler)
rest_store_api.installStoreApiHandlers(router, node, storeDiscoHandler)
rest_store_legacy_api.installStoreApiHandlers(router, node, storeDiscoHandler)
rest_store_endpoint.installStoreApiHandlers(router, node, storeDiscoHandler)
rest_store_legacy_endpoint.installStoreApiHandlers(router, node, storeDiscoHandler)
## Light push API
## Install it either if client is mounted)
@ -208,10 +208,12 @@ proc startRestServerProtocolSupport*(
else:
none(DiscoveryHandler)
rest_legacy_lightpush_api.installLightPushRequestHandler(
rest_legacy_lightpush_endpoint.installLightPushRequestHandler(
router, node, lightDiscoHandler
)
rest_lightpush_endpoint.installLightPushRequestHandler(
router, node, lightDiscoHandler
)
rest_lightpush_api.installLightPushRequestHandler(router, node, lightDiscoHandler)
else:
restServerNotInstalledTab["lightpush"] = "/lightpush endpoints are not available."

View File

@ -1,3 +0,0 @@
import ./waku_api/message_cache, ./waku_api/rest, ./waku_api/json_rpc
export message_cache, rest

View File

@ -31,7 +31,7 @@ proc computeDigest*(msg: WakuMessage): MessageDigest =
# Computes the hash
return ctx.finish()
## Public API types
## API types
type
#TODO Once Store v2 is removed, the cursor becomes the hash of the last message

View File

@ -3,6 +3,6 @@ import
./node/waku_switch as switch,
./node/waku_node as node,
./node/health_monitor as health_monitor,
./node/api as api
./node/kernel_api as kernel_api
export net_config, switch, node, health_monitor, api
export net_config, switch, node, health_monitor, kernel_api

3
waku/waku_rest.nim Normal file
View File

@ -0,0 +1,3 @@
import ./rest_api/message_cache, ./rest_api/endpoint, ./rest_api/json_rpc
export message_cache, rest

View File

@ -15,7 +15,7 @@ const
type WakuStoreResult*[T] = Result[T, string]
## Public API types
## API types
type
StoreQueryRequest* = object

View File

@ -29,7 +29,7 @@ proc computeDigest*(msg: WakuMessage): MessageDigest =
# Computes the hash
return ctx.finish()
## Public API types
## API types
type
HistoryCursor* = object