Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tutorials.mvs.org
68 changes: 28 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
# MetaverseTutorials
# Metaverse Tutorials
Step by step tutorials for the Metaverse Blockchain

This is a Metaverse Tutorial series

This is a series of Metaverse tutorials. To begin clone this repository

This is a series of Metaverse tutorials. To begin, clone this repository
```
git clone https://github.com/antron3000/MetaverseTutorials.git

git clone https://github.com/mvs-org/MetaverseTutorials.git
```

navigate to the tutorial directory

Navigate to the tutorial directory
```
cd MetaverseTutorials
```

update your repo to the latest version of mvs-blockchain-js
Update your repo to the latest version of mvs-blockchain-js
```
git submodule update --init --recursive
```

Install the metaverse npm package

```
npm install metaversejs --save
```
Expand All @@ -33,49 +27,45 @@ cd mvs-blockchain-js && npm install
```


Each tutorial builds on the previous ones, so it is recommended to do them in order

To begin a tutorial navigate to the tutorials folder and follow instructions.
Each tutorial builds on the previous one, so it is recommended to do them in order.

Tutorial Information:

These tutorials are designed
* to be simple, no fluff
* hands on
* explain inner workings and give broad understanding of Metaverse blockchain
* Show you step by step how to create dApp on Metaverse. Can also be used to integrate into your existing app.
* provide working examples of what you should have built.
* each tutorial comes with complete solutions to show you how its done in the end. Don't look till you're done!

These tutorials are designed to:
* Be simple, no fluff
* Be hands-on
* Explain the inner workings and give us a broad understanding of the Metaverse blockchain
* Show you step-by-step how to create dApps on Metaverse and how they can be used to integrate into your existing dApp
* Each tutorial comes with complete solutions to show you how it's done in the end. Don't look till you're done!

1. [Integrate Metaverse wallet into your dapp with your DID](tutorials/1-Metaverse-Wallet)
2. [Issue and transfer MST’s](tutorials/2-Avatars-and-MSTs)
3. [Issue and transfer MIT’s](tutorials/3-MITs)
1. [Integrate Metaverse wallet into your dApp with your DID](tutorials/1-Metaverse-Wallet)
2. [Issue and transfer MST](tutorials/2-Avatars-and-MSTs)
3. [Issue and transfer MIT](tutorials/3-MITs)

For more information refer to the [Metaverse Documentation](https://docs.mvs.org/docs/)
For more information refer to the [Metaverse Documentation](https://docs.mvs.org/docs/).
Also check out some working examples in the `./examples` folder.

Please follow the Environment setup instructions below before starting.
Please follow the "Environment Setup" instructions below before starting.

# Environment Setup

Start by entering the "playground" directory. This is where you can build ALL your Metaverse apps during the tutorial.

Start by entering the `playground` directory. This is where you can build ALL your Metaverse apps during the tutorial.
```
cd tutorials/playground
```

**Interact with metaverse libraries via nodejs**

create a testScript
Create a testScript
```
touch testScript.js
```

To interact with Metaverse using javascript you can interact with mvs-blockchain-js and metaversejs
To interact with Metaverse using javascript you can interact with `mvs-blockchain-js` and `metaversejs`.

For use in nodejs scripts, import mvs-blockchain from the mvs-blockchain folder, and require metaversjs.
For use in nodejs scripts, import `mvs-blockchain` from the `mvs-blockchain` folder, and require `metaversjs`.

Inside the testscript, add:
Inside the testscript, add the following. You will be using the `blockchain` and `Metaverse` objects later in the other tutorials.

```
//import mvs-blockchain-js
Expand All @@ -95,13 +85,13 @@ console.log(Metaverse)
console.log("Metaversjs has been successfully imported!")
```

now run
Now run

```
node testScript.js
```

**Interact with metaverse via webapp**
**Interact with metaverse via web app**

First create an html file
```
Expand All @@ -120,17 +110,16 @@ and add

</body>
</html>

```


To interact with webapps you must generate "index.js" from mvs-blockchain-js and "metaverse.min.js" from metaversejs. To generate these files you must clone each repository and simply run
To interact with web apps you must generate `index.js` from `mvs-blockchain-js` and `metaverse.min.js` from `metaversejs`. To generate these files you must clone each repository and simply run

```
grunt
```

This will generate javascript files into the /dist folder that you can import into your app. You don't have to worry about this for now. We have generated these files and placed them in the playground folder. To include them in your webapp just add these script tags into your html page.
This will generate javascript files into the `/dist` folder that you can import into your app. You don't have to worry about this for now. We have generated these files and placed them in the playground folder. To include them in your web app, just add these script tags into your html page.

```
<script src = "metaverse.min.js"></script>
Expand All @@ -143,7 +132,6 @@ python -m SimpleHTTPServer 4444
```

To test that the libraries have been successfully imported into your webpage, open the web console and enter

```
blockchain = await Blockchain({url: "https://explorer-testnet.mvs.org/api/"})

Expand All @@ -152,6 +140,6 @@ blockchain
Metaverse
```

You should see the "blockchain" (from mvs-blockchain-js) and Metaverse (from metaversjs) objects show up in the console.
You should see the "blockchain" (from mvs-blockchain-js) and "Metaverse" (from metaversjs) objects show up in the console.

You should now be fully set up and ready to begin [tutorial 1](tutorials/1-Metaverse-Wallet).
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
theme: jekyll-theme-minimal
logo: logo.png
logo: images/logo.png
4 changes: 2 additions & 2 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<br><br>
{% endif %}

<p class="view"><a href="{{ site.baseurl }}">Home</a></p>
<p class="view"><a href="/">Home</a></p>
<p class="view"><a href="{{ site.baseurl }}/tutorials/1-Metaverse-Wallet">Tutorial 1<small>Create Wallet</small></a></p>
<p class="view"><a href="{{ site.baseurl }}/tutorials/2-Avatars-and-MSTs">Tutorial 2<small>Avatars and Smart Token</small></a></p>
<p class="view"><a href="{{ site.baseurl }}/tutorials/3-MITs">Tutorial 3<small>Identifiable Token</small></a></p>
Expand Down Expand Up @@ -48,4 +48,4 @@
</script>
{% endif %}
</body>
</html>
</html>
Binary file added images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading