Currentness / anti-snapback check — call contract
Check a retained owner-state digest under a short-lived grant from signed-in Home. No private Map contents or execution permission are returned.
POST https://npl.kinganlogic.com/api/machine/bsc-currentness-anti-snapback
API npl-passport-buyer-2026-11-16 · Contract 2026-11-17-functions.2
Complete JSON contract · OpenAPI
Price and access
Base reference prices — not open for collection. Free preflight validates a request and returns its quoted price without execution or charge. Passport participant testing uses Concordium Testnet: 110.116999 CCD plus network fees, not Mainnet CCD or a USD conversion.
{
"network": "eip155:8453",
"currency": "USDC",
"scheme": "exact",
"usd": "0.03",
"atomic_units": "30000",
"unit": "operation",
"tariff_revision": "EXPLICIT_OWNER_DECISION_2026_10_15",
"tariff_sha256": "ff5142cc723fd3c3445dba1b12e079f572e4b53da3b6a4a57dca0916e60fc37a",
"tariff_url": "https://npl.kinganlogic.com/machines/base-tariff.json",
"availability": "COLLECTION_DISABLED_OWNER_DEFERRED"
}Mainnet CCD: unavailable. Participant Testnet instructions are separate from Base purchases.
Obtain runtime_state in signed-in Home, then POST it to /api/home/machines/state-digest and /api/home/machines/currentness-grant. Replace expected_hash and access_grant. Grant lifetime at most 900 seconds.
Complete request schema
Content-Type: application/json. Required fields are specified for each alternative shape. Unknown properties are rejected; defaults below apply only where implemented.
{
"oneOf": [
{
"type": "object",
"properties": {
"expected_hash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"field_refs": {
"type": "array",
"uniqueItems": true,
"items": {
"enum": [
"resident_understanding",
"workshop_selected_text",
"safe_display_name",
"interruption_preference"
]
}
},
"access_grant": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"description": "A short-lived owner-issued currentness capability for paid machine access."
}
},
"required": [
"expected_hash",
"access_grant"
],
"additionalProperties": false
},
{
"type": "object",
"required": [
"input"
],
"properties": {
"input": {
"type": "object",
"properties": {
"expected_hash": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"field_refs": {
"type": "array",
"uniqueItems": true,
"items": {
"enum": [
"resident_understanding",
"workshop_selected_text",
"safe_display_name",
"interruption_preference"
]
}
},
"access_grant": {
"type": "string",
"minLength": 1,
"maxLength": 256,
"description": "A short-lived owner-issued currentness capability for paid machine access."
}
},
"required": [
"expected_hash",
"access_grant"
],
"additionalProperties": false
}
},
"additionalProperties": false
}
]
}Implemented defaults
{}PRIVATE_VALUE_TEMPLATE_SCHEMA_ONLY
Supplied input
{
"expected_hash": "0000000000000000000000000000000000000000000000000000000000000000",
"access_grant": "SYNTHETIC-NON-USABLE-GRANT-OBTAIN-YOURS-IN-HOME"
}Free preflight
Validates and quotes only; never executes or charges. Publish input singular; the supported inputs alias rejects ambiguous dual-key requests.
curl -sS -i -X POST https://npl.kinganlogic.com/api/machine/preflight \
-H 'Content-Type: application/json' \
--data-binary '{"operation":"bsc-currentness-anti-snapback","input":{"expected_hash":"0000000000000000000000000000000000000000000000000000000000000000","access_grant":"SYNTHETIC-NON-USABLE-GRANT-OBTAIN-YOURS-IN-HOME"}}'Call the operation
This unpaid example is expected to encounter a payment challenge, not a completed execution. A private-value template must first be filled from your authorized Home.
curl -sS -i -X POST https://npl.kinganlogic.com/api/machine/bsc-currentness-anti-snapback \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: npl-synthetic-example-0001' \
--data-binary '{"expected_hash":"0000000000000000000000000000000000000000000000000000000000000000","access_grant":"SYNTHETIC-NON-USABLE-GRANT-OBTAIN-YOURS-IN-HOME"}'Client headers
{
"Content-Type": "application/json",
"Idempotency-Key": "8..128 ASCII letters, digits, underscore or hyphen; retain for retries",
"PAYMENT-SIGNATURE": "Buyer wallet x402 authorization, only after an active Base gateway challenge",
"X-NPL-Buyer-Key": "Optional private random base64url retry key, 43..128 characters; persist before authorization"
}Gateway-issued header
{
"PAYMENT-CONTEXT": "Cloudflare-issued Ed25519 signed JWT; never construct or supply a local fixture as payment proof"
}After owner activation, an x402-capable client obtains a gateway challenge and resends the same body with PAYMENT-SIGNATURE. Keep response headers and private result. The unpaid curl below deliberately does not authorize a debit.
Response and recovery
{
"200": "Complete evaluated result or same recovered result. HOLD is a deliverable.",
"400": "Invalid schema, malformed JSON or invalid inner payload",
"401": "Invalid payment context",
"402": "Payment required; an application 402 alone is not gateway purchase evidence",
"403": "Currentness capability missing, expired, revoked or outside scope",
"404": "Private state or receipt unavailable",
"409": "Conflicting idempotency or paid request",
"410": "Retained result deleted",
"503": "Required private storage/provider unavailable"
}{
"type": "object",
"required": [
"schema",
"version",
"operation",
"result_id",
"result",
"input_sha256",
"result_sha256",
"receipt_core_sha256",
"receipt_hash_fields"
],
"properties": {
"schema": {
"const": "NPL_COMPLETE_MACHINE_RESULT_V1"
},
"version": {
"type": "string"
},
"operation": {
"const": "bsc-currentness-anti-snapback"
},
"result_id": {
"type": "string",
"format": "uuid"
},
"owner_ref": {
"type": "string"
},
"created_at_utc": {
"type": "string"
},
"price_atomic_units": {
"type": "string",
"pattern": "^[0-9]+$"
},
"currency": {
"enum": [
"USD",
"CCD"
]
},
"data_permission_from_payment": {
"const": false
},
"input_sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"result_sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"receipt_core_sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"input_hash_scope": {
"const": "CANONICAL_JSON_OF_OPERATION_INPUT"
},
"result_hash_scope": {
"const": "CANONICAL_JSON_OF_RESULT_FIELD"
},
"receipt_hash_fields": {
"type": "array",
"items": {
"type": "string"
}
},
"result": {
"type": "object",
"required": [
"checked_at_utc",
"current_hash",
"currentness_matches",
"data_permission_granted",
"decision",
"expected_hash",
"field_currentness",
"future_use_allowed",
"runtime_id",
"scope",
"selected_fields_current",
"use_scope"
]
},
"billing": {
"type": "object"
},
"replayed": {
"type": "boolean"
},
"recovery": {
"type": "object",
"required": [
"path",
"credential"
],
"properties": {
"path": {
"type": "string"
},
"credential": {
"type": "string",
"description": "Private Bearer capability. Never include it in public evidence."
}
}
}
}
}Representative result: local synthetic evaluation, not a paid receipt
{
"created_at_utc": "2026-11-16T00:00:00Z",
"currency": "USD",
"data_permission_from_payment": false,
"hash_scheme": "NPL_CANONICAL_JSON_SHA256_V1",
"input_hash_scope": "CANONICAL_JSON_OF_OPERATION_INPUT",
"input_sha256": "eb429884e2c207ff42a528bc501340451d7c95e4c82c8a69471db187b79a8613",
"operation": "bsc-currentness-anti-snapback",
"owner_ref": "synthetic-public-example",
"price_atomic_units": "30000",
"receipt_core_sha256": "e481224ee0100ac2e3517e534cfcd8a0d5586fb2d146279b406b40e9414e798d",
"receipt_hash_fields": [
"created_at_utc",
"currency",
"data_permission_from_payment",
"hash_scheme",
"input_hash_scope",
"input_sha256",
"operation",
"owner_ref",
"price_atomic_units",
"result",
"result_hash_scope",
"result_id",
"result_sha256",
"schema",
"version"
],
"result": {
"checked_at_utc": "2026-11-16T00:00:00Z",
"current_hash": "04d3576b4f6f3fab3e4a87f76ae3b261faa3306e2a8be5e2423b20b2bac38fe3",
"currentness_matches": false,
"data_permission_granted": false,
"decision": "STALE",
"expected_hash": "0000000000000000000000000000000000000000000000000000000000000000",
"field_currentness": {},
"future_use_allowed": false,
"runtime_id": "synthetic-currentness-example",
"scope": "SERVER_SEALED_HOME_STATE",
"selected_fields_current": false,
"use_scope": "CURRENTNESS_ONLY"
},
"result_hash_scope": "CANONICAL_JSON_OF_RESULT_FIELD",
"result_id": "00000000-0000-4000-8000-000000000001",
"result_sha256": "ae80951cbc2b4045a13ef2490a902a69a8678f7ca94a5150f14718df9c1c964a",
"schema": "NPL_COMPLETE_MACHINE_RESULT_V1",
"version": "npl-passport-buyer-2026-11-16"
}The synthetic evaluator envelope has no live recovery credential or gateway settlement header. Real HTTP success adds private recovery information; never publish it.
Retain exact request, complete response, result_id and private recovery credential. Set the two variables from that response. Recovery requests do not debit. Wrong credentials return 404. For an interrupted Testnet response, retry the original order and transaction; do not transfer again.
curl -sS "https://npl.kinganlogic.com/api/machine/receipts/${NPL_RESULT_ID}" -H "Authorization: Bearer ${NPL_RECOVERY_CREDENTIAL}"MCP discovery, then REST
The sequence below is retained for legacy clients. POST each JSON-RPC message to https://npl.kinganlogic.com/mcp with Content-Type: application/json and Accept: application/json, text/event-stream. Initialize returns 200; initialized notification returns 202. Both tools take empty arguments {}. Modern clients use server/discover and per-request version metadata; see supported versions and tool descriptions. MCP discovery is free and does not execute these functions.
{
"transport": "https://npl.kinganlogic.com/mcp",
"authentication": "None for free discovery",
"tools": [
"list_npl_capabilities",
"inspect_npl_pricing"
],
"input_schema": {
"type": "object",
"properties": {},
"additionalProperties": false
},
"paid_execution": false,
"sequence": [
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2025-03-26",
"capabilities": {},
"clientInfo": {
"name": "npl-buyer",
"version": "1"
}
}
},
{
"jsonrpc": "2.0",
"method": "notifications/initialized"
},
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list"
},
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "list_npl_capabilities",
"arguments": {}
}
}
]
}Independent verification and limits · Support · All NPL functions