@dxos/echo-protocol 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.
- package/dist/src/feeds/feed.test.js +3 -6
- package/dist/src/feeds/feed.test.js.map +1 -1
- package/dist/src/proto/gen/dxos/credentials.d.ts +0 -39
- package/dist/src/proto/gen/dxos/credentials.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/feed.d.ts +6 -65
- package/dist/src/proto/gen/dxos/echo/feed.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/feed.js +0 -4
- package/dist/src/proto/gen/dxos/echo/feed.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/invitation.d.ts +3 -19
- package/dist/src/proto/gen/dxos/echo/invitation.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/invitation.js +0 -6
- package/dist/src/proto/gen/dxos/echo/invitation.js.map +1 -1
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts +4 -26
- package/dist/src/proto/gen/dxos/echo/metadata.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/service.d.ts +13 -49
- package/dist/src/proto/gen/dxos/echo/service.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts +13 -45
- package/dist/src/proto/gen/dxos/echo/snapshot.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/testing.d.ts +3 -15
- package/dist/src/proto/gen/dxos/echo/testing.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/echo/timeframe.d.ts +2 -9
- package/dist/src/proto/gen/dxos/echo/timeframe.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/keys.d.ts +2 -44
- package/dist/src/proto/gen/dxos/halo/keys.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/halo/keys.js +0 -4
- package/dist/src/proto/gen/dxos/halo/keys.js.map +1 -1
- package/dist/src/proto/gen/dxos/test/echo.d.ts +3 -15
- package/dist/src/proto/gen/dxos/test/echo.d.ts.map +1 -1
- package/dist/src/proto/gen/google/protobuf.d.ts +4 -4
- package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
- package/dist/src/proto/gen/index.d.ts.map +1 -1
- package/dist/src/proto/gen/index.js +1 -1
- package/dist/src/proto/gen/index.js.map +1 -1
- package/dist/src/proto/messages.d.ts +2 -1
- package/dist/src/proto/messages.d.ts.map +1 -1
- package/dist/src/proto/messages.js +13 -3
- package/dist/src/proto/messages.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/proto/gen/dxos/credentials.ts +0 -39
- package/src/proto/gen/dxos/echo/feed.ts +6 -65
- package/src/proto/gen/dxos/echo/invitation.ts +3 -19
- package/src/proto/gen/dxos/echo/metadata.ts +4 -26
- package/src/proto/gen/dxos/echo/service.ts +13 -49
- package/src/proto/gen/dxos/echo/snapshot.ts +13 -45
- package/src/proto/gen/dxos/echo/testing.ts +3 -15
- package/src/proto/gen/dxos/echo/timeframe.ts +2 -9
- package/src/proto/gen/dxos/halo/keys.ts +2 -44
- package/src/proto/gen/dxos/test/echo.ts +3 -15
- package/src/proto/gen/google/protobuf.ts +4 -4
- package/src/proto/gen/index.ts +1 -1
|
@@ -10,10 +10,6 @@ import * as dxos_echo_timeframe from "./timeframe";
|
|
|
10
10
|
import * as dxos_halo_keys from "../halo/keys";
|
|
11
11
|
import * as dxos_test_echo from "../test/echo";
|
|
12
12
|
import * as google_protobuf from "../../google/protobuf";
|
|
13
|
-
/**
|
|
14
|
-
* Defined in:
|
|
15
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/metadata.proto}
|
|
16
|
-
*/
|
|
17
13
|
export interface EchoMetadata {
|
|
18
14
|
/**
|
|
19
15
|
* Version number that is inceremnted every time there's a breaking change to the storage schema.
|
|
@@ -21,43 +17,25 @@ export interface EchoMetadata {
|
|
|
21
17
|
* This is used to detect if the storage schema has changed since the last time the client was run.
|
|
22
18
|
* Loading data from a different version will might result in an error.
|
|
23
19
|
*/
|
|
24
|
-
version
|
|
20
|
+
version?: number;
|
|
25
21
|
parties?: PartyMetadata[];
|
|
26
|
-
created
|
|
27
|
-
updated
|
|
22
|
+
created?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
|
|
23
|
+
updated?: ReturnType<(typeof substitutions)["google.protobuf.Timestamp"]["decode"]>;
|
|
28
24
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Defined in:
|
|
31
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/metadata.proto}
|
|
32
|
-
*/
|
|
33
25
|
export interface PartyMetadata {
|
|
34
26
|
/**
|
|
35
27
|
* Party key.
|
|
36
28
|
*/
|
|
37
|
-
key
|
|
38
|
-
/**
|
|
39
|
-
* Options:
|
|
40
|
-
* - proto3_optional = true
|
|
41
|
-
*/
|
|
29
|
+
key?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
42
30
|
genesisFeedKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
43
31
|
/**
|
|
44
32
|
* Key of the wriatable control feed.
|
|
45
|
-
*
|
|
46
|
-
* Options:
|
|
47
|
-
* - proto3_optional = true
|
|
48
33
|
*/
|
|
49
34
|
controlFeedKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
50
35
|
/**
|
|
51
36
|
* Key of the wriatable data feed.
|
|
52
|
-
*
|
|
53
|
-
* Options:
|
|
54
|
-
* - proto3_optional = true
|
|
55
37
|
*/
|
|
56
38
|
dataFeedKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
57
|
-
/**
|
|
58
|
-
* Options:
|
|
59
|
-
* - proto3_optional = true
|
|
60
|
-
*/
|
|
61
39
|
latestTimeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
|
|
62
40
|
/**
|
|
63
41
|
* List of all feed associated with the party.
|
|
@@ -10,79 +10,43 @@ import * as dxos_echo_timeframe from "./timeframe";
|
|
|
10
10
|
import * as dxos_halo_keys from "../halo/keys";
|
|
11
11
|
import * as dxos_test_echo from "../test/echo";
|
|
12
12
|
import * as google_protobuf from "../../google/protobuf";
|
|
13
|
-
/**
|
|
14
|
-
* Defined in:
|
|
15
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
|
|
16
|
-
*/
|
|
17
13
|
export interface SubscribeEntitySetRequest {
|
|
18
|
-
partyKey
|
|
14
|
+
partyKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
19
15
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Defined in:
|
|
22
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
|
|
23
|
-
*/
|
|
24
16
|
export interface SubscribeEntitySetResponse {
|
|
25
17
|
added?: dxos_echo_feed.EchoEnvelope[];
|
|
26
18
|
deleted?: dxos_echo_feed.EchoEnvelope[];
|
|
27
19
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Defined in:
|
|
30
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
|
|
31
|
-
*/
|
|
32
20
|
export interface SubscribeEntityStreamRequest {
|
|
33
|
-
partyKey
|
|
34
|
-
itemId
|
|
21
|
+
partyKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
22
|
+
itemId?: string;
|
|
35
23
|
}
|
|
36
|
-
/**
|
|
37
|
-
* Defined in:
|
|
38
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
|
|
39
|
-
*/
|
|
40
24
|
export interface SubscribeEntityStreamResponse {
|
|
41
25
|
snapshot?: dxos_echo_snapshot.ItemSnapshot;
|
|
42
26
|
mutation?: SubscribeEntityStreamResponse.Mutation;
|
|
43
27
|
}
|
|
44
28
|
export namespace SubscribeEntityStreamResponse {
|
|
45
|
-
/**
|
|
46
|
-
* Defined in:
|
|
47
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
|
|
48
|
-
*/
|
|
49
29
|
export interface Mutation {
|
|
50
|
-
data
|
|
51
|
-
meta
|
|
30
|
+
data?: dxos_echo_feed.EchoEnvelope;
|
|
31
|
+
meta?: SubscribeEntityStreamResponse.Mutation.Metadata;
|
|
52
32
|
}
|
|
53
33
|
export namespace Mutation {
|
|
54
|
-
/**
|
|
55
|
-
* Defined in:
|
|
56
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
|
|
57
|
-
*/
|
|
58
34
|
export interface Metadata {
|
|
59
|
-
feedKey
|
|
60
|
-
memberKey
|
|
61
|
-
seq
|
|
62
|
-
timeframe
|
|
35
|
+
feedKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
36
|
+
memberKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
37
|
+
seq?: number;
|
|
38
|
+
timeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
|
|
63
39
|
}
|
|
64
40
|
}
|
|
65
41
|
}
|
|
66
|
-
/**
|
|
67
|
-
* Defined in:
|
|
68
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
|
|
69
|
-
*/
|
|
70
42
|
export interface WriteRequest {
|
|
71
|
-
partyKey
|
|
72
|
-
mutation
|
|
43
|
+
partyKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
44
|
+
mutation?: dxos_echo_feed.EchoEnvelope;
|
|
73
45
|
}
|
|
74
|
-
/**
|
|
75
|
-
* Defined in:
|
|
76
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
|
|
77
|
-
*/
|
|
78
46
|
export interface MutationReceipt {
|
|
79
|
-
feedKey
|
|
80
|
-
seq
|
|
47
|
+
feedKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
48
|
+
seq?: number;
|
|
81
49
|
}
|
|
82
|
-
/**
|
|
83
|
-
* Defined in:
|
|
84
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/service.proto}
|
|
85
|
-
*/
|
|
86
50
|
export interface DataService {
|
|
87
51
|
subscribeEntitySet: (request: SubscribeEntitySetRequest) => Stream<SubscribeEntitySetResponse>;
|
|
88
52
|
subscribeEntityStream: (request: SubscribeEntityStreamRequest) => Stream<SubscribeEntityStreamResponse>;
|
|
@@ -10,44 +10,20 @@ import * as dxos_echo_timeframe from "./timeframe";
|
|
|
10
10
|
import * as dxos_halo_keys from "../halo/keys";
|
|
11
11
|
import * as dxos_test_echo from "../test/echo";
|
|
12
12
|
import * as google_protobuf from "../../google/protobuf";
|
|
13
|
-
/**
|
|
14
|
-
* Defined in:
|
|
15
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
|
|
16
|
-
*/
|
|
17
13
|
export interface PartySnapshot {
|
|
18
|
-
partyKey
|
|
19
|
-
/**
|
|
20
|
-
* Options:
|
|
21
|
-
* - proto3_optional = true
|
|
22
|
-
*/
|
|
14
|
+
partyKey?: Uint8Array;
|
|
23
15
|
timeframe?: ReturnType<(typeof substitutions)["dxos.echo.timeframe.TimeframeVector"]["decode"]>;
|
|
24
|
-
/**
|
|
25
|
-
* Options:
|
|
26
|
-
* - proto3_optional = true
|
|
27
|
-
*/
|
|
28
16
|
timestamp?: number;
|
|
29
|
-
halo
|
|
30
|
-
database
|
|
17
|
+
halo?: HaloStateSnapshot;
|
|
18
|
+
database?: DatabaseSnapshot;
|
|
31
19
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Defined in:
|
|
34
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
|
|
35
|
-
*/
|
|
36
20
|
export interface HaloStateSnapshot {
|
|
37
21
|
messages?: ReturnType<(typeof substitutions)["dxos.echo.feed.CredentialsMessage"]["decode"]>[];
|
|
38
22
|
}
|
|
39
|
-
/**
|
|
40
|
-
* Defined in:
|
|
41
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
|
|
42
|
-
*/
|
|
43
23
|
export interface DatabaseSnapshot {
|
|
44
24
|
items?: ItemSnapshot[];
|
|
45
25
|
links?: LinkSnapshot[];
|
|
46
26
|
}
|
|
47
|
-
/**
|
|
48
|
-
* Defined in:
|
|
49
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
|
|
50
|
-
*/
|
|
51
27
|
export interface ItemSnapshot {
|
|
52
28
|
/**
|
|
53
29
|
* Options:
|
|
@@ -59,7 +35,11 @@ export interface ItemSnapshot {
|
|
|
59
35
|
* - proto3_optional = true
|
|
60
36
|
*/
|
|
61
37
|
itemType?: string;
|
|
62
|
-
|
|
38
|
+
/**
|
|
39
|
+
* Options:
|
|
40
|
+
* - proto3_optional = true
|
|
41
|
+
*/
|
|
42
|
+
modelType?: string;
|
|
63
43
|
/**
|
|
64
44
|
* Options:
|
|
65
45
|
* - proto3_optional = true
|
|
@@ -76,10 +56,6 @@ export interface ItemSnapshot {
|
|
|
76
56
|
*/
|
|
77
57
|
model?: ModelSnapshot;
|
|
78
58
|
}
|
|
79
|
-
/**
|
|
80
|
-
* Defined in:
|
|
81
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
|
|
82
|
-
*/
|
|
83
59
|
export interface LinkSnapshot {
|
|
84
60
|
/**
|
|
85
61
|
* Options:
|
|
@@ -91,7 +67,11 @@ export interface LinkSnapshot {
|
|
|
91
67
|
* - proto3_optional = true
|
|
92
68
|
*/
|
|
93
69
|
linkType?: string;
|
|
94
|
-
|
|
70
|
+
/**
|
|
71
|
+
* Options:
|
|
72
|
+
* - proto3_optional = true
|
|
73
|
+
*/
|
|
74
|
+
modelType?: string;
|
|
95
75
|
/**
|
|
96
76
|
* Options:
|
|
97
77
|
* - proto3_optional = true
|
|
@@ -105,10 +85,6 @@ export interface LinkSnapshot {
|
|
|
105
85
|
*/
|
|
106
86
|
model?: ModelSnapshot;
|
|
107
87
|
}
|
|
108
|
-
/**
|
|
109
|
-
* Defined in:
|
|
110
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
|
|
111
|
-
*/
|
|
112
88
|
export interface ModelSnapshot {
|
|
113
89
|
/**
|
|
114
90
|
* Encoded model snapshot (defined by the model's codec).
|
|
@@ -123,18 +99,10 @@ export interface ModelSnapshot {
|
|
|
123
99
|
*/
|
|
124
100
|
mutations?: ModelMutation[];
|
|
125
101
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Defined in:
|
|
128
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
|
|
129
|
-
*/
|
|
130
102
|
export interface ModelMutation {
|
|
131
103
|
mutation: Uint8Array;
|
|
132
104
|
meta: ModelMutationMeta;
|
|
133
105
|
}
|
|
134
|
-
/**
|
|
135
|
-
* Defined in:
|
|
136
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/snapshot.proto}
|
|
137
|
-
*/
|
|
138
106
|
export interface ModelMutationMeta {
|
|
139
107
|
feedKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
140
108
|
seq: number;
|
|
@@ -10,25 +10,13 @@ import * as dxos_echo_timeframe from "./timeframe";
|
|
|
10
10
|
import * as dxos_halo_keys from "../halo/keys";
|
|
11
11
|
import * as dxos_test_echo from "../test/echo";
|
|
12
12
|
import * as google_protobuf from "../../google/protobuf";
|
|
13
|
-
/**
|
|
14
|
-
* Defined in:
|
|
15
|
-
* {@link file://./../../../defs/testing.proto}
|
|
16
|
-
*/
|
|
17
13
|
export interface TestItemMutation {
|
|
18
|
-
key
|
|
19
|
-
value
|
|
14
|
+
key?: string;
|
|
15
|
+
value?: string;
|
|
20
16
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Defined in:
|
|
23
|
-
* {@link file://./../../../defs/testing.proto}
|
|
24
|
-
*/
|
|
25
17
|
export interface TestListMutation {
|
|
26
|
-
data
|
|
18
|
+
data?: string;
|
|
27
19
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Defined in:
|
|
30
|
-
* {@link file://./../../../defs/testing.proto}
|
|
31
|
-
*/
|
|
32
20
|
export interface TestItemSnapshot {
|
|
33
21
|
keys?: TestItemMutation[];
|
|
34
22
|
}
|
|
@@ -12,20 +12,13 @@ import * as dxos_test_echo from "../test/echo";
|
|
|
12
12
|
import * as google_protobuf from "../../google/protobuf";
|
|
13
13
|
/**
|
|
14
14
|
* Vector timestamp used to order messages.
|
|
15
|
-
*
|
|
16
|
-
* Defined in:
|
|
17
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/timeframe.proto}
|
|
18
15
|
*/
|
|
19
16
|
export interface TimeframeVector {
|
|
20
17
|
frames?: TimeframeVector.Frame[];
|
|
21
18
|
}
|
|
22
19
|
export namespace TimeframeVector {
|
|
23
|
-
/**
|
|
24
|
-
* Defined in:
|
|
25
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/echo/timeframe.proto}
|
|
26
|
-
*/
|
|
27
20
|
export interface Frame {
|
|
28
|
-
feedKey
|
|
29
|
-
seq
|
|
21
|
+
feedKey?: Uint8Array;
|
|
22
|
+
seq?: number;
|
|
30
23
|
}
|
|
31
24
|
}
|
|
@@ -10,10 +10,6 @@ import * as dxos_echo_testing from "../echo/testing";
|
|
|
10
10
|
import * as dxos_echo_timeframe from "../echo/timeframe";
|
|
11
11
|
import * as dxos_test_echo from "../test/echo";
|
|
12
12
|
import * as google_protobuf from "../../google/protobuf";
|
|
13
|
-
/**
|
|
14
|
-
* Defined in:
|
|
15
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/halo/keys.proto}
|
|
16
|
-
*/
|
|
17
13
|
export enum KeyType {
|
|
18
14
|
UNKNOWN = 0,
|
|
19
15
|
IDENTITY = 1,
|
|
@@ -22,24 +18,12 @@ export enum KeyType {
|
|
|
22
18
|
FEED = 4,
|
|
23
19
|
DXNS_ADDRESS = 5
|
|
24
20
|
}
|
|
25
|
-
/**
|
|
26
|
-
* Defined in:
|
|
27
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/halo/keys.proto}
|
|
28
|
-
*/
|
|
29
21
|
export interface PubKey {
|
|
30
|
-
data
|
|
22
|
+
data?: Uint8Array;
|
|
31
23
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Defined in:
|
|
34
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/halo/keys.proto}
|
|
35
|
-
*/
|
|
36
24
|
export interface PrivKey {
|
|
37
|
-
data
|
|
25
|
+
data?: Uint8Array;
|
|
38
26
|
}
|
|
39
|
-
/**
|
|
40
|
-
* Defined in:
|
|
41
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/halo/keys.proto}
|
|
42
|
-
*/
|
|
43
27
|
export interface KeyRecord {
|
|
44
28
|
/**
|
|
45
29
|
* The `KeyType` type of the key. This is often unknown for keys from other sources.
|
|
@@ -51,59 +35,33 @@ export interface KeyRecord {
|
|
|
51
35
|
publicKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
52
36
|
/**
|
|
53
37
|
* The secret key as a Buffer (this will never be visible outside the Keyring).
|
|
54
|
-
*
|
|
55
|
-
* Options:
|
|
56
|
-
* - proto3_optional = true
|
|
57
38
|
*/
|
|
58
39
|
secretKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PrivKey"]["decode"]>;
|
|
59
40
|
/**
|
|
60
41
|
* Is this key from a Greeting "hint"?
|
|
61
|
-
*
|
|
62
|
-
* Options:
|
|
63
|
-
* - proto3_optional = true
|
|
64
42
|
*/
|
|
65
43
|
hint?: boolean;
|
|
66
44
|
/**
|
|
67
45
|
* Determines if this is our key?
|
|
68
46
|
* Usually true if `secretKey` is present; may be false for "inception keys" such as the Party key.
|
|
69
|
-
*
|
|
70
|
-
* Options:
|
|
71
|
-
* - proto3_optional = true
|
|
72
47
|
*/
|
|
73
48
|
own?: boolean;
|
|
74
49
|
/**
|
|
75
50
|
* Is this key to be trusted?
|
|
76
|
-
*
|
|
77
|
-
* Options:
|
|
78
|
-
* - proto3_optional = true
|
|
79
51
|
*/
|
|
80
52
|
trusted?: boolean;
|
|
81
53
|
/**
|
|
82
54
|
* An RFC-3339 date/time string for when the key was added to the Keyring.
|
|
83
|
-
*
|
|
84
|
-
* Options:
|
|
85
|
-
* - proto3_optional = true
|
|
86
55
|
*/
|
|
87
56
|
added?: string;
|
|
88
57
|
/**
|
|
89
58
|
* An RFC-3339 date/time string for when the key was created.
|
|
90
|
-
*
|
|
91
|
-
* Options:
|
|
92
|
-
* - proto3_optional = true
|
|
93
59
|
*/
|
|
94
60
|
created?: string;
|
|
95
61
|
}
|
|
96
|
-
/**
|
|
97
|
-
* Defined in:
|
|
98
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/halo/keys.proto}
|
|
99
|
-
*/
|
|
100
62
|
export interface KeyRecordList {
|
|
101
63
|
keys?: KeyRecord[];
|
|
102
64
|
}
|
|
103
|
-
/**
|
|
104
|
-
* Defined in:
|
|
105
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/halo/keys.proto}
|
|
106
|
-
*/
|
|
107
65
|
export interface KeyChain {
|
|
108
66
|
publicKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
|
|
109
67
|
message: dxos_credentials.SignedMessage;
|
|
@@ -10,25 +10,13 @@ import * as dxos_echo_testing from "../echo/testing";
|
|
|
10
10
|
import * as dxos_echo_timeframe from "../echo/timeframe";
|
|
11
11
|
import * as dxos_halo_keys from "../halo/keys";
|
|
12
12
|
import * as google_protobuf from "../../google/protobuf";
|
|
13
|
-
/**
|
|
14
|
-
* Defined in:
|
|
15
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/test/echo.proto}
|
|
16
|
-
*/
|
|
17
13
|
export interface TestItemMutation {
|
|
18
|
-
key
|
|
19
|
-
value
|
|
14
|
+
key?: string;
|
|
15
|
+
value?: string;
|
|
20
16
|
}
|
|
21
|
-
/**
|
|
22
|
-
* Defined in:
|
|
23
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/test/echo.proto}
|
|
24
|
-
*/
|
|
25
17
|
export interface TestListMutation {
|
|
26
|
-
data
|
|
18
|
+
data?: string;
|
|
27
19
|
}
|
|
28
|
-
/**
|
|
29
|
-
* Defined in:
|
|
30
|
-
* {@link file://./../../../../../../../common/protocols/src/proto/dxos/test/echo.proto}
|
|
31
|
-
*/
|
|
32
20
|
export interface TestItemSnapshot {
|
|
33
21
|
keys?: TestItemMutation[];
|
|
34
22
|
}
|
|
@@ -11,10 +11,10 @@ import * as dxos_echo_timeframe from "../dxos/echo/timeframe";
|
|
|
11
11
|
import * as dxos_halo_keys from "../dxos/halo/keys";
|
|
12
12
|
import * as dxos_test_echo from "../dxos/test/echo";
|
|
13
13
|
export interface Any {
|
|
14
|
-
type_url
|
|
15
|
-
value
|
|
14
|
+
type_url?: string;
|
|
15
|
+
value?: Uint8Array;
|
|
16
16
|
}
|
|
17
17
|
export interface Timestamp {
|
|
18
|
-
seconds
|
|
19
|
-
nanos
|
|
18
|
+
seconds?: string;
|
|
19
|
+
nanos?: number;
|
|
20
20
|
}
|
package/src/proto/gen/index.ts
CHANGED
|
@@ -63,5 +63,5 @@ export interface TYPES {
|
|
|
63
63
|
export interface SERVICES {
|
|
64
64
|
"dxos.echo.service.DataService": dxos_echo_service.DataService;
|
|
65
65
|
}
|
|
66
|
-
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)\"}}},\"echo\":{\"nested\":{\"feed\":{\"nested\":{\"CredentialsMessage\":{\"fields\":{\"data\":{\"type\":\"bytes\",\"id\":1,\"comment\":null}},\"comment\":\"A container for dxos.credentials.Message\"},\"EchoEnvelope\":{\"oneofs\":{\"_genesis\":{\"oneof\":[\"genesis\"]},\"_itemMutation\":{\"oneof\":[\"itemMutation\"]},\"_mutation\":{\"oneof\":[\"mutation\"]},\"_snapshot\":{\"oneof\":[\"snapshot\"]}},\"fields\":{\"itemId\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"genesis\":{\"type\":\"ItemGenesis\",\"id\":10,\"options\":{\"proto3_optional\":true},\"comment\":null},\"itemMutation\":{\"type\":\"ItemMutation\",\"id\":11,\"options\":{\"proto3_optional\":true},\"comment\":null},\"mutation\":{\"type\":\"bytes\",\"id\":12,\"options\":{\"proto3_optional\":true},\"comment\":null},\"snapshot\":{\"type\":\"ModelSnapshot\",\"id\":13,\"options\":{\"proto3_optional\":true},\"comment\":\"Set the model to the provided snapshot.\"}},\"comment\":\"Wrapper for all ECHO messages.\"},\"FeedMessage\":{\"oneofs\":{\"payload\":{\"oneof\":[\"halo\",\"echo\"],\"comment\":null}},\"fields\":{\"timeframe\":{\"type\":\"TimeframeVector\",\"id\":1,\"comment\":null},\"halo\":{\"type\":\"CredentialsMessage\",\"id\":10,\"comment\":null},\"echo\":{\"type\":\"EchoEnvelope\",\"id\":11,\"comment\":null}},\"comment\":\"Outer message type decoded by Codec.\\nThis is what is written to the feeds.\"},\"ItemGenesis\":{\"oneofs\":{\"_itemType\":{\"oneof\":[\"itemType\"]},\"_modelVersion\":{\"oneof\":[\"modelVersion\"]},\"_link\":{\"oneof\":[\"link\"]}},\"fields\":{\"itemType\":{\"type\":\"string\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelType\":{\"type\":\"string\",\"id\":2,\"comment\":null},\"modelVersion\":{\"type\":\"string\",\"id\":3,\"options\":{\"proto3_optional\":true},\"comment\":null},\"link\":{\"type\":\"LinkData\",\"id\":4,\"options\":{\"proto3_optional\":true},\"comment\":null}},\"comment\":null},\"ItemMutation\":{\"oneofs\":{\"_parentId\":{\"oneof\":[\"parentId\"]},\"_action\":{\"oneof\":[\"action\"]}},\"fields\":{\"parentId\":{\"type\":\"string\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":null},\"action\":{\"type\":\"Action\",\"id\":2,\"options\":{\"proto3_optional\":true},\"comment\":null}},\"nested\":{\"Action\":{\"values\":{\"NOOP\":0,\"DELETE\":1,\"RESTORE\":2},\"comment\":null,\"comments\":{\"NOOP\":null,\"DELETE\":null,\"RESTORE\":null}}},\"comment\":\"Item mutation.\"},\"LinkData\":{\"fields\":{\"source\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"target\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null}}},\"invitation\":{\"nested\":{\"InvitationDescriptor\":{\"oneofs\":{\"_identityKey\":{\"oneof\":[\"identityKey\"]},\"_secret\":{\"oneof\":[\"secret\"]}},\"fields\":{\"type\":{\"type\":\"Type\",\"id\":1,\"comment\":null},\"swarmKey\":{\"type\":\"bytes\",\"id\":2,\"comment\":null},\"invitation\":{\"type\":\"bytes\",\"id\":3,\"comment\":null},\"identityKey\":{\"type\":\"bytes\",\"id\":4,\"options\":{\"proto3_optional\":true},\"comment\":\"Only present if type == OFFLINE.\"},\"secret\":{\"type\":\"bytes\",\"id\":5,\"options\":{\"proto3_optional\":true},\"comment\":\"Must be stripped out when passing to another peer.\"}},\"nested\":{\"Type\":{\"values\":{\"INTERACTIVE\":1,\"OFFLINE\":2},\"comment\":\"Defines an invitation type.\",\"comments\":{\"INTERACTIVE\":\"Interactive invitation is when both peers are online at the same time.\",\"OFFLINE\":\"Offline is when only a single peer needs to be online at the time.\"}}},\"comment\":null}}},\"metadata\":{\"nested\":{\"EchoMetadata\":{\"fields\":{\"version\":{\"type\":\"int32\",\"id\":1,\"comment\":\"Version number that is inceremnted every time there's a breaking change to the storage schema.\\n\\nThis is used to detect if the storage schema has changed since the last time the client was run.\\nLoading data from a different version will might result in an error.\"},\"parties\":{\"rule\":\"repeated\",\"type\":\"PartyMetadata\",\"id\":2,\"comment\":null},\"created\":{\"type\":\"google.protobuf.Timestamp\",\"id\":3,\"comment\":null},\"updated\":{\"type\":\"google.protobuf.Timestamp\",\"id\":4,\"comment\":null}},\"comment\":null},\"PartyMetadata\":{\"oneofs\":{\"_genesisFeedKey\":{\"oneof\":[\"genesisFeedKey\"]},\"_controlFeedKey\":{\"oneof\":[\"controlFeedKey\"]},\"_dataFeedKey\":{\"oneof\":[\"dataFeedKey\"]},\"_latestTimeframe\":{\"oneof\":[\"latestTimeframe\"]}},\"fields\":{\"key\":{\"type\":\"PubKey\",\"id\":1,\"comment\":\"Party key.\"},\"genesisFeedKey\":{\"type\":\"PubKey\",\"id\":6,\"options\":{\"proto3_optional\":true},\"comment\":null},\"controlFeedKey\":{\"type\":\"PubKey\",\"id\":4,\"options\":{\"proto3_optional\":true},\"comment\":\"Key of the wriatable control feed.\"},\"dataFeedKey\":{\"type\":\"PubKey\",\"id\":3,\"options\":{\"proto3_optional\":true},\"comment\":\"Key of the wriatable data feed.\"},\"latestTimeframe\":{\"type\":\"TimeframeVector\",\"id\":5,\"options\":{\"proto3_optional\":true},\"comment\":null},\"feedKeys\":{\"rule\":\"repeated\",\"type\":\"PubKey\",\"id\":2,\"comment\":\"List of all feed associated with the party.\"}},\"comment\":null}}},\"service\":{\"nested\":{\"DataService\":{\"methods\":{\"SubscribeEntitySet\":{\"requestType\":\"SubscribeEntitySetRequest\",\"responseType\":\"SubscribeEntitySetResponse\",\"responseStream\":true,\"comment\":null},\"SubscribeEntityStream\":{\"requestType\":\"SubscribeEntityStreamRequest\",\"responseType\":\"SubscribeEntityStreamResponse\",\"responseStream\":true,\"comment\":null},\"Write\":{\"requestType\":\"WriteRequest\",\"responseType\":\"MutationReceipt\",\"comment\":null}},\"comment\":null},\"MutationReceipt\":{\"fields\":{\"feedKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"seq\":{\"type\":\"int32\",\"id\":2,\"comment\":null}},\"comment\":null},\"SubscribeEntitySetRequest\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null}},\"comment\":null},\"SubscribeEntitySetResponse\":{\"fields\":{\"added\":{\"rule\":\"repeated\",\"type\":\"EchoEnvelope\",\"id\":1,\"comment\":null},\"deleted\":{\"rule\":\"repeated\",\"type\":\"EchoEnvelope\",\"id\":2,\"comment\":null}},\"comment\":null},\"SubscribeEntityStreamRequest\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"itemId\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null},\"SubscribeEntityStreamResponse\":{\"oneofs\":{\"kind\":{\"oneof\":[\"snapshot\",\"mutation\"],\"comment\":null}},\"fields\":{\"snapshot\":{\"type\":\"ItemSnapshot\",\"id\":1,\"comment\":null},\"mutation\":{\"type\":\"Mutation\",\"id\":2,\"comment\":null}},\"nested\":{\"Mutation\":{\"fields\":{\"data\":{\"type\":\"EchoEnvelope\",\"id\":1,\"comment\":null},\"meta\":{\"type\":\"Metadata\",\"id\":2,\"comment\":null}},\"nested\":{\"Metadata\":{\"fields\":{\"feedKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"memberKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null},\"seq\":{\"type\":\"int32\",\"id\":3,\"comment\":null},\"timeframe\":{\"type\":\"TimeframeVector\",\"id\":4,\"comment\":null}},\"comment\":null}},\"comment\":null}},\"comment\":null},\"WriteRequest\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"mutation\":{\"type\":\"EchoEnvelope\",\"id\":2,\"comment\":null}},\"comment\":null}}},\"snapshot\":{\"nested\":{\"DatabaseSnapshot\":{\"fields\":{\"items\":{\"rule\":\"repeated\",\"type\":\"ItemSnapshot\",\"id\":1,\"comment\":null},\"links\":{\"rule\":\"repeated\",\"type\":\"LinkSnapshot\",\"id\":2,\"comment\":null}},\"comment\":null},\"HaloStateSnapshot\":{\"fields\":{\"messages\":{\"rule\":\"repeated\",\"type\":\"dxos.CredentialsMessage\",\"id\":1,\"comment\":null}},\"comment\":null},\"ItemSnapshot\":{\"oneofs\":{\"_itemId\":{\"oneof\":[\"itemId\"]},\"_itemType\":{\"oneof\":[\"itemType\"]},\"_modelVersion\":{\"oneof\":[\"modelVersion\"]},\"_parentId\":{\"oneof\":[\"parentId\"]},\"_model\":{\"oneof\":[\"model\"]}},\"fields\":{\"itemId\":{\"type\":\"string\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":null},\"itemType\":{\"type\":\"string\",\"id\":2,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelType\":{\"type\":\"string\",\"id\":3,\"comment\":null},\"modelVersion\":{\"type\":\"string\",\"id\":4,\"options\":{\"proto3_optional\":true},\"comment\":null},\"parentId\":{\"type\":\"string\",\"id\":5,\"options\":{\"proto3_optional\":true},\"comment\":null},\"model\":{\"type\":\"ModelSnapshot\",\"id\":6,\"options\":{\"proto3_optional\":true},\"comment\":null}},\"comment\":null},\"LinkSnapshot\":{\"oneofs\":{\"_linkId\":{\"oneof\":[\"linkId\"]},\"_linkType\":{\"oneof\":[\"linkType\"]},\"_modelVersion\":{\"oneof\":[\"modelVersion\"]},\"_model\":{\"oneof\":[\"model\"]}},\"fields\":{\"linkId\":{\"type\":\"string\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":null},\"linkType\":{\"type\":\"string\",\"id\":2,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelType\":{\"type\":\"string\",\"id\":3,\"comment\":null},\"modelVersion\":{\"type\":\"string\",\"id\":4,\"options\":{\"proto3_optional\":true},\"comment\":null},\"source\":{\"rule\":\"required\",\"type\":\"string\",\"id\":5,\"comment\":null},\"target\":{\"rule\":\"required\",\"type\":\"string\",\"id\":6,\"comment\":null},\"model\":{\"type\":\"ModelSnapshot\",\"id\":7,\"options\":{\"proto3_optional\":true},\"comment\":null}},\"comment\":null},\"ModelMutation\":{\"fields\":{\"mutation\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":1,\"comment\":null},\"meta\":{\"rule\":\"required\",\"type\":\"ModelMutationMeta\",\"id\":2,\"comment\":null}},\"comment\":null},\"ModelMutationMeta\":{\"fields\":{\"feedKey\":{\"rule\":\"required\",\"type\":\"dxos.halo.keys.PubKey\",\"id\":1,\"comment\":null},\"seq\":{\"rule\":\"required\",\"type\":\"int32\",\"id\":2,\"comment\":null},\"memberKey\":{\"rule\":\"required\",\"type\":\"dxos.halo.keys.PubKey\",\"id\":3,\"comment\":null}},\"comment\":null},\"ModelSnapshot\":{\"oneofs\":{\"_snapshot\":{\"oneof\":[\"snapshot\"]}},\"fields\":{\"snapshot\":{\"type\":\"bytes\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":\"Encoded model snapshot (defined by the model's codec).\\nIf undefined the state machine will be initialized with it's default state.\"},\"mutations\":{\"rule\":\"repeated\",\"type\":\"ModelMutation\",\"id\":2,\"comment\":\"Mutations to be applied on top of the snapshot, or on top of initial state if the snapshot is undefined.\"}},\"comment\":null},\"PartySnapshot\":{\"oneofs\":{\"_timeframe\":{\"oneof\":[\"timeframe\"]},\"_timestamp\":{\"oneof\":[\"timestamp\"]}},\"fields\":{\"partyKey\":{\"type\":\"bytes\",\"id\":1,\"comment\":null},\"timeframe\":{\"type\":\"TimeframeVector\",\"id\":2,\"options\":{\"proto3_optional\":true},\"comment\":null},\"timestamp\":{\"type\":\"int32\",\"id\":3,\"options\":{\"proto3_optional\":true},\"comment\":null},\"halo\":{\"type\":\"HaloStateSnapshot\",\"id\":11,\"comment\":null},\"database\":{\"type\":\"DatabaseSnapshot\",\"id\":12,\"comment\":null}},\"comment\":null}}},\"testing\":{\"nested\":{\"TestItemMutation\":{\"fields\":{\"key\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"value\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null},\"TestItemSnapshot\":{\"fields\":{\"keys\":{\"rule\":\"repeated\",\"type\":\"TestItemMutation\",\"id\":1,\"comment\":null}},\"comment\":null},\"TestListMutation\":{\"fields\":{\"data\":{\"type\":\"string\",\"id\":1,\"comment\":null}},\"comment\":null}}},\"timeframe\":{\"nested\":{\"TimeframeVector\":{\"fields\":{\"frames\":{\"rule\":\"repeated\",\"type\":\"Frame\",\"id\":1,\"comment\":null}},\"nested\":{\"Frame\":{\"fields\":{\"feedKey\":{\"type\":\"bytes\",\"id\":1,\"comment\":null},\"seq\":{\"type\":\"int32\",\"id\":3,\"comment\":null}},\"comment\":null}},\"comment\":\"Vector timestamp used to order messages.\"}}}}},\"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}}}}},\"test\":{\"nested\":{\"echo\":{\"nested\":{\"TestItemMutation\":{\"fields\":{\"key\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"value\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null},\"TestItemSnapshot\":{\"fields\":{\"keys\":{\"rule\":\"repeated\",\"type\":\"TestItemMutation\",\"id\":1,\"comment\":null}},\"comment\":null},\"TestListMutation\":{\"fields\":{\"data\":{\"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},\"Timestamp\":{\"fields\":{\"seconds\":{\"type\":\"int64\",\"id\":1},\"nanos\":{\"type\":\"int32\",\"id\":2}},\"comment\":null}}}}}}}");
|
|
66
|
+
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)\"}}},\"echo\":{\"nested\":{\"feed\":{\"nested\":{\"CredentialsMessage\":{\"fields\":{\"data\":{\"type\":\"bytes\",\"id\":1,\"comment\":null}},\"comment\":\"A container for dxos.credentials.Message\"},\"EchoEnvelope\":{\"fields\":{\"itemId\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"genesis\":{\"type\":\"ItemGenesis\",\"id\":10,\"comment\":null},\"itemMutation\":{\"type\":\"ItemMutation\",\"id\":11,\"comment\":null},\"mutation\":{\"type\":\"bytes\",\"id\":12,\"comment\":null},\"snapshot\":{\"type\":\"ModelSnapshot\",\"id\":13,\"comment\":\"Set the model to the provided snapshot.\"}},\"comment\":\"Wrapper for all ECHO messages.\"},\"FeedMessage\":{\"oneofs\":{\"payload\":{\"oneof\":[\"halo\",\"echo\"],\"comment\":null}},\"fields\":{\"timeframe\":{\"type\":\"TimeframeVector\",\"id\":1,\"comment\":null},\"halo\":{\"type\":\"CredentialsMessage\",\"id\":10,\"comment\":null},\"echo\":{\"type\":\"EchoEnvelope\",\"id\":11,\"comment\":null}},\"comment\":\"Outer message type decoded by Codec.\\nThis is what is written to the feeds.\"},\"ItemGenesis\":{\"fields\":{\"itemType\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"modelType\":{\"type\":\"string\",\"id\":2,\"comment\":null},\"modelVersion\":{\"type\":\"string\",\"id\":3,\"comment\":null},\"link\":{\"type\":\"LinkData\",\"id\":4,\"comment\":null}},\"comment\":null},\"ItemMutation\":{\"fields\":{\"parentId\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"action\":{\"type\":\"Action\",\"id\":2,\"comment\":null}},\"nested\":{\"Action\":{\"values\":{\"NOOP\":0,\"DELETE\":1,\"RESTORE\":2},\"comment\":null,\"comments\":{\"NOOP\":null,\"DELETE\":null,\"RESTORE\":null}}},\"comment\":\"Item mutation.\"},\"LinkData\":{\"fields\":{\"source\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"target\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null}}},\"invitation\":{\"nested\":{\"InvitationDescriptor\":{\"fields\":{\"type\":{\"type\":\"Type\",\"id\":1,\"comment\":null},\"swarmKey\":{\"type\":\"bytes\",\"id\":2,\"comment\":null},\"invitation\":{\"type\":\"bytes\",\"id\":3,\"comment\":null},\"identityKey\":{\"type\":\"bytes\",\"id\":4,\"comment\":\"Only present if type == OFFLINE.\"},\"secret\":{\"type\":\"bytes\",\"id\":5,\"comment\":\"Must be stripped out when passing to another peer.\"}},\"nested\":{\"Type\":{\"values\":{\"INTERACTIVE\":1,\"OFFLINE\":2},\"comment\":\"Defines an invitation type.\",\"comments\":{\"INTERACTIVE\":\"Interactive invitation is when both peers are online at the same time.\",\"OFFLINE\":\"Offline is when only a single peer needs to be online at the time.\"}}},\"comment\":null}}},\"metadata\":{\"nested\":{\"EchoMetadata\":{\"fields\":{\"version\":{\"type\":\"int32\",\"id\":1,\"comment\":\"Version number that is inceremnted every time there's a breaking change to the storage schema.\\n\\nThis is used to detect if the storage schema has changed since the last time the client was run.\\nLoading data from a different version will might result in an error.\"},\"parties\":{\"rule\":\"repeated\",\"type\":\"PartyMetadata\",\"id\":2,\"comment\":null},\"created\":{\"type\":\"google.protobuf.Timestamp\",\"id\":3,\"comment\":null},\"updated\":{\"type\":\"google.protobuf.Timestamp\",\"id\":4,\"comment\":null}},\"comment\":null},\"PartyMetadata\":{\"fields\":{\"key\":{\"type\":\"PubKey\",\"id\":1,\"comment\":\"Party key.\"},\"genesisFeedKey\":{\"type\":\"PubKey\",\"id\":6,\"comment\":null},\"controlFeedKey\":{\"type\":\"PubKey\",\"id\":4,\"comment\":\"Key of the wriatable control feed.\"},\"dataFeedKey\":{\"type\":\"PubKey\",\"id\":3,\"comment\":\"Key of the wriatable data feed.\"},\"latestTimeframe\":{\"type\":\"TimeframeVector\",\"id\":5,\"comment\":null},\"feedKeys\":{\"rule\":\"repeated\",\"type\":\"PubKey\",\"id\":2,\"comment\":\"List of all feed associated with the party.\"}},\"comment\":null}}},\"service\":{\"nested\":{\"DataService\":{\"methods\":{\"SubscribeEntitySet\":{\"requestType\":\"SubscribeEntitySetRequest\",\"responseType\":\"SubscribeEntitySetResponse\",\"responseStream\":true,\"comment\":null},\"SubscribeEntityStream\":{\"requestType\":\"SubscribeEntityStreamRequest\",\"responseType\":\"SubscribeEntityStreamResponse\",\"responseStream\":true,\"comment\":null},\"Write\":{\"requestType\":\"WriteRequest\",\"responseType\":\"MutationReceipt\",\"comment\":null}},\"comment\":null},\"MutationReceipt\":{\"fields\":{\"feedKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"seq\":{\"type\":\"int32\",\"id\":2,\"comment\":null}},\"comment\":null},\"SubscribeEntitySetRequest\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null}},\"comment\":null},\"SubscribeEntitySetResponse\":{\"fields\":{\"added\":{\"rule\":\"repeated\",\"type\":\"EchoEnvelope\",\"id\":1,\"comment\":null},\"deleted\":{\"rule\":\"repeated\",\"type\":\"EchoEnvelope\",\"id\":2,\"comment\":null}},\"comment\":null},\"SubscribeEntityStreamRequest\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"itemId\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null},\"SubscribeEntityStreamResponse\":{\"oneofs\":{\"kind\":{\"oneof\":[\"snapshot\",\"mutation\"],\"comment\":null}},\"fields\":{\"snapshot\":{\"type\":\"ItemSnapshot\",\"id\":1,\"comment\":null},\"mutation\":{\"type\":\"Mutation\",\"id\":2,\"comment\":null}},\"nested\":{\"Mutation\":{\"fields\":{\"data\":{\"type\":\"EchoEnvelope\",\"id\":1,\"comment\":null},\"meta\":{\"type\":\"Metadata\",\"id\":2,\"comment\":null}},\"nested\":{\"Metadata\":{\"fields\":{\"feedKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"memberKey\":{\"type\":\"PubKey\",\"id\":2,\"comment\":null},\"seq\":{\"type\":\"int32\",\"id\":3,\"comment\":null},\"timeframe\":{\"type\":\"TimeframeVector\",\"id\":4,\"comment\":null}},\"comment\":null}},\"comment\":null}},\"comment\":null},\"WriteRequest\":{\"fields\":{\"partyKey\":{\"type\":\"PubKey\",\"id\":1,\"comment\":null},\"mutation\":{\"type\":\"EchoEnvelope\",\"id\":2,\"comment\":null}},\"comment\":null}}},\"snapshot\":{\"nested\":{\"DatabaseSnapshot\":{\"fields\":{\"items\":{\"rule\":\"repeated\",\"type\":\"ItemSnapshot\",\"id\":1,\"comment\":null},\"links\":{\"rule\":\"repeated\",\"type\":\"LinkSnapshot\",\"id\":2,\"comment\":null}},\"comment\":null},\"HaloStateSnapshot\":{\"fields\":{\"messages\":{\"rule\":\"repeated\",\"type\":\"dxos.CredentialsMessage\",\"id\":1,\"comment\":null}},\"comment\":null},\"ItemSnapshot\":{\"oneofs\":{\"_itemId\":{\"oneof\":[\"itemId\"]},\"_itemType\":{\"oneof\":[\"itemType\"]},\"_modelType\":{\"oneof\":[\"modelType\"]},\"_modelVersion\":{\"oneof\":[\"modelVersion\"]},\"_parentId\":{\"oneof\":[\"parentId\"]},\"_model\":{\"oneof\":[\"model\"]}},\"fields\":{\"itemId\":{\"type\":\"string\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":null},\"itemType\":{\"type\":\"string\",\"id\":2,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelType\":{\"type\":\"string\",\"id\":3,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelVersion\":{\"type\":\"string\",\"id\":4,\"options\":{\"proto3_optional\":true},\"comment\":null},\"parentId\":{\"type\":\"string\",\"id\":5,\"options\":{\"proto3_optional\":true},\"comment\":null},\"model\":{\"type\":\"ModelSnapshot\",\"id\":6,\"options\":{\"proto3_optional\":true},\"comment\":null}},\"comment\":null},\"LinkSnapshot\":{\"oneofs\":{\"_linkId\":{\"oneof\":[\"linkId\"]},\"_linkType\":{\"oneof\":[\"linkType\"]},\"_modelType\":{\"oneof\":[\"modelType\"]},\"_modelVersion\":{\"oneof\":[\"modelVersion\"]},\"_model\":{\"oneof\":[\"model\"]}},\"fields\":{\"linkId\":{\"type\":\"string\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":null},\"linkType\":{\"type\":\"string\",\"id\":2,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelType\":{\"type\":\"string\",\"id\":3,\"options\":{\"proto3_optional\":true},\"comment\":null},\"modelVersion\":{\"type\":\"string\",\"id\":4,\"options\":{\"proto3_optional\":true},\"comment\":null},\"source\":{\"rule\":\"required\",\"type\":\"string\",\"id\":5,\"comment\":null},\"target\":{\"rule\":\"required\",\"type\":\"string\",\"id\":6,\"comment\":null},\"model\":{\"type\":\"ModelSnapshot\",\"id\":7,\"options\":{\"proto3_optional\":true},\"comment\":null}},\"comment\":null},\"ModelMutation\":{\"fields\":{\"mutation\":{\"rule\":\"required\",\"type\":\"bytes\",\"id\":1,\"comment\":null},\"meta\":{\"rule\":\"required\",\"type\":\"ModelMutationMeta\",\"id\":2,\"comment\":null}},\"comment\":null},\"ModelMutationMeta\":{\"fields\":{\"feedKey\":{\"rule\":\"required\",\"type\":\"dxos.halo.keys.PubKey\",\"id\":1,\"comment\":null},\"seq\":{\"rule\":\"required\",\"type\":\"int32\",\"id\":2,\"comment\":null},\"memberKey\":{\"rule\":\"required\",\"type\":\"dxos.halo.keys.PubKey\",\"id\":3,\"comment\":null}},\"comment\":null},\"ModelSnapshot\":{\"oneofs\":{\"_snapshot\":{\"oneof\":[\"snapshot\"]}},\"fields\":{\"snapshot\":{\"type\":\"bytes\",\"id\":1,\"options\":{\"proto3_optional\":true},\"comment\":\"Encoded model snapshot (defined by the model's codec).\\nIf undefined the state machine will be initialized with it's default state.\"},\"mutations\":{\"rule\":\"repeated\",\"type\":\"ModelMutation\",\"id\":2,\"comment\":\"Mutations to be applied on top of the snapshot, or on top of initial state if the snapshot is undefined.\"}},\"comment\":null},\"PartySnapshot\":{\"fields\":{\"partyKey\":{\"type\":\"bytes\",\"id\":1,\"comment\":null},\"timeframe\":{\"type\":\"TimeframeVector\",\"id\":2,\"comment\":null},\"timestamp\":{\"type\":\"int32\",\"id\":3,\"comment\":null},\"halo\":{\"type\":\"HaloStateSnapshot\",\"id\":11,\"comment\":null},\"database\":{\"type\":\"DatabaseSnapshot\",\"id\":12,\"comment\":null}},\"comment\":null}}},\"testing\":{\"nested\":{\"TestItemMutation\":{\"fields\":{\"key\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"value\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null},\"TestItemSnapshot\":{\"fields\":{\"keys\":{\"rule\":\"repeated\",\"type\":\"TestItemMutation\",\"id\":1,\"comment\":null}},\"comment\":null},\"TestListMutation\":{\"fields\":{\"data\":{\"type\":\"string\",\"id\":1,\"comment\":null}},\"comment\":null}}},\"timeframe\":{\"nested\":{\"TimeframeVector\":{\"fields\":{\"frames\":{\"rule\":\"repeated\",\"type\":\"Frame\",\"id\":1,\"comment\":null}},\"nested\":{\"Frame\":{\"fields\":{\"feedKey\":{\"type\":\"bytes\",\"id\":1,\"comment\":null},\"seq\":{\"type\":\"int32\",\"id\":3,\"comment\":null}},\"comment\":null}},\"comment\":\"Vector timestamp used to order messages.\"}}}}},\"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}}}}},\"test\":{\"nested\":{\"echo\":{\"nested\":{\"TestItemMutation\":{\"fields\":{\"key\":{\"type\":\"string\",\"id\":1,\"comment\":null},\"value\":{\"type\":\"string\",\"id\":2,\"comment\":null}},\"comment\":null},\"TestItemSnapshot\":{\"fields\":{\"keys\":{\"rule\":\"repeated\",\"type\":\"TestItemMutation\",\"id\":1,\"comment\":null}},\"comment\":null},\"TestListMutation\":{\"fields\":{\"data\":{\"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},\"Timestamp\":{\"fields\":{\"seconds\":{\"type\":\"int64\",\"id\":1},\"nanos\":{\"type\":\"int32\",\"id\":2}},\"comment\":null}}}}}}}");
|
|
67
67
|
export const schema = Schema.fromJson<TYPES, SERVICES>(schemaJson, substitutions);
|