Skip to content

Commit

Permalink
lab: Refactor wallet section
Browse files Browse the repository at this point in the history
  • Loading branch information
CostinCarabas committed Oct 9, 2024
1 parent 9816d5c commit c9699d9
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 15 deletions.
34 changes: 34 additions & 0 deletions chapters/introduction/lab/content/wallet/cmdline_wallet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# First Blockchain transaction

Let's perform our first ever blockchain transaction.
We will do this on MultiversX blockchain.

First, we need a wallet. Every access, read, write, execute, etc to the blockchain needs to be sign by you with a private key (a wallet).

To create a wallet simply run:
```shell
$ mxpy wallet new --format pem --outfile new_wallet.pem
```

Let's interpret the output:
```shell
$ mxpy wallet new --format pem --outfile new_wallet.pem
Mnemonic: bid blind field captain bar produce brush salute luggage double hole wonder meadow glass destroy giraffe auction square crush catalog knee lizard century nasty
Wallet address: erd1pfhel08mq6ucua005qgyvwq0el78ap3ytpcugy35yvqfdeq7afqsydkj3d
```

First, there is a [mnemonic](https://en.wikipedia.org/wiki/Mnemonic): 24 random words.
These words are used to create your private key (wallet) at any time, so you must store them carefully.
For now, this is only a test wallet, so just store them in a text file on your computer.

Second, we have a wallet address. This is our blockchain address.

Third, we have a new file `new_wallet.pem` that contains our private key (wallet):
```shell
$ cat new_wallet.pem
-----BEGIN PRIVATE KEY for erd1pfhel08mq6ucua005qgyvwq0el78ap3ytpcugy35yvqfdeq7afqsydkj3d-----
NjM1N2UxOGQxYjBjMDk5ZjY1MzM2OWUxZGFiZGM3Mzg1Yjc5ZmY0ZWNlZTBiNWY5
NWFmNjE1MzZjZDMwODNhOTBhNmY5ZmJjZmIwNmI5OGU3NWVmYTAxMDQ2MzgwZmNm
ZmM3ZTg2MjQ1ODcxYzQxMjM0MjMwMDk2ZTQxZWVhNDE=
-----END PRIVATE KEY for erd1pfhel08mq6ucua005qgyvwq0el78ap3ytpcugy35yvqfdeq7afqsydkj3d-----
```
2 changes: 1 addition & 1 deletion chapters/introduction/lab/content/wallet/faucet.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Access a wallet

Go to [Testnet Wallet](https://testnet-wallet.multiversx.com/) and click on "Connect with Keystore"; click Browse and locate your Keystore File [erd1… .json], then put in your password and click "Access Wallet".
Go to [Testnet Wallet](https://testnet-wallet.multiversx.com/) and click on "PEM" (bottom of the screen); click *"Select a file"* and locate your wallet `new_wallet.pem`.

![Testnet Wallet](../../media/multiversx-testnet-wallet.png)

Expand Down
4 changes: 3 additions & 1 deletion chapters/introduction/lab/content/wallet/wallet.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Setting up a Wallet
# Setting up a Wallet via Browser

We will use [MultiversX Testnet Wallet](https://testnet-wallet.multiversx.com/) to participate in the blockchain as a user.

If you already have a wallet, there is no need to create another one.

Go to [MultiversX Testnet Wallet](https://testnet-wallet.multiversx.com/) and create a new wallet by clicking **Create new one**.

![Testnet Wallet](../../media/testnet-wallet.png)
Expand Down
25 changes: 12 additions & 13 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,18 @@ docusaurus:
- Practical Sessions:
- Env Setup:
path: chapters/introduction/lab/content/setup

- Wallet:
path: chapters/introduction/lab/content/wallet
extra:
- ../../media/
subsections:
- Cmd line wallet/: cmdline_wallet.md
- Wallet/: wallet.md
- Keystore/: keystore.md
- Access & Faucet: faucet.md
- Send Transaction: send_tx.md
- Browser Web Wallet: browser_wallet.md
- Observer: observer.md
- Explorer:
path: chapters/introduction/lab/content/explorer
extra:
Expand All @@ -84,18 +95,6 @@ docusaurus:
# - ../../quiz/
subsections:
- Observers: observer.md
- Wallet:
path: chapters/introduction/lab/content/wallet
extra:
- ../../media/
# - ../../quiz/
subsections:
- Wallet/: wallet.md
- Keystore/: keystore.md
- Access & Faucet: faucet.md
- Send Transaction: send_tx.md
- Browser Web Wallet: browser_wallet.md
- Observer: observer.md
- Money:
path: chapters/money/lab/content
extra:
Expand Down

0 comments on commit c9699d9

Please sign in to comment.