sealnet 1.5.1 → 2.0.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 +28 -28
- package/THIRD-PARTY-NOTICES.txt +1 -1
- package/dist/index.cjs +1673 -2996
- package/dist/index.d.cts +49 -46
- package/dist/index.d.ts +49 -46
- package/dist/index.js +1669 -2995
- package/dist/seal.global.js +2 -2
- package/dist/seal.global.js.sha384 +1 -1
- package/dist/seal_crypto.wasm +0 -0
- package/dist/seal_crypto.wasm.sha384 +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
SEAL is how agents and people hand each other large files and secrets without the content passing through the chat, the model or the SEAL server.
|
|
4
4
|
|
|
5
|
-
Files are encrypted **client-side** before a single byte leaves your app; SEAL only ever stores ciphertext. The key travels in
|
|
5
|
+
Files are encrypted **client-side** before a single byte leaves your app; SEAL only ever stores ciphertext. The key of a link travels in its URL fragment, which never reaches SEAL servers — or, for a link to someone's address, nowhere in the link: it waits wrapped to their key. No account or API key required.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
@@ -20,8 +20,8 @@ and the SDK arrives as one global.
|
|
|
20
20
|
|
|
21
21
|
```html
|
|
22
22
|
<script
|
|
23
|
-
src="https://seal.net/sdk/
|
|
24
|
-
integrity="sha384-
|
|
23
|
+
src="https://seal.net/sdk/v2.0.0/seal.js"
|
|
24
|
+
integrity="sha384-9ZeXH0khtFG26aeQTB4tALMlc3cA8Yz29khqFiYdyA2qZoSAHPkPh2NtwBna2q50"
|
|
25
25
|
crossorigin="anonymous"
|
|
26
26
|
></script>
|
|
27
27
|
<script>
|
|
@@ -87,7 +87,7 @@ await seal.send({
|
|
|
87
87
|
filename,
|
|
88
88
|
ttl: '1h',
|
|
89
89
|
onProgress: ({ phase, percent }) => {
|
|
90
|
-
// phase: '
|
|
90
|
+
// phase: 'encrypting' | 'uploading' | 'verifying'
|
|
91
91
|
render(phase, percent)
|
|
92
92
|
},
|
|
93
93
|
})
|
|
@@ -120,9 +120,9 @@ await seal.revoke(result.sealId, result.ownerToken)
|
|
|
120
120
|
## Opening a link
|
|
121
121
|
|
|
122
122
|
In Node, `to` streams every file into a directory: each is written `0600` and
|
|
123
|
-
gets its name only after its
|
|
124
|
-
|
|
125
|
-
name. Memory stays flat whatever the size.
|
|
123
|
+
gets its name only after its header matched the one the sender registered and
|
|
124
|
+
its last segment opened, so a changed or cut download never appears under the
|
|
125
|
+
sender's name. Memory stays flat whatever the size.
|
|
126
126
|
|
|
127
127
|
```typescript
|
|
128
128
|
const saved = await seal.open(link, { to: './downloads' })
|
|
@@ -130,8 +130,8 @@ saved.files // [{ name, mime, secret, path, sizeBytes, sha256 }]
|
|
|
130
130
|
```
|
|
131
131
|
|
|
132
132
|
Without `to`, each file downloads when you read it, as a stream. The stream
|
|
133
|
-
fails
|
|
134
|
-
|
|
133
|
+
fails if the file was changed or cut: keep nothing you wrote from a stream
|
|
134
|
+
that errored.
|
|
135
135
|
|
|
136
136
|
Reading a seal is open to Node and to pages served from seal.net. A browser
|
|
137
137
|
page on any other site sends and asks (`send`, `request`) but does not read:
|
|
@@ -150,15 +150,15 @@ program that needs it, never print it.
|
|
|
150
150
|
## Asking a person for a file or a secret
|
|
151
151
|
|
|
152
152
|
`request` gives you a page to show the person (or to hand an MCP client as a
|
|
153
|
-
URL-mode elicitation). Their answer is sealed to your
|
|
154
|
-
it, and `waitFor` opens it exactly like `open`.
|
|
153
|
+
URL-mode elicitation). Their answer is sealed to your bundle, so SEAL never
|
|
154
|
+
sees it, and `waitFor` opens it exactly like `open`.
|
|
155
155
|
|
|
156
156
|
```typescript
|
|
157
|
-
const keys = await seal.keygen() // {
|
|
157
|
+
const keys = await seal.keygen() // { secretKey, address, bundle, words }
|
|
158
158
|
|
|
159
159
|
const ask = await seal.request({
|
|
160
160
|
what: 'Brave API key',
|
|
161
|
-
|
|
161
|
+
recipientBundle: keys.bundle,
|
|
162
162
|
kind: 'secret', // 'secret' | 'file' | 'any'
|
|
163
163
|
whereUrl: 'https://api.search.brave.com/app/keys', // where the key is created
|
|
164
164
|
})
|
|
@@ -168,20 +168,20 @@ const answer = await seal.waitFor(ask.intakeId, { keyPair: keys, to: './secrets'
|
|
|
168
168
|
answer.files[0].path // the value stays in the file
|
|
169
169
|
```
|
|
170
170
|
|
|
171
|
-
A link addressed to your
|
|
171
|
+
A link addressed to your address opens with `open(link, { keyPair: keys })`.
|
|
172
172
|
|
|
173
|
-
The three words name your
|
|
174
|
-
same
|
|
175
|
-
three emoji; `emoji` and an inbox item's `from` still carry them, deprecated,
|
|
176
|
-
until 2.0.
|
|
173
|
+
The three words name your address to the person (`fingerprint_words.json`):
|
|
174
|
+
the same address gives the same words in every SEAL client.
|
|
177
175
|
|
|
178
|
-
## Sending to
|
|
176
|
+
## Sending to an address, and your inbox
|
|
179
177
|
|
|
180
|
-
|
|
181
|
-
`
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
178
|
+
`keys.address` is your address, the fingerprint of your key (`keys.bundle`).
|
|
179
|
+
`secretKey` is the seed it all comes from, the same value as `SEAL_SEED` of
|
|
180
|
+
the `seal` CLI and of `sealnet-mcp`, so one seed gives one address in every
|
|
181
|
+
client; reading your inbox publishes your key. `send({ to })` addresses the
|
|
182
|
+
link to someone's address: it opens only with their seed, and it lands in
|
|
183
|
+
their inbox, so nobody has to pass the link on. An address whose key is not
|
|
184
|
+
published is refused before anything is uploaded (`RESOURCE_NOT_FOUND`).
|
|
185
185
|
|
|
186
186
|
```typescript
|
|
187
187
|
const sent = await seal.send({ file, filename: 'report.pdf', ttl: '30m', to: theirAddress })
|
|
@@ -195,12 +195,12 @@ for (const item of inbox.items) {
|
|
|
195
195
|
}
|
|
196
196
|
```
|
|
197
197
|
|
|
198
|
-
The inbox is shown only to the holder of the
|
|
198
|
+
The inbox is shown only to the holder of the seed. Pass `seen: inbox.version`
|
|
199
199
|
to wait for the next change instead of the next item.
|
|
200
200
|
|
|
201
201
|
## A person's SEAL inbox
|
|
202
202
|
|
|
203
|
-
A person keeps their own inbox at box.seal.net. Connect your
|
|
203
|
+
A person keeps their own inbox at box.seal.net. Connect your address to it once:
|
|
204
204
|
they open the page, compare the three words and connect. From then on pass
|
|
205
205
|
their address as `owner` and every seal you send also lands in their inbox,
|
|
206
206
|
where they manage and revoke it; pass it as `to` to `request` and the request
|
|
@@ -212,9 +212,9 @@ show(pairing.url, pairing.words) // the page shows the same three words
|
|
|
212
212
|
const inbox = await pairing.wait() // { address, name }
|
|
213
213
|
|
|
214
214
|
const sent = await seal.send({ file, filename: 'report.pdf', ttl: '1d', owner: inbox.address, keyPair: keys })
|
|
215
|
-
sent.ownerCopy // true: it is in their inbox (false if the inbox refused; the seal is sent anyway)
|
|
215
|
+
sent.ownerCopy // true: it is in their inbox (false if the inbox has no published key or refused; the seal is sent anyway)
|
|
216
216
|
|
|
217
|
-
await seal.request({ what: 'Brave API key',
|
|
217
|
+
await seal.request({ what: 'Brave API key', recipientBundle: keys.bundle, to: inbox.address })
|
|
218
218
|
```
|
|
219
219
|
|
|
220
220
|
## Error handling
|
package/THIRD-PARTY-NOTICES.txt
CHANGED