Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

sendScore

sendScore<Options>(handle, score, sendScoreOptions?): Promise<ScoreSentResult>

Sends the player’s score from the page to one of the game’s boards a page writes, writtenBy: "page": through the app, signed in as the player, 10 a minute. The board stays untrusted, as the page can edit anything it holds, and shows so. A score of the wrong shape, or metadata its schema refuses, throws. Outside the app it goes to the dev server’s stand-in, and to none on a published page outside the app.

Type Parameter
Options extends LeaderboardOptions & object
Parameter Type
handle LeaderboardHandle<Options>
score LeaderboardScore<Options>
sendScoreOptions SendScoreOptions<Options>

Promise<ScoreSentResult>

const sent = await sendScore(leaderboards.bestRun, 41250);