Skip to content

Stamp

The terrastamp cookie holds an EdDSA (Ed25519) JWT. Its claims:

Claim
status consensus (two or more signals agreed on the region) or inconclusive.
country ISO 3166-1 alpha-2, e.g. "US". null when inconclusive.
subdivision The US state’s postal code inside the US, e.g. "NY"; null elsewhere and when inconclusive.
region "US-NY" inside the US, the country elsewhere ("GB"). null when inconclusive.
metrics The signals that agreed, each with what it observed. null when inconclusive. See below.
reason Inconclusive only: why. See below.
guess Inconclusive only: { country, subdivision } from IP data alone. A hint, never evidence.
version Stamp format version. Bumped when the format or rules change.
ip_binding { "v4": "…", "v6": "…" }: a keyed hash of each visitor address the stamp was issued to. See Verify on the server.
iss https://api.terrastamp.dev
aud Your host, e.g. www.brand.com.
iat, exp Issued and expires, Unix seconds. Inconclusive stamps expire sooner than consensus ones.
issued_at, expires_at The same moments as ISO 8601, e.g. "2026-12-01T06:27:55Z".
jti The stamp’s id. Use it to fetch the timestamp proof.
{
"status": "consensus",
"country": "US",
"subdivision": "FL",
"region": "US-FL",
"metrics": {
"ip": "US-FL",
"rdns": "frontiernet:fl",
"tz": "America/New_York",
"lang": "en-US",
"edge": "MIA"
},
"version": 4,
"ip_binding": { "v4": "Qm9vZ3l3b29nbGVkb29kbG", "v6": "c2FtcGxlYmluZGluZ3ZhbH" },
"iss": "https://api.terrastamp.dev",
"aud": "www.brand.com",
"iat": 1795933675,
"exp": 1796020075,
"issued_at": "2026-12-01T06:27:55Z",
"expires_at": "2026-12-02T06:27:55Z",
"jti": "k3J9xQ2mT8vYb1Lw"
}

Each entry in metrics records what that signal observed:

Signal Observed value
ip The IP database’s region, e.g. "US-FL".
rdns The provider and the region code in its naming scheme, e.g. "frontiernet:fl".
tz The browser’s time zone, e.g. "America/New_York".
lang The browser’s preferred language, e.g. "en-US".
edge The network location’s code, e.g. "MIA".
gps Only the reading’s accuracy, e.g. "±12m". Never coordinates.
previous The earlier stamp’s jti.

An inconclusive stamp’s reason is one of:

reason
dismissed The visitor closed terrastamp’s dialog with Not now.
permission_denied The visitor declined the browser’s location popup, or the site blocks location.
position_unavailable The browser couldn’t produce a location reading.
low_accuracy The reading was too rough to count.
timeout No reading arrived in time.
border The reading was too close to a border to tell which side.
conflict The signals pointed to different regions.
unsupported_region The location isn’t in any covered region (for example at sea).

What verifyStamp returns as error when ok is false:

error
missing No cookie.
malformed Not a terrastamp JWT.
unknown_key Signed with a key not in the key set.
bad_signature The signature doesn’t match.
expired Past exp.
wrong_audience Issued for another host.
wrong_issuer iss isn’t the issuer you required.
ip_mismatch Issued to a different IP address.

In each case, render your default. The script on the page checks the visitor again.