Foodtruck Order — TypeScript Reference - v0.1.0
    Preparing search index...
    • Mint the stable identity of one checkout operation.

      Crypto.randomUUID() is exposed only in a secure context. This application is served over plain HTTP by the local Compose gateway, and the ordering tablet is reached over the truck's own network, where the origin is not a secure context and crypto.randomUUID is undefined. Calling it directly would therefore throw and break the payment control on the very device this feature exists for. Crypto.getRandomValues() is documented as the one Crypto member usable from an insecure context, so the identifier is assembled from it here instead. See docs/techstack.md §5 for the plain-HTTP gateway and the explicitly deferred Caddy/HTTPS work.

      The value is still an RFC 4122 version 4 UUID, which is what the backend contract requires. It carries no secret and no authority: it is a client-minted identity that persistence admits, so its only obligation is to be unique, not unpredictable.

      Returns string