2022-07-01 18:19:57 +00:00
|
|
|
# Nim-LibP2P
|
2023-01-20 14:47:40 +00:00
|
|
|
# Copyright (c) 2023 Status Research & Development GmbH
|
2022-07-01 18:19:57 +00:00
|
|
|
# Licensed under either of
|
|
|
|
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
|
|
|
|
# * MIT license ([LICENSE-MIT](LICENSE-MIT))
|
|
|
|
# at your option.
|
|
|
|
# This file may not be copied, modified, or distributed except according to
|
|
|
|
# those terms.
|
2019-12-08 21:06:58 +00:00
|
|
|
|
2022-07-01 18:19:57 +00:00
|
|
|
when defined(nimdoc):
|
2022-07-26 10:44:26 +00:00
|
|
|
## Welcome to the nim-libp2p reference!
|
2022-07-01 18:19:57 +00:00
|
|
|
##
|
|
|
|
## On the left, you'll find a switch that allows you to see private
|
|
|
|
## procedures. By default, you'll only see the public one (marked with `{.public.}`)
|
|
|
|
##
|
|
|
|
## The difference between public and private procedures is that public procedure
|
|
|
|
## stay backward compatible during the Major version, whereas private ones can
|
|
|
|
## change at each new Minor version.
|
|
|
|
##
|
2022-10-30 07:49:02 +00:00
|
|
|
## If you're new to nim-libp2p, you can find a tutorial `here<https://status-im.github.io/nim-libp2p/docs/tutorial_1_connect/>`_
|
2022-07-01 18:19:57 +00:00
|
|
|
## that can help you get started.
|
2019-12-08 21:06:58 +00:00
|
|
|
|
2022-07-01 18:19:57 +00:00
|
|
|
# Import stuff for doc
|
|
|
|
import
|
|
|
|
libp2p/[
|
|
|
|
protobuf/minprotobuf,
|
|
|
|
switch,
|
|
|
|
stream/lpstream,
|
|
|
|
builders,
|
|
|
|
transports/tcptransport,
|
|
|
|
transports/wstransport,
|
|
|
|
protocols/ping,
|
|
|
|
protocols/pubsub,
|
|
|
|
peerid,
|
|
|
|
peerinfo,
|
|
|
|
peerstore,
|
|
|
|
multiaddress,
|
|
|
|
]
|
|
|
|
|
|
|
|
proc dummyPrivateProc*() =
|
|
|
|
## A private proc example
|
|
|
|
discard
|
2024-06-11 15:18:06 +00:00
|
|
|
|
2022-07-01 18:19:57 +00:00
|
|
|
else:
|
|
|
|
import
|
|
|
|
libp2p/[
|
|
|
|
protobuf/minprotobuf,
|
|
|
|
muxers/muxer,
|
|
|
|
muxers/mplex/mplex,
|
|
|
|
stream/lpstream,
|
|
|
|
stream/bufferstream,
|
|
|
|
stream/connection,
|
|
|
|
transports/transport,
|
|
|
|
transports/tcptransport,
|
2024-06-26 13:27:34 +00:00
|
|
|
transports/quictransport,
|
2022-07-01 18:19:57 +00:00
|
|
|
protocols/secure/noise,
|
|
|
|
cid,
|
|
|
|
multihash,
|
|
|
|
multicodec,
|
|
|
|
errors,
|
|
|
|
switch,
|
|
|
|
peerid,
|
|
|
|
peerinfo,
|
|
|
|
multiaddress,
|
|
|
|
builders,
|
|
|
|
crypto/crypto,
|
|
|
|
protocols/pubsub,
|
|
|
|
]
|
|
|
|
|
|
|
|
export
|
|
|
|
minprotobuf, switch, peerid, peerinfo, connection, multiaddress, crypto, lpstream,
|
|
|
|
bufferstream, muxer, mplex, transport, tcptransport, noise, errors, cid, multihash,
|
|
|
|
multicodec, builders, pubsub
|