jackpot-network API / API
Public meter, published heads and pseudonymous awards
GET
/api/v1/public/jackpot-network/{pool_id}Authentication
Public endpoint · no signing headers
Parameters
pool_idpath · required- { "type": "string", "pattern": "^jp_[a-f0-9]{32}$" }
operatorquery · optional- Reject nonparticipating operator when supplied{ "type": "string" }
Responses
200 Authoritative snapshot
Authoritative snapshot
application/json
pool_idstring · requiredcurrencyschema · requiredstatusenum · required- active · paused · closed
as_ofinteger · requiredtiersarray · requiredheadsarray · requiredrecent_winnersarray · required
Schema (resolved)
JSON Schema
{
"type": "object",
"required": [
"pool_id",
"currency",
"status",
"tiers",
"recent_winners",
"heads",
"as_of"
],
"properties": {
"pool_id": {
"type": "string"
},
"currency": {
"const": "USD"
},
"status": {
"enum": [
"active",
"paused",
"closed"
]
},
"as_of": {
"type": "integer"
},
"tiers": {
"type": "array",
"items": {
"type": "object",
"required": [
"tier_no",
"name",
"trigger",
"cycle_no",
"amount",
"seed",
"contribution_ppm",
"reserve_ppm"
]
}
},
"heads": {
"type": "array",
"items": {
"type": "object",
"required": [
"n",
"root"
]
}
},
"recent_winners": {
"type": "array",
"maxItems": 5,
"items": {
"type": "object",
"required": [
"alias",
"tier",
"amount",
"currency",
"at"
]
}
}
}
}404 Unknown pool or not participating
Unknown pool or not participating
Request signing samples
Canonical string and HMAC helpers from the downloadable samples. Wallet callbacks may also use Ed25519; see the wallet signing modes.
Node.js node/spilvon.mjs
Node.js
export const signingString = (ts, method, pathAndQuery, body) => `${ts}.${method.toUpperCase()}.${pathAndQuery}.${body}`;
export const hmacHex = (secret, s) => createHmac("sha256", secret).update(s, "utf8").digest("hex");Python python/spilvon.py
Python
def signing_string(ts: str, method: str, path_and_query: str, body: str) -> str:
return f"{ts}.{method.upper()}.{path_and_query}.{body}"
def hmac_hex(secret: str, s: str) -> str:
return hmac.new(secret.encode(), s.encode("utf-8"), hashlib.sha256).hexdigest()Go go/main.go
Go
func signingString(ts, method, pathAndQuery, body string) string {
return ts + "." + strings.ToUpper(method) + "." + pathAndQuery + "." + body
}
func hmacHex(secret, s string) string {
m := hmac.New(sha256.New, []byte(secret))
m.Write([]byte(s))
return hex.EncodeToString(m.Sum(nil))
}PHP php/spilvon.php
PHP
function signing_string(string $ts, string $method, string $pathAndQuery, string $body): string {
return $ts . '.' . strtoupper($method) . '.' . $pathAndQuery . '.' . $body;
}
function hmac_hex(string $secret, string $s): string {
return hash_hmac('sha256', $s, $secret);
}Reviewed, not executed by the sample authors.