An entrance to the Massa blockchain.
This project is still WIP. It is a prototype.
To develop on this project you will need :
Once Golang is installed on your system, you can install the swagger dependency by running the following command outside of a go module directory:
go install github.com/go-swagger/go-swagger/cmd/swagger@latest
Use prettrier to format de code. We recommend to install IDE prettier extension to format on save.
For go code, we use the formatter included in https://marketplace.visualstudio.com/items?itemName=golang.go.
- golangci-lint is used to run linters in parallel.. We recommend to install it locally and run it on your source code, before pushing any modification, otherwise some potential lint errors will be catched by the pipeline.
- to run golangci-lint locally :
golangci-lint run .
- File is not
gofumpt
gofumpt need to be installed locally go install mvdan.cc/gofumpt@latest
run gofumpt locally on your source code gofumpt -l -w .
- File is not
gci
gci need to be installed locally go install github.com/daixiang0/gci@latest
run gofumpt locally on your source code gci --write .
Follow the instructions for your computer in the wiki:
- Create / delete your wallet
You can access to Thyra wallet interface at URL : http://my.massa/thyra/wallet/index.html
By inputing the 'Nickname' & 'Password', you'll be able to create an encrypted wallet locally on your machine.
To delete your wallet, simply use the interface.
- Get coins on your wallet
To get coins on your wallet, you have to send your address on Massa faucet channel Make sure that you use the latest version of Thyra (and defacto Testnet) here, otherwise the faucet won't work.
You can access to Thyra web hosting interface at URL : http://my.massa/thyra/websiteCreator/index.html
In order to register a website on Thyra you'll need to :
- Deploy a Smart Contract that will handle the storage of your website, your DNS name will fetch the Address of this Smart Contract - this step is handled by Thyra, don't worry. But at least you know what's happening behind the wood.
- Upload the build of your application
- Use a wallet with sufficient coins to upload it on the blockchain Important note: At the moment, we have defined that 1 chunk (=280ko) of data worth 100 MAS. It will change and become more and more specific and precise as the Testnet and Thyra are evolving. In the mean time, we have defined it arbitrarily.
- Visit the registry to find your .massa website and see others
Troubleshooting If you got any problem at any steps of the process, join us on Discord dedicated channel or report a problem
To install the latest dev version of the thyra-server
application you need to:
- install go
- execute
go install github.com/massalabs/thyra/cmd/thyra-server@main
in your terminal
Note: you can change main
to a tag or a commit value if needed.
That's it, thyra-server is installed in '$HOME/go/bin/' dir and you can use it by executing thyra-server
in your terminal.
Thyra accepts different options that you can specify when you start the program. In this section you will find a non-exhaustive list of such options and examples of how you can use them.
--node-server : Specify which Massa network Thyra will communicate with while running. Accepts a URL, an IP address or one of the following values :
- TESTNET : Uses Massa's testnet
- LABNET : Uses Massa's labnet
- INNONET : Uses Massa's innonet
- LOCALHOST : Expect Massa's network to be hosted at 127.0.0.1
To use this option with a constant, you have to execute :
thyra-server node-server=LABNET
To use this option with a custom IP address, you have to execute :
thyra-server node-server=192.168.X.X
Using HTTPS configuration without specifying your own certificate and key triggers a warning: insecure HTTPS configuration
.
To solve this you need to create your own certificate. You can do so by using openssl:
openssl req -newkey rsa:4096 \
-x509 \
-sha256 \
-days 365 \
-nodes \
-out my_thyra.crt \
-keyout my_thyra.key
You can now execute a thyra-server using the following command changing path to ... to proper values:
thyra-server --tls-certificate <path to my_thyra.crt> --tls-key <path to my_thyra.key>
.
You can run the application with this command: air
.
It will generate and reload thyra each time a file is modified.
With Thyra you can upload a website. It will be hosted on the Massa blockchain and available as a .massa
URL. You can access this URL through Tyhra.
For this to work, the file you upload must be a zip archive (file ending with .zip
). This archive must contain a index.html
file at the root.
θύρα (thýra) in ancient Greek means door, entrance. This is exactly what this project is: an entrance to the Massa blockchain.