@dcl/protocol 1.0.0-3061598530.commit-f2e0efe → 1.0.0-3069678574.commit-63cc310

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,74 @@
1
+ // This file maps to the definition in https://rfc.decentraland.org/rfc/RFC-5
2
+ // It is mandatory to also update that RFC when modifying this file
3
+
4
+ syntax = "proto3";
5
+
6
+ package protocol.comms.rfc5;
7
+
8
+ /**
9
+ * Sent to the clients when the challenge is validated and they are authenticated.
10
+ */
11
+ message WsWelcome {
12
+ uint32 alias = 1;
13
+ map<uint32, string> peer_identities = 2;
14
+ }
15
+
16
+ /**
17
+ * Sent to the clients when a user connects and their identity is authenticated.
18
+ */
19
+ message WsPeerJoin {
20
+ uint32 alias = 1;
21
+ string address = 2;
22
+ }
23
+
24
+ /**
25
+ * Sent to the clients when a user gets disconnected.
26
+ */
27
+ message WsPeerLeave {
28
+ uint32 alias = 1;
29
+ }
30
+
31
+ /**
32
+ * This is the data package for all user messages.
33
+ */
34
+ message WsPeerUpdate {
35
+ uint32 from_alias = 1;
36
+ bytes body = 2;
37
+ }
38
+
39
+
40
+ /**
41
+ * Sent to the clients as first message, it contains a challenge string and a
42
+ * hint about if the same address is connected to another island. In such case,
43
+ * after authentication, the server may decide to end the former connection. This
44
+ * hint exists for UX purposes of the explorers for cases like multiple running
45
+ * instances of the explorer.
46
+ */
47
+ message WsChallengeRequired {
48
+ string challenge_to_sign = 1;
49
+ bool already_connected = 2;
50
+ }
51
+
52
+ /**
53
+ * Response to WsChallengeRequired, signed using the AuthChain mechanism.
54
+ */
55
+ message WsSignedChallenge {
56
+ string auth_chain_json = 1;
57
+ }
58
+
59
+ message WsPacket {
60
+ oneof message {
61
+ // direction: server->client
62
+ WsWelcome welcome_message = 1;
63
+ // direction: server->client
64
+ WsPeerJoin peer_join_message = 2;
65
+ // direction: both ways
66
+ WsPeerUpdate peer_update_message = 3;
67
+ // direction: server->client
68
+ WsChallengeRequired challenge_message = 4;
69
+ // direction: client->server
70
+ WsSignedChallenge signed_challenge_for_server = 5;
71
+ // direction: server->client
72
+ WsPeerLeave peer_leave_message = 6;
73
+ }
74
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl/protocol",
3
- "version": "1.0.0-3061598530.commit-f2e0efe",
3
+ "version": "1.0.0-3069678574.commit-63cc310",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,5 +18,5 @@
18
18
  "ecs",
19
19
  "bff"
20
20
  ],
21
- "commit": "f2e0efe655a38a2218ed4afc6974af89fc66beff"
21
+ "commit": "63cc310f0cdccda0fafb1a138244a5fcee86dd38"
22
22
  }