Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
135ce63
wip first step
matiasbenary Sep 10, 2025
58affb7
Merge branch 'master' into add-tutorials-validations
matiasbenary Sep 10, 2025
ed776ba
wip: structure
Sep 11, 2025
39ec898
wip delete components and update components
matiasbenary Sep 15, 2025
d7aed26
wip change styles and fix bugs
matiasbenary Sep 15, 2025
13a0ad4
wip fix styles
matiasbenary Sep 15, 2025
22cc4c3
wip
Sep 15, 2025
fda6304
wip change components
matiasbenary Sep 16, 2025
76d785c
wip
Sep 16, 2025
0d1be4d
wip add useContext and refactor code
matiasbenary Sep 16, 2025
378676d
wip improve styles
matiasbenary Sep 16, 2025
b2ff8d6
wip improve styles
matiasbenary Sep 16, 2025
1330c43
wip
Sep 17, 2025
804491f
merge
matiasbenary Sep 19, 2025
574bccf
feat: add validation contract
matiasbenary Sep 19, 2025
484471b
Merge branch 'master' into add-tutorials-validations
bucanero Oct 6, 2025
57aa9f3
added in the first 6 lessons
joe-rlo Oct 16, 2025
5d5488d
chore: merge
Oct 17, 2025
6f4da40
chore: rm unnecesary files
Oct 17, 2025
4fc1a10
wip: re-organizing sections
Oct 22, 2025
482d83a
wip: re-organizing quests
Oct 22, 2025
66284e4
chore: merge master
Oct 24, 2025
cf38d22
wip
Oct 29, 2025
d11b0f3
wip: fixing css
Oct 29, 2025
3d33659
wip
Oct 30, 2025
fd60347
chore: work on building blocks of dapps
Oct 31, 2025
5a03648
wip
Nov 4, 2025
3497a5f
wip
Nov 4, 2025
674bd05
Merge branch 'master' into add-tutorials-validations
gagdiez Nov 6, 2025
a0cbf3c
feat: first version of docs quest
Nov 6, 2025
bc9e00b
fix: merge conflict
Nov 6, 2025
4be633e
fix: assets folder
Nov 6, 2025
da6dd0d
fix: test
Nov 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 40 additions & 5 deletions docs/protocol/account-id.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
id: account-id
title: Address (Account ID)
description: "Learn about NEAR account addresses - implicit addresses (64 characters) and named addresses that work as domains, including sub-account creation and management."
description: "Learn all about NEAR account addresses"
---

import Tabs from '@theme/Tabs';
Expand Down Expand Up @@ -62,12 +62,39 @@ near account create-account fund-later use-auto-generation save-to-folder ~/.nea

# The file "~/.near-credentials/implicit/8bca86065be487de45e795b2c3154fe834d53ffa07e0a44f29e76a2a5f075df8.json" was saved successfully

# Here is your console command if you need to script it or re-run:
# near account create-account fund-later use-auto-generation save-to-folder ~/.near-credentials/implicit
cat ~/.near-credentials/implicit/8bca86065be487de45e795b2c3154fe834d53ffa07e0a44f29e76a2a5f075df8.json
```

or `near-seed-phrase` library:

```js
import { generateSeedPhrase } from "near-seed-phrase";
const { seedPhrase, publicKey, secretKey } = generateSeedPhrase();
```

</details>

<details>

<summary> 🧑‍💻 Technical: How to derive an implicit account from a public key </summary>

You can derive the implicit account address from a public key by removing the `ed25519:` prefix, decoding the resulting Base58 string into bytes, and then converting those bytes into a hexadecimal string.

```js
// vanilla js
import { decode } from 'bs58';
Buffer.from(decode(publicKey.replace('ed25519:', ''))).toString('hex')
```

```js
// near-api-js
import { utils } from 'near-api-js';
utils.keyToImplicitAddress(publicKey);
```

</details>


---

## Named Address
Expand All @@ -83,7 +110,7 @@ An awesome feature of named accounts is that they can create **sub-accounts** of
- `account.near` **cannot** create `sub.another-account.near`
5. Accounts have **no control** over their sub-account, they are different entities

Anyone can create a `.near` or `.testnet` account, you just to call the `create_account` method of the corresponding top-level account - `testnet` on testnet, and `near` on mainnet.
Anyone can create a `.near` or `.testnet` account, you just need to call the `create_account` method of the corresponding top-level account - `testnet` on testnet, and `near` on mainnet.

<details>

Expand Down Expand Up @@ -145,8 +172,16 @@ You can use the same command to create sub-accounts of an existing named account

</details>

:::tip
:::tip Creating Named Accounts

If you are not going through an intermediary (i.e. the CLI, or a wallet), then you can create an implicit account, fund it, and call `create_account` on `near` / `testnet`

:::

:::note

Accounts have **no control** over their sub-accounts, they are different entities. This means that `near` cannot control `bob.near`, and `bob.near` cannot control `sub.bob.near`.

:::

---
Expand Down
93 changes: 93 additions & 0 deletions docs/quest/accounts/address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
id: address
title: Address Types
description: Learn about the different types of accounts in NEAR Protocol
hide_title: true
---

import Card from '@site/src/components/UI/Card';

import Progress from "@site/src/components/Academy/Progress";
import { Quiz, MultipleChoice, Option } from "@site/src/components/Academy/Quiz";

<Progress course="accounts" total={6} />

## Address Types in NEAR Protocol

Each account in NEAR protocol is identified by a **single and unique** address. While NEAR supports multiple types of addresses, most accounts use one of two: **named address** or **implicit address**.

<div class="row" style={{marginTop: '2rem'}}>
<div class="col col--6">
<Card title="Named Addresses" >
Named addresses are human-readable addresses that are easy to remember and share, making them ideal for everyday use:

- <a>`near` / `account.near` / `account.sweat` / `app.finance.tg`</a>

</Card>
</div>
<div class="col col--6">
<Card title="Implicit Address" >
Implicit addresses are derived from cryptographic key pairs and are a long strings of 64 characters

- <a>`757503837a63ece206449d450ec77ae8d79c88ccda5e62a810f4eeb51db93050`</a>
</Card>
</div>
</div>
<div class="row" style={{marginTop: '2rem'}}>
<div class="col col--6">
<Card title="Ethereum Address" >
NEAR Protocol supports Ethereum-like addresses to allow interoperability with EVM-based applications and tools

- <a>`0x32Be343B94f860124dC4fEe278FDCBD38C102D88`</a>
</Card>
</div>
<div class="col col--6">
<Card title="Other Addresses" >
NEAR supports more addresses in order to accommodate various use cases, an address is valid if:

- <a>It has between 2 and 64 chars</a>
- <a>Uses valid chars (`a-z`, `0-9`, `-`, `_`, `.`)</a>
- <a>Does not start or finish on a special character (`.`,`-`,`_`)</a>

</Card>
</div>
</div>

---

## Quiz

<Quiz course="accounts" id="accounts-quiz">
<MultipleChoice question="What are the two main types of NEAR accounts?">
<Option> A. Public accounts and private accounts.</Option>
<Option correct> B. Named accounts (like alice.near) and implicit accounts (like 0x123...).</Option>
<Option> C. Personal accounts and business accounts.</Option>
<Option> D. Main accounts and backup accounts.</Option>
</MultipleChoice>
<MultipleChoice question="What is a key advantage of named accounts over implicit accounts?">
<Option> A. Named accounts are more secure than implicit accounts.</Option>
<Option correct> B. Named accounts are human-readable and easy to remember, like alice.near.</Option>
<Option> C. Named accounts cost less to create than implicit accounts.</Option>
<Option> D. Named accounts can hold more tokens than implicit accounts.</Option>
</MultipleChoice>
<MultipleChoice question="In NEAR's hierarchical account system, who can create the sub-account 'store.bob.near'?">
<Option> A. The 'near' account can create it.</Option>
<Option correct> B. Only the 'bob.near' account can create it.</Option>
<Option> C. Any account can create it.</Option>
<Option> D. Only the registrar can create it.</Option>
</MultipleChoice>
<MultipleChoice question="What is the difference between a Full Access Key and a Function Call Key?">
<Option> A. Full Access Keys are free, Function Call Keys cost money.</Option>
<Option correct> B. Full Access Keys have complete control, Function Call Keys have limited permissions for specific contracts.</Option>
<Option> C. Full Access Keys work on mainnet, Function Call Keys work on testnet.</Option>
<Option> D. Full Access Keys are for named accounts, Function Call Keys are for implicit accounts.</Option>
</MultipleChoice>
<MultipleChoice question="How do NEAR transaction costs compare to Ethereum?">
<Option> A. NEAR transactions cost more than Ethereum transactions.</Option>
<Option correct> B. NEAR transactions cost tenths of a cent, while Ethereum transactions often cost dollars.</Option>
<Option> C. NEAR and Ethereum have the same transaction costs.</Option>
<Option> D. NEAR transactions are always free.</Option>
</MultipleChoice>
</Quiz>


43 changes: 43 additions & 0 deletions docs/quest/accounts/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
id: introduction
title: Introduction
description: Learn everything on NEAR accounts
hide_title: true
---

import { Quiz, MultipleChoice, Option } from "@site/src/components/Academy/Quiz";
import Progress from "@site/src/components/Academy/Progress";

<Progress course="accounts" total={6} />

## Introduction to NEAR Accounts

Welcome to the world of NEAR accounts! In this lesson, we'll explore how NEAR Protocol's account system works and why it's designed to be more user-friendly than traditional blockchain accounts.

<iframe width="100%" height="360px" src="https://www.youtube-nocookie.com/embed/suUerHpmNM0?si=jG3NypPwzH83cXuY" title="YouTube video player" frameborder="0" allow="accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

<br />
<br />

:::info Digital Identity

Think of NEAR accounts as your digital identity on the blockchain, which allows you to send and receive assets, interact with smart contracts, and interact with decentralized applications

:::

---

## What Makes NEAR Accounts Special?

**NEAR Accounts** are your personal space on the blockchain, allowing you to:
- **Hold** tokens and collectibles
- **Make and receive transfers**
- **Create and Interact** with decentralized applications
- **Control accounts on other blockchains** (like Ethereum or Bitcoin)
<!-- - **Help onboard new users** by covering their transaction costs -->

A key difference with other chains is that, instead of having an address like `0x742d35Cc6634C0532925a3b8D`, you can have a simple named like `alice.near` which is much easier to remember and share!

Another unique feature of NEAR is that accounts can have multiple keys with different permission levels, allowing for more flexible and secure account management.

Finally, in NEAR all accounts are also smart contracts, meaning you can program them to have custom behaviors and logic!
87 changes: 87 additions & 0 deletions docs/quest/accounts/keys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
id: access-keys
title: Access Keys & Permissions
description: Learn about the two main types of NEAR Addresses
hide_title: true
---

import Card from '@site/src/components/UI/Card';

import Progress from "@site/src/components/Academy/Progress";
import { Quiz, MultipleChoice, Option } from "@site/src/components/Academy/Quiz";

<Progress course="accounts" total={6} />

## Access Keys and Permissions

Most commonly, blockchains use a rigid system where every account is linked to a single private key that has complete control over it.

NEAR accounts use a more flexible and secure **access key system**, allowing accounts to have **multiple keys**, each with different permission levels.

<div class="row" style={{marginTop: '2rem'}}>
<div class="col col--6">
<Card title="Full Access Keys">
<p>Full Access Keys behave like traditional private keys on other blockchains, meaning they have complete control over the account.</p>
<ul>
<li><a>Complete control over the account</a></li>
<li><a>Like having the master key to your house</a></li>
</ul>
</Card>
</div>
<div class="col col--6">
<Card title="Function Call Keys">
<p>Limited permissions for specific smart contracts and operations.</p>
<ul>
<li><a>Call specific smart contracts</a></li>
<li><a>Call specific functions on the contract</a></li>
<li><a>Like a key that only works on specific rooms</a></li>
</ul>
</Card>
</div>
</div>

---

## Why This Matters

There are multiple advantages to using multiple access keys with different permissions:

1. **Key rotation**: If one key is compromised, you can replace it without losing your account
2. **Granular permissions**: Different keys can have different levels of access
3. **Third-party integration**: Apps can request limited permissions to your account to do specific tasks for you

---

## Why Function Call Keys?

<div class="row">
<div class="col col--6">
Imagine you are playing a game that registers your score on the blockchain.

On other protocols this will require you to either share your private key with the game (truly terrible idea), or to sign every single transaction manually.

With NEAR, the game can request a `Function Call Key` that **only allows** it call a function to update score on your behalf, **nothing else**.

</div>
<div class="col col--6">
<video width="100%" height="215" frameborder="0" autoplay loop allowfullscreen controls>
<source src="/assets/docs/quest/accounts/sign.mp4" type="video/mp4" />
</video>
*This is **not** what the future of web3 gaming looks like*
</div>
</div>

---

## Quiz

<Quiz course="accounts" id="accounts-quiz">
<MultipleChoice question="What is the difference between a Full Access Key and a Function Call Key?">
<Option> A. Full Access Keys are free, Function Call Keys cost money.</Option>
<Option correct> B. Full Access Keys have complete control, Function Call Keys have limited permissions for specific contracts.</Option>
<Option> C. Full Access Keys work on mainnet, Function Call Keys work on testnet.</Option>
<Option> D. Full Access Keys are for named accounts, Function Call Keys are for implicit accounts.</Option>
</MultipleChoice>
</Quiz>


Loading