@dxos/client-protocol 0.5.1-main.c37e119 → 0.5.1-main.ef0d69d
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/lib/browser/meta.json +1 -1
- package/dist/lib/node/meta.json +1 -1
- package/dist/types/src/halo.d.ts +4 -6
- package/dist/types/src/halo.d.ts.map +1 -1
- package/dist/types/src/space.d.ts +9 -11
- package/dist/types/src/space.d.ts.map +1 -1
- package/package.json +12 -12
- package/src/halo.ts +8 -9
- package/src/space.ts +10 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/sdk/client-protocol/src/config.ts":{"bytes":5856,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/echo.ts":{"bytes":3100,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/halo.ts":{"bytes":
|
|
1
|
+
{"inputs":{"packages/sdk/client-protocol/src/config.ts":{"bytes":5856,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/echo.ts":{"bytes":3100,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/halo.ts":{"bytes":2777,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytes":5401,"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytes":9484,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytes":578,"imports":[{"path":"packages/sdk/client-protocol/src/invitations/encoder.ts","kind":"import-statement","original":"./encoder"},{"path":"packages/sdk/client-protocol/src/invitations/invitations.ts","kind":"import-statement","original":"./invitations"}],"format":"esm"},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytes":8973,"imports":[{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/shell.ts":{"bytes":1064,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/space.ts":{"bytes":4067,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/timeouts.ts":{"bytes":3134,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/schema.ts":{"bytes":1602,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/index.ts":{"bytes":1364,"imports":[{"path":"packages/sdk/client-protocol/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/sdk/client-protocol/src/echo.ts","kind":"import-statement","original":"./echo"},{"path":"packages/sdk/client-protocol/src/halo.ts","kind":"import-statement","original":"./halo"},{"path":"packages/sdk/client-protocol/src/invitations/index.ts","kind":"import-statement","original":"./invitations"},{"path":"packages/sdk/client-protocol/src/service-definitions.ts","kind":"import-statement","original":"./service-definitions"},{"path":"packages/sdk/client-protocol/src/shell.ts","kind":"import-statement","original":"./shell"},{"path":"packages/sdk/client-protocol/src/space.ts","kind":"import-statement","original":"./space"},{"path":"packages/sdk/client-protocol/src/timeouts.ts","kind":"import-statement","original":"./timeouts"},{"path":"packages/sdk/client-protocol/src/schema.ts","kind":"import-statement","original":"./schema"}],"format":"esm"}},"outputs":{"packages/sdk/client-protocol/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19546},"packages/sdk/client-protocol/dist/lib/browser/index.mjs":{"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["AUTHENTICATION_CODE_LENGTH","AUTH_TIMEOUT","AuthenticatingInvitation","CREATE_SPACE_TIMEOUT","CancellableInvitation","DEFAULT_CLIENT_CHANNEL","DEFAULT_INTERNAL_CHANNEL","DEFAULT_SHELL_CHANNEL","DEFAULT_VAULT_ORIGIN","DEFAULT_VAULT_URL","DX_CACHE","DX_CONFIG","DX_DATA","DX_RUNTIME","DX_STATE","ENV_DX_CONFIG","ENV_DX_PROFILE","ENV_DX_PROFILE_DEFAULT","EXPECTED_CONFIG_VERSION","INVITATION_TIMEOUT","InvitationEncoder","LOAD_CONTROL_FEEDS_TIMEOUT","LOAD_PROPERTIES_TIMEOUT","PROXY_CONNECTION_TIMEOUT","Properties","RESOURCE_LOCK_TIMEOUT","STATUS_TIMEOUT","appServiceBundle","clientServiceBundle","defaultConfig","defaultKey","getProfilePath","iframeServiceBundle","shellServiceBundle","workerServiceBundle","wrapObservable"],"entryPoint":"packages/sdk/client-protocol/src/index.ts","inputs":{"packages/sdk/client-protocol/src/config.ts":{"bytesInOutput":797},"packages/sdk/client-protocol/src/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/echo.ts":{"bytesInOutput":32},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytesInOutput":1242},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytesInOutput":1941},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytesInOutput":1494},"packages/sdk/client-protocol/src/timeouts.ts":{"bytesInOutput":224},"packages/sdk/client-protocol/src/schema.ts":{"bytesInOutput":236}},"bytes":7143}}}
|
package/dist/lib/node/meta.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/sdk/client-protocol/src/config.ts":{"bytes":5856,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/echo.ts":{"bytes":3100,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/halo.ts":{"bytes":
|
|
1
|
+
{"inputs":{"packages/sdk/client-protocol/src/config.ts":{"bytes":5856,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/echo.ts":{"bytes":3100,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/halo.ts":{"bytes":2777,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytes":5401,"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytes":9484,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytes":578,"imports":[{"path":"packages/sdk/client-protocol/src/invitations/encoder.ts","kind":"import-statement","original":"./encoder"},{"path":"packages/sdk/client-protocol/src/invitations/invitations.ts","kind":"import-statement","original":"./invitations"}],"format":"esm"},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytes":8973,"imports":[{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/shell.ts":{"bytes":1064,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/space.ts":{"bytes":4067,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/timeouts.ts":{"bytes":3134,"imports":[],"format":"esm"},"packages/sdk/client-protocol/src/schema.ts":{"bytes":1602,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/sdk/client-protocol/src/index.ts":{"bytes":1364,"imports":[{"path":"packages/sdk/client-protocol/src/config.ts","kind":"import-statement","original":"./config"},{"path":"packages/sdk/client-protocol/src/echo.ts","kind":"import-statement","original":"./echo"},{"path":"packages/sdk/client-protocol/src/halo.ts","kind":"import-statement","original":"./halo"},{"path":"packages/sdk/client-protocol/src/invitations/index.ts","kind":"import-statement","original":"./invitations"},{"path":"packages/sdk/client-protocol/src/service-definitions.ts","kind":"import-statement","original":"./service-definitions"},{"path":"packages/sdk/client-protocol/src/shell.ts","kind":"import-statement","original":"./shell"},{"path":"packages/sdk/client-protocol/src/space.ts","kind":"import-statement","original":"./space"},{"path":"packages/sdk/client-protocol/src/timeouts.ts","kind":"import-statement","original":"./timeouts"},{"path":"packages/sdk/client-protocol/src/schema.ts","kind":"import-statement","original":"./schema"}],"format":"esm"}},"outputs":{"packages/sdk/client-protocol/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":19546},"packages/sdk/client-protocol/dist/lib/node/index.cjs":{"imports":[{"path":"base-x","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"@dxos/protocols","kind":"import-statement","external":true},{"path":"@dxos/rpc","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["AUTHENTICATION_CODE_LENGTH","AUTH_TIMEOUT","AuthenticatingInvitation","CREATE_SPACE_TIMEOUT","CancellableInvitation","DEFAULT_CLIENT_CHANNEL","DEFAULT_INTERNAL_CHANNEL","DEFAULT_SHELL_CHANNEL","DEFAULT_VAULT_ORIGIN","DEFAULT_VAULT_URL","DX_CACHE","DX_CONFIG","DX_DATA","DX_RUNTIME","DX_STATE","ENV_DX_CONFIG","ENV_DX_PROFILE","ENV_DX_PROFILE_DEFAULT","EXPECTED_CONFIG_VERSION","INVITATION_TIMEOUT","InvitationEncoder","LOAD_CONTROL_FEEDS_TIMEOUT","LOAD_PROPERTIES_TIMEOUT","PROXY_CONNECTION_TIMEOUT","Properties","RESOURCE_LOCK_TIMEOUT","STATUS_TIMEOUT","appServiceBundle","clientServiceBundle","defaultConfig","defaultKey","getProfilePath","iframeServiceBundle","shellServiceBundle","workerServiceBundle","wrapObservable"],"entryPoint":"packages/sdk/client-protocol/src/index.ts","inputs":{"packages/sdk/client-protocol/src/config.ts":{"bytesInOutput":797},"packages/sdk/client-protocol/src/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/echo.ts":{"bytesInOutput":32},"packages/sdk/client-protocol/src/invitations/encoder.ts":{"bytesInOutput":1242},"packages/sdk/client-protocol/src/invitations/index.ts":{"bytesInOutput":0},"packages/sdk/client-protocol/src/invitations/invitations.ts":{"bytesInOutput":1941},"packages/sdk/client-protocol/src/service-definitions.ts":{"bytesInOutput":1494},"packages/sdk/client-protocol/src/timeouts.ts":{"bytesInOutput":224},"packages/sdk/client-protocol/src/schema.ts":{"bytesInOutput":236}},"bytes":7143}}}
|
package/dist/types/src/halo.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type MulticastObservable } from '@dxos/async';
|
|
2
2
|
import { type PublicKey } from '@dxos/keys';
|
|
3
3
|
import { type Contact, type Device, type Identity, type Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
4
4
|
import { type DeviceProfileDocument, type Credential, type Presentation, type ProfileDocument } from '@dxos/protocols/proto/dxos/halo/credentials';
|
|
@@ -12,18 +12,16 @@ export interface Halo {
|
|
|
12
12
|
get device(): Device | undefined;
|
|
13
13
|
get contacts(): MulticastObservable<Contact[]>;
|
|
14
14
|
get invitations(): MulticastObservable<CancellableInvitation[]>;
|
|
15
|
+
get credentials(): MulticastObservable<Credential[]>;
|
|
15
16
|
createIdentity(options?: ProfileDocument, deviceProfile?: DeviceProfileDocument): Promise<Identity>;
|
|
16
17
|
recoverIdentity(recoveryKey: Uint8Array): Promise<Identity>;
|
|
17
18
|
updateProfile(profile: ProfileDocument): Promise<Identity>;
|
|
18
19
|
share(options?: Partial<Invitation>): CancellableInvitation;
|
|
19
20
|
join(invitation: Invitation, deviceProfile?: DeviceProfileDocument): AuthenticatingInvitation;
|
|
20
|
-
queryCredentials(options
|
|
21
|
+
queryCredentials(options: {
|
|
21
22
|
ids?: PublicKey[];
|
|
22
23
|
type?: string;
|
|
23
|
-
}):
|
|
24
|
-
onUpdate: (credentials: Credential[]) => void;
|
|
25
|
-
onError: (error?: Error) => void;
|
|
26
|
-
}, Credential[]>;
|
|
24
|
+
}): Credential[];
|
|
27
25
|
writeCredentials(credentials: Credential[]): Promise<void>;
|
|
28
26
|
presentCredentials(options: {
|
|
29
27
|
ids: PublicKey[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"halo.d.ts","sourceRoot":"","sources":["../../../src/halo.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"halo.d.ts","sourceRoot":"","sources":["../../../src/halo.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACvH,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,eAAe,EACrB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EAAE,KAAK,wBAAwB,EAAE,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE1F;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB,IAAI,QAAQ,IAAI,mBAAmB,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC;IACrD,IA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face SpaceInternal {
|
|
10
10
|
get data(): SpaceData;
|
|
11
|
-
/**
|
|
12
|
-
* Activates the space enabling the use of the database and starts replication with peers.
|
|
13
|
-
* The setting is persisted on the local device.
|
|
14
|
-
*/
|
|
15
|
-
open(): Promise<void>;
|
|
16
|
-
/**
|
|
17
|
-
* Deactivates the space stopping replication with other peers.
|
|
18
|
-
* The space will not auto-open on the next app launch.
|
|
19
|
-
* The setting is persisted on the local device.
|
|
20
|
-
*/
|
|
21
|
-
close(): Promise<void>;
|
|
22
11
|
createEpoch(): Promise<void>;
|
|
23
12
|
removeMember(memberKey: PublicKey): Promise<void>;
|
|
24
13
|
}
|
|
@@ -49,7 +38,16 @@ export interface Space {
|
|
|
49
38
|
* @deprecated
|
|
50
39
|
*/
|
|
51
40
|
get internal(): SpaceInternal;
|
|
41
|
+
/**
|
|
42
|
+
* Activates the space enabling the use of the database and starts replication with peers.
|
|
43
|
+
* The setting is persisted on the local device.
|
|
44
|
+
*/
|
|
52
45
|
open(): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Deactivates the space stopping replication with other peers.
|
|
48
|
+
* The space will not auto-open on the next app launch.
|
|
49
|
+
* The setting is persisted on the local device.
|
|
50
|
+
*/
|
|
53
51
|
close(): Promise<void>;
|
|
54
52
|
/**
|
|
55
53
|
* Waits until the space is in the ready state, with database initialized.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../../src/space.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EACL,KAAK,UAAU,EACf,KAAK,KAAK,IAAI,SAA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AI,OAAO,CAAC;IAEtB;;OAEG;IACH,IAAI,UAAU,IAAI,kBAAkB,CAAC,GAAG,CAAC,CAAC;IAE1C;;;;OAIG;IACH,IAAI,KAAK,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAE7C;;OAEG;IACH,IAAI,QAAQ,IAAI,mBAAmB,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;IAE7D,IAAI,WAAW,IAAI,mBAAmB,CAAC,qBAAqB,EAAE,CAAC,CAAC;IAChE,IAAI,OAAO,IAAI,mBAAmB,CAAC,WAAW,EAAE,CAAC,CAAC;IAElD;;OAEG;IAEH,IAAI,QAAQ,IAAI,aAAa,CAAC;IAG9B;;;OAGG;IACH,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB;;;;OAIG;IACH,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAEvB;;OAEG;IACH,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAGhC,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9D,MAAM,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,KAAK,mBAAmB,CAAC;IAE7F,KAAK,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,qBAAqB,CAAC;IAE5D,cAAc,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;CAC1C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/client-protocol",
|
|
3
|
-
"version": "0.5.1-main.
|
|
3
|
+
"version": "0.5.1-main.ef0d69d",
|
|
4
4
|
"description": "Core DXOS Client API.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -18,19 +18,19 @@
|
|
|
18
18
|
],
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"base-x": "~3.0.9",
|
|
21
|
-
"@dxos/async": "0.5.1-main.
|
|
22
|
-
"@dxos/config": "0.5.1-main.
|
|
23
|
-
"@dxos/
|
|
24
|
-
"@dxos/echo-
|
|
25
|
-
"@dxos/
|
|
26
|
-
"@dxos/
|
|
27
|
-
"@dxos/
|
|
28
|
-
"@dxos/node-std": "0.5.1-main.
|
|
29
|
-
"@dxos/protocols": "0.5.1-main.
|
|
30
|
-
"@dxos/rpc": "0.5.1-main.
|
|
21
|
+
"@dxos/async": "0.5.1-main.ef0d69d",
|
|
22
|
+
"@dxos/config": "0.5.1-main.ef0d69d",
|
|
23
|
+
"@dxos/context": "0.5.1-main.ef0d69d",
|
|
24
|
+
"@dxos/echo-db": "0.5.1-main.ef0d69d",
|
|
25
|
+
"@dxos/invariant": "0.5.1-main.ef0d69d",
|
|
26
|
+
"@dxos/keys": "0.5.1-main.ef0d69d",
|
|
27
|
+
"@dxos/echo-schema": "0.5.1-main.ef0d69d",
|
|
28
|
+
"@dxos/node-std": "0.5.1-main.ef0d69d",
|
|
29
|
+
"@dxos/protocols": "0.5.1-main.ef0d69d",
|
|
30
|
+
"@dxos/rpc": "0.5.1-main.ef0d69d"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@dxos/echo-typegen": "0.5.1-main.
|
|
33
|
+
"@dxos/echo-typegen": "0.5.1-main.ef0d69d"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
package/src/halo.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// Copyright 2021 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import { type
|
|
5
|
+
import { type MulticastObservable } from '@dxos/async';
|
|
6
6
|
import { type PublicKey } from '@dxos/keys';
|
|
7
7
|
import { type Contact, type Device, type Identity, type Invitation } from '@dxos/protocols/proto/dxos/client/services';
|
|
8
8
|
import {
|
|
@@ -23,6 +23,7 @@ export interface Halo {
|
|
|
23
23
|
get device(): Device | undefined;
|
|
24
24
|
get contacts(): MulticastObservable<Contact[]>;
|
|
25
25
|
get invitations(): MulticastObservable<CancellableInvitation[]>;
|
|
26
|
+
get credentials(): MulticastObservable<Credential[]>;
|
|
26
27
|
|
|
27
28
|
createIdentity(options?: ProfileDocument, deviceProfile?: DeviceProfileDocument): Promise<Identity>;
|
|
28
29
|
recoverIdentity(recoveryKey: Uint8Array): Promise<Identity>;
|
|
@@ -31,14 +32,12 @@ export interface Halo {
|
|
|
31
32
|
share(options?: Partial<Invitation>): CancellableInvitation;
|
|
32
33
|
join(invitation: Invitation, deviceProfile?: DeviceProfileDocument): AuthenticatingInvitation;
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
Credential[]
|
|
41
|
-
>;
|
|
35
|
+
/*
|
|
36
|
+
* query Credentials currently known to the identity.
|
|
37
|
+
* Note: Will return an empty or incomplete result if called before credentials have been loaded.
|
|
38
|
+
* @experimental
|
|
39
|
+
*/
|
|
40
|
+
queryCredentials(options: { ids?: PublicKey[]; type?: string }): Credential[];
|
|
42
41
|
writeCredentials(credentials: Credential[]): Promise<void>;
|
|
43
42
|
presentCredentials(options: { ids: PublicKey[]; nonce?: Uint8Array }): Promise<Presentation>;
|
|
44
43
|
}
|
package/src/space.ts
CHANGED
|
@@ -20,19 +20,6 @@ import { type CancellableInvitation } from './invitations';
|
|
|
20
20
|
export interface SpaceInternal {
|
|
21
21
|
get data(): SpaceData;
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* Activates the space enabling the use of the database and starts replication with peers.
|
|
25
|
-
* The setting is persisted on the local device.
|
|
26
|
-
*/
|
|
27
|
-
open(): Promise<void>;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Deactivates the space stopping replication with other peers.
|
|
31
|
-
* The space will not auto-open on the next app launch.
|
|
32
|
-
* The setting is persisted on the local device.
|
|
33
|
-
*/
|
|
34
|
-
close(): Promise<void>;
|
|
35
|
-
|
|
36
23
|
// TODO(dmaretskyi): Return epoch info.
|
|
37
24
|
createEpoch(): Promise<void>;
|
|
38
25
|
|
|
@@ -75,7 +62,17 @@ export interface Space {
|
|
|
75
62
|
// TODO(wittjosiah): Remove. This should not be exposed.
|
|
76
63
|
get internal(): SpaceInternal;
|
|
77
64
|
|
|
65
|
+
// TODO(wittjosiah): Rename activate/deactivate?
|
|
66
|
+
/**
|
|
67
|
+
* Activates the space enabling the use of the database and starts replication with peers.
|
|
68
|
+
* The setting is persisted on the local device.
|
|
69
|
+
*/
|
|
78
70
|
open(): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Deactivates the space stopping replication with other peers.
|
|
73
|
+
* The space will not auto-open on the next app launch.
|
|
74
|
+
* The setting is persisted on the local device.
|
|
75
|
+
*/
|
|
79
76
|
close(): Promise<void>;
|
|
80
77
|
|
|
81
78
|
/**
|