mirror of
https://github.com/logos-messaging/specs.git
synced 2026-01-07 08:33:07 +00:00
tiny suggestions for waku-api.md
This commit is contained in:
parent
f834dc4346
commit
ea8fc05d63
@ -91,11 +91,12 @@ description: "Waku: a private and censorship-resistant message routing library."
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
types:
|
types:
|
||||||
WakuNode:
|
WakuNodeHandle:
|
||||||
type: struct
|
type: struct
|
||||||
description: "A Waku node instance."
|
description: "A representation of Waku node instance. This is built by createNode function and
|
||||||
|
should be passed to any other API call."
|
||||||
|
|
||||||
NodeConfig:
|
WakuConfig:
|
||||||
type: struct
|
type: struct
|
||||||
fields:
|
fields:
|
||||||
mode:
|
mode:
|
||||||
@ -103,8 +104,8 @@ types:
|
|||||||
constraints: [ "edge", "relay" ]
|
constraints: [ "edge", "relay" ]
|
||||||
default: *platform dependent*
|
default: *platform dependent*
|
||||||
description: "The mode of operation of the Waku node. Core protocols used by the node are inferred from this mode."
|
description: "The mode of operation of the Waku node. Core protocols used by the node are inferred from this mode."
|
||||||
waku_config:
|
topology:
|
||||||
type: WakuConfig
|
type: TopologyConfig
|
||||||
default: TheWakuNetworkPreset
|
default: TheWakuNetworkPreset
|
||||||
store_confirmation:
|
store_confirmation:
|
||||||
type: bool
|
type: bool
|
||||||
@ -114,15 +115,21 @@ types:
|
|||||||
eth_rpc_endpoints:
|
eth_rpc_endpoints:
|
||||||
type: array<string>
|
type: array<string>
|
||||||
description: "Eth/Web3 RPC endpoint URLs"
|
description: "Eth/Web3 RPC endpoint URLs"
|
||||||
|
message_validation:
|
||||||
|
type: MessageValidation
|
||||||
|
# If the default config for TWN is not used, then we still provide a message validation default
|
||||||
|
default: DefaultMessageValidation
|
||||||
|
|
||||||
WakuConfig:
|
TopologyConfig:
|
||||||
type: struct
|
type: struct
|
||||||
fields:
|
fields:
|
||||||
boostrap_nodes:
|
boostraps:
|
||||||
type: array<string>
|
type: array<string>
|
||||||
# Default means the node does not bootstrap, it is not ideal but practical for local development
|
# Default means the node does not bootstrap, it is not ideal but practical for local development
|
||||||
# TODO: get feedback
|
# TODO: get feedback
|
||||||
description: "Bootstrap nodes, entree and multiaddr formats are accepted."
|
description: "ENRs ([EIP-778](https://eips.ethereum.org/EIPS/eip-778)),
|
||||||
|
enrtree ([EIP-1459](https://eips.ethereum.org/EIPS/eip-1459)) and
|
||||||
|
[multiaddr](https://docs.libp2p.io/concepts/fundamentals/addressing/) formats are accepted."
|
||||||
static_store_nodes:
|
static_store_nodes:
|
||||||
type: array<string>
|
type: array<string>
|
||||||
default: []
|
default: []
|
||||||
@ -133,10 +140,6 @@ types:
|
|||||||
type: AutoShardingConfig
|
type: AutoShardingConfig
|
||||||
default: DefaultAutoShardingConfig
|
default: DefaultAutoShardingConfig
|
||||||
description: "The auto-sharding config, if sharding mode is `auto`"
|
description: "The auto-sharding config, if sharding mode is `auto`"
|
||||||
message_validation:
|
|
||||||
type: MessageValidation
|
|
||||||
# If the default config for TWN is not used, then we still provide a message validation default
|
|
||||||
default: DefaultMessageValidation
|
|
||||||
|
|
||||||
AutoShardingConfig:
|
AutoShardingConfig:
|
||||||
type: struct
|
type: struct
|
||||||
@ -183,7 +186,7 @@ functions:
|
|||||||
type: Config
|
type: Config
|
||||||
description: "The Waku node configuration."
|
description: "The Waku node configuration."
|
||||||
returns:
|
returns:
|
||||||
type: result<WakuNode, error>
|
type: result<WakuNodeHandle, error>
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Predefined values
|
#### Predefined values
|
||||||
@ -229,7 +232,7 @@ values:
|
|||||||
|
|
||||||
#### Extended definitions
|
#### Extended definitions
|
||||||
|
|
||||||
If the `mode` set is `edge`, the initialised `WakuNode` MUST mount:
|
If the `mode` set is `edge`, the initialised `WakuNodeHandle` MUST mount:
|
||||||
|
|
||||||
- [LIGHTPUSH](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/19/lightpush.md) as client
|
- [LIGHTPUSH](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/19/lightpush.md) as client
|
||||||
- [FILTER](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/12/filter.md) as client
|
- [FILTER](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/12/filter.md) as client
|
||||||
@ -239,7 +242,7 @@ And must use mount and use the following protocols to discover peers:
|
|||||||
|
|
||||||
- [PEER-EXCHANGE](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/34/peer-exchange.md)
|
- [PEER-EXCHANGE](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/34/peer-exchange.md)
|
||||||
|
|
||||||
If the `mode` set is `relay`, the initialised `WakuNode` MUST mount:
|
If the `mode` set is `relay`, the initialised `WakuNodeHandle` MUST mount:
|
||||||
|
|
||||||
- [RELAY](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/11/relay.md)
|
- [RELAY](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/11/relay.md)
|
||||||
- [LIGHTPUSH](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/19/lightpush.md) as service node
|
- [LIGHTPUSH](https://github.com/vacp2p/rfc-index/blob/main/waku/standards/core/19/lightpush.md) as service node
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user