Docs Category: 02-beginner

Implementing the login button

To Share and +4 nLEARNs NEAR Wallet import loggingIn from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/logging-in.png’; import explorerTransfer from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/chapter-2-explorer-transfer.jpg’; Add 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 …

Implementing the login button Read More »

Covering access keys and login

To Share and +4 nLEARNs NEAR Wallet import chapter1Correct from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/chapter-1-crossword-correct.gif’; import accessKeys from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/keys-cartoon-good–alcantara_gabriel.near–Bagriel_5_10.png’; import functionCallAction from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/function-call-action.png’; import tutorialAccessKeys from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/access-keys.png’; Logging 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 …

Covering access keys and login Read More »

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

To Share and +4 nLEARNs NEAR Wallet import blankCrossword from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/chapter-2-crossword-blank.png’; import teachingDeployment from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/teaching-just-teacher–herogranada.near–GranadaHero.jpeg’; import recreatingSubaccount from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/erase-recreate-subaccount–3one9.near–3one92.gif’; Adding 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 …

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

There are several Actions an account can do, including sending the winner of the crossword puzzle NEAR using the Transfer Action

To Share and +4 nLEARNs NEAR Wallet import allActions from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/crossword-actions.png’; import transferNEAR from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/transfer-brand-blue–qiqi04.near–blankworl.png’; import yoctoNEAR from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/yoctoNEAR-magnifying–jrbemint.near–JrbeMad.jpg’; import signerPredecessorCurrent from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/predecessor-signer-current–yasuoarts.near–YasuoArt69.png’; Actions (including sending NEAR) We’re going to introduce a new Action: Transfer. In this chapter, we’d like the first person to solve the crossword puzzle to earn some prize money, sent in …

There are several Actions an account can do, including sending the winner of the crossword puzzle NEAR using the Transfer Action Read More »

How to think about structs and enums when writing a Rust smart contract on NEAR

To Share and +4 nLEARNs NEAR Wallet import basicCrossword from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/basics-crossword.jpg’; import enumBox from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/enum-a-d-block–eizaconiendo.near–eiza_coniendo.png’; Structs and enums Overview Structs If you’re not familiar with Rust, it may be confusing that there are no classes or inheritance like other programming languages. We’ll be exploring how to use structs, which are someone similar to classes, but …

How to think about structs and enums when writing a Rust smart contract on NEAR Read More »

Store multiple crossword puzzles using a specialized collection in NEAR called a LookupMap

To Share and +4 nLEARNs NEAR Wallet import bookPagination from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/paging-through-hashes-swing–pierced_staggg.near–pierced_stag.jpg’; import guardsAroundContract from ‘https://raw.githubusercontent.com/Techbridge3/docs/master/website/static/docs/assets/crosswords/guards-contract-permissions–connoisseur_dane.near–connoisseurdane.png’; Using collections As mentioned in the previous chapter, the online Rust Book is a great reference for folks getting started with Rust, but there are concepts that differ when we’re dealing with the blockchain. One of these differences is the …

Store multiple crossword puzzles using a specialized collection in NEAR called a LookupMap Read More »

Scroll to Top
🕺New partnerships = cool giveaways! 5 lucky winners will get (L)Earners NFTs!🏆
This is default text for notification bar