@dxos/client 2.33.7-dev.c2ba88fb → 2.33.8-dev.c77ba621

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.
Files changed (36) hide show
  1. package/README.md +1 -1
  2. package/dist/src/api/client.d.ts +1 -1
  3. package/dist/src/api/proxies/echo-proxy.d.ts.map +1 -1
  4. package/dist/src/api/proxies/echo-proxy.js.map +1 -1
  5. package/dist/src/api/proxies/halo-proxy.d.ts +11 -9
  6. package/dist/src/api/proxies/halo-proxy.d.ts.map +1 -1
  7. package/dist/src/api/proxies/halo-proxy.js +11 -7
  8. package/dist/src/api/proxies/halo-proxy.js.map +1 -1
  9. package/dist/src/api/proxies/party-proxy.d.ts +1 -1
  10. package/dist/src/api/proxies/party-proxy.d.ts.map +1 -1
  11. package/dist/src/api/proxies/party-proxy.js.map +1 -1
  12. package/dist/src/devtools/feeds.js.map +1 -1
  13. package/dist/src/devtools/network.js +2 -2
  14. package/dist/src/devtools/network.js.map +1 -1
  15. package/dist/src/proto/gen/dxos/halo/keys.d.ts +9 -9
  16. package/dist/src/proto/gen/google/protobuf.d.ts +4 -4
  17. package/dist/src/proto/gen/google/protobuf.d.ts.map +1 -1
  18. package/dist/src/proto/gen/index.d.ts.map +1 -1
  19. package/dist/src/proto/gen/index.js +1 -1
  20. package/dist/src/proto/gen/index.js.map +1 -1
  21. package/dist/src/proto/substitutions.d.ts +2 -2
  22. package/dist/src/proto/substitutions.d.ts.map +1 -1
  23. package/dist/src/proto/substitutions.js +2 -2
  24. package/dist/src/proto/substitutions.js.map +1 -1
  25. package/dist/src/services/impl/party.d.ts +2 -2
  26. package/dist/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +19 -19
  28. package/src/api/proxies/echo-proxy.ts +1 -1
  29. package/src/api/proxies/halo-proxy.ts +21 -14
  30. package/src/api/proxies/party-proxy.ts +1 -1
  31. package/src/devtools/feeds.ts +1 -1
  32. package/src/devtools/network.ts +1 -1
  33. package/src/proto/gen/dxos/halo/keys.ts +9 -9
  34. package/src/proto/gen/google/protobuf.ts +4 -4
  35. package/src/proto/gen/index.ts +1 -1
  36. package/src/proto/substitutions.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/client",
3
- "version": "2.33.7-dev.c2ba88fb",
3
+ "version": "2.33.8-dev.c77ba621",
4
4
  "license": "MIT",
5
5
  "author": "DXOS.org",
6
6
  "main": "dist/src/index.js",
@@ -10,21 +10,21 @@
10
10
  "src"
11
11
  ],
12
12
  "dependencies": {
13
- "@dxos/async": "2.33.7-dev.c2ba88fb",
14
- "@dxos/codec-protobuf": "2.33.7-dev.c2ba88fb",
15
- "@dxos/config": "2.33.7-dev.c2ba88fb",
16
- "@dxos/credentials": "2.33.7-dev.c2ba88fb",
17
- "@dxos/crypto": "2.33.7-dev.c2ba88fb",
18
- "@dxos/debug": "2.33.7-dev.c2ba88fb",
19
- "@dxos/echo-db": "2.33.7-dev.c2ba88fb",
20
- "@dxos/echo-protocol": "2.33.7-dev.c2ba88fb",
21
- "@dxos/feed-store": "2.33.7-dev.c2ba88fb",
22
- "@dxos/model-factory": "2.33.7-dev.c2ba88fb",
23
- "@dxos/network-manager": "2.33.7-dev.c2ba88fb",
24
- "@dxos/object-model": "2.33.7-dev.c2ba88fb",
25
- "@dxos/protocols": "2.33.7-dev.c2ba88fb",
26
- "@dxos/rpc": "2.33.7-dev.c2ba88fb",
27
- "@dxos/util": "2.33.7-dev.c2ba88fb",
13
+ "@dxos/async": "2.33.8-dev.c77ba621",
14
+ "@dxos/codec-protobuf": "2.33.8-dev.c77ba621",
15
+ "@dxos/config": "2.33.8-dev.c77ba621",
16
+ "@dxos/credentials": "2.33.8-dev.c77ba621",
17
+ "@dxos/crypto": "2.33.8-dev.c77ba621",
18
+ "@dxos/debug": "2.33.8-dev.c77ba621",
19
+ "@dxos/echo-db": "2.33.8-dev.c77ba621",
20
+ "@dxos/echo-protocol": "2.33.8-dev.c77ba621",
21
+ "@dxos/feed-store": "2.33.8-dev.c77ba621",
22
+ "@dxos/model-factory": "2.33.8-dev.c77ba621",
23
+ "@dxos/network-manager": "2.33.8-dev.c77ba621",
24
+ "@dxos/object-model": "2.33.8-dev.c77ba621",
25
+ "@dxos/protocols": "2.33.8-dev.c77ba621",
26
+ "@dxos/rpc": "2.33.8-dev.c77ba621",
27
+ "@dxos/util": "2.33.8-dev.c77ba621",
28
28
  "abstract-leveldown": "~7.0.0",
29
29
  "assert": "^2.0.0",
30
30
  "debug": "^4.3.3",
@@ -38,9 +38,9 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@dxos/eslint-plugin": "~1.0.34",
41
- "@dxos/protocols-toolchain": "2.33.6",
42
- "@dxos/random-access-multi-storage": "2.33.7-dev.c2ba88fb",
43
- "@dxos/testutils": "2.33.6",
41
+ "@dxos/protocols-toolchain": "2.33.7",
42
+ "@dxos/random-access-multi-storage": "2.33.8-dev.c77ba621",
43
+ "@dxos/testutils": "2.33.7",
44
44
  "@types/debug": "^4.1.7",
45
45
  "@types/jest": "^26.0.7",
46
46
  "@types/level-js": "~4.0.1",
@@ -5,12 +5,12 @@
5
5
  import assert from 'assert';
6
6
 
7
7
  import { Event, latch } from '@dxos/async';
8
- import { PublicKey } from '@dxos/crypto';
9
8
  import { failUndefined } from '@dxos/debug';
10
9
  import { InvitationDescriptor, PARTY_ITEM_TYPE, ResultSet } from '@dxos/echo-db';
11
10
  import { PartyKey, PartySnapshot } from '@dxos/echo-protocol';
12
11
  import { ModelConstructor, ModelFactory } from '@dxos/model-factory';
13
12
  import { ObjectModel } from '@dxos/object-model';
13
+ import { PublicKey } from '@dxos/protocols';
14
14
  import { ComplexMap, SubscriptionGroup } from '@dxos/util';
15
15
 
16
16
  import { ClientServiceHost, ClientServiceProvider } from '../../services';
@@ -3,9 +3,9 @@
3
3
  //
4
4
 
5
5
  import { Event } from '@dxos/async';
6
- import { KeyRecord } from '@dxos/credentials';
7
- import { PublicKey } from '@dxos/crypto';
6
+ import { DeviceInfo, KeyRecord } from '@dxos/credentials';
8
7
  import { Contact, CreateProfileOptions, InvitationDescriptor, PartyMember, ResultSet } from '@dxos/echo-db';
8
+ import { PublicKey } from '@dxos/protocols';
9
9
  import { SubscriptionGroup } from '@dxos/util';
10
10
 
11
11
  import { Profile, SignRequest, SignResponse } from '../../proto/gen/dxos/client';
@@ -23,6 +23,9 @@ export interface Halo {
23
23
  createProfile (options?: CreateProfileOptions): Promise<Profile>
24
24
  recoverProfile (seedPhrase: string): Promise<Profile>
25
25
 
26
+ sign (request: SignRequest): Promise<SignResponse>
27
+ addKeyRecord (keyRecord: KeyRecord): Promise<void>
28
+
26
29
  /**
27
30
  * @deprecated
28
31
  */
@@ -32,13 +35,12 @@ export interface Halo {
32
35
  createInvitation (): Promise<InvitationRequest>
33
36
  acceptInvitation (invitationDescriptor: InvitationDescriptor): Invitation
34
37
 
35
- addKeyRecord (keyRecord: KeyRecord): Promise<void>
36
- sign (request: SignRequest): Promise<SignResponse>
38
+ queryDevices (): Promise<DeviceInfo[]>
39
+ setDevicePreference (key: string, value: string): Promise<void>
40
+ getDevicePreference (key: string): Promise<string | undefined>
37
41
 
38
42
  setGlobalPreference (key: string, value: string): Promise<void>
39
43
  getGlobalPreference (key: string): Promise<string | undefined>
40
- setDevicePreference (key: string, value: string): Promise<void>
41
- getDevicePreference (key: string): Promise<string | undefined>
42
44
  }
43
45
 
44
46
  /**
@@ -155,20 +157,17 @@ export class HaloProxy implements Halo {
155
157
  );
156
158
  }
157
159
 
158
- async addKeyRecord (keyRecord: KeyRecord) {
159
- await this._serviceProvider.services.HaloService.addKeyRecord({ keyRecord });
160
- }
161
-
162
160
  async sign (request: SignRequest) {
163
161
  return await this._serviceProvider.services.HaloService.sign(request);
164
162
  }
165
163
 
166
- async setGlobalPreference (key: string, value: string): Promise<void> {
167
- await this._serviceProvider.services.HaloService.setGlobalPreference({ key, value });
164
+ async addKeyRecord (keyRecord: KeyRecord) {
165
+ await this._serviceProvider.services.HaloService.addKeyRecord({ keyRecord });
168
166
  }
169
167
 
170
- async getGlobalPreference (key: string): Promise<string | undefined> {
171
- return (await this._serviceProvider.services.HaloService.getGlobalPreference({ key })).value;
168
+ // TODO(burdon): Implement.
169
+ async queryDevices (): Promise<DeviceInfo[]> {
170
+ return [];
172
171
  }
173
172
 
174
173
  async setDevicePreference (key: string, value: string): Promise<void> {
@@ -179,6 +178,14 @@ export class HaloProxy implements Halo {
179
178
  return (await this._serviceProvider.services.HaloService.getDevicePreference({ key })).value;
180
179
  }
181
180
 
181
+ async setGlobalPreference (key: string, value: string): Promise<void> {
182
+ await this._serviceProvider.services.HaloService.setGlobalPreference({ key, value });
183
+ }
184
+
185
+ async getGlobalPreference (key: string): Promise<string | undefined> {
186
+ return (await this._serviceProvider.services.HaloService.getGlobalPreference({ key })).value;
187
+ }
188
+
182
189
  /**
183
190
  * Allocate resources and set-up internal subscriptions.
184
191
  *
@@ -2,7 +2,6 @@
2
2
  // Copyright 2021 DXOS.org
3
3
  //
4
4
 
5
- import { PublicKey } from '@dxos/crypto';
6
5
  import { failUndefined } from '@dxos/debug';
7
6
  import {
8
7
  PARTY_ITEM_TYPE,
@@ -17,6 +16,7 @@ import {
17
16
  import { PartyKey, PartySnapshot } from '@dxos/echo-protocol';
18
17
  import { ModelFactory } from '@dxos/model-factory';
19
18
  import { ObjectModel, ObjectProperties } from '@dxos/object-model';
19
+ import { PublicKey } from '@dxos/protocols';
20
20
 
21
21
  import { Party as PartyProto, PartyDetails } from '../../proto/gen/dxos/client';
22
22
  import { ClientServiceHost, ClientServiceProvider, ClientServiceProxy } from '../../services';
@@ -5,8 +5,8 @@
5
5
  import { Readable } from 'readable-stream';
6
6
 
7
7
  import { Stream } from '@dxos/codec-protobuf';
8
- import { PublicKey } from '@dxos/crypto';
9
8
  import { createBatchStream } from '@dxos/feed-store';
9
+ import { PublicKey } from '@dxos/protocols';
10
10
 
11
11
  import {
12
12
  SubscribeToFeedsRequest,
@@ -3,8 +3,8 @@
3
3
  //
4
4
 
5
5
  import { Stream } from '@dxos/codec-protobuf';
6
- import { PublicKey } from '@dxos/crypto';
7
6
  import { SignalApi } from '@dxos/network-manager';
7
+ import { PublicKey } from '@dxos/protocols';
8
8
 
9
9
  import {
10
10
  GetNetworkPeersRequest,
@@ -27,36 +27,36 @@ export interface PrivKey {
27
27
  }
28
28
  export interface KeyRecord {
29
29
  /**
30
- * - The `KeyType` type of the key. This is often unknown for keys from other sources.
30
+ * The `KeyType` type of the key. This is often unknown for keys from other sources.
31
31
  */
32
32
  type: KeyType;
33
33
  /**
34
- * - The public key as a Buffer (required).
34
+ * The public key as a Buffer (required).
35
35
  */
36
36
  publicKey: ReturnType<(typeof substitutions)["dxos.halo.keys.PubKey"]["decode"]>;
37
37
  /**
38
- * - The secret key as a Buffer (this will never be visible outside the Keyring).
38
+ * The secret key as a Buffer (this will never be visible outside the Keyring).
39
39
  */
40
40
  secretKey?: ReturnType<(typeof substitutions)["dxos.halo.keys.PrivKey"]["decode"]>;
41
41
  /**
42
- * - Is this key from a Greeting "hint"?
42
+ * Is this key from a Greeting "hint"?
43
43
  */
44
44
  hint?: boolean;
45
45
  /**
46
- * - Is this our key? Usually true if `secretKey` is present,
47
- * may be false for "inception keys" such as the Party key.
46
+ * Determines if this is our key?
47
+ * Usually true if `secretKey` is present; may be false for "inception keys" such as the Party key.
48
48
  */
49
49
  own?: boolean;
50
50
  /**
51
- * - Is this key to be trusted?
51
+ * Is this key to be trusted?
52
52
  */
53
53
  trusted?: boolean;
54
54
  /**
55
- * - An RFC-3339 date/time string for when the key was added to the Keyring.
55
+ * An RFC-3339 date/time string for when the key was added to the Keyring.
56
56
  */
57
57
  added?: string;
58
58
  /**
59
- * - An RFC-3339 date/time string for when the key was created.
59
+ * An RFC-3339 date/time string for when the key was created.
60
60
  */
61
61
  created?: string;
62
62
  }
@@ -13,14 +13,14 @@ import * as dxos_halo_keys from "../dxos/halo/keys";
13
13
  import * as dxos_rpc from "../dxos/rpc";
14
14
  export interface Empty {
15
15
  }
16
- export interface Any {
17
- type_url?: string;
18
- value?: Uint8Array;
19
- }
20
16
  export interface Timestamp {
21
17
  seconds?: string;
22
18
  nanos?: number;
23
19
  }
20
+ export interface Any {
21
+ type_url?: string;
22
+ value?: Uint8Array;
23
+ }
24
24
  export interface FileDescriptorSet {
25
25
  file?: FileDescriptorProto[];
26
26
  }