@kagal/taistamp 0.1.1 → 0.1.2
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 +5 -5
- package/dist/index.api.json +1546 -0
- package/dist/index.mjs +1 -1
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ absent (no echo, no signature) per [spec §5.4][spec-nonce].
|
|
|
69
69
|
Response headers on success:
|
|
70
70
|
|
|
71
71
|
| Header | Value |
|
|
72
|
-
|
|
72
|
+
| ------ | ----- |
|
|
73
73
|
| `Content-Type` | `application/tai64n` |
|
|
74
74
|
| `Content-Length` | `25` |
|
|
75
75
|
| `Cache-Control` | `no-store` |
|
|
@@ -99,7 +99,7 @@ newTaistampHandler({ cors: false }); // CORS-specific headers of
|
|
|
99
99
|
When CORS is enabled, responses carry:
|
|
100
100
|
|
|
101
101
|
| Response | CORS headers added | `Vary: Origin` (scoped origin only) |
|
|
102
|
-
|
|
102
|
+
| -------- | ------------------ | ----------------------------------- |
|
|
103
103
|
| `OPTIONS` 200 | `Access-Control-Allow-Origin`, `Access-Control-Allow-Methods: GET, HEAD`, `Access-Control-Allow-Headers: TAI-Nonce`, `Access-Control-Expose-Headers: TAI-Leap-Seconds, TAI-Nonce, TAI-Key-Selector, TAI-Signature`, `Access-Control-Max-Age: 600` | yes |
|
|
104
104
|
| `GET` / `HEAD` 200 | `Access-Control-Allow-Origin`, `Access-Control-Expose-Headers` (so browser JS can read the `TAI-*` headers) | yes |
|
|
105
105
|
| `405` | `Access-Control-Allow-Origin` | yes |
|
|
@@ -215,7 +215,7 @@ v=tai1; k=ed25519; p=<base64-of-32-raw-pubkey-bytes>
|
|
|
215
215
|
```
|
|
216
216
|
|
|
217
217
|
| Tag | Value |
|
|
218
|
-
|
|
218
|
+
| --- | ----- |
|
|
219
219
|
| `v` | Protocol version. `tai1` for the framing in this README. |
|
|
220
220
|
| `k` | Key algorithm. `ed25519` for the only algorithm currently defined. |
|
|
221
221
|
| `p` | Public key, standard base64. For Ed25519: 32 raw bytes → 43-44 chars. |
|
|
@@ -383,7 +383,7 @@ are re-exported for callers that need raw TAI64N
|
|
|
383
383
|
construction:
|
|
384
384
|
|
|
385
385
|
| Export | Description |
|
|
386
|
-
|
|
386
|
+
| ------ | ----------- |
|
|
387
387
|
| `now()` | Current TAI as `{ sec, nano, offset }` |
|
|
388
388
|
| `fromUTC(utc)` | `Date.now()`-shaped milliseconds → TAI timestamp |
|
|
389
389
|
| `tai64nLabel(t?)` | 25-byte label string for a timestamp (or `now()`) |
|
|
@@ -398,7 +398,7 @@ history.
|
|
|
398
398
|
### Constants
|
|
399
399
|
|
|
400
400
|
| Name | Value |
|
|
401
|
-
|
|
401
|
+
| ---- | ----- |
|
|
402
402
|
| `TAISTAMP_PATH` | `/.well-known/taistamp` |
|
|
403
403
|
| `TAI64N_CONTENT_TYPE` | `application/tai64n` |
|
|
404
404
|
| `TAI64N_CONTENT_LENGTH` | `25` |
|