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 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.3.0/seal.js"
24
- integrity="sha384-CJIB2VIieqftNMeDtRlqjDL+8bXDWZerJvz+W2qSTNkj4k9HrK4Qljcfghiku+cQ"
23
+ src="https://seal.net/sdk/v1.5.0/seal.js"
24
+ integrity="sha384-k125VC/xjGAGVbK1q1A7W2ihRtQbFBPOTNxPFrjKfI96lwnIgZI2U5/TDnTh7F9f"
25
25
  crossorigin="anonymous"
26
26
  ></script>
27
27
  <script>
@@ -54,7 +54,7 @@ const seal = new SealClient()
54
54
  const result = await seal.send({
55
55
  file: fileInput.files[0], // File | Blob | ArrayBuffer | Uint8Array
56
56
  filename: 'contract.pdf', // what the RECIPIENT sees; overrides the File own name
57
- ttl: '7d', // '5m' | '30m' | '1h' | '1d' | '7d'
57
+ ttl: '7d', // one of the lifetimes seal.net offers
58
58
  })
59
59
 
60
60
  result.shareUrl // give to the recipient
@@ -95,17 +95,17 @@ await seal.send({
95
95
 
96
96
  ### Files over 1 GB
97
97
 
98
- Up to 1 GB is free. Above it the person pays once by card for a tier
99
- (`5gb` $9 90 days, `50gb` $29 180 days, `500gb` $99 365 days). Show them the
100
- payment page; `send` waits for the payment and finishes the upload into the
101
- same seal. Not paid in time (the seal's expiry, at most 23 hours): the seal
102
- is revoked and `send` throws `PAYMENT_REQUIRED`.
98
+ Up to 1 GB is free. Above it the person pays once by card for a tier (prices
99
+ and terms: seal.net/pricing). Show them the payment page; `send` waits for the
100
+ payment and finishes the upload into the same seal. Not paid in time (the
101
+ seal's expiry, at most 23 hours): the seal is revoked and `send` throws
102
+ `PAYMENT_REQUIRED`.
103
103
 
104
104
  ```typescript
105
105
  await seal.send({
106
106
  file,
107
107
  filename: 'dump.sql',
108
- ttl: '1d', // 1d or 7d with a tier
108
+ ttl: '1d', // a lifetime the server allows a paid seal
109
109
  tier: '5gb',
110
110
  onPaymentRequired: (checkoutUrl) => window.open(checkoutUrl),
111
111
  })
@@ -162,7 +162,7 @@ const ask = await seal.request({
162
162
  kind: 'secret', // 'secret' | 'file' | 'any'
163
163
  whereUrl: 'https://api.search.brave.com/app/keys', // where the key is created
164
164
  })
165
- show(ask.url, ask.emoji) // the page shows the same three emoji
165
+ show(ask.url, ask.words) // the page shows the same three words
166
166
 
167
167
  const answer = await seal.waitFor(ask.intakeId, { keyPair: keys, to: './secrets' })
168
168
  answer.files[0].path // the value stays in the file
@@ -170,6 +170,11 @@ answer.files[0].path // the value stays in the file
170
170
 
171
171
  A link addressed to your key opens with `open(link, { keyPair: keys })`.
172
172
 
173
+ The three words name your key to the person (`fingerprint_words.json`): the
174
+ same key gives the same words in every SEAL client. Before 1.4 the SDK gave
175
+ three emoji; `emoji` and an inbox item's `from` still carry them, deprecated,
176
+ until 2.0.
177
+
173
178
  ## Sending to a key, and your inbox
174
179
 
175
180
  Your key's public half is your address. `secretKey` is the same value as
@@ -184,7 +189,7 @@ sent.delivered // true: it is in their inbox
184
189
 
185
190
  const inbox = await seal.inbox({ keyPair: keys, wait: 60 }) // waits up to 60 s for something
186
191
  for (const item of inbox.items) {
187
- // item: { id, from (three emoji of the sender, or null), label, receivedAt, expiresAt }
192
+ // item: { id, fromWords (three words of the sender, or null), label, receivedAt, expiresAt }
188
193
  const saved = await seal.open(item, { keyPair: keys, to: './downloads' })
189
194
  await seal.dismiss(item, { keyPair: keys })
190
195
  }
@@ -196,14 +201,14 @@ to wait for the next change instead of the next item.
196
201
  ## A person's SEAL inbox
197
202
 
198
203
  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
204
+ they open the page, compare the three words and connect. From then on pass
200
205
  their address as `owner` and every seal you send also lands in their inbox,
201
206
  where they manage and revoke it; pass it as `to` to `request` and the request
202
207
  waits there as a card.
203
208
 
204
209
  ```typescript
205
210
  const pairing = await seal.pair({ keyPair: keys, name: 'Report bot' })
206
- show(pairing.url, pairing.emoji) // the page shows the same three emoji
211
+ show(pairing.url, pairing.words) // the page shows the same three words
207
212
  const inbox = await pairing.wait() // { address, name }
208
213
 
209
214
  const sent = await seal.send({ file, filename: 'report.pdf', ttl: '1d', owner: inbox.address, keyPair: keys })
@@ -1,4 +1,4 @@
1
- sealnet 1.3.0 — third-party notices
1
+ sealnet 1.5.0 — third-party notices
2
2
 
3
3
  The standalone browser build (dist/seal.global.js, also published at
4
4
  https://seal.net/sdk/v<version>/seal.js) bundles the software below.