createSignedTimestampId
createSignedTimestampId<
Brand>(brand,opts):SignedTimestampCodec<Brand>
Defined in: src/codecs/signed/index.ts:182
Construct a SignedTimestampCodec for brand.
opts.keys is a non-empty ordered signing keyring — the first entry is current
(used by generate / generateAt); all entries are tried on verify /
safeVerify; duplicate operator secrets are rejected at construction.
Type Parameters
Section titled “Type Parameters”Brand extends string
Parameters
Section titled “Parameters”Brand & ValidBrand<Brand>
Returns
Section titled “Returns”SignedTimestampCodec<Brand>
Example
Section titled “Example”const key = await importSigningKey(new Uint8Array(32));const usr = createSignedTimestampId("usr", { keys: [key] });
const id = await usr.generate(); // Id<"usr">await usr.verify(id); // passesusr.extractTimestamp(id); // Date — sync, timestamp is plaintext