Skip to main content
When a buyer’s key validates, Sirius injects a Sirius global before your code runs. Read it to branch on what they own.

The Sirius global

FieldDescription
Tier.idThe permanent slug from the product. Branch on this.
Tier.nameDisplay name. Safe for UI.
Source"whitelist" for paid keys, "checkpoint" for free ad-gated keys.
ExpiresAtUnix seconds for subscriptions, nil for permanent keys.

Branching

Always default to "free" when the global is missing — the script might be running outside a key gate.

Trust the global once

The buyer’s executor controls the runtime. They can overwrite getgenv().Sirius after your script loads. Read it once at the top of your script and cache it.
The tier id and watermark are also baked into the source itself, so leaked scripts trace back regardless of runtime tampering.