@dxos/client 2.24.1-dev.79448ad7 → 2.25.1-dev.3e7251f9
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/api/echo-proxy.d.ts +7 -7
- package/dist/src/api/echo-proxy.d.ts.map +1 -1
- package/dist/src/api/echo-proxy.js +10 -8
- package/dist/src/api/echo-proxy.js.map +1 -1
- package/dist/src/api/halo-proxy.d.ts +4 -1
- package/dist/src/api/halo-proxy.d.ts.map +1 -1
- package/dist/src/api/halo-proxy.js +18 -9
- package/dist/src/api/halo-proxy.js.map +1 -1
- package/dist/src/api/party-proxy.d.ts +6 -6
- package/dist/src/api/party-proxy.d.ts.map +1 -1
- package/dist/src/api/party-proxy.js +18 -9
- package/dist/src/api/party-proxy.js.map +1 -1
- package/dist/src/client/client-services.test.js +5 -5
- package/dist/src/client/client.d.ts +1 -1
- package/dist/src/client/client.js +3 -3
- package/dist/src/client/client.js.map +1 -1
- package/dist/src/client/client.test.js +2 -2
- package/dist/src/client/client.test.js.map +1 -1
- package/dist/src/client/service-host/services/halo.d.ts +14 -0
- package/dist/src/client/service-host/services/halo.d.ts.map +1 -0
- package/dist/src/client/service-host/services/halo.js +73 -0
- package/dist/src/client/service-host/services/halo.js.map +1 -0
- package/dist/src/client/service-host/services/party.d.ts +10 -10
- package/dist/src/client/service-host/services/party.d.ts.map +1 -1
- package/dist/src/client/service-host/services/party.js +13 -13
- package/dist/src/client/service-host/services/party.js.map +1 -1
- package/dist/src/client/service-host/services/profile.d.ts +7 -8
- package/dist/src/client/service-host/services/profile.d.ts.map +1 -1
- package/dist/src/client/service-host/services/profile.js +6 -25
- package/dist/src/client/service-host/services/profile.js.map +1 -1
- package/dist/src/client/service-host/services/services.d.ts.map +1 -1
- package/dist/src/client/service-host/services/services.js +4 -2
- package/dist/src/client/service-host/services/services.js.map +1 -1
- package/dist/src/client/service-host/services/system.js +2 -2
- package/dist/src/devtools/devtools-host.js +19 -19
- package/dist/src/devtools/items.js +2 -2
- package/dist/src/devtools/items.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +12 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/interfaces/client-service-provider.d.ts +2 -1
- package/dist/src/interfaces/client-service-provider.d.ts.map +1 -1
- package/dist/src/interfaces/client-service-provider.js +1 -0
- package/dist/src/interfaces/client-service-provider.js.map +1 -1
- package/dist/src/proto/gen/dxos/client.d.ts +52 -34
- package/dist/src/proto/gen/dxos/client.d.ts.map +1 -1
- package/dist/src/proto/gen/dxos/client.js.map +1 -1
- package/dist/src/proto/gen/dxos/devtools.d.ts +21 -21
- package/dist/src/proto/gen/dxos/echo/service.d.ts +3 -3
- package/dist/src/proto/gen/google/protobuf.d.ts +2 -2
- package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
- package/dist/src/proto/gen/google/protobuf.js.map +1 -1
- package/dist/src/proto/gen/index.d.ts +4 -0
- 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/tsconfig.tsbuildinfo +1 -1
- package/package.json +22 -19
- package/src/api/echo-proxy.ts +20 -16
- package/src/api/halo-proxy.ts +24 -10
- package/src/api/party-proxy.ts +21 -11
- package/src/client/client-services.test.ts +5 -5
- package/src/client/client.test.ts +2 -2
- package/src/client/client.ts +3 -3
- package/src/client/service-host/services/halo.ts +80 -0
- package/src/client/service-host/services/party.ts +15 -15
- package/src/client/service-host/services/profile.ts +7 -38
- package/src/client/service-host/services/services.ts +4 -2
- package/src/client/service-host/services/system.ts +2 -2
- package/src/devtools/devtools-host.ts +19 -19
- package/src/devtools/items.ts +2 -2
- package/src/index.ts +15 -0
- package/src/interfaces/client-service-provider.ts +3 -1
- package/src/proto/gen/dxos/client.ts +51 -34
- package/src/proto/gen/dxos/devtools.ts +21 -21
- package/src/proto/gen/dxos/echo/service.ts +3 -3
- package/src/proto/gen/google/protobuf.ts +2 -2
- package/src/proto/gen/index.ts +5 -1
|
@@ -9,22 +9,11 @@ import { latch } from '@dxos/async';
|
|
|
9
9
|
import { Stream } from '@dxos/codec-protobuf';
|
|
10
10
|
import { defaultSecretValidator, generatePasscode, SecretProvider } from '@dxos/credentials';
|
|
11
11
|
import { ECHO, InvitationDescriptor } from '@dxos/echo-db';
|
|
12
|
-
import { SubscriptionGroup } from '@dxos/util';
|
|
13
12
|
|
|
14
13
|
import {
|
|
15
|
-
InvitationState,
|
|
16
|
-
ProfileService as IProfileService,
|
|
17
|
-
AuthenticateInvitationRequest,
|
|
18
|
-
SubscribeProfileResponse,
|
|
19
|
-
InvitationRequest,
|
|
20
|
-
CreateProfileRequest,
|
|
21
|
-
Contacts,
|
|
22
|
-
RedeemedInvitation,
|
|
23
|
-
Profile
|
|
24
|
-
, RecoverProfileRequest
|
|
14
|
+
AuthenticateInvitationRequest, CreateProfileRequest, InvitationRequest, InvitationState, Profile, ProfileService as IProfileService, RecoverProfileRequest, RedeemedInvitation, SubscribeProfileResponse
|
|
25
15
|
} from '../../../proto/gen/dxos/client';
|
|
26
16
|
import { InvitationDescriptor as InvitationDescriptorProto } from '../../../proto/gen/dxos/echo/invitation';
|
|
27
|
-
import { resultSetToStream } from '../../../util';
|
|
28
17
|
import { CreateServicesOpts, InviteeInvitation, InviteeInvitations } from './interfaces';
|
|
29
18
|
|
|
30
19
|
export class ProfileService implements IProfileService {
|
|
@@ -32,7 +21,7 @@ export class ProfileService implements IProfileService {
|
|
|
32
21
|
|
|
33
22
|
constructor (private echo: ECHO) {}
|
|
34
23
|
|
|
35
|
-
|
|
24
|
+
subscribeProfile (): Stream<SubscribeProfileResponse> {
|
|
36
25
|
return new Stream(({ next }) => {
|
|
37
26
|
const emitNext = () => next({
|
|
38
27
|
profile: this.echo.halo.isInitialized ? this.echo.halo.getProfile() : undefined
|
|
@@ -43,11 +32,11 @@ export class ProfileService implements IProfileService {
|
|
|
43
32
|
});
|
|
44
33
|
}
|
|
45
34
|
|
|
46
|
-
async
|
|
35
|
+
async createProfile (request: CreateProfileRequest) {
|
|
47
36
|
return this.echo.halo.createProfile(request);
|
|
48
37
|
}
|
|
49
38
|
|
|
50
|
-
async
|
|
39
|
+
async recoverProfile (request: RecoverProfileRequest): Promise<Profile> {
|
|
51
40
|
if (!request.seedPhrase) {
|
|
52
41
|
throw new Error('Recovery SeedPhrase not provided.');
|
|
53
42
|
}
|
|
@@ -58,7 +47,7 @@ export class ProfileService implements IProfileService {
|
|
|
58
47
|
return profile;
|
|
59
48
|
}
|
|
60
49
|
|
|
61
|
-
|
|
50
|
+
createInvitation (): Stream<InvitationRequest> {
|
|
62
51
|
return new Stream(({ next, close }) => {
|
|
63
52
|
setImmediate(async () => {
|
|
64
53
|
const secret = Buffer.from(generatePasscode());
|
|
@@ -82,7 +71,7 @@ export class ProfileService implements IProfileService {
|
|
|
82
71
|
});
|
|
83
72
|
}
|
|
84
73
|
|
|
85
|
-
|
|
74
|
+
acceptInvitation (request: InvitationDescriptorProto): Stream<RedeemedInvitation> {
|
|
86
75
|
return new Stream(({ next, close }) => {
|
|
87
76
|
const id = v4();
|
|
88
77
|
const [secretLatch, secretTrigger] = latch();
|
|
@@ -112,7 +101,7 @@ export class ProfileService implements IProfileService {
|
|
|
112
101
|
});
|
|
113
102
|
}
|
|
114
103
|
|
|
115
|
-
async
|
|
104
|
+
async authenticateInvitation (request: AuthenticateInvitationRequest) {
|
|
116
105
|
assert(request.processId, 'Process ID is missing.');
|
|
117
106
|
const invitation = this.inviteeInvitations.get(request.processId);
|
|
118
107
|
assert(invitation, 'Invitation not found.');
|
|
@@ -122,26 +111,6 @@ export class ProfileService implements IProfileService {
|
|
|
122
111
|
invitation.secret = request.secret;
|
|
123
112
|
invitation.secretTrigger?.();
|
|
124
113
|
}
|
|
125
|
-
|
|
126
|
-
SubscribeContacts (): Stream<Contacts> {
|
|
127
|
-
if (this.echo.halo.isInitialized) {
|
|
128
|
-
return resultSetToStream(this.echo.halo.queryContacts(), (contacts): Contacts => ({ contacts }));
|
|
129
|
-
} else {
|
|
130
|
-
return new Stream(({ next }) => {
|
|
131
|
-
const subGroup = new SubscriptionGroup();
|
|
132
|
-
|
|
133
|
-
setImmediate(async () => {
|
|
134
|
-
await this.echo.halo.identityReady.waitForCondition(() => this.echo.halo.isInitialized);
|
|
135
|
-
|
|
136
|
-
const resultSet = this.echo.halo.queryContacts();
|
|
137
|
-
next({ contacts: resultSet.value });
|
|
138
|
-
subGroup.push(resultSet.update.on(() => next({ contacts: resultSet.value })));
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
return () => subGroup.unsubscribe();
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
114
|
}
|
|
146
115
|
|
|
147
116
|
export const createProfileService = ({ echo }: CreateServicesOpts): ProfileService => {
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { ClientServices } from '../../../interfaces';
|
|
6
|
+
import { createHaloService } from './halo';
|
|
6
7
|
import { CreateServicesOpts } from './interfaces';
|
|
7
8
|
import { createPartyService } from './party';
|
|
8
9
|
import { createProfileService } from './profile';
|
|
@@ -12,13 +13,14 @@ export const createServices = (opts: CreateServicesOpts): Omit<ClientServices, '
|
|
|
12
13
|
return {
|
|
13
14
|
SystemService: createSystemService(opts),
|
|
14
15
|
ProfileService: createProfileService(opts),
|
|
16
|
+
HaloService: createHaloService(opts),
|
|
15
17
|
PartyService: createPartyService(opts),
|
|
16
18
|
DataService: opts.echo.dataService,
|
|
17
19
|
TracingService: {
|
|
18
|
-
|
|
20
|
+
setTracingOptions: () => {
|
|
19
21
|
throw new Error('Tracing not available');
|
|
20
22
|
},
|
|
21
|
-
|
|
23
|
+
subscribeToRpcTrace: () => {
|
|
22
24
|
throw new Error('Tracing not available');
|
|
23
25
|
}
|
|
24
26
|
}
|
|
@@ -7,7 +7,7 @@ import { CreateServicesOpts } from './interfaces';
|
|
|
7
7
|
|
|
8
8
|
export const createSystemService = ({ config, echo }: CreateServicesOpts): SystemService => {
|
|
9
9
|
return {
|
|
10
|
-
|
|
10
|
+
getConfig: async () => {
|
|
11
11
|
return {
|
|
12
12
|
...config.values,
|
|
13
13
|
build: {
|
|
@@ -16,7 +16,7 @@ export const createSystemService = ({ config, echo }: CreateServicesOpts): Syste
|
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
},
|
|
19
|
-
|
|
19
|
+
reset: async () => {
|
|
20
20
|
await echo.reset();
|
|
21
21
|
}
|
|
22
22
|
};
|
|
@@ -24,68 +24,68 @@ import { resetStorage } from './storage';
|
|
|
24
24
|
|
|
25
25
|
export const createDevtoolsHost = (context: DevtoolsServiceDependencies, events: DevtoolsHostEvents) : DevtoolsHost => {
|
|
26
26
|
return {
|
|
27
|
-
|
|
27
|
+
events: () => {
|
|
28
28
|
return new Stream<ClientAPIEvent>(({ next }) => {
|
|
29
29
|
events.ready.on(() => {
|
|
30
30
|
next({ ready: {} });
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
33
|
},
|
|
34
|
-
|
|
34
|
+
getConfig: async () => {
|
|
35
35
|
const config = getConfig(context);
|
|
36
36
|
return config;
|
|
37
37
|
},
|
|
38
|
-
|
|
38
|
+
resetStorage: async () => {
|
|
39
39
|
await resetStorage(context);
|
|
40
40
|
},
|
|
41
|
-
|
|
41
|
+
enableDebugLogging: async (request) => {
|
|
42
42
|
enableDebugLogging(context, request);
|
|
43
43
|
return {};
|
|
44
44
|
},
|
|
45
|
-
|
|
45
|
+
disableDebugLogging: async () => {
|
|
46
46
|
disableDebugLogging(context);
|
|
47
47
|
return {};
|
|
48
48
|
},
|
|
49
|
-
|
|
49
|
+
subscribeToKeyringKeys: () => {
|
|
50
50
|
return subscribeToKeyringKeys(context);
|
|
51
51
|
},
|
|
52
|
-
|
|
52
|
+
subscribeToCredentialMessages: (request) => {
|
|
53
53
|
return subscribeToCredentialMessages(context, request);
|
|
54
54
|
},
|
|
55
|
-
|
|
55
|
+
subscribeToParties: () => {
|
|
56
56
|
return subscribeToParties(context);
|
|
57
57
|
},
|
|
58
|
-
|
|
58
|
+
subscribeToItems: () => {
|
|
59
59
|
return subscribeToItems(context);
|
|
60
60
|
},
|
|
61
|
-
|
|
61
|
+
subscribeToFeeds: () => {
|
|
62
62
|
return subscribeToFeeds(context);
|
|
63
63
|
},
|
|
64
|
-
|
|
64
|
+
subscribeToFeed: (request) => {
|
|
65
65
|
return subscribeToFeed(context, request);
|
|
66
66
|
},
|
|
67
|
-
|
|
67
|
+
getPartySnapshot: async (request) => {
|
|
68
68
|
return getPartySnapshot(context, request);
|
|
69
69
|
},
|
|
70
|
-
|
|
70
|
+
savePartySnapshot: async (request) => {
|
|
71
71
|
return savePartySnapshot(context, request);
|
|
72
72
|
},
|
|
73
|
-
|
|
73
|
+
clearSnapshots: async () => {
|
|
74
74
|
await context.echo.snapshotStore.clear();
|
|
75
75
|
},
|
|
76
|
-
|
|
76
|
+
getNetworkPeers: async (request) => {
|
|
77
77
|
return getNetworkPeers(context, request);
|
|
78
78
|
},
|
|
79
|
-
|
|
79
|
+
subscribeToNetworkTopics: () => {
|
|
80
80
|
return subscribeToNetworkTopics(context);
|
|
81
81
|
},
|
|
82
|
-
|
|
82
|
+
subscribeToSignalStatus: () => {
|
|
83
83
|
return subscribeToNetworkStatus(context);
|
|
84
84
|
},
|
|
85
|
-
|
|
85
|
+
subscribeToSignalTrace: () => {
|
|
86
86
|
return subscribeToSignalTrace(context);
|
|
87
87
|
},
|
|
88
|
-
|
|
88
|
+
subscribeToSwarmInfo: () => {
|
|
89
89
|
return subscribeToSwarmInfo(context);
|
|
90
90
|
}
|
|
91
91
|
};
|
package/src/devtools/items.ts
CHANGED
|
@@ -19,7 +19,7 @@ const getData = (echo: DevtoolsServiceDependencies['echo']): SubscribeToItemsRes
|
|
|
19
19
|
items: []
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
-
const items = party.database.select(
|
|
22
|
+
const { result: items } = party.database.select().query();
|
|
23
23
|
for (const item of items) {
|
|
24
24
|
partyInfo.items.push({
|
|
25
25
|
id: item.id,
|
|
@@ -48,7 +48,7 @@ export const subscribeToItems = ({ echo }: DevtoolsServiceDependencies) => {
|
|
|
48
48
|
const unsubscribe = echo.queryParties().subscribe((parties) => {
|
|
49
49
|
parties.forEach(party => {
|
|
50
50
|
if (!partySubscriptions[party.key.toHex()]) {
|
|
51
|
-
const sub = party.database.select(
|
|
51
|
+
const sub = party.database.select().query().update.on(() => {
|
|
52
52
|
// Send updates on items changes.
|
|
53
53
|
update();
|
|
54
54
|
});
|
package/src/index.ts
CHANGED
|
@@ -9,3 +9,18 @@ export * from './devtools/devtools-context';
|
|
|
9
9
|
export * from './devtools/devtools-host-events';
|
|
10
10
|
export * from './util';
|
|
11
11
|
export * as proto from './proto/gen';
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
Entity,
|
|
15
|
+
Item,
|
|
16
|
+
Link,
|
|
17
|
+
Database,
|
|
18
|
+
Selection,
|
|
19
|
+
SelectionResult,
|
|
20
|
+
InvitationDescriptor,
|
|
21
|
+
InvitationDescriptorType,
|
|
22
|
+
OpenProgress,
|
|
23
|
+
PartyMember,
|
|
24
|
+
ResultSet,
|
|
25
|
+
PARTY_ITEM_TYPE
|
|
26
|
+
} from '@dxos/echo-db';
|
|
@@ -7,13 +7,14 @@ import { DataService, schema as schemaProtocol } from '@dxos/echo-protocol';
|
|
|
7
7
|
import { createServiceBundle } from '@dxos/rpc';
|
|
8
8
|
|
|
9
9
|
import { schema } from '../proto/gen';
|
|
10
|
-
import { PartyService, ProfileService, SystemService } from '../proto/gen/dxos/client';
|
|
10
|
+
import { PartyService, ProfileService, SystemService, HaloService } from '../proto/gen/dxos/client';
|
|
11
11
|
import { DevtoolsHost, TracingService } from '../proto/gen/dxos/devtools';
|
|
12
12
|
|
|
13
13
|
// TODO(burdon): Is there a way to mark TS (generics) so cast isn't required for result of stream?
|
|
14
14
|
export interface ClientServices {
|
|
15
15
|
SystemService: SystemService;
|
|
16
16
|
ProfileService: ProfileService;
|
|
17
|
+
HaloService: HaloService;
|
|
17
18
|
PartyService: PartyService;
|
|
18
19
|
DataService: DataService;
|
|
19
20
|
DevtoolsHost: DevtoolsHost;
|
|
@@ -24,6 +25,7 @@ export const clientServiceBundle = createServiceBundle<ClientServices>({
|
|
|
24
25
|
SystemService: schema.getService('dxos.client.SystemService'),
|
|
25
26
|
ProfileService: schema.getService('dxos.client.ProfileService'),
|
|
26
27
|
PartyService: schema.getService('dxos.client.PartyService'),
|
|
28
|
+
HaloService: schema.getService('dxos.client.HaloService'),
|
|
27
29
|
// DataService is provided and implemented internally in ECHO so we import it from there.
|
|
28
30
|
DataService: schemaProtocol.getService('dxos.echo.service.DataService'),
|
|
29
31
|
DevtoolsHost: schema.getService('dxos.devtools.DevtoolsHost'),
|
|
@@ -11,23 +11,8 @@ import * as dxos_halo_keys from "./halo/keys";
|
|
|
11
11
|
import * as dxos_rpc from "./rpc";
|
|
12
12
|
import * as google_protobuf from "../google/protobuf";
|
|
13
13
|
export interface SystemService {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
export interface Profile {
|
|
18
|
-
publicKey: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
19
|
-
username?: string;
|
|
20
|
-
}
|
|
21
|
-
export interface SubscribeProfileResponse {
|
|
22
|
-
profile?: Profile;
|
|
23
|
-
}
|
|
24
|
-
export interface CreateProfileRequest {
|
|
25
|
-
username?: string;
|
|
26
|
-
publicKey?: Uint8Array;
|
|
27
|
-
secretKey?: Uint8Array;
|
|
28
|
-
}
|
|
29
|
-
export interface RecoverProfileRequest {
|
|
30
|
-
seedPhrase?: string;
|
|
14
|
+
getConfig: (request: void) => Promise<dxos_config.Config>;
|
|
15
|
+
reset: (request: void) => Promise<void>;
|
|
31
16
|
}
|
|
32
17
|
export enum InvitationState {
|
|
33
18
|
WAITING_FOR_CONNECTION = 1,
|
|
@@ -68,6 +53,21 @@ export interface AuthenticateInvitationRequest {
|
|
|
68
53
|
processId?: string;
|
|
69
54
|
secret?: Uint8Array;
|
|
70
55
|
}
|
|
56
|
+
export interface Profile {
|
|
57
|
+
publicKey: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
58
|
+
username?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface SubscribeProfileResponse {
|
|
61
|
+
profile?: Profile;
|
|
62
|
+
}
|
|
63
|
+
export interface CreateProfileRequest {
|
|
64
|
+
username?: string;
|
|
65
|
+
publicKey?: Uint8Array;
|
|
66
|
+
secretKey?: Uint8Array;
|
|
67
|
+
}
|
|
68
|
+
export interface RecoverProfileRequest {
|
|
69
|
+
seedPhrase?: string;
|
|
70
|
+
}
|
|
71
71
|
export interface Contact {
|
|
72
72
|
publicKey?: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
73
73
|
displayName?: string;
|
|
@@ -76,13 +76,30 @@ export interface Contacts {
|
|
|
76
76
|
contacts?: Contact[];
|
|
77
77
|
}
|
|
78
78
|
export interface ProfileService {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
subscribeProfile: (request: void) => Stream<SubscribeProfileResponse>;
|
|
80
|
+
createProfile: (request: CreateProfileRequest) => Promise<Profile>;
|
|
81
|
+
recoverProfile: (request: RecoverProfileRequest) => Promise<Profile>;
|
|
82
|
+
createInvitation: (request: void) => Stream<InvitationRequest>;
|
|
83
|
+
acceptInvitation: (request: dxos_echo_invitation.InvitationDescriptor) => Stream<RedeemedInvitation>;
|
|
84
|
+
authenticateInvitation: (request: AuthenticateInvitationRequest) => Promise<void>;
|
|
85
|
+
}
|
|
86
|
+
export interface AddKeyRecordRequest {
|
|
87
|
+
keyRecord?: dxos_halo_keys.KeyRecord;
|
|
88
|
+
}
|
|
89
|
+
export interface SignRequest {
|
|
90
|
+
/**
|
|
91
|
+
* - The public key of the key that is supposed to be used for signing.
|
|
92
|
+
*/
|
|
93
|
+
publicKey?: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
94
|
+
payload?: ReturnType<typeof substitutions["google.protobuf.Any"]["decode"]>;
|
|
95
|
+
}
|
|
96
|
+
export interface SignResponse {
|
|
97
|
+
signed?: ReturnType<typeof substitutions["google.protobuf.Any"]["decode"]>;
|
|
98
|
+
}
|
|
99
|
+
export interface HaloService {
|
|
100
|
+
subscribeContacts: (request: void) => Stream<Contacts>;
|
|
101
|
+
addKeyRecord: (request: AddKeyRecordRequest) => Promise<void>;
|
|
102
|
+
sign: (request: SignRequest) => Promise<SignResponse>;
|
|
86
103
|
}
|
|
87
104
|
export interface Party {
|
|
88
105
|
publicKey: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
@@ -138,17 +155,17 @@ export interface CreateSnaspotRequest {
|
|
|
138
155
|
partyKey?: ReturnType<typeof substitutions["dxos.halo.keys.PubKey"]["decode"]>;
|
|
139
156
|
}
|
|
140
157
|
export interface PartyService {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
158
|
+
subscribeToParty: (request: SubscribePartyRequest) => Stream<SubscribePartyResponse>;
|
|
159
|
+
subscribeParties: (request: void) => Stream<SubscribePartiesResponse>;
|
|
160
|
+
createParty: (request: void) => Promise<Party>;
|
|
161
|
+
cloneParty: (request: dxos_echo_snapshot.PartySnapshot) => Promise<Party>;
|
|
145
162
|
/**
|
|
146
163
|
* Open and close or activate and deactivate a party.
|
|
147
164
|
*/
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
165
|
+
setPartyState: (request: SetPartyStateRequest) => Promise<Party>;
|
|
166
|
+
createInvitation: (request: CreateInvitationRequest) => Stream<InvitationRequest>;
|
|
167
|
+
acceptInvitation: (request: dxos_echo_invitation.InvitationDescriptor) => Stream<RedeemedInvitation>;
|
|
168
|
+
authenticateInvitation: (request: AuthenticateInvitationRequest) => Promise<void>;
|
|
169
|
+
subscribeMembers: (request: SubscribeMembersRequest) => Stream<SubscribeMembersResponse>;
|
|
170
|
+
createSnapshot: (request: CreateSnaspotRequest) => Promise<dxos_echo_snapshot.PartySnapshot>;
|
|
154
171
|
}
|
|
@@ -11,25 +11,25 @@ import * as dxos_halo_keys from "./halo/keys";
|
|
|
11
11
|
import * as dxos_rpc from "./rpc";
|
|
12
12
|
import * as google_protobuf from "../google/protobuf";
|
|
13
13
|
export interface DevtoolsHost {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
14
|
+
events: (request: void) => Stream<Event>;
|
|
15
|
+
getConfig: (request: void) => Promise<GetConfigResponse>;
|
|
16
|
+
resetStorage: (request: ResetStorageRequest) => Promise<void>;
|
|
17
|
+
enableDebugLogging: (request: EnableDebugLoggingRequest) => Promise<EnableDebugLoggingResponse>;
|
|
18
|
+
disableDebugLogging: (request: EnableDebugLoggingRequest) => Promise<EnableDebugLoggingResponse>;
|
|
19
|
+
subscribeToKeyringKeys: (request: SubscribeToKeyringKeysRequest) => Stream<SubscribeToKeyringKeysResponse>;
|
|
20
|
+
subscribeToCredentialMessages: (request: SubscribeToCredentialMessagesRequest) => Stream<SubscribeToCredentialMessagesResponse>;
|
|
21
|
+
subscribeToParties: (request: SubscribeToPartiesRequest) => Stream<SubscribeToPartiesResponse>;
|
|
22
|
+
subscribeToItems: (request: SubscribeToItemsRequest) => Stream<SubscribeToItemsResponse>;
|
|
23
|
+
subscribeToFeeds: (request: SubscribeToFeedsRequest) => Stream<SubscribeToFeedsResponse>;
|
|
24
|
+
subscribeToFeed: (request: SubscribeToFeedRequest) => Stream<SubscribeToFeedResponse>;
|
|
25
|
+
getPartySnapshot: (request: GetPartySnapshotRequest) => Promise<GetPartySnapshotResponse>;
|
|
26
|
+
savePartySnapshot: (request: SavePartySnapshotRequest) => Promise<SavePartySnapshotResponse>;
|
|
27
|
+
clearSnapshots: (request: ClearSnapshotsRequest) => Promise<void>;
|
|
28
|
+
getNetworkPeers: (request: GetNetworkPeersRequest) => Promise<GetNetworkPeersResponse>;
|
|
29
|
+
subscribeToNetworkTopics: (request: void) => Stream<SubscribeToNetworkTopicsResponse>;
|
|
30
|
+
subscribeToSignalStatus: (request: void) => Stream<SubscribeToSignalStatusResponse>;
|
|
31
|
+
subscribeToSignalTrace: (request: void) => Stream<SubscribeToSignalTraceResponse>;
|
|
32
|
+
subscribeToSwarmInfo: (request: SubscribeToSwarmInfoRequest) => Stream<SubscribeToSwarmInfoResponse>;
|
|
33
33
|
}
|
|
34
34
|
export interface Event {
|
|
35
35
|
ready?: ReadyEvent;
|
|
@@ -196,6 +196,6 @@ export interface SetTracingOptionsRequest {
|
|
|
196
196
|
enable?: boolean;
|
|
197
197
|
}
|
|
198
198
|
export interface TracingService {
|
|
199
|
-
|
|
200
|
-
|
|
199
|
+
setTracingOptions: (request: SetTracingOptionsRequest) => Promise<void>;
|
|
200
|
+
subscribeToRpcTrace: (request: void) => Stream<dxos_rpc.RpcMessage>;
|
|
201
201
|
}
|
|
@@ -47,7 +47,7 @@ export interface MutationReceipt {
|
|
|
47
47
|
seq?: number;
|
|
48
48
|
}
|
|
49
49
|
export interface DataService {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
subscribeEntitySet: (request: SubscribeEntitySetRequest) => Stream<SubscribeEntitySetResponse>;
|
|
51
|
+
subscribeEntityStream: (request: SubscribeEntityStreamRequest) => Stream<SubscribeEntityStreamResponse>;
|
|
52
|
+
write: (request: WriteRequest) => Promise<MutationReceipt>;
|
|
53
53
|
}
|
|
@@ -10,6 +10,8 @@ import * as dxos_echo_service from "../dxos/echo/service";
|
|
|
10
10
|
import * as dxos_echo_snapshot from "../dxos/echo/snapshot";
|
|
11
11
|
import * as dxos_halo_keys from "../dxos/halo/keys";
|
|
12
12
|
import * as dxos_rpc from "../dxos/rpc";
|
|
13
|
+
export interface Empty {
|
|
14
|
+
}
|
|
13
15
|
export interface Timestamp {
|
|
14
16
|
seconds?: string;
|
|
15
17
|
nanos?: number;
|
|
@@ -255,8 +257,6 @@ export namespace GeneratedCodeInfo {
|
|
|
255
257
|
end?: number;
|
|
256
258
|
}
|
|
257
259
|
}
|
|
258
|
-
export interface Empty {
|
|
259
|
-
}
|
|
260
260
|
export interface Any {
|
|
261
261
|
type_url?: string;
|
|
262
262
|
value?: Uint8Array;
|