Files
mesh/testdata/reward_paths.json
waozi 90630564c5 Require consecutive check-in days for Wurm's daily Dew
A missed UTC day starts the count over, so a daily reward cannot be claimed after a gap however many days came before it.
2026-11-01 12:00:30 -03:00

122 lines
4.5 KiB
JSON

{
"/api/v1/rewards": {
"get": {
"summary": "List the game rewards the node gives",
"description": "Requires the account bearer. Returns rewards [{reward,units}]: the Dew the next claim of each reward gives, in integer millionths.",
"responses": {
"200": {
"description": "The rewards and their Dew; no-store"
},
"401": {
"description": "Account authentication required"
}
}
},
"post": {
"summary": "Claim a game reward for the account",
"description": "The node sets each reward's Dew; the client names only the reward. Requires complete synced evidence with at least 10 moves for Classic 1-28 (chest) or 1-175 (campaign), or earned progress imported once from the immutable pre-upgrade account snapshot. New uploads cannot enlarge legacy eligibility. The campaign pays by finishing place: 100 Dew for places 1-10, 50 for 11-30, 20 for 31-100 and 5 after. Wurm's daily rewards wurm.daily-05, -10, -15, -20 and -25 give 1, 2, 2, 2 and 3 Dew once the node has counted 5, 10, 15, 20 or 25 consecutive UTC check-in days for the account, ending today, and a missed day starts the count over; every claim of one checks the account in for that day, also when it answers 403. Returns {reward,units,credited,balance}, with place for the campaign; each account is credited once and keeps its place.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"reward"
],
"properties": {
"reward": {
"type": "string",
"maxLength": 64
}
}
}
}
}
},
"responses": {
"200": {
"description": "Claimed, or claimed before, with the current balance"
},
"400": {
"description": "Malformed request"
},
"401": {
"description": "Account authentication required"
},
"403": {
"description": "Required qualifying completion evidence has not synced, or too few consecutive check-in days"
},
"404": {
"description": "Unknown reward"
},
"503": {
"description": "Rewards unavailable"
}
}
}
},
"/api/v1/rewards/migration": {
"get": {
"summary": "Read the account frozen legacy progress snapshot",
"description": "Bearer authenticated, private no-store. Returns status missing/done/available. Available includes the frozen ciphertext, its SHA-256 snapshot ID and 24-byte nonce_hex. Only the canonical pre-upgrade Shovey Classic record is eligible.",
"responses": {
"200": {
"description": "Frozen snapshot or migration state"
},
"401": {
"description": "Authentication required"
},
"503": {
"description": "Snapshot unavailable"
}
}
},
"post": {
"summary": "Import earned legacy progress once",
"description": "Bearer authenticated. Body {snapshot,key} identifies the frozen version and its 32-byte nonce-prefix HChaCha20 opening subkey in hex. Never submit an account key or reusable record key. The node authenticates the exact old record, stores earned unlocks/completion marks and discards opening material. No Dew is credited; use the normal claim endpoint.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"snapshot",
"key"
],
"additionalProperties": false,
"properties": {
"snapshot": {
"type": "string",
"minLength": 64,
"maxLength": 64
},
"key": {
"type": "string",
"minLength": 64,
"maxLength": 64
}
}
}
}
}
},
"responses": {
"200": {
"description": "Migrated or already migrated"
},
"400": {
"description": "Malformed body"
},
"401": {
"description": "Authentication required"
},
"403": {
"description": "No matching frozen record or invalid proof"
}
}
}
}
}