@drakkar.software/starfish-client 3.0.0-alpha.1 → 3.0.0-alpha.2
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/append.d.ts +50 -0
- package/dist/background-sync.js +29 -0
- package/dist/bindings/broadcast.d.ts +19 -0
- package/dist/bindings/broadcast.js +65 -0
- package/dist/bindings/react.d.ts +12 -0
- package/dist/bindings/react.js +25 -0
- package/dist/bindings/suspense.js +49 -0
- package/dist/bindings/zustand.js +36 -0
- package/dist/bindings/zustand.js.map +2 -2
- package/dist/client.d.ts +20 -0
- package/dist/client.js +112 -0
- package/dist/config.d.ts +2 -2
- package/dist/config.js +18 -0
- package/dist/crypto.js +49 -0
- package/dist/debounced-sync.js +120 -0
- package/dist/dedup.js +35 -0
- package/dist/entitlements.js +41 -0
- package/dist/export.js +115 -0
- package/dist/group-crypto.d.ts +111 -0
- package/dist/group-crypto.js +205 -0
- package/dist/group-crypto.js.map +7 -0
- package/dist/history.js +61 -0
- package/dist/identity.d.ts +82 -4
- package/dist/identity.js +354 -2
- package/dist/identity.js.map +4 -4
- package/dist/index.js +36 -0
- package/dist/index.js.map +2 -2
- package/dist/logger.js +80 -0
- package/dist/migrate.js +38 -0
- package/dist/mobile-lifecycle.js +55 -0
- package/dist/multi-store.js +92 -0
- package/dist/polling.js +52 -0
- package/dist/resolvers.js +223 -0
- package/dist/service-worker.js +55 -0
- package/dist/storage/indexeddb.js +59 -0
- package/dist/sync.js +127 -0
- package/dist/types.js +18 -0
- package/dist/validate.js +28 -0
- package/package.json +2 -2
- package/dist/_crypto_helpers.d.ts +0 -4
- package/dist/cap-mint.d.ts +0 -20
- package/dist/cap-mint.js +0 -12
- package/dist/cap-mint.js.map +0 -7
- package/dist/directory.d.ts +0 -9
- package/dist/directory.js +0 -24
- package/dist/directory.js.map +0 -7
- package/dist/keyring.d.ts +0 -6
- package/dist/keyring.js +0 -26
- package/dist/keyring.js.map +0 -7
- package/dist/pairing.d.ts +0 -6
- package/dist/pairing.js +0 -26
- package/dist/pairing.js.map +0 -7
- package/dist/recipients.d.ts +0 -6
- package/dist/recipients.js +0 -16
- package/dist/recipients.js.map +0 -7
package/dist/sync.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { deepMerge, stableStringify } from "@drakkar.software/starfish-protocol";
|
|
2
|
+
import { ConflictError } from "./types.js";
|
|
3
|
+
import { createEncryptor } from "./crypto.js";
|
|
4
|
+
import { ValidationError } from "./validate.js";
|
|
5
|
+
export class SyncManager {
|
|
6
|
+
client;
|
|
7
|
+
pullPath;
|
|
8
|
+
pushPath;
|
|
9
|
+
onConflict;
|
|
10
|
+
maxRetries;
|
|
11
|
+
encryptor;
|
|
12
|
+
signData;
|
|
13
|
+
logger;
|
|
14
|
+
loggerName;
|
|
15
|
+
validate;
|
|
16
|
+
lastHash = null;
|
|
17
|
+
lastCheckpoint = 0;
|
|
18
|
+
localData = {};
|
|
19
|
+
constructor(options) {
|
|
20
|
+
this.client = options.client;
|
|
21
|
+
this.pullPath = options.pullPath;
|
|
22
|
+
this.pushPath = options.pushPath;
|
|
23
|
+
this.onConflict = options.onConflict ?? deepMerge;
|
|
24
|
+
this.maxRetries = options.maxRetries ?? 3;
|
|
25
|
+
this.signData = options.signData;
|
|
26
|
+
this.logger = options.logger;
|
|
27
|
+
this.loggerName = options.loggerName ?? options.pullPath.split("/").filter(Boolean).pop() ?? options.pullPath;
|
|
28
|
+
this.validate = options.validate;
|
|
29
|
+
this.encryptor =
|
|
30
|
+
options.encryptor ??
|
|
31
|
+
(options.encryptionSecret && options.encryptionSalt
|
|
32
|
+
? createEncryptor(options.encryptionSecret, options.encryptionSalt, options.encryptionInfo)
|
|
33
|
+
: null);
|
|
34
|
+
}
|
|
35
|
+
getData() {
|
|
36
|
+
return { ...this.localData };
|
|
37
|
+
}
|
|
38
|
+
getHash() {
|
|
39
|
+
return this.lastHash;
|
|
40
|
+
}
|
|
41
|
+
getCheckpoint() {
|
|
42
|
+
return this.lastCheckpoint;
|
|
43
|
+
}
|
|
44
|
+
async pull() {
|
|
45
|
+
this.logger?.pullStart(this.loggerName);
|
|
46
|
+
const start = performance.now();
|
|
47
|
+
try {
|
|
48
|
+
const result = await this.client.pull(this.pullPath, this.lastCheckpoint);
|
|
49
|
+
if (this.encryptor) {
|
|
50
|
+
const decrypted = await this.encryptor.decrypt(result.data);
|
|
51
|
+
this.localData = decrypted;
|
|
52
|
+
result.data = decrypted;
|
|
53
|
+
}
|
|
54
|
+
else if (this.lastCheckpoint > 0) {
|
|
55
|
+
this.localData = deepMerge(this.localData, result.data);
|
|
56
|
+
result.data = this.localData;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
this.localData = result.data;
|
|
60
|
+
}
|
|
61
|
+
this.lastHash = result.hash;
|
|
62
|
+
this.lastCheckpoint = result.timestamp;
|
|
63
|
+
this.logger?.pullSuccess(this.loggerName, Math.round(performance.now() - start));
|
|
64
|
+
return result;
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
this.logger?.pullError(this.loggerName, err instanceof Error ? err.message : String(err));
|
|
68
|
+
throw err;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async push(data) {
|
|
72
|
+
if (this.validate) {
|
|
73
|
+
const result = this.validate(data);
|
|
74
|
+
if (result !== true)
|
|
75
|
+
throw new ValidationError(result);
|
|
76
|
+
}
|
|
77
|
+
this.logger?.pushStart(this.loggerName);
|
|
78
|
+
const start = performance.now();
|
|
79
|
+
let attempt = 0;
|
|
80
|
+
let pendingData = data;
|
|
81
|
+
while (attempt <= this.maxRetries) {
|
|
82
|
+
try {
|
|
83
|
+
const payload = this.encryptor
|
|
84
|
+
? await this.encryptor.encrypt(pendingData)
|
|
85
|
+
: pendingData;
|
|
86
|
+
const sig = this.signData
|
|
87
|
+
? await this.signData(stableStringify(payload))
|
|
88
|
+
: undefined;
|
|
89
|
+
const result = await this.client.push(this.pushPath, payload, this.lastHash, sig);
|
|
90
|
+
this.lastHash = result.hash;
|
|
91
|
+
this.lastCheckpoint = result.timestamp;
|
|
92
|
+
this.localData = pendingData;
|
|
93
|
+
this.logger?.pushSuccess(this.loggerName, Math.round(performance.now() - start));
|
|
94
|
+
return result;
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
if (!(err instanceof ConflictError) || attempt >= this.maxRetries) {
|
|
98
|
+
this.logger?.pushError(this.loggerName, err instanceof Error ? err.message : String(err));
|
|
99
|
+
throw err;
|
|
100
|
+
}
|
|
101
|
+
this.logger?.conflict(this.loggerName, attempt + 1);
|
|
102
|
+
try {
|
|
103
|
+
const remote = await this.client.pull(this.pullPath);
|
|
104
|
+
const remoteData = this.encryptor
|
|
105
|
+
? await this.encryptor.decrypt(remote.data)
|
|
106
|
+
: remote.data;
|
|
107
|
+
this.lastHash = remote.hash;
|
|
108
|
+
this.lastCheckpoint = remote.timestamp;
|
|
109
|
+
pendingData = this.onConflict(pendingData, remoteData);
|
|
110
|
+
}
|
|
111
|
+
catch (resolveErr) {
|
|
112
|
+
const msg = resolveErr instanceof Error ? resolveErr.message : String(resolveErr);
|
|
113
|
+
this.logger?.pushError(this.loggerName, `Conflict resolution failed (attempt ${attempt + 1}): ${msg}`);
|
|
114
|
+
throw resolveErr;
|
|
115
|
+
}
|
|
116
|
+
await new Promise(resolve => setTimeout(resolve, Math.min(100 * Math.pow(2, attempt), 2000) + Math.random() * 100));
|
|
117
|
+
attempt++;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
throw new ConflictError();
|
|
121
|
+
}
|
|
122
|
+
async update(modifier) {
|
|
123
|
+
await this.pull();
|
|
124
|
+
const updated = modifier(this.localData);
|
|
125
|
+
return this.push(updated);
|
|
126
|
+
}
|
|
127
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Push conflict error (HTTP 409). */
|
|
2
|
+
export class ConflictError extends Error {
|
|
3
|
+
constructor() {
|
|
4
|
+
super("hash_mismatch");
|
|
5
|
+
this.name = "ConflictError";
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
/** HTTP error from the Starfish server. */
|
|
9
|
+
export class StarfishHttpError extends Error {
|
|
10
|
+
status;
|
|
11
|
+
body;
|
|
12
|
+
constructor(status, body) {
|
|
13
|
+
super(`HTTP ${status}: ${body}`);
|
|
14
|
+
this.status = status;
|
|
15
|
+
this.body = body;
|
|
16
|
+
this.name = "StarfishHttpError";
|
|
17
|
+
}
|
|
18
|
+
}
|
package/dist/validate.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Error thrown when pre-push validation fails. */
|
|
2
|
+
export class ValidationError extends Error {
|
|
3
|
+
errors;
|
|
4
|
+
constructor(errors) {
|
|
5
|
+
super(`Validation failed: ${errors.join("; ")}`);
|
|
6
|
+
this.errors = errors;
|
|
7
|
+
this.name = "ValidationError";
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Creates a validator from a JSON Schema object.
|
|
12
|
+
* Requires an Ajv-compatible validate function.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* import Ajv from "ajv"
|
|
17
|
+
* const ajv = new Ajv()
|
|
18
|
+
* const validator = createSchemaValidator(ajv, mySchema)
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export function createSchemaValidator(ajv, schema) {
|
|
22
|
+
const validate = ajv.compile(schema);
|
|
23
|
+
return (data) => {
|
|
24
|
+
if (validate(data))
|
|
25
|
+
return true;
|
|
26
|
+
return [ajv.errorsText(validate.errors)];
|
|
27
|
+
};
|
|
28
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@drakkar.software/starfish-client",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/Drakkar-Software/starfish.git",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
}
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@drakkar.software/starfish-protocol": "3.0.0-alpha.
|
|
63
|
+
"@drakkar.software/starfish-protocol": "3.0.0-alpha.2"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@legendapp/state": "^2.0.0",
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export declare function hkdfBytes(ikm: Uint8Array, salt: Uint8Array, info: Uint8Array, lengthBytes?: number): Promise<Uint8Array>;
|
|
2
|
-
export declare function bytesToHex(bytes: Uint8Array): string;
|
|
3
|
-
export declare function hexToBytes(hex: string): Uint8Array;
|
|
4
|
-
export declare function concat(...parts: Uint8Array[]): Uint8Array;
|
package/dist/cap-mint.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Phase-2 transitional shim. `mintDeviceCap` + `scopes.rootAll` now live in
|
|
3
|
-
* `@drakkar.software/starfish-identities`; `mintMemberCap` +
|
|
4
|
-
* `scopes.readOnly`/`scopes.writer`/`scopes.admin` now live in
|
|
5
|
-
* `@drakkar.software/starfish-sharing`. The `scopes` re-export here merges
|
|
6
|
-
* both so existing imports of `import { scopes } from
|
|
7
|
-
* "../src/cap-mint.js"` keep working. Removed in Phase 3.
|
|
8
|
-
*/
|
|
9
|
-
import { type ScopePreset as IdentityScopePreset, type MintOpts as IdentityMintOpts } from "@drakkar.software/starfish-identities";
|
|
10
|
-
export { mintDeviceCap } from "@drakkar.software/starfish-identities";
|
|
11
|
-
export { mintMemberCap } from "@drakkar.software/starfish-sharing";
|
|
12
|
-
/** @deprecated Phase-2 transitional facade. Use the per-package `scopes` directly. */
|
|
13
|
-
export declare const scopes: {
|
|
14
|
-
readOnly: (c: string) => import("@drakkar.software/starfish-sharing").ScopePreset;
|
|
15
|
-
writer: (c: string) => import("@drakkar.software/starfish-sharing").ScopePreset;
|
|
16
|
-
admin: (c: string) => import("@drakkar.software/starfish-sharing").ScopePreset;
|
|
17
|
-
rootAll: () => IdentityScopePreset;
|
|
18
|
-
};
|
|
19
|
-
export type ScopePreset = IdentityScopePreset;
|
|
20
|
-
export type MintOpts = IdentityMintOpts;
|
package/dist/cap-mint.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
// src/cap-mint.ts
|
|
2
|
-
import { scopes as identityScopes } from "@drakkar.software/starfish-identities";
|
|
3
|
-
import { scopes as sharingScopes } from "@drakkar.software/starfish-sharing";
|
|
4
|
-
import { mintDeviceCap } from "@drakkar.software/starfish-identities";
|
|
5
|
-
import { mintMemberCap } from "@drakkar.software/starfish-sharing";
|
|
6
|
-
var scopes = { ...identityScopes, ...sharingScopes };
|
|
7
|
-
export {
|
|
8
|
-
mintDeviceCap,
|
|
9
|
-
mintMemberCap,
|
|
10
|
-
scopes
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=cap-mint.js.map
|
package/dist/cap-mint.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/cap-mint.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Phase-2 transitional shim. `mintDeviceCap` + `scopes.rootAll` now live in\n * `@drakkar.software/starfish-identities`; `mintMemberCap` +\n * `scopes.readOnly`/`scopes.writer`/`scopes.admin` now live in\n * `@drakkar.software/starfish-sharing`. The `scopes` re-export here merges\n * both so existing imports of `import { scopes } from\n * \"../src/cap-mint.js\"` keep working. Removed in Phase 3.\n */\nimport { scopes as identityScopes, type ScopePreset as IdentityScopePreset, type MintOpts as IdentityMintOpts } from \"@drakkar.software/starfish-identities\"\nimport { scopes as sharingScopes } from \"@drakkar.software/starfish-sharing\"\n\nexport { mintDeviceCap } from \"@drakkar.software/starfish-identities\"\nexport { mintMemberCap } from \"@drakkar.software/starfish-sharing\"\n\n/** @deprecated Phase-2 transitional facade. Use the per-package `scopes` directly. */\nexport const scopes = { ...identityScopes, ...sharingScopes }\n\nexport type ScopePreset = IdentityScopePreset\nexport type MintOpts = IdentityMintOpts\n"],
|
|
5
|
-
"mappings": ";AAQA,SAAS,UAAU,sBAAkG;AACrH,SAAS,UAAU,qBAAqB;AAExC,SAAS,qBAAqB;AAC9B,SAAS,qBAAqB;AAGvB,IAAM,SAAS,EAAE,GAAG,gBAAgB,GAAG,cAAc;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/directory.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Phase-2 transitional shim. Device-directory helpers now live in
|
|
3
|
-
* `@drakkar.software/starfish-identities`; member-directory helpers now live
|
|
4
|
-
* in `@drakkar.software/starfish-sharing`. Removed in Phase 3.
|
|
5
|
-
*/
|
|
6
|
-
export { addDeviceEntry, listDevices, removeDeviceEntry, devicesPathFor, } from "@drakkar.software/starfish-identities";
|
|
7
|
-
export type { DirectoryEntry, Directory, DeviceEntry, ListDirectoryOpts, } from "@drakkar.software/starfish-identities";
|
|
8
|
-
export { addMemberEntry, listMembers, removeMemberEntry, membersPathFor, } from "@drakkar.software/starfish-sharing";
|
|
9
|
-
export type { MemberEntry } from "@drakkar.software/starfish-sharing";
|
package/dist/directory.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// src/directory.ts
|
|
2
|
-
import {
|
|
3
|
-
addDeviceEntry,
|
|
4
|
-
listDevices,
|
|
5
|
-
removeDeviceEntry,
|
|
6
|
-
devicesPathFor
|
|
7
|
-
} from "@drakkar.software/starfish-identities";
|
|
8
|
-
import {
|
|
9
|
-
addMemberEntry,
|
|
10
|
-
listMembers,
|
|
11
|
-
removeMemberEntry,
|
|
12
|
-
membersPathFor
|
|
13
|
-
} from "@drakkar.software/starfish-sharing";
|
|
14
|
-
export {
|
|
15
|
-
addDeviceEntry,
|
|
16
|
-
addMemberEntry,
|
|
17
|
-
devicesPathFor,
|
|
18
|
-
listDevices,
|
|
19
|
-
listMembers,
|
|
20
|
-
membersPathFor,
|
|
21
|
-
removeDeviceEntry,
|
|
22
|
-
removeMemberEntry
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=directory.js.map
|
package/dist/directory.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/directory.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Phase-2 transitional shim. Device-directory helpers now live in\n * `@drakkar.software/starfish-identities`; member-directory helpers now live\n * in `@drakkar.software/starfish-sharing`. Removed in Phase 3.\n */\nexport {\n addDeviceEntry,\n listDevices,\n removeDeviceEntry,\n devicesPathFor,\n} from \"@drakkar.software/starfish-identities\"\nexport type {\n DirectoryEntry,\n Directory,\n DeviceEntry,\n ListDirectoryOpts,\n} from \"@drakkar.software/starfish-identities\"\n\nexport {\n addMemberEntry,\n listMembers,\n removeMemberEntry,\n membersPathFor,\n} from \"@drakkar.software/starfish-sharing\"\nexport type { MemberEntry } from \"@drakkar.software/starfish-sharing\"\n"],
|
|
5
|
-
"mappings": ";AAKA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAQP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/keyring.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Phase-2 transitional shim. The implementation lives in
|
|
3
|
-
* `@drakkar.software/starfish-keyring`. This file is removed in Phase 3.
|
|
4
|
-
*/
|
|
5
|
-
export { KEYRING_WRAP_SALT, KEYRING_WRAP_INFO, KEYRING_IV_BYTES, wrapForRecipient, unwrapFromEntry, verifyEntrySignature, createKeyring, addRecipient, rotateEpoch, createKeyringEncryptor, } from "@drakkar.software/starfish-keyring";
|
|
6
|
-
export type { WrappedKeyEntry, KeyringEpoch, Keyring, KeyringEncryptor, } from "@drakkar.software/starfish-keyring";
|
package/dist/keyring.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// src/keyring.ts
|
|
2
|
-
import {
|
|
3
|
-
KEYRING_WRAP_SALT,
|
|
4
|
-
KEYRING_WRAP_INFO,
|
|
5
|
-
KEYRING_IV_BYTES,
|
|
6
|
-
wrapForRecipient,
|
|
7
|
-
unwrapFromEntry,
|
|
8
|
-
verifyEntrySignature,
|
|
9
|
-
createKeyring,
|
|
10
|
-
addRecipient,
|
|
11
|
-
rotateEpoch,
|
|
12
|
-
createKeyringEncryptor
|
|
13
|
-
} from "@drakkar.software/starfish-keyring";
|
|
14
|
-
export {
|
|
15
|
-
KEYRING_IV_BYTES,
|
|
16
|
-
KEYRING_WRAP_INFO,
|
|
17
|
-
KEYRING_WRAP_SALT,
|
|
18
|
-
addRecipient,
|
|
19
|
-
createKeyring,
|
|
20
|
-
createKeyringEncryptor,
|
|
21
|
-
rotateEpoch,
|
|
22
|
-
unwrapFromEntry,
|
|
23
|
-
verifyEntrySignature,
|
|
24
|
-
wrapForRecipient
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=keyring.js.map
|
package/dist/keyring.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/keyring.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Phase-2 transitional shim. The implementation lives in\n * `@drakkar.software/starfish-keyring`. This file is removed in Phase 3.\n */\nexport {\n KEYRING_WRAP_SALT,\n KEYRING_WRAP_INFO,\n KEYRING_IV_BYTES,\n wrapForRecipient,\n unwrapFromEntry,\n verifyEntrySignature,\n createKeyring,\n addRecipient,\n rotateEpoch,\n createKeyringEncryptor,\n} from \"@drakkar.software/starfish-keyring\"\nexport type {\n WrappedKeyEntry,\n KeyringEpoch,\n Keyring,\n KeyringEncryptor,\n} from \"@drakkar.software/starfish-keyring\"\n"],
|
|
5
|
-
"mappings": ";AAIA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/pairing.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Phase-2 transitional shim. The implementation lives in
|
|
3
|
-
* `@drakkar.software/starfish-identities`. Removed in Phase 3.
|
|
4
|
-
*/
|
|
5
|
-
export { bootstrapRootIdentity, buildPairingQr, parsePairingQr, assemblePairingBundle, installPairingBundle, deriveCodeKey, buildPairingRequest, readPairingRequest, buildPairingResponse, readPairingResponse, } from "@drakkar.software/starfish-identities";
|
|
6
|
-
export type { DeviceCredentials, PairingQrPayload, PairingBundle, WrappedCekEntry, InstalledPairingResult, AssemblePairingBundleOpts, PairingRequestEncrypted, PairingResponseEncrypted, } from "@drakkar.software/starfish-identities";
|
package/dist/pairing.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// src/pairing.ts
|
|
2
|
-
import {
|
|
3
|
-
bootstrapRootIdentity,
|
|
4
|
-
buildPairingQr,
|
|
5
|
-
parsePairingQr,
|
|
6
|
-
assemblePairingBundle,
|
|
7
|
-
installPairingBundle,
|
|
8
|
-
deriveCodeKey,
|
|
9
|
-
buildPairingRequest,
|
|
10
|
-
readPairingRequest,
|
|
11
|
-
buildPairingResponse,
|
|
12
|
-
readPairingResponse
|
|
13
|
-
} from "@drakkar.software/starfish-identities";
|
|
14
|
-
export {
|
|
15
|
-
assemblePairingBundle,
|
|
16
|
-
bootstrapRootIdentity,
|
|
17
|
-
buildPairingQr,
|
|
18
|
-
buildPairingRequest,
|
|
19
|
-
buildPairingResponse,
|
|
20
|
-
deriveCodeKey,
|
|
21
|
-
installPairingBundle,
|
|
22
|
-
parsePairingQr,
|
|
23
|
-
readPairingRequest,
|
|
24
|
-
readPairingResponse
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=pairing.js.map
|
package/dist/pairing.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/pairing.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Phase-2 transitional shim. The implementation lives in\n * `@drakkar.software/starfish-identities`. Removed in Phase 3.\n */\nexport {\n bootstrapRootIdentity,\n buildPairingQr,\n parsePairingQr,\n assemblePairingBundle,\n installPairingBundle,\n deriveCodeKey,\n buildPairingRequest,\n readPairingRequest,\n buildPairingResponse,\n readPairingResponse,\n} from \"@drakkar.software/starfish-identities\"\nexport type {\n DeviceCredentials,\n PairingQrPayload,\n PairingBundle,\n WrappedCekEntry,\n InstalledPairingResult,\n AssemblePairingBundleOpts,\n PairingRequestEncrypted,\n PairingResponseEncrypted,\n} from \"@drakkar.software/starfish-identities\"\n"],
|
|
5
|
-
"mappings": ";AAIA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/recipients.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Phase-2 transitional shim. The implementation lives in
|
|
3
|
-
* `@drakkar.software/starfish-keyring`. This file is removed in Phase 3.
|
|
4
|
-
*/
|
|
5
|
-
export { keyringPathFor, addCollectionRecipient, removeRecipient, listRecipients, currentEpoch, } from "@drakkar.software/starfish-keyring";
|
|
6
|
-
export type { RecipientRef, AdderKeys, ListedRecipient, } from "@drakkar.software/starfish-keyring";
|
package/dist/recipients.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// src/recipients.ts
|
|
2
|
-
import {
|
|
3
|
-
keyringPathFor,
|
|
4
|
-
addCollectionRecipient,
|
|
5
|
-
removeRecipient,
|
|
6
|
-
listRecipients,
|
|
7
|
-
currentEpoch
|
|
8
|
-
} from "@drakkar.software/starfish-keyring";
|
|
9
|
-
export {
|
|
10
|
-
addCollectionRecipient,
|
|
11
|
-
currentEpoch,
|
|
12
|
-
keyringPathFor,
|
|
13
|
-
listRecipients,
|
|
14
|
-
removeRecipient
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=recipients.js.map
|
package/dist/recipients.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/recipients.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Phase-2 transitional shim. The implementation lives in\n * `@drakkar.software/starfish-keyring`. This file is removed in Phase 3.\n */\nexport {\n keyringPathFor,\n addCollectionRecipient,\n removeRecipient,\n listRecipients,\n currentEpoch,\n} from \"@drakkar.software/starfish-keyring\"\nexport type {\n RecipientRef,\n AdderKeys,\n ListedRecipient,\n} from \"@drakkar.software/starfish-keyring\"\n"],
|
|
5
|
-
"mappings": ";AAIA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|