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.
| Job | Keyguard |
|---|---|
| Validate a license | Client init then type=license |
| Mint licenses | Seller POST /api/seller/licenses/create — never in the loader |
| Reset HWID | Panel Users → Reset HWID, or seller (owner key) |
| Extend expiry | Panel Licenses → +30d, or seller |
| Register a user | Client type=register |
| Login | Client type=login |
| Logout | Client type=logout |
| Change password | Client type=changepassword |
| Renew | Client type=renew |
| Updates | Client type=updates |
| C++ library | keyguard.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.