Closed gedanziger closed 5 years ago
Call Create Game from the stardust SDK, and keep the result:
// CREATE_GAME FUNCTIONS const hashGame = (gameData) => { const{name, symbol, desc, image, owner, nonce} = gameData; const gameParamTypes = ['string', 'string', 'string', 'string', 'address', 'uint256']; const hashes = hashParams([name, symbol, desc, image, owner, nonce], gameParamTypes); return(hashParam(hashes, 'bytes32[]')); }; const hashAndSignGame = (gameData, privKey) => { const sig = accounts.sign(hashGame(gameData), privKey); return({'signedMessage': sig.signature + sig.message.slice(2)}); }; const createGamePostJSON = (gameData, privKey) => ({...gameData, ...hashAndSignGame(gameData, privKey)});
Using a keypair stored as an env variable (do NOT store on github, just query env to get it), use these values:
Create a game on the Stardust platform for BrowserQuest using these configs:
BrowserQuest
BRQ
Stardust BrowserQuest Demo
Afterwards, keep the info for the game to an application config and update the README for how to set it.
API base url is noted in #5 comment. @sunrisepopov
Verified fixed and closed
Call Create Game from the stardust SDK, and keep the result:
Using a keypair stored as an env variable (do NOT store on github, just query env to get it), use these values:
Create a game on the Stardust platform for BrowserQuest using these configs:
BrowserQuest
BRQ
Stardust BrowserQuest Demo
Afterwards, keep the info for the game to an application config and update the README for how to set it.