@dxos/network-manager 2.33.9-dev.6efa8ddf → 2.33.9-dev.8e92e630

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.
@@ -3,64 +3,25 @@ import substitutions from "../../substitutions";
3
3
  import * as dxos_halo_keys from "./halo/keys";
4
4
  import * as dxos_mesh_signal from "./mesh/signal";
5
5
  import * as google_protobuf from "../google/protobuf";
6
- /**
7
- * Defined in:
8
- * {@link file://./../../../../../../common/protocols/src/proto/dxos/halo/signed.proto}
9
- */
10
6
  export interface Message {
11
7
  payload: google_protobuf.Any;
12
8
  }
13
9
  /**
14
10
  * A generic container message used whenever messages are signed (e.g. PartyCredential)
15
- *
16
- * Defined in:
17
- * {@link file://./../../../../../../common/protocols/src/proto/dxos/halo/signed.proto}
18
11
  */
19
12
  export interface SignedMessage {
20
- /**
21
- * The signed message contents.
22
- */
23
13
  signed: SignedMessage.Signed;
24
- /**
25
- * An array of Signatures, one for each key that signed the message.
26
- */
27
14
  signatures?: SignedMessage.Signature[];
28
15
  }
29
16
  export namespace SignedMessage {
30
- /**
31
- * Defined in:
32
- * {@link file://./../../../../../../common/protocols/src/proto/dxos/halo/signed.proto}
33
- */
34
17
  export interface Signed {
35
- /**
36
- * RFC-3339 datetime string.
37
- */
38
18
  created: string;
39
19
  nonce: Uint8Array;
40
- /**
41
- * The payload to be signed.
42
- */
43
20
  payload: google_protobuf.Any;
44
21
  }
45
- /**
46
- * Defined in:
47
- * {@link file://./../../../../../../common/protocols/src/proto/dxos/halo/signed.proto}
48
- */
49
22
  export interface Signature {
50
- /**
51
- * The publicKey of the keypair that made this signature.
52
- */
53
23
  key: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
54
- /**
55
- * The bytes of the signature.
56
- */
57
24
  signature: Uint8Array;
58
- /**
59
- * The certification chain of SignedMessages for this key.
60
- *
61
- * Options:
62
- * - proto3_optional = true
63
- */
64
25
  keyChain?: dxos_halo_keys.KeyChain;
65
26
  }
66
27
  }
@@ -3,10 +3,6 @@ import substitutions from "../../../substitutions";
3
3
  import * as dxos_credentials from "../credentials";
4
4
  import * as dxos_mesh_signal from "../mesh/signal";
5
5
  import * as google_protobuf from "../../google/protobuf";
6
- /**
7
- * Defined in:
8
- * {@link file://./../../../../../../../common/protocols/src/proto/dxos/halo/keys.proto}
9
- */
10
6
  export enum KeyType {
11
7
  UNKNOWN = 0,
12
8
  IDENTITY = 1,
@@ -15,24 +11,12 @@ export enum KeyType {
15
11
  FEED = 4,
16
12
  DXNS_ADDRESS = 5
17
13
  }
18
- /**
19
- * Defined in:
20
- * {@link file://./../../../../../../../common/protocols/src/proto/dxos/halo/keys.proto}
21
- */
22
14
  export interface PubKey {
23
- data: Uint8Array;
15
+ data?: Uint8Array;
24
16
  }
25
- /**
26
- * Defined in:
27
- * {@link file://./../../../../../../../common/protocols/src/proto/dxos/halo/keys.proto}
28
- */
29
17
  export interface PrivKey {
30
- data: Uint8Array;
18
+ data?: Uint8Array;
31
19
  }
32
- /**
33
- * Defined in:
34
- * {@link file://./../../../../../../../common/protocols/src/proto/dxos/halo/keys.proto}
35
- */
36
20
  export interface KeyRecord {
37
21
  /**
38
22
  * The `KeyType` type of the key. This is often unknown for keys from other sources.
@@ -44,59 +28,33 @@ export interface KeyRecord {
44
28
  publicKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
45
29
  /**
46
30
  * The secret key as a Buffer (this will never be visible outside the Keyring).
47
- *
48
- * Options:
49
- * - proto3_optional = true
50
31
  */
51
32
  secretKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PrivKey"]["decode"]>;
52
33
  /**
53
34
  * Is this key from a Greeting "hint"?
54
- *
55
- * Options:
56
- * - proto3_optional = true
57
35
  */
58
36
  hint?: boolean;
59
37
  /**
60
38
  * Determines if this is our key?
61
39
  * Usually true if `secretKey` is present; may be false for "inception keys" such as the Party key.
62
- *
63
- * Options:
64
- * - proto3_optional = true
65
40
  */
66
41
  own?: boolean;
67
42
  /**
68
43
  * Is this key to be trusted?
69
- *
70
- * Options:
71
- * - proto3_optional = true
72
44
  */
73
45
  trusted?: boolean;
74
46
  /**
75
47
  * An RFC-3339 date/time string for when the key was added to the Keyring.
76
- *
77
- * Options:
78
- * - proto3_optional = true
79
48
  */
80
49
  added?: string;
81
50
  /**
82
51
  * An RFC-3339 date/time string for when the key was created.
83
- *
84
- * Options:
85
- * - proto3_optional = true
86
52
  */
87
53
  created?: string;
88
54
  }
89
- /**
90
- * Defined in:
91
- * {@link file://./../../../../../../../common/protocols/src/proto/dxos/halo/keys.proto}
92
- */
93
55
  export interface KeyRecordList {
94
56
  keys?: KeyRecord[];
95
57
  }
96
- /**
97
- * Defined in:
98
- * {@link file://./../../../../../../../common/protocols/src/proto/dxos/halo/keys.proto}
99
- */
100
58
  export interface KeyChain {
101
59
  publicKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
102
60
  message: dxos_credentials.SignedMessage;
@@ -3,80 +3,50 @@ import substitutions from "../../../substitutions";
3
3
  import * as dxos_credentials from "../credentials";
4
4
  import * as dxos_halo_keys from "../halo/keys";
5
5
  import * as google_protobuf from "../../google/protobuf";
6
- /**
7
- * Defined in:
8
- * {@link file://./../../../defs/dxos/mesh/signal.proto}
9
- */
10
6
  export interface Message {
11
7
  /**
12
8
  * Sender's public key.
13
9
  */
14
- id: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
10
+ id?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
15
11
  /**
16
12
  * Receiver`s public key.
17
13
  */
18
- remoteId: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
14
+ remoteId?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
19
15
  /**
20
16
  * Swarm identefier.
21
17
  */
22
- topic: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
18
+ topic?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
23
19
  /**
24
20
  * Unique connection identifier.
25
21
  */
26
- sessionId: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
22
+ sessionId?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
27
23
  /**
28
24
  * Message payload.
29
25
  */
30
- data: MessageData;
26
+ data?: MessageData;
31
27
  /**
32
28
  * Unique message identifier. Used for Acknolegment and matching Anwers to Offers.
33
- *
34
- * Options:
35
- * - proto3_optional = true
36
29
  */
37
30
  messageId?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
38
31
  }
39
- /**
40
- * Defined in:
41
- * {@link file://./../../../defs/dxos/mesh/signal.proto}
42
- */
43
32
  export interface MessageData {
44
33
  offer?: Offer;
45
34
  answer?: Answer;
46
35
  signal?: Signal;
47
36
  ack?: Acknowledgement;
48
37
  }
49
- /**
50
- * Defined in:
51
- * {@link file://./../../../defs/dxos/mesh/signal.proto}
52
- */
53
38
  export interface Offer {
54
39
  }
55
- /**
56
- * Defined in:
57
- * {@link file://./../../../defs/dxos/mesh/signal.proto}
58
- */
59
40
  export interface Answer {
60
- accept: boolean;
41
+ accept?: boolean;
61
42
  /**
62
43
  * MessageId of the Offer being answered.
63
- *
64
- * Options:
65
- * - proto3_optional = true
66
44
  */
67
45
  offerMessageId?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
68
46
  }
69
- /**
70
- * Defined in:
71
- * {@link file://./../../../defs/dxos/mesh/signal.proto}
72
- */
73
47
  export interface Signal {
74
- json: string;
48
+ json?: string;
75
49
  }
76
- /**
77
- * Defined in:
78
- * {@link file://./../../../defs/dxos/mesh/signal.proto}
79
- */
80
50
  export interface Acknowledgement {
81
- messageId: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
51
+ messageId?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
82
52
  }
@@ -4,6 +4,6 @@ import * as dxos_credentials from "../dxos/credentials";
4
4
  import * as dxos_halo_keys from "../dxos/halo/keys";
5
5
  import * as dxos_mesh_signal from "../dxos/mesh/signal";
6
6
  export interface Any {
7
- type_url: string;
8
- value: Uint8Array;
7
+ type_url?: string;
8
+ value?: Uint8Array;
9
9
  }
@@ -25,5 +25,5 @@ export interface TYPES {
25
25
  }
26
26
  export interface SERVICES {
27
27
  }
28
- export const schemaJson = JSON.parse("{\"nested\":{\"dxos\":{\"nested\":{\"credentials\":{\"nested\":{\"Message\":{\"fields\":{\"payload\":{\"rule\":\"required\",\"type\":\"google.protobuf.Any\",\"id\":1,\"comment\":null}},\"comment\":null},\"SignedMessage\":{\"fields\":{\"signed\":{\"rule\":\"required\",\"type\":\"Signed\",\"id\":1,\"comment\":\"The signed message contents.\"},\"signatures\":{\"rule\":\"repeated\",\"type\":\"Signature\",\"id\":2,\"comment\":\"An array of Signatures, one for each key that signed the message.\"}},\"nested\":{\"Signature\":{\"oneofs\":{\"_keyChain\":{\"oneof\":[\"keyChain\"]}},\"fields\":{\"key\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":1,\"comment\":\"The publicKey of the keypair that made this signature.\"},\"signature\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":2,\"comment\":\"The bytes of the signature.\"},\"keyChain\":{\"type\":\"KeyChain\",\"id\":3,\"options\":{\"proto3_optional\":true},\"comment\":\"The certification chain of SignedMessages for this key.\"}},\"comment\":null},\"Signed\":{\"fields\":{\"created\":{\"rule\":\"required\",\"type\":\"string\",\"id\":1,\"comment\":\"RFC-3339 datetime string.\"},\"nonce\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":2,\"comment\":null},\"payload\":{\"rule\":\"required\",\"type\":\"google.protobuf.Any\",\"id\":10,\"comment\":\"The payload to be signed.\"}},\"comment\":null}},\"comment\":\"A generic container message used whenever messages are signed (e.g. PartyCredential)\"}}},\"halo\":{\"nested\":{\"keys\":{\"nested\":{\"KeyChain\":{\"fields\":{\"publicKey\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"message\":{\"rule\":\"required\",\"type\":\"SignedMessage\",\"id\":2,\"comment\":null},\"parents\":{\"rule\":\"repeated\",\"type\":\"KeyChain\",\"id\":3,\"comment\":null}},\"comment\":null},\"KeyRecord\":{\"oneofs\":{\"_secretKey\":{\"oneof\":[\"secretKey\"]},\"_hint\":{\"oneof\":[\"hint\"]},\"_own\":{\"oneof\":[\"own\"]},\"_trusted\":{\"oneof\":[\"trusted\"]},\"_added\":{\"oneof\":[\"added\"]},\"_created\":{\"oneof\":[\"created\"]}},\"fields\":{\"type\":{\"rule\":\"required\",\"type\":\"KeyType\",\"id\":1,\"comment\":\"The `KeyType` type of the key. This is often unknown for keys from other sources.\"},\"publicKey\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":2,\"comment\":\"The public key as a Buffer (required).\"},\"secretKey\":{\"type\":\"PrivKey\",\"id\":3,\"options\":{\"proto3_optional\":true},\"comment\":\"The secret key as a Buffer (this will never be visible outside the Keyring).\"},\"hint\":{\"type\":\"bool\",\"id\":4,\"options\":{\"proto3_optional\":true},\"comment\":\"Is this key from a Greeting \\\"hint\\\"?\"},\"own\":{\"type\":\"bool\",\"id\":5,\"options\":{\"proto3_optional\":true},\"comment\":\"Determines if this is our key?\\nUsually true if `secretKey` is present; may be false for \\\"inception keys\\\" such as the Party key.\"},\"trusted\":{\"type\":\"bool\",\"id\":6,\"options\":{\"proto3_optional\":true},\"comment\":\"Is this key to be trusted?\"},\"added\":{\"type\":\"string\",\"id\":7,\"options\":{\"proto3_optional\":true},\"comment\":\"An RFC-3339 date/time string for when the key was added to the Keyring.\"},\"created\":{\"type\":\"string\",\"id\":8,\"options\":{\"proto3_optional\":true},\"comment\":\"An RFC-3339 date/time string for when the key was created.\"}},\"comment\":null},\"KeyRecordList\":{\"fields\":{\"keys\":{\"rule\":\"repeated\",\"type\":\"KeyRecord\",\"id\":1,\"comment\":null}},\"comment\":null},\"KeyType\":{\"values\":{\"UNKNOWN\":0,\"IDENTITY\":1,\"DEVICE\":2,\"PARTY\":3,\"FEED\":4,\"DXNS_ADDRESS\":5},\"comment\":null,\"comments\":{\"UNKNOWN\":null,\"IDENTITY\":null,\"DEVICE\":null,\"PARTY\":null,\"FEED\":null,\"DXNS_ADDRESS\":null}},\"PrivKey\":{\"fields\":{\"data\":{\"type\":\"bytes\",\"id\":1,\"comment\":null}},\"comment\":null},\"PubKey\":{\"fields\":{\"data\":{\"type\":\"bytes\",\"id\":1,\"comment\":null}},\"comment\":null}}}}},\"mesh\":{\"nested\":{\"signal\":{\"nested\":{\"Acknowledgement\":{\"fields\":{\"messageId\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null}},\"comment\":null},\"Answer\":{\"oneofs\":{\"_offerMessageId\":{\"oneof\":[\"offerMessageId\"]}},\"fields\":{\"accept\":{\"type\":\"bool\",\"id\":1,\"comment\":null},\"offerMessageId\":{\"type\":\"PubKey\",\"id\":2,\"options\":{\"proto3_optional\":true},\"comment\":\"MessageId of the Offer being answered.\"}},\"comment\":null},\"Message\":{\"oneofs\":{\"_messageId\":{\"oneof\":[\"messageId\"]}},\"fields\":{\"id\":{\"type\":\"PubKey\",\"id\":1,\"comment\":\"Sender's public key.\"},\"remoteId\":{\"type\":\"PubKey\",\"id\":2,\"comment\":\"Receiver`s public key.\"},\"topic\":{\"type\":\"PubKey\",\"id\":3,\"comment\":\"Swarm identefier.\"},\"sessionId\":{\"type\":\"PubKey\",\"id\":4,\"comment\":\"Unique connection identifier.\"},\"data\":{\"type\":\"MessageData\",\"id\":5,\"comment\":\"Message payload.\"},\"messageId\":{\"type\":\"PubKey\",\"id\":6,\"options\":{\"proto3_optional\":true},\"comment\":\"Unique message identifier. Used for Acknolegment and matching Anwers to Offers.\"}},\"comment\":null},\"MessageData\":{\"oneofs\":{\"payload\":{\"oneof\":[\"offer\",\"answer\",\"signal\",\"ack\"],\"comment\":null}},\"fields\":{\"offer\":{\"type\":\"Offer\",\"id\":1,\"comment\":null},\"answer\":{\"type\":\"Answer\",\"id\":2,\"comment\":null},\"signal\":{\"type\":\"Signal\",\"id\":3,\"comment\":null},\"ack\":{\"type\":\"Acknowledgement\",\"id\":4,\"comment\":null}},\"comment\":null},\"Offer\":{\"fields\":{},\"comment\":null},\"Signal\":{\"fields\":{\"json\":{\"type\":\"string\",\"id\":1,\"comment\":null}},\"comment\":null}}}}}}},\"google\":{\"nested\":{\"protobuf\":{\"nested\":{\"Any\":{\"fields\":{\"type_url\":{\"type\":\"string\",\"id\":1},\"value\":{\"type\":\"bytes\",\"id\":2}},\"comment\":null}}}}}}}");
28
+ export const schemaJson = JSON.parse("{\"nested\":{\"dxos\":{\"nested\":{\"credentials\":{\"nested\":{\"Message\":{\"fields\":{\"payload\":{\"rule\":\"required\",\"type\":\"google.protobuf.Any\",\"id\":1,\"comment\":null}},\"comment\":null},\"SignedMessage\":{\"fields\":{\"signed\":{\"rule\":\"required\",\"type\":\"Signed\",\"id\":1,\"comment\":null},\"signatures\":{\"rule\":\"repeated\",\"type\":\"Signature\",\"id\":2,\"comment\":null}},\"nested\":{\"Signature\":{\"fields\":{\"key\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"signature\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":2,\"comment\":null},\"keyChain\":{\"type\":\"KeyChain\",\"id\":3,\"comment\":null}},\"comment\":null},\"Signed\":{\"fields\":{\"created\":{\"rule\":\"required\",\"type\":\"string\",\"id\":1,\"comment\":null},\"nonce\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":2,\"comment\":null},\"payload\":{\"rule\":\"required\",\"type\":\"google.protobuf.Any\",\"id\":10,\"comment\":null}},\"comment\":null}},\"comment\":\"A generic container message used whenever messages are signed (e.g. PartyCredential)\"}}},\"halo\":{\"nested\":{\"keys\":{\"nested\":{\"KeyChain\":{\"fields\":{\"publicKey\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"message\":{\"rule\":\"required\",\"type\":\"SignedMessage\",\"id\":2,\"comment\":null},\"parents\":{\"rule\":\"repeated\",\"type\":\"KeyChain\",\"id\":3,\"comment\":null}},\"comment\":null},\"KeyRecord\":{\"fields\":{\"type\":{\"rule\":\"required\",\"type\":\"KeyType\",\"id\":1,\"comment\":\"The `KeyType` type of the key. This is often unknown for keys from other sources.\"},\"publicKey\":{\"rule\":\"required\",\"type\":\"PubKey\",\"id\":2,\"comment\":\"The public key as a Buffer (required).\"},\"secretKey\":{\"type\":\"PrivKey\",\"id\":3,\"comment\":\"The secret key as a Buffer (this will never be visible outside the Keyring).\"},\"hint\":{\"type\":\"bool\",\"id\":4,\"comment\":\"Is this key from a Greeting \\\"hint\\\"?\"},\"own\":{\"type\":\"bool\",\"id\":5,\"comment\":\"Determines if this is our key?\\nUsually true if `secretKey` is present; may be false for \\\"inception keys\\\" such as the Party key.\"},\"trusted\":{\"type\":\"bool\",\"id\":6,\"comment\":\"Is this key to be trusted?\"},\"added\":{\"type\":\"string\",\"id\":7,\"comment\":\"An RFC-3339 date/time string for when the key was added to the Keyring.\"},\"created\":{\"type\":\"string\",\"id\":8,\"comment\":\"An RFC-3339 date/time string for when the key was created.\"}},\"comment\":null},\"KeyRecordList\":{\"fields\":{\"keys\":{\"rule\":\"repeated\",\"type\":\"KeyRecord\",\"id\":1,\"comment\":null}},\"comment\":null},\"KeyType\":{\"values\":{\"UNKNOWN\":0,\"IDENTITY\":1,\"DEVICE\":2,\"PARTY\":3,\"FEED\":4,\"DXNS_ADDRESS\":5},\"comment\":null,\"comments\":{\"UNKNOWN\":null,\"IDENTITY\":null,\"DEVICE\":null,\"PARTY\":null,\"FEED\":null,\"DXNS_ADDRESS\":null}},\"PrivKey\":{\"fields\":{\"data\":{\"type\":\"bytes\",\"id\":1,\"comment\":null}},\"comment\":null},\"PubKey\":{\"fields\":{\"data\":{\"type\":\"bytes\",\"id\":1,\"comment\":null}},\"comment\":null}}}}},\"mesh\":{\"nested\":{\"signal\":{\"nested\":{\"Acknowledgement\":{\"fields\":{\"messageId\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null}},\"comment\":null},\"Answer\":{\"fields\":{\"accept\":{\"type\":\"bool\",\"id\":1,\"comment\":null},\"offerMessageId\":{\"type\":\"PubKey\",\"id\":2,\"comment\":\"MessageId of the Offer being answered.\"}},\"comment\":null},\"Message\":{\"fields\":{\"id\":{\"type\":\"PubKey\",\"id\":1,\"comment\":\"Sender's public key.\"},\"remoteId\":{\"type\":\"PubKey\",\"id\":2,\"comment\":\"Receiver`s public key.\"},\"topic\":{\"type\":\"PubKey\",\"id\":3,\"comment\":\"Swarm identefier.\"},\"sessionId\":{\"type\":\"PubKey\",\"id\":4,\"comment\":\"Unique connection identifier.\"},\"data\":{\"type\":\"MessageData\",\"id\":5,\"comment\":\"Message payload.\"},\"messageId\":{\"type\":\"PubKey\",\"id\":6,\"comment\":\"Unique message identifier. Used for Acknolegment and matching Anwers to Offers.\"}},\"comment\":null},\"MessageData\":{\"oneofs\":{\"payload\":{\"oneof\":[\"offer\",\"answer\",\"signal\",\"ack\"],\"comment\":null}},\"fields\":{\"offer\":{\"type\":\"Offer\",\"id\":1,\"comment\":null},\"answer\":{\"type\":\"Answer\",\"id\":2,\"comment\":null},\"signal\":{\"type\":\"Signal\",\"id\":3,\"comment\":null},\"ack\":{\"type\":\"Acknowledgement\",\"id\":4,\"comment\":null}},\"comment\":null},\"Offer\":{\"fields\":{},\"comment\":null},\"Signal\":{\"fields\":{\"json\":{\"type\":\"string\",\"id\":1,\"comment\":null}},\"comment\":null}}}}}}},\"google\":{\"nested\":{\"protobuf\":{\"nested\":{\"Any\":{\"fields\":{\"type_url\":{\"type\":\"string\",\"id\":1},\"value\":{\"type\":\"bytes\",\"id\":2}},\"comment\":null}}}}}}}");
29
29
  export const schema = Schema.fromJson<TYPES, SERVICES>(schemaJson, substitutions);