core-lightning/gossipd/gossip_wire.csv
Rusty Russell ced572b973 JSONRPC: getnodes: rename to listnodes.
Like listinvoice, and add optional 'id' parameter to ask about a
specific node.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-01-19 22:23:45 +00:00

6.1 KiB

1#include <common/cryptomsg.h>
2#include <common/wireaddr.h>
3# Initialize the gossip daemon.
4gossipctl_init,3000
5gossipctl_init,,broadcast_interval,u32
6gossipctl_init,,chain_hash,struct bitcoin_blkid
7gossipctl_init,,id,struct pubkey
8# If non-zero, port to listen on.
9gossipctl_init,,port,u16
10gossipctl_init,,gflen,u16
11gossipctl_init,,gfeatures,gflen*u8
12gossipctl_init,,lflen,u16
13gossipctl_init,,lfeatures,lflen*u8
14gossipctl_init,,num_wireaddrs,u16
15gossipctl_init,,wireaddrs,num_wireaddrs*struct wireaddr
16gossipctl_init,,rgb,3*u8
17gossipctl_init,,alias,32*u8
18gossipctl_init,,update_channel_interval,u32
19# Master -> gossipd: Optional hint for where to find peer.
20gossipctl_peer_addrhint,3014
21gossipctl_peer_addrhint,,id,struct pubkey
22gossipctl_peer_addrhint,,addr,struct wireaddr
23# Master -> gossipd: connect to a peer. We may get a peer_connected or
24# peer_already_connected
25gossipctl_reach_peer,3001
26gossipctl_reach_peer,,id,struct pubkey
27# Gossipd -> master: we got a peer. Two fds: peer and gossip
28gossip_peer_connected,3002
29gossip_peer_connected,,id,struct pubkey
30gossip_peer_connected,,addr,struct wireaddr
31gossip_peer_connected,,crypto_state,struct crypto_state
32gossip_peer_connected,,gossip_index,u64
33gossip_peer_connected,,gflen,u16
34gossip_peer_connected,,gfeatures,gflen*u8
35gossip_peer_connected,,lflen,u16
36gossip_peer_connected,,lfeatures,lflen*u8
37# Gossipd -> master: you asked to reach a peer, we already had.
38gossip_peer_already_connected,3015
39gossip_peer_already_connected,,id,struct pubkey
40# Gossipd -> master: peer sent non-gossip packet. Two fds: peer and gossip
41gossip_peer_nongossip,3003
42gossip_peer_nongossip,,id,struct pubkey
43gossip_peer_nongossip,,addr,struct wireaddr
44gossip_peer_nongossip,,crypto_state,struct crypto_state
45gossip_peer_nongossip,,gossip_index,u64
46gossip_peer_nongossip,,gflen,u16
47gossip_peer_nongossip,,gfeatures,gflen*u8
48gossip_peer_nongossip,,lflen,u16
49gossip_peer_nongossip,,lfeatures,lflen*u8
50gossip_peer_nongossip,,len,u16
51gossip_peer_nongossip,,msg,len*u8
52# Master -> gossipd: release a peer (so we can open a channel)
53gossipctl_release_peer,3004
54gossipctl_release_peer,,id,struct pubkey
55# Gossipd -> master: reply to gossip_release_peer. Two fds: peer and gossip.
56gossipctl_release_peer_reply,3104
57gossipctl_release_peer_reply,,addr,struct wireaddr
58gossipctl_release_peer_reply,,crypto_state,struct crypto_state
59gossipctl_release_peer_reply,,gossip_index,u64
60gossipctl_release_peer_reply,,gflen,u16
61gossipctl_release_peer_reply,,gfeatures,gflen*u8
62gossipctl_release_peer_reply,,lflen,u16
63gossipctl_release_peer_reply,,lfeatures,lflen*u8
64# Gossipd -> master: reply to gossip_release_peer if we couldn't find the peer.
65gossipctl_release_peer_replyfail,3204
66# master -> gossipd: take back peer, with optional msg. (+peer fd, +gossip fd)
67gossipctl_hand_back_peer,3013
68gossipctl_hand_back_peer,,id,struct pubkey
69gossipctl_hand_back_peer,,crypto_state,struct crypto_state
70gossipctl_hand_back_peer,,gossip_index,u64
71gossipctl_hand_back_peer,,len,u16
72gossipctl_hand_back_peer,,msg,len*u8
73# Pass JSON-RPC getnodes call through
74gossip_getnodes_request,3005
75# Can be 0 or 1 currently
76gossip_getnodes_request,,num,u16
77gossip_getnodes_request,,id,num*struct pubkey
78#include <lightningd/gossip_msg.h>
79gossip_getnodes_reply,3105
80gossip_getnodes_reply,,num_nodes,u16
81gossip_getnodes_reply,,nodes,num_nodes*struct gossip_getnodes_entry
82# Pass JSON-RPC getroute call through
83gossip_getroute_request,3006
84gossip_getroute_request,,source,struct pubkey
85gossip_getroute_request,,destination,struct pubkey
86gossip_getroute_request,,msatoshi,u32
87gossip_getroute_request,,riskfactor,u16
88gossip_getroute_request,,final_cltv,u32
89gossip_getroute_reply,3106
90gossip_getroute_reply,,num_hops,u16
91gossip_getroute_reply,,hops,num_hops*struct route_hop
92gossip_getchannels_request,3007
93gossip_getchannels_reply,3107
94gossip_getchannels_reply,,num_channels,u16
95gossip_getchannels_reply,,nodes,num_channels*struct gossip_getchannels_entry
96# Ping/pong test. Waits for a reply if it expects one.
97gossip_ping,3008
98gossip_ping,,id,struct pubkey
99gossip_ping,,num_pong_bytes,u16
100gossip_ping,,len,u16
101gossip_ping_reply,3108
102# False if id in gossip_ping was unknown.
103gossip_ping_reply,,sent,bool
104# 0 == no pong expected
105gossip_ping_reply,,totlen,u16
106# Given a short_channel_id, return the endpoints
107gossip_resolve_channel_request,3009
108gossip_resolve_channel_request,,channel_id,struct short_channel_id
109gossip_resolve_channel_reply,3109
110gossip_resolve_channel_reply,,num_keys,u16
111gossip_resolve_channel_reply,,keys,num_keys*struct pubkey
112# The main daemon asks for peers
113gossip_getpeers_request,3011
114gossip_getpeers_reply,3111
115gossip_getpeers_reply,,num,u16
116gossip_getpeers_reply,,id,num*struct pubkey
117gossip_getpeers_reply,,addr,num*struct wireaddr
118# Channel daemon can ask for updates for a specific channel, for sending
119# errors. Must be distinct from WIRE_CHANNEL_ANNOUNCEMENT etc. gossip msgs!
120gossip_get_update,3012
121gossip_get_update,,short_channel_id,struct short_channel_id
122# If channel isn't known, update will be empty.
123gossip_get_update_reply,3112
124gossip_get_update_reply,,len,u16
125gossip_get_update_reply,,update,len*u8
126# Gossipd can tell channeld etc about gossip to fwd.
127gossip_send_gossip,3016
128gossip_send_gossip,,gossip_index,u64
129gossip_send_gossip,,len,u16
130gossip_send_gossip,,gossip,len*u8
131# Both sides have seen the funding tx being locked, but we have not
132# yet reached the announcement depth. So we add the channel locally so
133# we can use it already.
134gossip_local_add_channel,3017
135gossip_local_add_channel,,short_channel_id,struct short_channel_id
136gossip_local_add_channel,,chain_hash,struct bitcoin_blkid
137gossip_local_add_channel,,remote_node_id,struct pubkey
138gossip_local_add_channel,,flags,u16
139gossip_local_add_channel,,cltv_expiry_delta,u16
140gossip_local_add_channel,,htlc_minimum_msat,u64
141gossip_local_add_channel,,fee_base_msat,u32
142gossip_local_add_channel,,fee_proportional_millionths,u32
143# Gossipd->master get this tx output please.
144gossip_get_txout,3018
145gossip_get_txout,,short_channel_id,struct short_channel_id
146# master->gossipd here is the output, or empty if none.
147gossip_get_txout_reply,3118
148gossip_get_txout_reply,,short_channel_id,struct short_channel_id
149gossip_get_txout_reply,,len,u16
150gossip_get_txout_reply,,outscript,len*u8