API

Client vs seller

Keyguard splits product client (HMAC after init) from seller (Bearer header). The loader never ships a seller key. Shops mint keys over HTTPS with a header-only secret.

JobKeyguard
Validate a licenseClient init then type=license
Mint licensesSeller POST /api/seller/licenses/create — never in the loader
Reset HWIDPanel Users → Reset HWID, or seller (owner key)
Extend expiryPanel Licenses → +30d, or seller
Register a userClient type=register
LoginClient type=login
LogoutClient type=logout
Change passwordClient type=changepassword
RenewClient type=renew
UpdatesClient type=updates
C++ librarykeyguard.hpp (source, HMAC)

Client envelope

POST https://api.keyguard.live/api/client/v1/dispatch
{
  "type": "license",
  "sessionid": "...",
  "timestamp": 1710000000,
  "nonce": "hex",
  "signature": "hmac-sha256(type|timestamp|nonce|sessionid|payloadJson)",
  "payload": { "key": "...", "hwid": "..." }
}

Clock skew max 90s. Nonces are single-use. Replay dies.

Why generate is not in the C++ lib

The client library sits in the user’s process. If it could mint keys, anyone who dumps the binary could mint keys. Keyguard generate stays on the seller API with a header-only key you never ship.