sealnet 1.3.0 → 1.5.0
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/README.md +18 -13
- package/THIRD-PARTY-NOTICES.txt +1 -1
- package/dist/index.cjs +1016 -124
- package/dist/index.d.cts +22 -11
- package/dist/index.d.ts +22 -11
- package/dist/index.js +1016 -124
- package/dist/seal.global.js +2 -2
- package/dist/seal.global.js.sha384 +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -19,7 +19,10 @@ interface Pairing {
|
|
|
19
19
|
readonly name: string;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
/** The lifetimes a seal can have: `ttl_options` of the SEAL contract, which the server checks. */
|
|
23
|
+
declare const TTL_OPTIONS: readonly string[];
|
|
24
|
+
/** A seal's lifetime, one of the contract's `ttl_options`. */
|
|
25
|
+
type TTL = (typeof TTL_OPTIONS)[number];
|
|
23
26
|
interface CreateAnonymousSealOptions {
|
|
24
27
|
/** File data (File, ArrayBuffer, Uint8Array, or Blob) */
|
|
25
28
|
file: File | ArrayBuffer | Uint8Array | Blob;
|
|
@@ -27,7 +30,7 @@ interface CreateAnonymousSealOptions {
|
|
|
27
30
|
filename: string;
|
|
28
31
|
/** MIME type (optional, defaults to application/octet-stream) */
|
|
29
32
|
mimeType?: string;
|
|
30
|
-
/** Time to live:
|
|
33
|
+
/** Time to live: one of the lifetimes seal.net offers */
|
|
31
34
|
ttl: TTL;
|
|
32
35
|
/** Optional password (OTP) for download protection */
|
|
33
36
|
otp?: string;
|
|
@@ -62,9 +65,9 @@ interface CreateAnonymousSealOptions {
|
|
|
62
65
|
readonly secretKey: string;
|
|
63
66
|
};
|
|
64
67
|
/**
|
|
65
|
-
* Over 1 GB: the tier the person pays for once by card (
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
+
* Over 1 GB: the tier the person pays for once by card (prices and terms:
|
|
69
|
+
* seal.net/pricing). Needs `onPaymentRequired` and a `ttl` the server allows
|
|
70
|
+
* a paid seal.
|
|
68
71
|
*/
|
|
69
72
|
tier?: '5gb' | '50gb' | '500gb';
|
|
70
73
|
/**
|
|
@@ -129,7 +132,9 @@ interface CreateAnonymousSealResult {
|
|
|
129
132
|
*/
|
|
130
133
|
type SealErrorCode = 'AUTH_INVALID_KEY' | 'AUTH_EXPIRED_TOKEN' | 'AUTH_INSUFFICIENT_SCOPE' | 'RESOURCE_NOT_FOUND' | 'VALIDATION_ERROR' | 'RATE_LIMITED' | 'STORAGE_QUOTA_EXCEEDED'
|
|
131
134
|
/** Over 1 GB: the seal was not paid for in time and was revoked. */
|
|
132
|
-
| 'PAYMENT_REQUIRED' | 'ENCRYPTION_ERROR' | 'DECRYPTION_ERROR' | 'INVALID_KEY' | 'INTERNAL_ERROR' | 'SERVICE_UNAVAILABLE' | 'NETWORK_ERROR' | 'TIMEOUT'
|
|
135
|
+
| 'PAYMENT_REQUIRED' | 'ENCRYPTION_ERROR' | 'DECRYPTION_ERROR' | 'INVALID_KEY' | 'INTERNAL_ERROR' | 'SERVICE_UNAVAILABLE' | 'NETWORK_ERROR' | 'TIMEOUT'
|
|
136
|
+
/** The API no longer serves this SDK version: the message says how to update. */
|
|
137
|
+
| 'CLIENT_OUTDATED';
|
|
133
138
|
/**
|
|
134
139
|
* Extra context carried by {@link SealError}.
|
|
135
140
|
*
|
|
@@ -222,7 +227,9 @@ interface RequestResult {
|
|
|
222
227
|
readonly intakeId: string;
|
|
223
228
|
/** Give this to the person — or to an MCP client as a URL-mode elicitation. */
|
|
224
229
|
readonly url: string;
|
|
225
|
-
/** Three
|
|
230
|
+
/** Three words of your key, one space apart; the page shows the same ones. */
|
|
231
|
+
readonly words: string;
|
|
232
|
+
/** @deprecated Your key as the three emoji clients before 1.4 showed: use `words`. Removed in 2.0. */
|
|
226
233
|
readonly emoji: string;
|
|
227
234
|
readonly expiresAt: string;
|
|
228
235
|
}
|
|
@@ -236,7 +243,9 @@ interface PairOptions {
|
|
|
236
243
|
interface PairResult {
|
|
237
244
|
/** Give this to the person: they open it on the device with their SEAL inbox. */
|
|
238
245
|
readonly url: string;
|
|
239
|
-
/** Three
|
|
246
|
+
/** Three words of your key, one space apart; the page shows the same ones. */
|
|
247
|
+
readonly words: string;
|
|
248
|
+
/** @deprecated Your key as the three emoji clients before 1.4 showed: use `words`. Removed in 2.0. */
|
|
240
249
|
readonly emoji: string;
|
|
241
250
|
readonly expiresAt: string;
|
|
242
251
|
/** Wait until they connect: their inbox's address (use it as `owner`) and name. */
|
|
@@ -245,7 +254,9 @@ interface PairResult {
|
|
|
245
254
|
/** Something sent to your key: open it with `open(item, {keyPair})`. */
|
|
246
255
|
interface InboxItem {
|
|
247
256
|
readonly id: string;
|
|
248
|
-
/** Three
|
|
257
|
+
/** Three words of the sender's address when it proved one. */
|
|
258
|
+
readonly fromWords: string | null;
|
|
259
|
+
/** @deprecated The sender's address as the three emoji clients before 1.4 showed: use `fromWords`. Removed in 2.0. */
|
|
249
260
|
readonly from: string | null;
|
|
250
261
|
/** What the sender called itself, in the clear: never content. */
|
|
251
262
|
readonly label: string | null;
|
|
@@ -355,7 +366,7 @@ declare class SealClient {
|
|
|
355
366
|
}): Promise<OpenedSeal<OpenedSealFile>>;
|
|
356
367
|
/**
|
|
357
368
|
* Connect your key to a person's SEAL inbox, once: show them `url` and
|
|
358
|
-
* `
|
|
369
|
+
* `words`, then `wait()` gives their inbox's address. Pass it as `owner` to
|
|
359
370
|
* {@link SealClient.send} (every seal lands in their inbox) or as `to` to
|
|
360
371
|
* {@link SealClient.request} (the request waits there).
|
|
361
372
|
*/
|
|
@@ -373,6 +384,6 @@ declare class SealClient {
|
|
|
373
384
|
revokedAt: string | null;
|
|
374
385
|
}>;
|
|
375
386
|
}
|
|
376
|
-
declare const VERSION
|
|
387
|
+
declare const VERSION: string;
|
|
377
388
|
|
|
378
389
|
export { type Inbox, type InboxItem, type InboxOptions, type KeyPair, type OpenOptions, type OpenedSeal, type OpenedSealFile, type PairOptions, type PairResult, type RequestOptions, type RequestResult, type SavedSealFile, SealClient, type SealClientOptions, SealError, type SealErrorCode, type SealErrorDetails, type SendOptions, type SendResult, type TTL, VERSION };
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,10 @@ interface Pairing {
|
|
|
19
19
|
readonly name: string;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
/** The lifetimes a seal can have: `ttl_options` of the SEAL contract, which the server checks. */
|
|
23
|
+
declare const TTL_OPTIONS: readonly string[];
|
|
24
|
+
/** A seal's lifetime, one of the contract's `ttl_options`. */
|
|
25
|
+
type TTL = (typeof TTL_OPTIONS)[number];
|
|
23
26
|
interface CreateAnonymousSealOptions {
|
|
24
27
|
/** File data (File, ArrayBuffer, Uint8Array, or Blob) */
|
|
25
28
|
file: File | ArrayBuffer | Uint8Array | Blob;
|
|
@@ -27,7 +30,7 @@ interface CreateAnonymousSealOptions {
|
|
|
27
30
|
filename: string;
|
|
28
31
|
/** MIME type (optional, defaults to application/octet-stream) */
|
|
29
32
|
mimeType?: string;
|
|
30
|
-
/** Time to live:
|
|
33
|
+
/** Time to live: one of the lifetimes seal.net offers */
|
|
31
34
|
ttl: TTL;
|
|
32
35
|
/** Optional password (OTP) for download protection */
|
|
33
36
|
otp?: string;
|
|
@@ -62,9 +65,9 @@ interface CreateAnonymousSealOptions {
|
|
|
62
65
|
readonly secretKey: string;
|
|
63
66
|
};
|
|
64
67
|
/**
|
|
65
|
-
* Over 1 GB: the tier the person pays for once by card (
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
+
* Over 1 GB: the tier the person pays for once by card (prices and terms:
|
|
69
|
+
* seal.net/pricing). Needs `onPaymentRequired` and a `ttl` the server allows
|
|
70
|
+
* a paid seal.
|
|
68
71
|
*/
|
|
69
72
|
tier?: '5gb' | '50gb' | '500gb';
|
|
70
73
|
/**
|
|
@@ -129,7 +132,9 @@ interface CreateAnonymousSealResult {
|
|
|
129
132
|
*/
|
|
130
133
|
type SealErrorCode = 'AUTH_INVALID_KEY' | 'AUTH_EXPIRED_TOKEN' | 'AUTH_INSUFFICIENT_SCOPE' | 'RESOURCE_NOT_FOUND' | 'VALIDATION_ERROR' | 'RATE_LIMITED' | 'STORAGE_QUOTA_EXCEEDED'
|
|
131
134
|
/** Over 1 GB: the seal was not paid for in time and was revoked. */
|
|
132
|
-
| 'PAYMENT_REQUIRED' | 'ENCRYPTION_ERROR' | 'DECRYPTION_ERROR' | 'INVALID_KEY' | 'INTERNAL_ERROR' | 'SERVICE_UNAVAILABLE' | 'NETWORK_ERROR' | 'TIMEOUT'
|
|
135
|
+
| 'PAYMENT_REQUIRED' | 'ENCRYPTION_ERROR' | 'DECRYPTION_ERROR' | 'INVALID_KEY' | 'INTERNAL_ERROR' | 'SERVICE_UNAVAILABLE' | 'NETWORK_ERROR' | 'TIMEOUT'
|
|
136
|
+
/** The API no longer serves this SDK version: the message says how to update. */
|
|
137
|
+
| 'CLIENT_OUTDATED';
|
|
133
138
|
/**
|
|
134
139
|
* Extra context carried by {@link SealError}.
|
|
135
140
|
*
|
|
@@ -222,7 +227,9 @@ interface RequestResult {
|
|
|
222
227
|
readonly intakeId: string;
|
|
223
228
|
/** Give this to the person — or to an MCP client as a URL-mode elicitation. */
|
|
224
229
|
readonly url: string;
|
|
225
|
-
/** Three
|
|
230
|
+
/** Three words of your key, one space apart; the page shows the same ones. */
|
|
231
|
+
readonly words: string;
|
|
232
|
+
/** @deprecated Your key as the three emoji clients before 1.4 showed: use `words`. Removed in 2.0. */
|
|
226
233
|
readonly emoji: string;
|
|
227
234
|
readonly expiresAt: string;
|
|
228
235
|
}
|
|
@@ -236,7 +243,9 @@ interface PairOptions {
|
|
|
236
243
|
interface PairResult {
|
|
237
244
|
/** Give this to the person: they open it on the device with their SEAL inbox. */
|
|
238
245
|
readonly url: string;
|
|
239
|
-
/** Three
|
|
246
|
+
/** Three words of your key, one space apart; the page shows the same ones. */
|
|
247
|
+
readonly words: string;
|
|
248
|
+
/** @deprecated Your key as the three emoji clients before 1.4 showed: use `words`. Removed in 2.0. */
|
|
240
249
|
readonly emoji: string;
|
|
241
250
|
readonly expiresAt: string;
|
|
242
251
|
/** Wait until they connect: their inbox's address (use it as `owner`) and name. */
|
|
@@ -245,7 +254,9 @@ interface PairResult {
|
|
|
245
254
|
/** Something sent to your key: open it with `open(item, {keyPair})`. */
|
|
246
255
|
interface InboxItem {
|
|
247
256
|
readonly id: string;
|
|
248
|
-
/** Three
|
|
257
|
+
/** Three words of the sender's address when it proved one. */
|
|
258
|
+
readonly fromWords: string | null;
|
|
259
|
+
/** @deprecated The sender's address as the three emoji clients before 1.4 showed: use `fromWords`. Removed in 2.0. */
|
|
249
260
|
readonly from: string | null;
|
|
250
261
|
/** What the sender called itself, in the clear: never content. */
|
|
251
262
|
readonly label: string | null;
|
|
@@ -355,7 +366,7 @@ declare class SealClient {
|
|
|
355
366
|
}): Promise<OpenedSeal<OpenedSealFile>>;
|
|
356
367
|
/**
|
|
357
368
|
* Connect your key to a person's SEAL inbox, once: show them `url` and
|
|
358
|
-
* `
|
|
369
|
+
* `words`, then `wait()` gives their inbox's address. Pass it as `owner` to
|
|
359
370
|
* {@link SealClient.send} (every seal lands in their inbox) or as `to` to
|
|
360
371
|
* {@link SealClient.request} (the request waits there).
|
|
361
372
|
*/
|
|
@@ -373,6 +384,6 @@ declare class SealClient {
|
|
|
373
384
|
revokedAt: string | null;
|
|
374
385
|
}>;
|
|
375
386
|
}
|
|
376
|
-
declare const VERSION
|
|
387
|
+
declare const VERSION: string;
|
|
377
388
|
|
|
378
389
|
export { type Inbox, type InboxItem, type InboxOptions, type KeyPair, type OpenOptions, type OpenedSeal, type OpenedSealFile, type PairOptions, type PairResult, type RequestOptions, type RequestResult, type SavedSealFile, SealClient, type SealClientOptions, SealError, type SealErrorCode, type SealErrorDetails, type SendOptions, type SendResult, type TTL, VERSION };
|