Archives: Docs

Docs

Implementing the login button

Login with NEARAdd the login functionality Plan We’re going to add a login button that uses near-api-js to login with NEAR. Below is the workflow of logging in: User clicks the login button near-api-js creates a private key in the browser A redirect to NEAR Wallet occurs, passing the public key. NEAR Wallet (often) has …

Implementing the login button Read More »

Covering access keys and login

Login with NEARLogging in with NEAR Previously… In the previous chapter we simply displayed whether the crossword puzzle was solved or not, by checking the solution hash against the user’s answers. Updates to transfer prize money In this chapter, our smart contract will send 5 Ⓝ to the first person who solves the puzzle. For …

Covering access keys and login Read More »

Adding a new puzzle now that we’re using a collection that can contain multiple crossword puzzles

Login with NEARAdding a puzzle We’re going to make a new puzzle, which means we need to provide the smart contract with a set of clues and info about the answers. Of course, we’ll not be sending the answers to the smart contract, otherwise everyone could see. We will, however, send details about each clue, …

Adding a new puzzle now that we’re using a collection that can contain multiple crossword puzzles Read More »

Scroll to Top