sealnet 1.1.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.
@@ -0,0 +1,281 @@
1
+ import { A, Y } from './open-DUqF6AyG.js';
2
+
3
+ type TTL = '5m' | '30m' | '1h' | '1d' | '7d';
4
+ interface CreateAnonymousSealOptions {
5
+ /** File data (File, ArrayBuffer, Uint8Array, or Blob) */
6
+ file: File | ArrayBuffer | Uint8Array | Blob;
7
+ /** Original filename */
8
+ filename: string;
9
+ /** MIME type (optional, defaults to application/octet-stream) */
10
+ mimeType?: string;
11
+ /** Time to live: 5m, 30m, 1h, 1d, 7d */
12
+ ttl: TTL;
13
+ /** Optional password (OTP) for download protection */
14
+ otp?: string;
15
+ /** Require NDA signature before download */
16
+ nda?: boolean;
17
+ /** Owner email (required if nda=true) */
18
+ ownerEmail?: string;
19
+ /** Optional message to display to recipient */
20
+ message?: string;
21
+ /** Delete after first download */
22
+ singleUse?: boolean;
23
+ /** Maximum number of downloads allowed */
24
+ maxOpens?: number;
25
+ /** Restrict access to specific countries (ISO codes) */
26
+ geoAllowlist?: string[];
27
+ /**
28
+ * Over 1 GB: the tier the person pays for once by card (`5gb` $9 90 days,
29
+ * `50gb` $29 180 days, `500gb` $99 365 days). Needs `ttl` 1d or 7d and
30
+ * `onPaymentRequired`.
31
+ */
32
+ tier?: '5gb' | '50gb' | '500gb';
33
+ /**
34
+ * Called with the Stripe payment page when the seal has to be paid for.
35
+ * Show it to the person; `create` waits for the payment (until the seal
36
+ * expires, at most 23 hours) and finishes the upload into the same seal.
37
+ * Not paid by then: the seal is revoked and `PAYMENT_REQUIRED` is thrown.
38
+ */
39
+ onPaymentRequired?: (checkoutUrl: string) => void | Promise<void>;
40
+ /** Progress callback for large files */
41
+ onProgress?: (progress: {
42
+ phase: string;
43
+ percent: number;
44
+ }) => void;
45
+ /** Abort signal */
46
+ signal?: AbortSignal;
47
+ }
48
+ interface CreateAnonymousSealResult {
49
+ /** Seal id */
50
+ sealId: string;
51
+ /**
52
+ * Complete RECIPIENT share URL with encryption key.
53
+ * ISSUE-0620: this is a minted share link (`/s/{id}/{code}#{shareKey}`)
54
+ * — it never carries the owner capability.
55
+ */
56
+ shareUrl: string;
57
+ /**
58
+ * Complete OWNER management URL (`/s/{id}#{ownerLinkKey}`).
59
+ * ISSUE-0620: additive — gives programmatic callers the same owner
60
+ * capability the web create flow shows, clearly separated from
61
+ * `shareUrl`.
62
+ */
63
+ ownerUrl: string;
64
+ /** Owner token for seal management (revoke, etc.) */
65
+ ownerToken: string;
66
+ /** Expiration datetime (ISO string) */
67
+ expiresAt: string;
68
+ /** Encryption key (base64) - only returned, never stored */
69
+ encryptionKey: string;
70
+ /** File ID */
71
+ fileId: string;
72
+ }
73
+
74
+ /**
75
+ * The one error this SDK throws for a failed API interaction.
76
+ *
77
+ * It lives in its own module because both halves need it: the public
78
+ * client in `index.ts` and the anonymous resource in `anonymous.ts` that
79
+ * the client is built on. Programming errors (a missing global, an
80
+ * aborted signal) still surface as their native types; anything the SEAL
81
+ * service refused arrives here.
82
+ */
83
+ /**
84
+ * Machine-readable classification on {@link SealError.code}.
85
+ *
86
+ * Values are stable strings — compare against them directly
87
+ * (`err.code === 'RATE_LIMITED'`).
88
+ */
89
+ type SealErrorCode = 'AUTH_INVALID_KEY' | 'AUTH_EXPIRED_TOKEN' | 'AUTH_INSUFFICIENT_SCOPE' | 'RESOURCE_NOT_FOUND' | 'VALIDATION_ERROR' | 'RATE_LIMITED' | 'STORAGE_QUOTA_EXCEEDED'
90
+ /** Over 1 GB: the seal was not paid for in time and was revoked. */
91
+ | 'PAYMENT_REQUIRED' | 'ENCRYPTION_ERROR' | 'DECRYPTION_ERROR' | 'INVALID_KEY' | 'INTERNAL_ERROR' | 'SERVICE_UNAVAILABLE' | 'NETWORK_ERROR' | 'TIMEOUT';
92
+ /**
93
+ * Extra context carried by {@link SealError}.
94
+ *
95
+ * When a failure happens AFTER the seal became live on the server, these
96
+ * carry everything needed to manage it — so an interrupted call never
97
+ * leaves a seal nobody can revoke.
98
+ */
99
+ interface SealErrorDetails {
100
+ /** Present when the seal exists remotely despite the failure. */
101
+ sealId?: string;
102
+ /** Owner capability for revoking it. */
103
+ ownerToken?: string;
104
+ /** Link key of the owner URL. */
105
+ ownerLinkKey?: string;
106
+ [key: string]: unknown;
107
+ }
108
+ declare class SealError extends Error {
109
+ readonly code: SealErrorCode;
110
+ /** HTTP status from the SEAL API, or 500 when the failure was local. */
111
+ readonly status: number;
112
+ readonly details: SealErrorDetails | null;
113
+ constructor(message: string, code: SealErrorCode, status: number, details?: SealErrorDetails | null, options?: {
114
+ cause?: unknown;
115
+ });
116
+ toJSON(): Record<string, unknown>;
117
+ }
118
+
119
+ /** An X25519 identity: give `publicKey` to senders, keep `secretKey`. Base64url. */
120
+ interface KeyPair {
121
+ readonly publicKey: string;
122
+ readonly secretKey: string;
123
+ }
124
+ interface OpenOptions {
125
+ /** Opens a link addressed to this key (`x25519:` links). */
126
+ readonly keyPair?: Pick<KeyPair, 'secretKey'>;
127
+ /** The seal's password, when it has one. */
128
+ readonly password?: string;
129
+ readonly signal?: AbortSignal;
130
+ /** Ciphertext bytes received so far, out of the seal's total. */
131
+ readonly onProgress?: (done: number, total: number) => void;
132
+ }
133
+ /** One file of an opened link, not yet downloaded. */
134
+ interface OpenedSealFile {
135
+ readonly name: string;
136
+ readonly mime: string;
137
+ /** Ciphertext bytes. */
138
+ readonly size: number;
139
+ /** The sender marked it a secret: hand it to a program, never print it. */
140
+ readonly secret: boolean;
141
+ /**
142
+ * Download and decrypt it — this is what counts as an open. The stream
143
+ * FAILS at its end if the ciphertext is not the one the sender registered:
144
+ * keep nothing written from a stream that errored.
145
+ */
146
+ read(): Promise<A>;
147
+ }
148
+ /** One file written to disk by `open(url, {to})`. */
149
+ interface SavedSealFile {
150
+ readonly name: string;
151
+ readonly mime: string;
152
+ readonly secret: boolean;
153
+ readonly path: string;
154
+ readonly sizeBytes: number;
155
+ /** SHA-256 of the plaintext, hex. */
156
+ readonly sha256: string;
157
+ }
158
+ interface OpenedSeal<F> {
159
+ readonly sealId: string;
160
+ readonly expiresAt: string;
161
+ readonly files: readonly F[];
162
+ }
163
+ interface RequestOptions {
164
+ /** What you ask for, as the person reads it: "Brave API key". */
165
+ readonly what: string;
166
+ /** Your public key (`keygen().publicKey`): the answer is sealed to it. */
167
+ readonly recipientKey: string;
168
+ /** `secret` (a password field), `file`, or `any`. */
169
+ readonly kind?: Y;
170
+ /** The https page where that key is created; the person sees its domain. */
171
+ readonly whereUrl?: string;
172
+ /** Seconds the request lives (default 15 minutes, at most a day). */
173
+ readonly ttl?: number;
174
+ /** Who asks, as the page names it. */
175
+ readonly label?: string;
176
+ readonly signal?: AbortSignal;
177
+ }
178
+ interface RequestResult {
179
+ readonly intakeId: string;
180
+ /** Give this to the person — or to an MCP client as a URL-mode elicitation. */
181
+ readonly url: string;
182
+ /** Three emoji of your key; the page shows the same ones. */
183
+ readonly emoji: string;
184
+ readonly expiresAt: string;
185
+ }
186
+
187
+ /**
188
+ * SEAL SDK
189
+ *
190
+ * SEAL is how agents and people hand each other large files and secrets
191
+ * without the content passing through the chat, the model or the SEAL server.
192
+ * Files are encrypted client-side before a single byte leaves the caller; the
193
+ * SEAL service only ever stores ciphertext.
194
+ *
195
+ * @packageDocumentation
196
+ */
197
+
198
+ /** Options accepted by {@link SealClient.send}. */
199
+ type SendOptions = CreateAnonymousSealOptions;
200
+ /** Result of a successful {@link SealClient.send}. */
201
+ type SendResult = CreateAnonymousSealResult;
202
+
203
+ interface SealClientOptions {
204
+ /** SEAL API origin. Defaults to the public SEAL cloud (`https://api.seal.net`). */
205
+ apiUrl?: string;
206
+ /** Origin used to build links. Defaults to `https://seal.net`. */
207
+ shareUrl?: string;
208
+ }
209
+ /**
210
+ * SEAL client: send, open, ask a person for a file or a secret.
211
+ *
212
+ * No account or API key is required: ownership of a seal is proven by a
213
+ * client-generated owner token, and the encryption key travels only in the
214
+ * URL fragment of the links returned — neither ever reaches SEAL servers in
215
+ * plaintext.
216
+ *
217
+ * @example
218
+ * ```typescript
219
+ * import { SealClient } from 'sealnet'
220
+ *
221
+ * const seal = new SealClient()
222
+ * const { shareUrl } = await seal.send({ file, filename: 'dump.sql', ttl: '1d' })
223
+ * const opened = await seal.open(shareUrl, { to: './downloads' }) // Node
224
+ * ```
225
+ */
226
+ declare class SealClient {
227
+ private readonly seals;
228
+ private readonly api;
229
+ private readonly site;
230
+ constructor(options?: SealClientOptions);
231
+ /**
232
+ * Encrypt a file client-side, upload the ciphertext, and return the
233
+ * recipient share link plus the owner management material.
234
+ *
235
+ * `filename` and `mimeType` are what the RECIPIENT sees — they override
236
+ * the name and type of a `File` you pass in.
237
+ */
238
+ send(options: SendOptions): Promise<SendResult>;
239
+ /**
240
+ * Open a link. With `to` (Node) every file is streamed into that directory
241
+ * — 0600, named only after its ciphertext matched the digest registered at
242
+ * upload. Without it each file is downloaded when you `read()` it, as a
243
+ * stream that fails at its end if the ciphertext was changed. Either way
244
+ * memory stays one segment whatever the size. `keyPair` opens a link
245
+ * addressed to your key.
246
+ */
247
+ open(url: string, options: OpenOptions & {
248
+ to: string;
249
+ }): Promise<OpenedSeal<SavedSealFile>>;
250
+ open(url: string, options?: OpenOptions): Promise<OpenedSeal<OpenedSealFile>>;
251
+ /**
252
+ * Ask a person for a file or a secret without it passing through a chat:
253
+ * show them `url` (or hand it to an MCP client as a URL-mode elicitation)
254
+ * and collect the answer with {@link SealClient.waitFor}. The answer is
255
+ * sealed to `recipientKey`; the server never sees it.
256
+ */
257
+ request(options: RequestOptions): Promise<RequestResult>;
258
+ /** Wait for the answer to {@link SealClient.request} and open it. */
259
+ waitFor(intakeId: string, options: OpenOptions & {
260
+ keyPair: KeyPair;
261
+ to: string;
262
+ }): Promise<OpenedSeal<SavedSealFile>>;
263
+ waitFor(intakeId: string, options: OpenOptions & {
264
+ keyPair: KeyPair;
265
+ }): Promise<OpenedSeal<OpenedSealFile>>;
266
+ /** A fresh X25519 identity for addressed links and requests. */
267
+ keygen(): Promise<KeyPair>;
268
+ /**
269
+ * Revoke a previously sent seal, making it permanently inaccessible.
270
+ * `ownerToken` is the one returned by {@link SealClient.send}.
271
+ */
272
+ revoke(sealId: string, ownerToken: string, options?: {
273
+ signal?: AbortSignal;
274
+ }): Promise<{
275
+ status: string;
276
+ revokedAt: string | null;
277
+ }>;
278
+ }
279
+ declare const VERSION = "1.1.0";
280
+
281
+ export { type KeyPair, type OpenOptions, type OpenedSeal, type OpenedSealFile, type RequestOptions, type RequestResult, type SavedSealFile, SealClient, type SealClientOptions, SealError, type SealErrorCode, type SealErrorDetails, type SendOptions, type SendResult, type TTL, VERSION };
@@ -0,0 +1,281 @@
1
+ import { A, Y } from './open-DUqF6AyG.js';
2
+
3
+ type TTL = '5m' | '30m' | '1h' | '1d' | '7d';
4
+ interface CreateAnonymousSealOptions {
5
+ /** File data (File, ArrayBuffer, Uint8Array, or Blob) */
6
+ file: File | ArrayBuffer | Uint8Array | Blob;
7
+ /** Original filename */
8
+ filename: string;
9
+ /** MIME type (optional, defaults to application/octet-stream) */
10
+ mimeType?: string;
11
+ /** Time to live: 5m, 30m, 1h, 1d, 7d */
12
+ ttl: TTL;
13
+ /** Optional password (OTP) for download protection */
14
+ otp?: string;
15
+ /** Require NDA signature before download */
16
+ nda?: boolean;
17
+ /** Owner email (required if nda=true) */
18
+ ownerEmail?: string;
19
+ /** Optional message to display to recipient */
20
+ message?: string;
21
+ /** Delete after first download */
22
+ singleUse?: boolean;
23
+ /** Maximum number of downloads allowed */
24
+ maxOpens?: number;
25
+ /** Restrict access to specific countries (ISO codes) */
26
+ geoAllowlist?: string[];
27
+ /**
28
+ * Over 1 GB: the tier the person pays for once by card (`5gb` $9 90 days,
29
+ * `50gb` $29 180 days, `500gb` $99 365 days). Needs `ttl` 1d or 7d and
30
+ * `onPaymentRequired`.
31
+ */
32
+ tier?: '5gb' | '50gb' | '500gb';
33
+ /**
34
+ * Called with the Stripe payment page when the seal has to be paid for.
35
+ * Show it to the person; `create` waits for the payment (until the seal
36
+ * expires, at most 23 hours) and finishes the upload into the same seal.
37
+ * Not paid by then: the seal is revoked and `PAYMENT_REQUIRED` is thrown.
38
+ */
39
+ onPaymentRequired?: (checkoutUrl: string) => void | Promise<void>;
40
+ /** Progress callback for large files */
41
+ onProgress?: (progress: {
42
+ phase: string;
43
+ percent: number;
44
+ }) => void;
45
+ /** Abort signal */
46
+ signal?: AbortSignal;
47
+ }
48
+ interface CreateAnonymousSealResult {
49
+ /** Seal id */
50
+ sealId: string;
51
+ /**
52
+ * Complete RECIPIENT share URL with encryption key.
53
+ * ISSUE-0620: this is a minted share link (`/s/{id}/{code}#{shareKey}`)
54
+ * — it never carries the owner capability.
55
+ */
56
+ shareUrl: string;
57
+ /**
58
+ * Complete OWNER management URL (`/s/{id}#{ownerLinkKey}`).
59
+ * ISSUE-0620: additive — gives programmatic callers the same owner
60
+ * capability the web create flow shows, clearly separated from
61
+ * `shareUrl`.
62
+ */
63
+ ownerUrl: string;
64
+ /** Owner token for seal management (revoke, etc.) */
65
+ ownerToken: string;
66
+ /** Expiration datetime (ISO string) */
67
+ expiresAt: string;
68
+ /** Encryption key (base64) - only returned, never stored */
69
+ encryptionKey: string;
70
+ /** File ID */
71
+ fileId: string;
72
+ }
73
+
74
+ /**
75
+ * The one error this SDK throws for a failed API interaction.
76
+ *
77
+ * It lives in its own module because both halves need it: the public
78
+ * client in `index.ts` and the anonymous resource in `anonymous.ts` that
79
+ * the client is built on. Programming errors (a missing global, an
80
+ * aborted signal) still surface as their native types; anything the SEAL
81
+ * service refused arrives here.
82
+ */
83
+ /**
84
+ * Machine-readable classification on {@link SealError.code}.
85
+ *
86
+ * Values are stable strings — compare against them directly
87
+ * (`err.code === 'RATE_LIMITED'`).
88
+ */
89
+ type SealErrorCode = 'AUTH_INVALID_KEY' | 'AUTH_EXPIRED_TOKEN' | 'AUTH_INSUFFICIENT_SCOPE' | 'RESOURCE_NOT_FOUND' | 'VALIDATION_ERROR' | 'RATE_LIMITED' | 'STORAGE_QUOTA_EXCEEDED'
90
+ /** Over 1 GB: the seal was not paid for in time and was revoked. */
91
+ | 'PAYMENT_REQUIRED' | 'ENCRYPTION_ERROR' | 'DECRYPTION_ERROR' | 'INVALID_KEY' | 'INTERNAL_ERROR' | 'SERVICE_UNAVAILABLE' | 'NETWORK_ERROR' | 'TIMEOUT';
92
+ /**
93
+ * Extra context carried by {@link SealError}.
94
+ *
95
+ * When a failure happens AFTER the seal became live on the server, these
96
+ * carry everything needed to manage it — so an interrupted call never
97
+ * leaves a seal nobody can revoke.
98
+ */
99
+ interface SealErrorDetails {
100
+ /** Present when the seal exists remotely despite the failure. */
101
+ sealId?: string;
102
+ /** Owner capability for revoking it. */
103
+ ownerToken?: string;
104
+ /** Link key of the owner URL. */
105
+ ownerLinkKey?: string;
106
+ [key: string]: unknown;
107
+ }
108
+ declare class SealError extends Error {
109
+ readonly code: SealErrorCode;
110
+ /** HTTP status from the SEAL API, or 500 when the failure was local. */
111
+ readonly status: number;
112
+ readonly details: SealErrorDetails | null;
113
+ constructor(message: string, code: SealErrorCode, status: number, details?: SealErrorDetails | null, options?: {
114
+ cause?: unknown;
115
+ });
116
+ toJSON(): Record<string, unknown>;
117
+ }
118
+
119
+ /** An X25519 identity: give `publicKey` to senders, keep `secretKey`. Base64url. */
120
+ interface KeyPair {
121
+ readonly publicKey: string;
122
+ readonly secretKey: string;
123
+ }
124
+ interface OpenOptions {
125
+ /** Opens a link addressed to this key (`x25519:` links). */
126
+ readonly keyPair?: Pick<KeyPair, 'secretKey'>;
127
+ /** The seal's password, when it has one. */
128
+ readonly password?: string;
129
+ readonly signal?: AbortSignal;
130
+ /** Ciphertext bytes received so far, out of the seal's total. */
131
+ readonly onProgress?: (done: number, total: number) => void;
132
+ }
133
+ /** One file of an opened link, not yet downloaded. */
134
+ interface OpenedSealFile {
135
+ readonly name: string;
136
+ readonly mime: string;
137
+ /** Ciphertext bytes. */
138
+ readonly size: number;
139
+ /** The sender marked it a secret: hand it to a program, never print it. */
140
+ readonly secret: boolean;
141
+ /**
142
+ * Download and decrypt it — this is what counts as an open. The stream
143
+ * FAILS at its end if the ciphertext is not the one the sender registered:
144
+ * keep nothing written from a stream that errored.
145
+ */
146
+ read(): Promise<A>;
147
+ }
148
+ /** One file written to disk by `open(url, {to})`. */
149
+ interface SavedSealFile {
150
+ readonly name: string;
151
+ readonly mime: string;
152
+ readonly secret: boolean;
153
+ readonly path: string;
154
+ readonly sizeBytes: number;
155
+ /** SHA-256 of the plaintext, hex. */
156
+ readonly sha256: string;
157
+ }
158
+ interface OpenedSeal<F> {
159
+ readonly sealId: string;
160
+ readonly expiresAt: string;
161
+ readonly files: readonly F[];
162
+ }
163
+ interface RequestOptions {
164
+ /** What you ask for, as the person reads it: "Brave API key". */
165
+ readonly what: string;
166
+ /** Your public key (`keygen().publicKey`): the answer is sealed to it. */
167
+ readonly recipientKey: string;
168
+ /** `secret` (a password field), `file`, or `any`. */
169
+ readonly kind?: Y;
170
+ /** The https page where that key is created; the person sees its domain. */
171
+ readonly whereUrl?: string;
172
+ /** Seconds the request lives (default 15 minutes, at most a day). */
173
+ readonly ttl?: number;
174
+ /** Who asks, as the page names it. */
175
+ readonly label?: string;
176
+ readonly signal?: AbortSignal;
177
+ }
178
+ interface RequestResult {
179
+ readonly intakeId: string;
180
+ /** Give this to the person — or to an MCP client as a URL-mode elicitation. */
181
+ readonly url: string;
182
+ /** Three emoji of your key; the page shows the same ones. */
183
+ readonly emoji: string;
184
+ readonly expiresAt: string;
185
+ }
186
+
187
+ /**
188
+ * SEAL SDK
189
+ *
190
+ * SEAL is how agents and people hand each other large files and secrets
191
+ * without the content passing through the chat, the model or the SEAL server.
192
+ * Files are encrypted client-side before a single byte leaves the caller; the
193
+ * SEAL service only ever stores ciphertext.
194
+ *
195
+ * @packageDocumentation
196
+ */
197
+
198
+ /** Options accepted by {@link SealClient.send}. */
199
+ type SendOptions = CreateAnonymousSealOptions;
200
+ /** Result of a successful {@link SealClient.send}. */
201
+ type SendResult = CreateAnonymousSealResult;
202
+
203
+ interface SealClientOptions {
204
+ /** SEAL API origin. Defaults to the public SEAL cloud (`https://api.seal.net`). */
205
+ apiUrl?: string;
206
+ /** Origin used to build links. Defaults to `https://seal.net`. */
207
+ shareUrl?: string;
208
+ }
209
+ /**
210
+ * SEAL client: send, open, ask a person for a file or a secret.
211
+ *
212
+ * No account or API key is required: ownership of a seal is proven by a
213
+ * client-generated owner token, and the encryption key travels only in the
214
+ * URL fragment of the links returned — neither ever reaches SEAL servers in
215
+ * plaintext.
216
+ *
217
+ * @example
218
+ * ```typescript
219
+ * import { SealClient } from 'sealnet'
220
+ *
221
+ * const seal = new SealClient()
222
+ * const { shareUrl } = await seal.send({ file, filename: 'dump.sql', ttl: '1d' })
223
+ * const opened = await seal.open(shareUrl, { to: './downloads' }) // Node
224
+ * ```
225
+ */
226
+ declare class SealClient {
227
+ private readonly seals;
228
+ private readonly api;
229
+ private readonly site;
230
+ constructor(options?: SealClientOptions);
231
+ /**
232
+ * Encrypt a file client-side, upload the ciphertext, and return the
233
+ * recipient share link plus the owner management material.
234
+ *
235
+ * `filename` and `mimeType` are what the RECIPIENT sees — they override
236
+ * the name and type of a `File` you pass in.
237
+ */
238
+ send(options: SendOptions): Promise<SendResult>;
239
+ /**
240
+ * Open a link. With `to` (Node) every file is streamed into that directory
241
+ * — 0600, named only after its ciphertext matched the digest registered at
242
+ * upload. Without it each file is downloaded when you `read()` it, as a
243
+ * stream that fails at its end if the ciphertext was changed. Either way
244
+ * memory stays one segment whatever the size. `keyPair` opens a link
245
+ * addressed to your key.
246
+ */
247
+ open(url: string, options: OpenOptions & {
248
+ to: string;
249
+ }): Promise<OpenedSeal<SavedSealFile>>;
250
+ open(url: string, options?: OpenOptions): Promise<OpenedSeal<OpenedSealFile>>;
251
+ /**
252
+ * Ask a person for a file or a secret without it passing through a chat:
253
+ * show them `url` (or hand it to an MCP client as a URL-mode elicitation)
254
+ * and collect the answer with {@link SealClient.waitFor}. The answer is
255
+ * sealed to `recipientKey`; the server never sees it.
256
+ */
257
+ request(options: RequestOptions): Promise<RequestResult>;
258
+ /** Wait for the answer to {@link SealClient.request} and open it. */
259
+ waitFor(intakeId: string, options: OpenOptions & {
260
+ keyPair: KeyPair;
261
+ to: string;
262
+ }): Promise<OpenedSeal<SavedSealFile>>;
263
+ waitFor(intakeId: string, options: OpenOptions & {
264
+ keyPair: KeyPair;
265
+ }): Promise<OpenedSeal<OpenedSealFile>>;
266
+ /** A fresh X25519 identity for addressed links and requests. */
267
+ keygen(): Promise<KeyPair>;
268
+ /**
269
+ * Revoke a previously sent seal, making it permanently inaccessible.
270
+ * `ownerToken` is the one returned by {@link SealClient.send}.
271
+ */
272
+ revoke(sealId: string, ownerToken: string, options?: {
273
+ signal?: AbortSignal;
274
+ }): Promise<{
275
+ status: string;
276
+ revokedAt: string | null;
277
+ }>;
278
+ }
279
+ declare const VERSION = "1.1.0";
280
+
281
+ export { type KeyPair, type OpenOptions, type OpenedSeal, type OpenedSealFile, type RequestOptions, type RequestResult, type SavedSealFile, SealClient, type SealClientOptions, SealError, type SealErrorCode, type SealErrorDetails, type SendOptions, type SendResult, type TTL, VERSION };