sealnet 1.2.0 → 1.3.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 +21 -2
- package/THIRD-PARTY-NOTICES.txt +1 -1
- package/dist/index.cjs +324 -129
- package/dist/index.d.cts +53 -4
- package/dist/index.d.ts +53 -4
- package/dist/index.js +319 -124
- package/dist/seal.global.js +2 -2
- package/dist/seal.global.js.sha384 +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -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/v1.
|
|
24
|
-
integrity="sha384-
|
|
23
|
+
src="https://seal.net/sdk/v1.3.0/seal.js"
|
|
24
|
+
integrity="sha384-CJIB2VIieqftNMeDtRlqjDL+8bXDWZerJvz+W2qSTNkj4k9HrK4Qljcfghiku+cQ"
|
|
25
25
|
crossorigin="anonymous"
|
|
26
26
|
></script>
|
|
27
27
|
<script>
|
|
@@ -193,6 +193,25 @@ for (const item of inbox.items) {
|
|
|
193
193
|
The inbox is shown only to the holder of the key. Pass `seen: inbox.version`
|
|
194
194
|
to wait for the next change instead of the next item.
|
|
195
195
|
|
|
196
|
+
## A person's SEAL inbox
|
|
197
|
+
|
|
198
|
+
A person keeps their own inbox at box.seal.net. Connect your key to it once:
|
|
199
|
+
they open the page, compare the three emoji and connect. From then on pass
|
|
200
|
+
their address as `owner` and every seal you send also lands in their inbox,
|
|
201
|
+
where they manage and revoke it; pass it as `to` to `request` and the request
|
|
202
|
+
waits there as a card.
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
const pairing = await seal.pair({ keyPair: keys, name: 'Report bot' })
|
|
206
|
+
show(pairing.url, pairing.emoji) // the page shows the same three emoji
|
|
207
|
+
const inbox = await pairing.wait() // { address, name }
|
|
208
|
+
|
|
209
|
+
const sent = await seal.send({ file, filename: 'report.pdf', ttl: '1d', owner: inbox.address, keyPair: keys })
|
|
210
|
+
sent.ownerCopy // true: it is in their inbox (false if the inbox refused; the seal is sent anyway)
|
|
211
|
+
|
|
212
|
+
await seal.request({ what: 'Brave API key', recipientKey: keys.publicKey, to: inbox.address })
|
|
213
|
+
```
|
|
214
|
+
|
|
196
215
|
## Error handling
|
|
197
216
|
|
|
198
217
|
```typescript
|
package/THIRD-PARTY-NOTICES.txt
CHANGED