-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathlibp2p.ss
75 lines (74 loc) · 1.6 KB
/
libp2p.ss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
;;; -*- Gerbil -*-
;;; © vyzo
;;; libp2p package interface
(import :vyzo/libp2p/daemon
:vyzo/libp2p/client
:vyzo/libp2p/dht
:vyzo/libp2p/pubsub
:vyzo/libp2p/connmgr
:vyzo/libp2p/cid
:vyzo/libp2p/peer
:vyzo/libp2p/multiaddr)
(export
;; :vyzo/libp2p/daemon
current-libp2p-daemon
start-libp2p-daemon!
stop-libp2p-daemon!
use-libp2p-daemon!
;; :vyzo/libp2p/client
libp2p-error?
(rename: client? libp2p-client?)
stream?
stream-in
stream-out
stream-info
stream-close
stream-write-delimited
stream-read-delimited
open-libp2p-client
libp2p-identify
libp2p-connect
libp2p-disconnect
libp2p-stream
libp2p-listen
libp2p-close
libp2p-list-peers
;; :vyzo/libp2p/dht
dht-find-peer
dht-find-peers-connected-to-peer*
dht-find-peers-connected-to-peer
dht-get-closest-peers*
dht-get-closest-peers
dht-get-public-key
dht-get-value
dht-search-value*
dht-search-value
dht-put-value
dht-find-providers*
dht-find-providers
dht-provide
;; :vyzo/libp2p/pubsub
pubsub-get-topics
pubsub-list-peers
pubsub-publish
pubsub-publisher
pubsub-subscribe
;; :vyzo/libp2p/connmgr
libp2p-tag-peer
libp2p-untag-peer
libp2p-trim-open-connections
;; :vyzo/libp2p/cid
CID?
CIDv1 CIDv1Raw CIDv1Raw/sha256
CID->string string->CID
CID->bytes bytes->CID
multihash? multihash-sha256
;; :vyzo/libp2p/peer
(struct-out ID peer-info)
ID->string string->ID
peer-info->string peer-info->string* string->peer-info
;; :vyzo/libp2p/multiaddr
(struct-out multiaddr)
multiaddr->string
string->multiaddr
defprotocol)