# Intro to Valist

Powering Deployment in the Decentralized Era - Deploying Games at Lightning Speed, from Small Prototypes to Epic Projects, on Web2 and Web3!

## Welcome to Valist ✨

{% embed url="<https://youtu.be/7ak6PQPDBkk>" %}

Valist is an open-source, web3-native software publishing protocol.

You can think of it as the App Store or Steam, but decentralized -- no reliance on a single entity to deliver software from the developer to the end user!

Right now, software distribution is relying entirely on centralized web2 companies to distribute and publish our software.

Imagine you're building an app or game for months, or years, putting your hard work, love, and energy into it -- finally, the day comes when you're ready to share it with the world! Next thing you know, you're being interrogated by your app store/distributor for countless details, jumping through the hoops of their release process, and when they finally take your app's build, you can only hope they let it pass through the gates! Then, if you manage to get your app published, they take 30+% of your hard-earned revenue!

There are so many problems with this. The craziest part is:

* They own your products.
* They own your users.
* Your users don't even truly own the assets they've purchased.

How did we ever let this happen? These are the problems that are created when you rely on ***companies*** and not ***protocols***.

Valist ties together the best-in-class web3 protocols, like [Polygon](https://polygon.technology/), [IPFS](https://ipfs.io/), [Filecoin](https://filecoin.io/), and other networks to make publishing your software or game super easy.

It supports any kind of software -- from binaries to web apps to Unity games -- all in a unified interface, with a familiar look and feel.

The most popular, and supported use cases for Valist are:

* Publishing static web apps (Next.js, Create React App, Gatsby, etc.)
* Publishing games and apps
* Publishing static binaries and executables
  * Golang, Rust, and other binaries are excellent fits here
* Publishing Electron & other desktop apps
* Publishing apps to multiple platforms (Mac, Windows, Linux, Android, and Web currently supported)

Valist works by using IPFS and Filecoin to store all software and other data assets, and Polygon to coordinate the `account/project/version` combination in a decentralized registry smart contract that enforces all the security policies set on the Valist account.

This is all wrapped into an easy-to-use interface, with gas-less transactions and password-less email login as a cherry on top.

The Valist SDK is what powers the [Web Dashboard](https://app.valist.io), [CLI](/quick-start/cli), [GitHub Action](/quick-start/github-action), and any other Valist-powered tooling.

An example of a Valist Release on-chain looks like this:

{% code overflow="wrap" lineNumbers="true" %}

```json
{
  "name": "1.2.3",
  "description": "Example multi-platform binary release!",
  "install": {
    "windows_amd64": "hello-windows-amd64",
    "linux_amd64": "hello-linux-amd64",
    "darwin_arm64": "hello-darwin-arm64",
    "darwin_amd64": "hello-darwin-amd64"
  },
  "external_url": "https://gateway.valist.io/ipfs/bafybeidlsyuka7ycdqtj5hltmlv6gghfkbr45gmissqvi6lbgdkqmbfieu"
}
```

{% endcode %}

Gateway URLs are stored with `https://gateway.valist.io/ipfs/` as the prefix, but you can easily strip this away and fetch the CID directly from IPFS! The Valist clients do this automatically, and load from native IPFS wherever possible.

Valist is **fully decentralized**, meaning you can run Valist entirely locally, plugging in your own web3 infrastructure, without depending on a single point of failure. All you need is a Polygon RPC node, an IPFS node, and a Valist Subgraph endpoint.

[**valist.io**](https://www.valist.io/) is simply a hosted version of the Valist protocol, with some extra performance and services we provide on top!

*Ready to get started?* 🚀

Click next to know more about how we help Gamers and Game Devs.


# Valist For Gamers

Enter the ultimate realm of Web3 gaming - a thrilling universe brimming with the coolest blockchain games worldwide, fueled by valist and launched with HyperPlay - Your new gaming haven awaits!

[**Valist**](https://www.valist.io/gamers) partnership with [**HyperPlay**](https://www.hyperplay.xyz/) is the ultimate launcher delivering the finest selection of Web3 games right to your fingertips - meticulously curated for your endless enjoyment!

<figure><img src="/files/a22isbf55kvWUFItPOif" alt=""><figcaption></figcaption></figure>

***⬆️ Level up your gaming adventure with us! ⬆️***

Partnered with the official gaming launcher, our platform offers games that embody unbeatable security, transparency, and fairness, allowing you to indulge in gaming with complete confidence and peace of mind.

Flexibility and convenience are paramount in the gaming world, and that's why we support fully cross-platform games, utilizing HyperPlay as our chosen launcher to guarantee a seamless gaming journey on any device, be it *Windows, MacOS, or Linux.*

Our thriving global gaming community is a melting pot of passionate gamers from all corners of the world. Within this engaging space, you'll find a welcoming environment to connect with fellow gamers, share thrilling experiences, and interact with like-minded individuals. Forge enduring friendships, engage in discussions about the latest gaming trends and strategies, or find your perfect gaming partner to embark on epic quests together.

Find a list of amazing games here: [**https://store.hyperplay.xyz/**](https://store.hyperplay.xyz/)

*Get ready to embark on an extraordinary gaming adventure that promises excitement, camaraderie, and unparalleled fun.*&#x20;


# Valist For Game Developers

Level up your game development with Valist - the lightning-fast, open-source web3 protocol that offers seamless deployment for both web3 and web2 software, from massive projects to small prototypes!

[Valist](https://www.valist.io/software-developers) in partnership with [HyperPlay](https://www.hyperplay.xyz/) brings the best way for game developers to break into the Web 3.0 realm!\
\
Say goodbye to tiresome and slow development and distribution processes. With Valist, we offer a lightning-fast solution to deploy your games while safeguarding your precious in-game economy. Embrace efficiency without compromise!

<figure><img src="/files/6tYYLKG2Zjmk1G3RGgIF" alt=""><figcaption></figcaption></figure>

Discover the Valist difference - where quality service and reliability reign supreme. Unleash the power of our all-in-one solution that ticks all the boxes:

1. **Speed:** We understand that time is of the essence in the competitive world of game development. With Valist, you can bid farewell to delays and bottlenecks. Our platform excels in lightning-fast software deployment, allowing you to swiftly bring your creations to the market. Say hello to quicker release cycles and more frequent updates, giving you a significant advantage in the industry.
2. **Scalability:** As your game gains traction and your user base expand, you need a platform that can keep up with your growing demands. Valist is engineered to handle large-scale deployments with ease. No matter how much your business flourishes, our infrastructure is primed to scale accordingly, ensuring your games continue to perform flawlessly and accommodate a growing number of players.
3. **Security:** We recognize the importance of safeguarding your hard work and in-game economy. Valist provides a secure environment for software deployment, implementing robust measures to protect your games from potential threats. Rest assured that your intellectual property and your players' data are in safe hands, allowing you to focus on crafting unforgettable gaming experiences without worrying about security breaches.

Our powerful platform grants you the freedom to deploy your creations seamlessly on any device or platform, be it web, or desktop, reaching a vast and diverse audience while ensuring compatibility across multiple systems.

No limitations, no boundaries – Valist supports a wide array of frameworks, from Next.js and React to Capacitor, Unity, Unreal Engine, and beyond. Embrace the language you love and build your games with the utmost creativity and innovation.

With Valist, you're equipped with easy token gating and release channels, making it a breeze to introduce beta versions and ongoing projects to your passionate community. Welcome your players onboard effortlessly, engaging them in the development process and building anticipation for the grand release.

Empower your game development journey with Valist's robust features, unlocking new opportunities, and captivating audiences like never before. It's time to bring your vision to life and leave a mark in the gaming world. Join Valist today!


# Creating an Account & Project

Creating an account on Valist is super easy!

The web dashboard will walk you through the whole process, but the high level overview is:

* Creating an account, and setting up the addresses that will be admins for the account.
* Creating a project, and optionally giving access to additional project-level addresses that can publish only under this specific project. Adding as much detail in the descriptions and adding optional screenshots qualify you for the Valist Discovery page & features!
* Publishing to the project when you're ready to release!

First, navigate to the web dashboard at [app.valist.io](https://app.valist.io/):

{% embed url="<https://app.valist.io/>" %}
Valist Web Dashboard
{% endembed %}

This will display the onboarding welcome page:

<figure><img src="/files/aRsLJpO1zGWZarwivSVQ" alt=""><figcaption></figcaption></figure>

You'll then be prompted to create an account.

The `Account Name` is your Valist username -- this will abstract away all of the other keys associated with the account into a human-readable namespace that can also act as an organization account. This is unique, and cannot be changed, so pick wisely!

<figure><img src="/files/VoybYnyzG5Yg77dyYyUr" alt=""><figcaption></figcaption></figure>

Once you've filled out this meta-data, you will be asked to setup the `Account Members`:

<figure><img src="/files/9EJJ9iLWVoSs9P9IVcYv" alt=""><figcaption></figcaption></figure>

**This is a super important step!** This is the list of addresses that will become administrators on this account. Every account member has access to publish across any project within the account, as well as modify other account & project settings. Be mindful who you give access here! For even higher security, you can also put a Gnosis Safe Multi-sig here (***\*Polygon only***) to ensure that multiple admins need to sign off on an action.

Once you click `Create`, a message signature request will pop-up on your wallet, like so:

![](/files/WXCoxnOo3jfRQF2KiK0U)

This is a "meta-transaction" -- meaning, the Valist protocol is paying the gas and creating the on-chain transaction for you! All Valist needs is a signature from your wallet approving the transaction. If you're using MetaMask, you may have to click the small arrow on the bottom right to enable the `Sign` button.

Voilà! You've now created a Valist account successfully.

Creating a project is very similar, with some slight differences.

The `Project Name` works the same way as the `Account Name` -- it is an immutable short-name for your project that will be used to reference by `account/project` in the Valist Registry.

Filling in as much detail about your project is key, as it will enable your app to be more easily discovered in the Valist ecosystem!

Be mindful of the `Project Type` field as well -- this is the field that indicates how to consume your software. If it's `web`, Valist will know to launch it like a web app in a Browser or WebView. If it's `native` or `cli`, Valist will know that it needs to show different publishing options for cross-platform builds, and signals to Valist how to install/launch your app.

<figure><img src="/files/eWuQr37jWVxv6PaORzSP" alt=""><figcaption></figcaption></figure>

You can also add as many tags as you like, including custom tags that aren't in the default list:

<figure><img src="/files/tTknnuR3BpFyQdoJPWAJ" alt=""><figcaption></figcaption></figure>

The `Descriptions` section also supports Markdown in the long description, so feel free to copy/paste your existing `README.md` file here!

<figure><img src="/files/uHAkqRUjFDe7Ollqn12j" alt=""><figcaption></figcaption></figure>

**Another important configuration** is the project `Members` tab. This is where you configure which addresses will have access to this project. The Account Members already have admin access, so they are shown here for reference, but you can add additional keys to just this project. This is great for adding more team members, or configuring CI/CD only keys with the GitHub Action.

<figure><img src="/files/O3RE1aSive3zLWZIQISi" alt=""><figcaption></figcaption></figure>

Lastly, the `Media` tab allows you to add screenshots, and a YouTube URL that will auto-render on the project's page. Feel free to skip this for now, but remember: to qualify for the Discovery page & other Discovery features, you'll need to add at least one screenshot and high quality descriptions!

<figure><img src="/files/TZAbcWwf2ckVL8TAy8o4" alt=""><figcaption></figcaption></figure>

### Now you're ready to get publishing!

You've got an account and a project fully set up for web3-native publishing. After creating the Project, you'll be taken back to your Dashboard where you can click `New Release` to get your software out to the world!

From this point forward, creating Releases is a straight-forward process, with multiple options for how you prefer to publish. The Web Dashboard is an excellent choice for drag-and-drop uploading. The CLI is awesome if you prefer to run `valist publish account/project/version build_folder` instead. Or, integrate the GitHub Action into your existing release pipeline super easily, whichever your dev needs lead you!


# Web Dashboard

The Valist Web Dashboard is your one-stop place to see all of your Valist Accounts, Projects, and Releases. It allows you to both publish software, as well as discover and download new software.

Once you've logged in, created an account and a project, you will see a familiar, Vercel/Netlify-like interface.

If you haven't created an account or project yet, visit the following page to learn how:

{% content-ref url="/pages/iSrHS6Po1cDaMdMsMTOt" %}
[Creating an Account & Project](/quick-start/creating-an-account-and-project)
{% endcontent-ref %}

### The Dashboard

On the Dashboard, the top left corner enables you to switch between your Valist Accounts (currently selected, `acme-co`). The center shows the list of projects within this account, and the right hand side shows the list of Members in the Account, and any recent activity.

<figure><img src="/files/jvJB8rOB2QdC5Heln42v" alt=""><figcaption></figcaption></figure>

### Releases

Depending on your `Project Type` in your project settings, you will see two different upload screens when creating a Release.

If you've chosen `web` as your project, you will see a standard drag-and-drop uploader that you can use to upload your app's build folder (see [Publishing Web Apps](/publishing/publishing-web-apps) for more).

If you've chosen `native` or `cli`, the uploader will show buttons for the supported platform/architecture combinations (see [Publishing Binaries & Executables](/publishing/publishing-binaries-and-executables) for more).

All you need to do is name your release with an immutable tag, and select your files:

<figure><img src="/files/2IH38mUMlxC8oAJ7kkyA" alt=""><figcaption></figcaption></figure>

If you're uploading a `web` project, you will see the following uploader:

<figure><img src="/files/LA5M4DM4WbhycI2regM7" alt=""><figcaption></figcaption></figure>

If you chose `native` or `cli`, you will see:

<figure><img src="/files/nHBDY35ujBCdfmQICG8m" alt=""><figcaption></figcaption></figure>

Once you click `Create` it will upload all of the files to IPFS, then fire off a meta-transaction request to finalize the Release on-chain!

For more information about how to create a release, visit the `Publishing` section for more examples:

{% content-ref url="/pages/eCCYBkALWdgGup7TR8fF" %}
[Publishing](/publishing/publishing-web-apps)
{% endcontent-ref %}

Congratulations, you've now published a web3-native software release! 🚀 time to show off your project to the world (and in our community [Discord server](https://valist.io/discord)!)


# Sapphire Launcher

A cross-platform desktop and Android app store and game launcher for web3.

<figure><img src="/files/phYl0dKnxxeMMCoHKbbX" alt=""><figcaption><p>Valist Sapphire preview</p></figcaption></figure>

Valist Sapphire is a cross-platform app store and game launcher for web3. You can think of it as an evolution of web2 app stores and game launchers.

Sapphire replaces traditional platforms like the App Store and Steam with a web3-powered alternative that uses cryptocurrency and Software License NFTs as payment methods, with fiat gateways (coming soon) on top for easy payment onboarding/offboarding.

### Features

* Fully web3-native app distribution powered by Polygon, IPFS, and Filecoin + other payment networks.
* Built-in crypto wallet that's transparent when you want it, but confirms with you when it should.
* Natively install and launch web apps, Unity games, and other software published on Valist. Or, simply browse as usual!
* Local IPFS node + Valist.io IPFS/Filecoin infrastructure, so you're not relying on a single entity to fetch the software -- you can even fetch it from your neighbor if they've already downloaded it! This helps especially for large games.

The Sapphire Launcher can install and launch both **web** and **native** games:

<figure><img src="/files/mMvkIK5XT1aqMwNIoYhX" alt=""><figcaption><p>Play and install games!</p></figcaption></figure>

Sapphire supports both full-screen and windowed gameplay, creating the most immersive experience for any dApp or game!

<figure><img src="/files/E5HHszKEBcURpgWpON0n" alt=""><figcaption><p>Full-screen mode support</p></figcaption></figure>

You can even install and launch multiple web apps!

<figure><img src="/files/iNv3ZeltcMlsjBFpuosO" alt=""><figcaption><p>Install and launch web applications to your local IPFS node</p></figcaption></figure>

With support for NFT in-games assets and collectibles.

<figure><img src="/files/dJ4Pq9W1tHFp2KC9lbSQ" alt=""><figcaption><p>Sapphire supports in-game and in-app asset management</p></figcaption></figure>

### Installation

Coming soon! We're hard at work getting Sapphire built and deployed via CI/CD and jumping through the traditional web2 gatekeeper hoops to deliver you a downloadable version of Sapphire!

Check out the progress here: <https://github.com/valist-io/valist-js/pull/235>

If you can't wait, and want to get a build today or start contributing, you can perform the following steps:

```
git clone https://github.com/valist-io/valist-js
cd valist-js
make install electron
```

This will install all dependencies, build the frontend first, then build and launch the Electron app.


# CLI

**Note: An account and project is required for the following section.** If you haven't created an account or project yet, visit the following page to learn how:

{% content-ref url="/pages/iSrHS6Po1cDaMdMsMTOt" %}
[Creating an Account & Project](/quick-start/creating-an-account-and-project)
{% endcontent-ref %}

### Valist CLI

The Valist CLI allows you to easily *publish*, *download*, and *install* releases from the command line! It's a great way to easily work with releases without navigating through a frontend. You can also use it to integrate your existing CI/CD workflows.

### Features

The Valist CLI supports all of the core publishing functionality of Valist, including:

* Secure key management with [keytar](https://www.npmjs.com/package/keytar)
* Publishing releases, for example `valist publish example-account/go-binary/0.0.1 dist/*`
* Downloading releases, for example `valist download example-account/go-binary`
* Gasless meta-transactions powered by [OpenGSN](https://github.com/opengsn/gsn)

<figure><img src="/files/hcwMZaSiDwCZpGeg7f1f" alt=""><figcaption><p>The Valist CLI</p></figcaption></figure>

### Installation

To install the CLI, you will need Node.js v16+ installed.

```bash
npm i -g @valist/cli
```

**Note: An account and project is required for the following section.** If you haven't created an account or project yet, visit the following page to learn how:

{% content-ref url="/pages/iSrHS6Po1cDaMdMsMTOt" %}
[Creating an Account & Project](/quick-start/creating-an-account-and-project)
{% endcontent-ref %}

### Generating or importing a key in the CLI wallet

**Generating a fresh key (recommended, most secure method)**

The most recommended configuration is to generate a fresh key in the CLI, then add that address to the designated account or project you wish to publish to.

To generate a new key and store it directly into your secure keystore, run the following:

```
valist keygen
```

This will print out an address like so:

<figure><img src="/files/PA960AGq49SEoAVLOMAr" alt=""><figcaption></figcaption></figure>

Next, you will need to add this key to your desired project or account members to give it access to publish. Navigate to your project or account settings in the web dashboard, and add the key like so, and hit `enter` -- this will trigger a transaction to add the account to the project:

<figure><img src="/files/fDyBBWjAMFzpbI6nCYJo" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
This step is required before the CLI can publish under the account or project.
{% endhint %}

**Importing a Key (easiest, less secure)**

The Valist CLI also supports importing the following key formats:

* Private Key Hex string
* Encrypted JSON Keystore (MyCrypto, Geth, etc)
* Mnemonic phrase

To import your key into your secure keystore, run the following:

```bash
valist import
```

This will prompt you to import the key into your system's secure credential storage. You will then be able to use this key for publishing.

{% hint style="info" %}
Your key is only accessible by you -- this simply copies your key into your system's native secure keystore.
{% endhint %}

### Publishing a Release

Publishing a Release with the CLI is very simple. You simply need to give it the `account/project/tag` path to publish, and the set of files to include in the Release.

The format is the following:

```bash
valist publish <username>/<project>/<version> <folder>
```

An example of this looks like this:

```
valist publish acme-co/go-binary/0.0.1 dist
```

This will upload the files to IPFS, and trigger the publish. Meta-transactions are enabled by default, so you won't need to spend any gas.

<figure><img src="/files/9u4N44fy157KtF0ELEW8" alt=""><figcaption><p>Example Valist Publish uploading a Go binary</p></figcaption></figure>

This is a flexible and simple way to publish in any environment that supports Node.js!

Feel free to publish your static website's build folder, a Unity project build folder, binaries, you name it! (**Just make sure, it's just your build folder!** :stuck\_out\_tongue\_winking\_eye:**)**

#### Advanced Configuration (Cross-platform builds)

You can configure the CLI to support advanced behaviors, like cross-platform builds by creating a `valist.yml` file in the root of your project.

The `valist.yml` file looks like the following:

```yaml
account: acme-co
project: multi-platform
release: 0.1.3
path: dist
install:
  name: hello-go
  darwin_amd64: hello-darwin-amd64
  darwin_arm64: hello-darwin-arm64
  linux_amd64: hello-linux-amd64
  windows_amd64: hello-windows-amd64
```

The `account`, `project`, `release`, and `path` variables are all the same, however, an additional `install` field is available to enable mapping native static binaries to their designated platforms.

{% hint style="info" %}
The following platform/architecture combinations are supported:

* darwin\_amd64
* darwin\_arm64
* linux\_amd64
* linux\_arm64
* windows\_amd64
  {% endhint %}

### Downloading a Release

Downloading a Release with the CLI is just as easy.

Simply provide the release path, and it will download a `.tar` bundle containing the Release:

```bash
valist download acme-co/go-binary/0.0.1
```

If you don't specify a tag, the CLI will automatically download the latest Release:

```bash
valist download acme-co/go-binary
```

Voila! This will fetch the Release metadata and the corresponding artifacts from IPFS into your working directory.


# GitHub Action

**Note: An account and project is required for the following section.** If you haven't created an account or project yet, visit the following page to learn how:

{% content-ref url="/pages/iSrHS6Po1cDaMdMsMTOt" %}
[Creating an Account & Project](/quick-start/creating-an-account-and-project)
{% endcontent-ref %}

### Valist GitHub Action

Valist provides an extremely easy to integrate GitHub Action that enables you to publish anything, including websites, binaries, Electron apps, Android apps, Docker images, or anything else that you're building in your existing CI/CD pipeline!

It can be found in the GitHub Marketplace below:

{% embed url="<https://github.com/marketplace/actions/valist-action>" %}

Here's what it looks like to publish a release to Valist using the Valist GitHub Action:

```yaml
name: Valist Publish
jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      - uses: valist-io/valist-github-action@v2.5.6
        with:
          private-key: ${{ secrets.PRIVATE_KEY }}
          account: example-acount
          project: example-project
          release: ${{ github.ref_name }} # this can be whatever tag you wish to use
          path: build
```

Here's an [example run](https://github.com/awantoch/valist-publish-gha-example/runs/8096182559) of a React app being published:

<figure><img src="/files/93COhT81c5p8R5QdXlQJ" alt=""><figcaption></figcaption></figure>

Super easy!

### Configuring the workflow file

**Note: An account and project is required for the following section.** If you haven't created an account or project yet, visit the following page to learn how:

{% content-ref url="/pages/iSrHS6Po1cDaMdMsMTOt" %}
[Creating an Account & Project](/quick-start/creating-an-account-and-project)
{% endcontent-ref %}

There are several values that you will need to update to get your project publishing correctly.

#### Setting up the GitHub Action's Private Key

First, you will need to setup the `private-key` variable.

* The `private-key` field maps to your GitHub Repository secret that contains a key with permission on the Valist Project. We **strongly recommend** this is a fresh key that only has access to the corresponding Valist Project, and that you don't use an Account-level admin key here.

To generate a fresh key, you can use any Ethereum wallet that can export private keys. We also have a helper script that makes it even easier here:

```bash
npx @valist/keygen eth
```

This will securely generate and output a private key and a public address that you can use to configure your Valist GitHub Action.

<figure><img src="/files/l8iRLpCRtj55NBaLerCr" alt=""><figcaption></figcaption></figure>

Copy this private key, and add it as a GitHub Repository Secret called `VALIST_SIGNER`:

<figure><img src="/files/PoaSJc9W711Q0bFjUt93" alt=""><figcaption></figcaption></figure>

Next, you will need to add this key to your desired project or account members to give it access to publish.

Navigate to your project or account settings in the web dashboard, click on `Members` and add the key -- this will trigger a transaction to add the account to the project:

<figure><img src="/files/fDyBBWjAMFzpbI6nCYJo" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
This step is required before the CLI can publish under the account or project.
{% endhint %}

This will give the key access to the project and enable the GitHub Action to publish to the project!

#### Configuring the account, project, path, and release version

Next, fill out the rest of the values and match them to your Valist Account and Project:

* The `account` field maps to your Valist Account
* The `project` field maps to the Valist Project you wish to publish to

Then, you will need to configure the Release's build path, and the version to tag it with.

Each `release` is immutable and unique, so make sure this is a version tag that matches your workflow.

* The `release` field maps to the version/tag you wish to release. You can use SemVer, or some other release versioning system you wish.

Finally, you will need to point the Action at the build path. Make sure this is your build output, or "dist" folder.

* The `path` field is the folder you wish to release.&#x20;

#### Advanced Configuration (Cross-Platform Releases)

You can also configure cross-platform releases with the `install` field, similarly to the [CLI](/quick-start/cli#advanced-configuration-cross-platform-builds).

```
install-name: 'hello'
install-darwin-amd64: hello-darwin-amd64
install-darwin-arm64: hello-darwin-arm64
install-linux-amd64: hello-linux-amd64
install-windows-amd64: hello-windows-amd64
```

This will map each binary to its designated platform, enabling the Valist tooling to install the correct version on the correct platforms.

{% hint style="info" %}
The following platform/architecture combinations are supported:

* install-darwin-amd64
* install-darwin-arm64
* install-linux-amd64
* install-linux-arm64
* install-windows-amd64
  {% endhint %}

For a set of examples, check out these repositories below:

{% embed url="<https://github.com/awantoch/valist-publish-gha-example/blob/main/.github/workflows/publish.yml>" %}
Simple Valist Publish with Timestamp as the Release Name
{% endembed %}

{% embed url="<https://github.com/berty/berty/blob/master/.github/workflows/valist.yml>" %}
Berty Messenger publishing cross-platform builds from their GitHub Releases
{% endembed %}

{% embed url="<https://github.com/valist-io/example-projects/blob/main/.github/workflows/nextjs-project.yml>" %}
Next.js project built and published with the Valist GHA
{% endembed %}

{% embed url="<https://github.com/valist-io/example-projects/blob/main/.github/workflows/multi-platform.yml>" %}
Multi-platform Go binary (Mac, Windows, Linux)
{% endembed %}

{% embed url="<https://github.com/Abbas-Khann/NFTicket/blob/main/.github/workflows/valist.yml>" %}
NFTicket Website deployment
{% endembed %}

{% hint style="success" %}
Want to add your example to these docs? Please feel free to open a PR or contact us at <hello@valist.io> 😄
{% endhint %}

The Valist Action is built to be modular, and compatible with your existing pipeline. There are many ways to configure it! Take a look at the following pages for more examples of how to use it:

{% content-ref url="/pages/e2OZUFDpYTd1gFCPfteA" %}
[Publishing Web Apps](/publishing/publishing-web-apps)
{% endcontent-ref %}

{% content-ref url="/pages/nVRuVie4k58vpMzUivYF" %}
[Publishing Binaries & Executables](/publishing/publishing-binaries-and-executables)
{% endcontent-ref %}


# Publishing Web Apps

Valist makes it effortless to publish your static web app. The platform is compatible with any web framework that generates static sites, including popular choices such as Next.js, Create React App, G

Publishing a static web app with Valist is easy!

No matter what web framework you're using, whether it's Next.js, Create React App, Gatsby or any other, Valist has got you covered. It supports all frameworks that can generate static sites, making the process simple and easy for you.

### **Deploy Next JS Application**

{% content-ref url="/pages/3Gas1IhcoWzc7k1v4Nbj" %}
[Publishing a Next JS App](/publishing/publishing-web-apps/publishing-a-next-js-app)
{% endcontent-ref %}

### Deploy React JS Application

{% content-ref url="/pages/AE0DT8hG2LSMJlhwlQoB" %}
[Publishing a React JS App](/publishing/publishing-web-apps/publishing-a-react-js-app)
{% endcontent-ref %}

Please note that IPFS gateways that don't use subdomains are not secure for accessing web applications due to sharing the same origin.

IPFS Gateways support either or both of the following formats:

1. Subdomain gateway mode: e.g. `https://<CID>.ipfs.dweb.link/`
2. Path gateway mode: e.g. `https://ipfs.io/ipfs/<CID>/`

You only want to access web apps from IPFS via the first type of gateway. This is because the browser will treat the subdomain as a different "origin" and therefore treat local storage and other security policies in a way that prevents other websites from interfering with your app.

More information can be found here:

{% embed url="<https://consensys.net/diligence/blog/2021/06/ipfs-gateway-security/>" %}

### Example Projects

We also have examples of common JavaScript frameworks like Next.js and Create React App, check them out below!

{% embed url="<https://github.com/valist-io/example-projects/tree/main/nextjs-project>" %}
Next.js App
{% endembed %}

{% embed url="<https://github.com/valist-io/example-projects/tree/main/react-project>" %}
Create React App
{% endembed %}


# Publishing a Next JS App

Valist offers a different options for uploading your Next JS application, making deployment a breeze. The following steps will guide you through the process seamlessly.

### Step 1: Build your project statically

*You'll first need to run `next export` to create an `out` folder instead of the normal `_next` folder that is served.*

Make sure you have created a Next JS project:

```bash
npx create-next-app
```

First, you will need to add `next export` to your `package.json`:

```json
"scripts": {
    "dev": "next dev",
    "build": "next build",
    "export": "next export",
    "start": "next start",
    "lint": "next lint"
 },
```

This can be done by copying and adding `"export": "next export",` line under the `build` script.

*Unfortunately, Next.js server-side features like image optimization and API routes are not supported in static build environments. If you are using `next/image` for your images, you will need to add an `images` property to the `nextConfig` object in your `next.config.js` file. The value of `image` should be an object having a property called `unoptimized` set to `true`. For example:*

{% code title="next.config.js" %}

```javascript
const nextConfig={

...

images: {
      unoptimized: true,
},

...

}
```

{% endcode %}

*Otherwise, you will see an error like the following:*

{% hint style="warning" %}

```bash
Error: Image Optimization using Next.js' default loader is not compatible with `next export`.
  Possible solutions:
    - Use `next start` to run a server, which includes the Image Optimization API.
    - Configure `images.unoptimized = true` in `next.config.js` to disable the Image Optimization API.
  Read more: https://nextjs.org/docs/messages/export-image-api
```

{% endhint %}

**You can still communicate with existing HTTP backends via the static frontend!**

Then, build and run the app by running the following:

```bash
npm run build
npm run export
```

This will then create a folder named `out` in the project directory. Feel free to add the `build` script to the beginning of the `export` script for more convenience!

**You can now upload this to Valist directly**, *you're all set!*

### Step 2: Publishing a Release

Now that you've built your application, you have 3 different options for publishing depending on your preferences!

{% tabs %}
{% tab title="Web Dashboard" %}
To publish a Release with the web dashboard, make sure your `Project Type` is set to `web` in the settings, then click `New Release` on your project page.

This will show a simple upload form:

<figure><img src="/files/6Hga3MYnfacvtNtDONX6" alt=""><figcaption></figcaption></figure>

* The `Release Image` allows you to attach an image to the release.
* The `Release Name` works the same way as the `account` and `project` names -- it is an immutable tag that represents the version of the release and is accessible at the `account/project/release` the path once published.
* The `Display Name` is simply a human-readable name as an alternative to the immutable tag.
* The `Description` is a Markdown-compatible description for the release.

The next tab allows you to drag and drop or click to upload a folder. Here is where you will drag your `out` folder:

<figure><img src="/files/JUvzRvN1zTdaUEUTWlL6" alt=""><figcaption></figcaption></figure>

After clicking `Create`, you will be prompted to sign a message for the release! 🚀
{% endtab %}

{% tab title="CLI" %}
**Note: First, you'll need to install and set up your Valist CLI by configuring the key it uses to publish.** If you haven't done this yet, visit the CLI quick start (it will take less than 5 min):

{% content-ref url="/pages/Zq0XdKZCPvKtxjZPf0Km" %}
[CLI](/quick-start/cli)
{% endcontent-ref %}

Publishing a web app with the Valist CLI is easy, simply run the following:

```bash
valist publish account_name/project_name/release_name out
```

Replace the variables with your Valist Account & Project names, and giving your release a `release_name` or tag. The `release_name` works the same way as the `account` and `project` names -- it is an immutable tag that represents the version of the release, and is accessible at the `account/project/release` path once published.

Replace `out` with the path, you wish to publish.

An example publish looks like:

```bash
valist publish acme-co/next-project/0.0.1 out
```

This will upload the files to IPFS and create a meta-transaction, publishing your release at the designated version:

<figure><img src="/files/v2GehYyySO04r57Jum1F" alt=""><figcaption></figcaption></figure>

That's it! The CLI will print a few different ways to access your application, like below:

```bash
confirming transaction 0x08279fa71dc9482b55c6b638218712e34e4892f1b4f2df7bfc607f7ac2881ec1... done
successfully published acme-co/next-project/0.0.1!
view the release at:
    https://app.valist.io/acme-co/next-project/0.0.1
    https://gateway.valist.io/ipfs/bafybeigdq74jk5523p5tdhqqq5bydthewlra5klk2guot2pj3fgbx5eakm
    ipfs://bafybeigdq74jk5523p5tdhqqq5bydthewlra5klk2guot2pj3fgbx5eakm
```

Now you can celebrate knowing your app is available on web3! 🚀

**Optional: Publishing with a valist.yml file**

The Valist CLI also reads a `valist.yml` file to configure the publishing.

This is typically used to configure multi-platform releases (Mac/Windows/Linux/Android), but you can also use it for web projects.

An example for a web app looks like the following:

{% code title="valist.yml" %}

```yaml
account: acme-co
project: next-project
release: 0.0.1
path: out
```

{% endcode %}

Once the `valist.yml` file is saved, simply run:

```bash
valist publish
```

It will use these values instead of the CLI arguments, making it an easy way to keep track of the previous release!
{% endtab %}

{% tab title="GitHub Action" %}
**Note: For more information about how the GitHub Action works, visit the following page. If you're familiar with the CLI, configuring the GitHub Action is very similar:**

{% content-ref url="/pages/41TwQhKnLGVND3DirLGM" %}
[GitHub Action](/quick-start/github-action)
{% endcontent-ref %}

Building and publishing a web app with the Valist GitHub Action is easy!

You simply need:

* Add the Valist Publish step to the end of your app's build process
* Add a Repository Secret called `VALIST_SIGNER` that contains a fresh private key that has access to the Valist Project you're publishing to. For more information, visit the [GitHub Action page](/quick-start/github-action).

Create a `.github/workflows/valist.yml` file like the following:

{% code title="valist.yml" %}

```yaml
name: Valist Publish
on:
  push:
    branches:
      - main
jobs:
  valist-publish:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Setup Node
        uses: actions/setup-node@v3
        with:
          node-version: '16'

      - name: Build and export Next.js app
        run: |
          npm install
          npm run build
          npm run export

      - run: echo "TIMESTAMP=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV

      - name: Valist Publish
        uses: valist-io/valist-github-action@v2.5.6
        with:
          private-key: ${{ secrets.VALIST_SIGNER }}
          account: acme-co
          project: next-project
          release: github-action-${{ env.TIMESTAMP }}
          path: build

```

{% endcode %}

In this example, the Valist Publish step contains:

* The `private-key` of the address that has access to this Valist Project.
* The Valist `account` name.
* The Valist `project` name.
* The Valist `release` name. This works the same way as the `account` and `project` names -- it is an immutable tag that represents the version of the release, and is accessible at the `account/project/release` path once published.
* The `path` of the folder you wish to publish. In this example, it's the static Next.js output folder.

**Live Example**

A working example can be found here:

{% embed url="<https://github.com/valist-io/example-projects/blob/main/.github/workflows/nextjs-project.yml>" %}
Publish Next.js app with the Valist GHA
{% endembed %}

{% embed url="<https://github.com/valist-io/example-projects/runs/8144882618?check_suite_focus=true>" %}
Successful Workflow run
{% endembed %}

Congratulations! You now have your web app building and publishing automatically to web3! 🚀
{% endtab %}
{% endtabs %}

That's all you need to publish web apps with Valist!

After publishing, your application will be highly available via IPFS, using links like the following:

<https://bafybeihpv3piaiybqgqcvqmgpq3dkjz55czkndkjdqjpskagml3fnczih4.ipfs.gateway.valist.io/>

You can access this IPFS hash from anywhere on the IPFS network including your own node, and from common gateways like IPFS.io, dweb.link, and Cloudflare:

<http://bafybeihpv3piaiybqgqcvqmgpq3dkjz55czkndkjdqjpskagml3fnczih4.ipfs.dweb.link/>

Please note that IPFS gateways that don't use subdomains are not secure for accessing web applications due to sharing the same origin.

IPFS Gateways support either or both of the following formats:

1. Subdomain gateway mode: e.g. `https://<CID>.ipfs.dweb.link/`
2. Path gateway mode: e.g. `https://ipfs.io/ipfs/<CID>/`

You only want to access web apps from IPFS via the first type of gateway. This is because the browser will treat the subdomain as a different "origin" and therefore treat local storage and other security policies in a way that prevents other websites from interfering with your app.


# Publishing a React JS App

Valist simplifies the process of uploading your React JS application with various options available. The step-by-step guide provided will ensure a smooth and effortless deployment.

### Step 1: Build your project statically

*In most cases, you won't have to modify anything about your React build!*

For tools like Create React App, you can simply run a normal build and upload your `build` folder.

Make sure you have created a React app:

```bash
npx create-react-app react-project
```

Then, inside this folder, you can simply run:

```bash
npm run build
```

This will create your `build` folder.

**You can upload this to Valist directly**, you're all set!

### Step 2: Publishing a Release

Now that you've built your application, you have 3 different options for publishing depending on your preferences!

{% tabs %}
{% tab title="Web Dashboard" %}
To publish a Release with the web dashboard, make sure your `Project Type` is set to `web` in the settings, then click `New Release` on your project page.

This will show a simple upload form:

<figure><img src="/files/6Hga3MYnfacvtNtDONX6" alt=""><figcaption></figcaption></figure>

* The `Release Image` allows you to attach an image to the release.
* The `Release Name` works the same way as the `account` and `project` names -- it is an immutable tag that represents the version of the release and is accessible at the `account/project/release` the path once published.
* The `Display Name` is simply a human-readable name as an alternative to the immutable tag.
* The `Description` is a Markdown-compatible description for the release.

The next tab allows you to drag and drop or click to upload a folder. Here is where you will drag your `build` folder:

<figure><img src="/files/JUvzRvN1zTdaUEUTWlL6" alt=""><figcaption></figcaption></figure>

After clicking `Create`, you will be prompted to sign a message for the release! 🚀
{% endtab %}

{% tab title="CLI" %}
**Note: First, you'll need to install and set up your Valist CLI by configuring its publish key.** If you haven't done this yet, visit the CLI quick start (it will take less than 5 min):

{% content-ref url="/pages/Zq0XdKZCPvKtxjZPf0Km" %}
[CLI](/quick-start/cli)
{% endcontent-ref %}

Publishing a web app with the Valist CLI is easy, simply run the following:

```bash
valist publish account_name/project_name/release_name build
```

Replace the variables with your Valist Account & Project names, and give your release a `release_name` or tag. The `release_name` works the same way as the `account` and `project` names -- it is an immutable tag that represents the version of the release, and is accessible at the `account/project/release` the path once published.

Replace `out` with the path, you wish to publish.

An example publish looks like:

```bash
valist publish acme-co/next-project/0.0.1 build
```

This will upload the files to IPFS and create a meta-transaction, publishing your release at the designated version:

<figure><img src="/files/v2GehYyySO04r57Jum1F" alt=""><figcaption></figcaption></figure>

That's it! The CLI will print a few different ways to access your application, like below:

```bash
confirming transaction 0x08279fa71dc9482b55c6b638218712e34e4892f1b4f2df7bfc607f7ac2881ec1... done
successfully published acme-co/next-project/0.0.1!
view the release at:
    https://app.valist.io/acme-co/next-project/0.0.1
    https://gateway.valist.io/ipfs/bafybeigdq74jk5523p5tdhqqq5bydthewlra5klk2guot2pj3fgbx5eakm
    ipfs://bafybeigdq74jk5523p5tdhqqq5bydthewlra5klk2guot2pj3fgbx5eakm
```

Now you can celebrate knowing your app is available on web3! 🚀

**Optional: Publishing with a valist.yml file**

The Valist CLI also reads a `valist.yml` file to configure the publishing.

This is typically used to configure multi-platform releases (Mac/Windows/Linux/Android), but you can also use it for web projects.

An example of a web app looks like the following:

{% code title="valist.yml" %}

```yaml
account: acme-co
project: next-project
release: 0.0.1
path: build
```

{% endcode %}

Once the `valist.yml` file is saved, simply run:

```bash
valist publish
```

It will use these values instead of the CLI arguments, making it an easy way to keep track of the previous release!
{% endtab %}

{% tab title="GitHub Action" %}
**Note: For more information about how the GitHub Action works, visit the following page. If you're familiar with the CLI, configuring the GitHub Action is very similar:**

{% content-ref url="/pages/41TwQhKnLGVND3DirLGM" %}
[GitHub Action](/quick-start/github-action)
{% endcontent-ref %}

Building and publishing a web app with the Valist GitHub Action is easy!

You simply need:

* Add the Valist Publish step to the end of your app's build process
* Add a Repository Secret called `VALIST_SIGNER` that contains a fresh private key that has access to the Valist Project you're publishing to. For more information, visit the [GitHub Action page](/quick-start/github-action).

Create a `.github/workflows/valist.yml` file like the following:

{% code title="valist.yml" %}

```yaml
name: Valist Publish
on:
  push:
    branches:
      - main
jobs:
  valist-publish:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Setup Node
        uses: actions/setup-node@v3
        with:
          node-version: '16'

      - name: Build and export Next.js app
        run: |
          npm install
          npm run build
          npm run export

      - run: echo "TIMESTAMP=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV

      - name: Valist Publish
        uses: valist-io/valist-github-action@v2.5.6
        with:
          private-key: ${{ secrets.VALIST_SIGNER }}
          account: acme-co
          project: next-project
          release: github-action-${{ env.TIMESTAMP }}
          path: build

```

{% endcode %}

In this example, the Valist Publish step contains:

* The `private-key` of the address that has access to this Valist Project.
* The Valist `account` name.
* The Valist `project` name.
* The Valist `release` name. This works the same way as the `account` and `project` names -- it is an immutable tag that represents the version of the release, and is accessible at the `account/project/release` path once published.
* The `path` of the folder you wish to publish. In this example, it's the static Next.js output folder.

**Live Example**

A working example can be found here:

{% embed url="<https://github.com/valist-io/example-projects/blob/main/.github/workflows/nextjs-project.yml>" %}
Publish Next.js app with the Valist GHA
{% endembed %}

{% embed url="<https://github.com/valist-io/example-projects/runs/8144882618?check_suite_focus=true>" %}
Successful Workflow run
{% endembed %}

Congratulations! You now have your web app building and publishing automatically to web3! 🚀
{% endtab %}
{% endtabs %}

That's all you need to publish web apps with Valist!

After publishing, your application will be highly available via IPFS, using links like the following:

<https://bafybeihpv3piaiybqgqcvqmgpq3dkjz55czkndkjdqjpskagml3fnczih4.ipfs.gateway.valist.io/>

You can access this IPFS hash from anywhere on the IPFS network including your own node, and from common gateways like IPFS.io, dweb.link, and Cloudflare:

<http://bafybeihpv3piaiybqgqcvqmgpq3dkjz55czkndkjdqjpskagml3fnczih4.ipfs.dweb.link/>

Please note that IPFS gateways that don't use subdomains are not secure for accessing web applications due to sharing the exact origin.

IPFS Gateways support either or both of the following formats:

1. Subdomain gateway mode: e.g. `https://<CID>.ipfs.dweb.link/`
2. Path gateway mode: e.g. `https://ipfs.io/ipfs/<CID>/`

You only want to access web apps from IPFS via the first type of gateway. This is because the browser will treat the subdomain as a different "origin" and therefore treat local storage and other security policies in a way that prevents other websites from interfering with your app.


# Publishing Unity Projects

Publishing a Unity Project with Valist is super easy!

Publishing a Unity Project with Valist is super easy -- you have multiple options, depending on whether you are building for WebGL, or a native Windows, Mac, or Linux executable.

### Step 1: Setting your Project Type to "web" or "native"

The first thing you'll need to do is configure your Valist Project Type.

* `web` is for projects built and distributed via WebGL
* `native` is for projects built to native executables for platforms like Windows, Mac, or Linux.

You can set this in your Project Settings by visiting your project, and clicking the `Settings` icon:

<figure><img src="/files/5pzdZr7urMVRfhMLZLfm" alt=""><figcaption></figcaption></figure>

This will take you to your Project Details, where you can configure the Project Type:

<figure><img src="/files/VChgGK8G2SisHUUjLyvG" alt=""><figcaption></figcaption></figure>

Setting this to `web` will tell Valist to open this in browsers or WebViews, and will show a regular folder uploader on the Web Dashboard Publishing page.

Setting this to `native` or `cli` will tell Valist to change the upload form to include multiple platforms (Mac, Windows, Linux), so that you can specify which binary corresponds to each platform during publish.

For more information, check out "How Native App Publishing" in Valist works:

{% content-ref url="/pages/nVRuVie4k58vpMzUivYF" %}
[Publishing Binaries & Executables](/publishing/publishing-binaries-and-executables)
{% endcontent-ref %}

### Step 2: Building your project

Building your Unity project works the same as you would normally!

However, something to consider if you are using WebGL is that most IPFS gateways do not support Gzip compression -- the default Unity settings.

The Valist IPFS Gateways \*do\* support Gzip, since it returns the proper headers, but keep this in mind if you plan on accessing this from other IPFS gateways. As a fallback, you can disable compression, but this is only recommended as a last resort.

### Step 3: Publishing your project

From here, all you need to do is publish your project! The flows from here are largely the same as any other Valist project.

If you're using the Valist Web Dashboard, it's a simple drag and drop. The Valist CLI is also super easy to configure and publish with!

Depending on your Project Type, you will have slightly different publishing flows.

#### WebGL Projects:

For `web` projects, follow from Step 2 of the following page:

{% content-ref url="/pages/e2OZUFDpYTd1gFCPfteA" %}
[Publishing Web Apps](/publishing/publishing-web-apps)
{% endcontent-ref %}

#### Native Projects:

For `native` projects, follow from Step 2 of the following page:

{% content-ref url="/pages/nVRuVie4k58vpMzUivYF" %}
[Publishing Binaries & Executables](/publishing/publishing-binaries-and-executables)
{% endcontent-ref %}

That's all you need to publish a Unity project with Valist and distribute it to the world! 🚀

#### Live Examples:

* [MintWorld](https://app.valist.io/mintworld/mintworld) - 2D Monster Catcher RPG built with Unity & ChainSafe SDK


# Publishing using CI/CD

Valist simplifies the publishing and configuring of your applications. Enjoy automated deployments, CI, and source control in no time.

**Go to your project page and select the deployments tab by clicking the 🚀 button.**&#x20;

### Step 1: Connect your repository

To get started, link your GitHub repository to the project you created. You can choose which branch you prefer (either `main` or `master`). This will provide Github with a developer keypair, granting it access to your Valist project.

Here's the flow that will happen:

1. The browser will securely generate a fresh, unique `Ethereum key` for your project.
2. The `public key` address will be added to the Valist Project, and the `private key` will be stored in the chosen GitHub repository as a confidential secret labeled **VALIST\_SIGNER**.

This gives the GitHub Action access to your Valist project without compromising on security!

<figure><img src="/files/XUwAm2glix7VhydKACXc" alt=""><figcaption></figcaption></figure>

### Step 2: Configuring your builds

> **Important**: The next step is a crucial one.&#x20;

It is essential to ensure that you have configured your builds accurately. Double-check that the environment and framework you are using match your localhost environment. This will help ensure everything runs smoothly and is properly set up.&#x20;

Additionally, you should take the time to test your build configurations before deploying them. This will help ensure that the end product meets the requirements.

<figure><img src="/files/Crr86GabsR8hsTbjo65n" alt=""><figcaption></figcaption></figure>

### Step 3: Choose where to publish

After you've successfully configured your build, choose a platform where you want your project to be deployed.

*Valist will soon give you the option to select from various platforms to publish your application.*

<figure><img src="/files/KzAoopw9yHImWuklAy98" alt=""><figcaption></figcaption></figure>

### Step 4: Add Integrations

Valist offers additional integrations, such as Twitter and Discord, to enhance your experience.

<figure><img src="/files/8Nc4lfmfwm1p8GYlk84f" alt=""><figcaption></figcaption></figure>

### Step 5: Deploy now! 🚀

Once you have completed the steps above, hit the `Deploy` button. A transaction will pop up that you need to sign, *but don't worry - you won't be spending any gas fees.*

<figure><img src="/files/FxdoUQ95UbBlFmRfEfWV" alt=""><figcaption></figcaption></figure>

### Step 6: Merge the PR!

Once the transaction is processed, a Pull Request will be generated for your connected GitHub repository. A prompt will appear on your screen, which will direct you to the Pull Requests page.&#x20;

Merge the Pull Request and wait for Valist's Github Action to build your code.

<figure><img src="/files/ewno0h7lOGkpcVGPmNQi" alt=""><figcaption></figcaption></figure>

*That's it! 🚀* &#x20;

That's how easily you can create a full CI/CD pipeline to publish your applications on Valist. You can now access your releases from anywhere in the Valist ecosystem, and from IPFS directly!


# Publishing Binaries & Executables

Publishing executable binaries is super easy with Valist. Learn how to use publish with the web dashboard, CLI, or GitHub Action!

Publishing executable binaries is super easy with Valist!

{% hint style="info" %}
Note: currently, only statically linked binaries are supported, since Valist does not have a built-in dependency manager yet.
{% endhint %}

### How native app publishing in Valist works

While standard releases are usually a simple folder upload, in order to get Valist to interpret the platform you are building for, you will need to tell it how to describe your Release.

This is accomplished by:

* Setting your `Project Type` to `native` or `cli` in your Project Settings. This will signal to the Web Dashboard and other tooling to display a different upload form fit for your use-case.
* Specifying which binaries belong to their designated platforms during the Release. This can be done from the simple Web Dashboard upload form by clicking the correct platform, or by configuring the `install` field if using the CLI or GitHub Action

Each Release includes metadata that maps the platform/architecture to the corresponding binary.

{% hint style="info" %}
The following platform/architecture combinations are supported:

* darwin\_amd64
* darwin\_arm64
* linux\_amd64
* linux\_arm64
* windows\_amd64
  {% endhint %}

### Step 1: Setting your Project Type to "native" or "cli"

First, you will need to set your Project Type to `native` or `cli` to tell the rest of the Valist tooling to treat this project as a native, non-web application.

{% hint style="info" %}
**Note:** the `cli` type is essentially the same as `native`, but exists to specify whether or not the native app has a GUI.&#x20;
{% endhint %}

Navigate to your Project Settings, and in the Project Details section, set the `Project Type` to either `native` or `cli`:

<figure><img src="/files/zLji513rZ1YpcLSz4N5D" alt=""><figcaption></figcaption></figure>

Awesome! Now, any Releases moving forward will show a different upload form with specific binaries available. Each Release is independently configured, so you can rest assured knowing that changing this later will not break old Releases. This is simply a hint to the tooling to treat upcoming Releases as a certain type.

### Step 2: Publishing a native Release

{% tabs %}
{% tab title="Web Dashboard" %}
Navigate to your project, then click the `New Release` button.

<figure><img src="/files/obaxPqlZWRB69RId5CHC" alt=""><figcaption></figcaption></figure>

The form will ask you for a Release Name, a Display Name, and Description. You can also add an image to the release.

The `name` field works the same way as the `account` and `project` names -- it is an immutable tag that represents the version of the release, and is accessible at the `account/project/release` path once published.

<figure><img src="/files/mD5qoCkKQrLUHHIta9G6" alt=""><figcaption></figcaption></figure>

Next, you will see a list of file upload buttons corresponding to the supported platform/architecture combinations. Choose one or more of your binaries for the right platform, and click `Create`.

This will fire off a transaction, and successfully publish your release!

Congratulations, you've now published your binaries in a web3-native way! 🚀 Time to pat yourself on the back and share your work with the world!
{% endtab %}

{% tab title="CLI" %}
**Note: First, you'll need to install and setup your Valist CLI by configuring the key it uses to publish.** If you haven't done this yet, visit the CLI quick start (it will take less than 5 min):

{% content-ref url="/pages/Zq0XdKZCPvKtxjZPf0Km" %}
[CLI](/quick-start/cli)
{% endcontent-ref %}

#### Step 2a: Creating a valist.yml file

Once you've installed and configured your key, you will need to create a `valist.yml` file:

{% code title="valist.yml" %}

```yaml
account: acme-co
project: multi-platform
release: 0.1.5 # update this for every release
path: dist
install:
  name: hello-go
  darwin_amd64: hello-darwin-amd64
  darwin_arm64: hello-darwin-arm64
  linux_amd64: hello-linux-amd64
  windows_amd64: hello-windows-amd64
```

{% endcode %}

* Simply replace the `account` with your Valist Account name
* Replace the `project` with your Valist Project name
* Replace the `release` with the immutable version/tag you wish to use.
  * The `release` field works the same way as the `account` and `project` names -- it is an immutable tag that represents the version of the release, and is accessible at the `account/project/release` path once published.
* The `path` field indicates the folder to upload. All of the files within will be uploaded, so make sure no private information is included!
* The `install` field acts as a map between the platform/architecture and the designated binary. The `name` field is the name of the binary will be given post-installation.

You can map each supported platform within the `install` field by specifying the platform/architecture along with the path to the binary from within your release directory.

In this example, the `darwin_amd64` version of the `hello-go` binary will be uploaded from the `dist/hello-darwin-amd64` path:

```yaml
path: dist
install:
  name: hello-go
  darwin_amd64: hello-darwin-amd64
```

{% hint style="info" %}
The following platform/architecture combinations are supported:

* darwin\_amd64
* darwin\_arm64
* linux\_amd64
* linux\_arm64
* windows\_amd64
  {% endhint %}

#### Step 3: Publishing the Release!

Once you've configured the release, simply run the following command:

```bash
valist publish
```

Boom! 🚀 You're all finished! You should see a successful release prompt like the following:

<figure><img src="/files/bTq0fQtGF4p8NkVEEeFU" alt=""><figcaption><p>A successful Valist Release</p></figcaption></figure>

You can now access this from anywhere in the Valist ecosystem, and from IPFS directly!

Congratulations, you've now published your binaries in a web3-native way! 🚀 Time to pat yourself on the back and share your work with the world!
{% endtab %}

{% tab title="GitHub Action" %}
**Note: For more information about how the GitHub Action works, visit the following page. If you're familiar with the CLI, configuring the GitHub Action is very similar:**

{% content-ref url="/pages/41TwQhKnLGVND3DirLGM" %}
[GitHub Action](/quick-start/github-action)
{% endcontent-ref %}

#### Step 2a: Creating the valist.yml workflow file

First, you'll need to create a `valist.yml` file inside of the `.github/workflows` folder in your project.

Alternatively, you can add only the necessary Valist GitHub Action code to your existing workflow files.

An example workflow file for a multi-platform build looks like the following:

```yaml
name: Valist Publish
on:
  push:
    branches:
      - main
jobs:
  valist-publish:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Setup Go
        uses: actions/setup-go@v3
        with:
          go-version: '^1.13.1'

      - name: Build multi-platform Go binary
        run: |
          cd multi-platform-project
          make

      - run: echo "TIMESTAMP=$(date +%Y%m%d%H%M)" >> $GITHUB_ENV

      - name: Valist Publish
        uses: valist-io/valist-github-action@v2.5.6
        with:
          private-key: ${{ secrets.VALIST_SIGNER }}
          account: acme-co
          project: multi-platform
          release: github-action-${{ env.TIMESTAMP }}
          path: multi-platform-project/dist

          # configures installer support for mac, linux, and windows
          install-name: hello-go
          install-darwin-amd64: hello-darwin-amd64
          install-darwin-arm64: hello-darwin-arm64
          install-linux-amd64: hello-linux-amd64
          install-windows-amd64: hello-windows-amd64
```

In this example, the following fields are configured:

* The `private-key` uses a GitHub repository secret, containing a key that has access to the Valist Project.
* The `account` is the Valist Account name.
* The `project` is the Valist Project name.
* The `release` field works the same way as the `account` and `project` names -- it is an immutable tag that represents the version of the release, and is accessible at the `account/project/release` path once published.
* The `path` field indicates the folder to upload. All of the files within will be uploaded, so make sure no private information is included!

The `install-*` fields act as a map between the platform/architecture and the designated binary. The `install-name` field is the name of the binary will be given post-installation.

This will map each binary to its designated platform, enabling the Valist tooling to install the correct version on the correct platforms.

In this example, the `darwin_amd64` version of the `hello-go` binary will be uploaded from the `multi-platform-project/dist/hello-darwin-amd64` path:

```yaml
path: multi-platform-project/dist
install-name: hello-go
install-darwin-amd64: hello-darwin-amd64
```

{% hint style="info" %}
The following platform/architecture combinations are supported:

* install-darwin-amd64
* install-darwin-arm64
* install-linux-amd64
* install-linux-arm64
* install-windows-amd64
  {% endhint %}

Once you've configured the release, the Valist GitHub Action will publish the binaries, and configure the platforms as specified! 🚀

A successful workflow run will look something like this:

<figure><img src="/files/gUJAAn7bmrBFWCTggx1p" alt=""><figcaption></figcaption></figure>

A live example can be found here:

{% embed url="<https://github.com/valist-io/example-projects/blob/main/.github/workflows/multi-platform.yml>" %}
Multi-platform Go binary publish via the Valist GitHub Action
{% endembed %}

{% embed url="<https://app.valist.io/acme-co/multi-platform>" %}
Valist Multi-platform project
{% endembed %}

Congratulations, you've now published your binaries in a web3-native way! 🚀 Time to pat yourself on the back and share your work with the world!
{% endtab %}
{% endtabs %}

An example multi-platform project can be found here:

{% embed url="<https://github.com/valist-io/example-projects/tree/main/multi-platform-project>" %}
Multi-platform Go project
{% endembed %}

This contains both a [CLI](https://github.com/valist-io/example-projects/blob/main/multi-platform-project/valist.yml) example, as well as a GitHub Action [workflow](https://github.com/valist-io/example-projects/blob/main/.github/workflows/multi-platform.yml) example!

{% hint style="success" %}
Want to add your example to these docs? Please feel free to open a PR or contact us at <hello@valist.io> 😄
{% endhint %}


# Intro to Software License NFTs

{% hint style="info" %}
Hey there! Software License NFTs are a new and flexible primitive. We'd love your feedback on different ways Valist can improve the implementation, come share your thoughts in our Discord! <https://valist.io/discord>
{% endhint %}

{% embed url="<https://youtu.be/_RqN0eeGQUQ>" %}

Valist helps developers monetize their projects, essentially making them products. The Valist SDK helps facilitate the price, royalties, supply, limit and NFT for products.&#x20;

A project on Valist can be wrapped into an NFT and monetized. Owning a product's NFT means owning the product's license. At the moment, a project can support a single product. To release different editions, you will need to create different projects and configure their prices separately. This is beneficial to separate the token-gated content and payment configurations between the products.&#x20;

Products support the following configurations:

* Payment in MATIC and any ERC-20 token on the Polygon network
* Setting supply limits for the product. This is great for special editions/releases.
* Built-in Royalties to monetize secondary item sales.

You can use Valist to create a Software License NFT that enables you to directly monetize your game or software fairly.

The Software License NFT is an ERC1155 token that you can use as a token-gate, or in-app/game purchase.

Valist will facilitate creating the NFT contract, including setting a price, metadata, etc.

You can then embed a license check into your app/game by using the Valist SDK, or any other ERC1155-compatible token SDK or API. You can also directly call the contract yourself!

The Valist SDK also makes it easy to query balances, purchasing/minting Licenses, and fetching License metadata.

There is a 2.5% protocol fee to support the Valist project. There will be a 2.5% community contribution fee introduced to support public goods funding, as well as community funding for projects published on Valist. This will be controlled by the Valist community members with sufficient on-chain reputation (i.e., use of the protocol, past public goods funding history, etc).

{% hint style="info" %}
For reference, the SoftwareLicense contract is deployed at the following addresses:<br>

Polygon Mainnet: `0x3cE643dc61bb40bB0557316539f4A93016051b81`\
Polygon Mumbai: `0x3cE643dc61bb40bB0557316539f4A93016051b81`
{% endhint %}

{% hint style="info" %}
You can view the smart contract implementation [here](https://github.com/valist-io/valist-contracts).
{% endhint %}

After creating a License, you can gate your software with it! Click next to learn how to create and configure a Software License NFT in your project 🚀


# Configuring Pricing for your Products

The Valist Web Dashboard gives you an easy way to configure Software License NFTs, set pricing, supply limits, and more.

{% hint style="success" %}
The Pricing & Product features are evolving quickly! Expect frequent feature enhancements and interface changes 🚀
{% endhint %}

To configure your Software License NFT products, navigate to your Valist Project and click on the `Pricing` button:

<figure><img src="/files/WjODQ8iwg8k6NPyJJcMT" alt=""><figcaption></figcaption></figure>

This will take you to a page with 3 sections: `Pricing`, `Royalty`, and `Withdraw`:

<figure><img src="/files/3JEAsBLWAoF11XddJF9w" alt=""><figcaption></figcaption></figure>

### Pricing

The `Pricing` tab has a few different options for you to manage your product.&#x20;

#### Max License Limits

The first option you will see is the `Max License Limit` -- this value allows you to set a max supply for the Software License NFT you're creating. By default, this is `0`, or unlimited.

#### Adding Payment Currencies

By clicking the `Add Currency` button, you will be able to enable various supported ERC20-tokens on the Polygon network.

This list is provided as a convenient, verified list, but custom tokens are also supported! This is especially useful if you have an in-game currency, or protocol token.

<figure><img src="/files/fouQaj7KLEdERBgUED2m" alt=""><figcaption><p>Add ERC20 tokens as payment methods for your Software License NFT</p></figcaption></figure>

Once you add the tokens you wish to accept as payments, you will see them appear in the list:

<figure><img src="/files/HynR88I89FvmZVzbGqBP" alt=""><figcaption><p>Example pricing configured to accept $20 as payment in 3 different USD stablecoins</p></figcaption></figure>

You can then individual set each token price. This will automatically enable these currencies in the Checkout flow!

### Royalties

The `Royalty` tab allows you to configure resale royalty settings for your Product.

<figure><img src="/files/03wdwFcxSLon3rcgP2bv" alt=""><figcaption></figcaption></figure>

Once you configure this, your Software License NFT will comply with the [ERC-2981 Royalty Standard](https://eips.ethereum.org/EIPS/eip-2981) -- so any supported marketplaces like Valist and OpenSea will respect the standard!

{% embed url="<https://eips.ethereum.org/EIPS/eip-2981>" %}

### Withdrawing Funds

The `Withdraw` tab shows your token balances across your accepted payment currencies, and enables you to withdraw a specific amount like so:

<figure><img src="/files/z1CbxcMMxwA12ggOgL5e" alt=""><figcaption></figcaption></figure>

The funds are stored in the Software License NFT contract, and **any Valist Account admin** can trigger this function call, so be mindful who you give access!


# Token-gating Unity Projects

Valist makes it easy to token-gate Unity projects

{% hint style="warning" %}
This page is under re-construction! Stay tuned for updates!
{% endhint %}

Once you've created a License NFT (ERC1155), it's up to you how you'd like to token gate!

The general flow for token gating your software is to:

1. &#x20;Connect to the user's wallet
2. Sign a message to authenticate the user
3. Recover the address from the signature
4. Check the user's License NFT balance
5. Start your application if they have a License token. If they don't, redirect them to your Valist Project page, or enable in-app purchasing of the License.

For Unity games and applications, we recommend:

* [ChainSafe Gaming](https://gaming.chainsafe.io/) SDK (Developer [Docs](https://docs.gaming.chainsafe.io/erc1155))
  * Example [script](https://gist.github.com/nasdf/d8b7fb4e570e563e990c52501bdfdfa7)
* Moralis Unity SDK (Developer [Docs](https://github.com/ethereum-boilerplate/ethereum-unity-boilerplate))

A starter template for ChainSafe Gaming & Valist Software License NFTs can be found here:

{% embed url="<https://github.com/valist-io/valist-chainsafe-gaming-starter>" %}

The following script enables quick signing, you just simply need to attach this to a `Login` object in your Unity game!

{% embed url="<https://gist.github.com/nasdf/d8b7fb4e570e563e990c52501bdfdfa7>" %}
NFTLicense.cs
{% endembed %}

Another example can be found here:

{% embed url="<https://youtu.be/aurYZhPkRQw>" %}


# TypeScript SDK

Documentation for using the TypeScript Valist software development kit.

Welcome to Valist’s TypeScript SDK v2. It helps developers interact with Valist’s Registry smart contracts, protocols like IPFS, The Graph, OpenGSN, and more, in an easy to use interface.&#x20;

### Getting Started

The SDK is written in TypeScript and is meant to simplify interaction with Valist in a Javascript based environment. It is compatible with both Node.js and Browser environments!

#### Overview

The SDK is broken into two components:

1. Client: An exported class used to interact with the contracts and registry to manage projects and accounts.
   * This connects to the Polygon network and corresponding contract addresses, as well as gas-less meta-transactions powered by OpenGSN.
   * This also connects to IPFS, and handles automatic storage functionality when publishing content.
2. Types & interfaces: Exported interfaces for metadata associated with Accounts, Projects and Releases.

Everything is abstracted into a clean interface, and all you need to get started is a Wallet/Web3 Provider! You can also customize the infrastructure (RPC, IPFS, Subgraph, etc) the SDK connects with. By default it uses the valist.io managed infrastructure, but you can swap out every component for your own!

#### Installation

To start using the SDK, simply install it into your project...

```bash
npm install @valist/valist-sdk
```

Then, you can import the `create` function to create a Valist client!

```jsx
import { create } from "@valist/valist-sdk"
```

If there are other functions with the same name (i.e., IPFS client library), you can import it like this instead:

```javascript
import { create as createValist } from "@valist/valist-sdk"
```

Below is an example of creating a Valist Client and fetching some Project and Release metadata:

```javascript
const ethers = require('ethers');
const create = require('@valist/sdk').create;
const Web3HttpProvider = require('web3-providers-http');

async function main() {
  try {
    const web3 = new Web3HttpProvider("https://rpc.valist.io/polygon");
    const privateKey = ethers.Wallet.createRandom();
    const wallet = new ethers.Wallet(privateKey);
    const provider = new ethers.providers.Web3Provider(web3);
    
    const valist = await create(provider, { wallet, metaTx: true });

    const projectID = valist.getProjectID(137, 'acme-co', 'go-binary')
    const releaseID = await valist.getLatestReleaseID(projectID)

    const projectMeta = await valist.getProjectMeta(projectID);
    const latestRelease = await valist.getReleaseMeta(releaseID);

    console.log(projectMeta);
    console.log(latestRelease);
  } catch (err) {
    console.log(err)
  }
}

main()
```

Here's a live example:

{% embed url="<https://replit.com/@AlecWantoch/valist-sdk>" %}

### TypeDoc

To view the TypeDoc for the Valist TypeScript SDK, navigate to the following site:

{% embed url="<https://jsdocs.valist.io/>" %}


# TypeDoc

Auto-generated TypeDoc documentation for the Valist TypeScript SDK.

To view the TypeDoc for the Valist TypeScript SDK, navigate to the following site:

{% embed url="<https://jsdocs.valist.io/>" %}

You will see an interactive site that allows you to explore the SDK's methods, properties, types, and other helpful information to get you started:

### TypeDoc Site

<figure><img src="https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmgEzbOxsu56slAZZ4IbM%2Fuploads%2F0a8BeQAgjC9frs9JWdto%2Fimage.png?alt=media&#x26;token=476fbc06-c450-45f7-b087-c18d0249d671" alt=""><figcaption></figcaption></figure>


# Golang SDK

Documentation for the Valist Golang software development kit.

The Valist SDK has a Golang implementation to support common web3 environments. To view the Godoc, navigate to the link below:

{% embed url="<https://pkg.go.dev/github.com/valist-io/valist-go>" %}

The `Client` reference contains everything you'll need to get started. Another good resource is the Valist client tests, which demonstrate the way the interface is used:

{% embed url="<https://github.com/valist-io/valist-go/blob/main/client/client_test.go>" %}


# Smart Contracts

List of deployed Valist contracts with addresses, and how to interact with them directly.

Below is the source for the Valist contracts:

{% embed url="<https://github.com/valist-io/valist-contracts>" %}
Smart contract source code
{% endembed %}

Below is a list of Valist contracts, and the current addresses for each network:

### Valist Contract Deployments

| Contract              | Network          | Address                                      |
| --------------------- | ---------------- | -------------------------------------------- |
| Valist Registry       | Polygon & Mumbai | `0xD504d012D78B81fA27288628f3fC89B0e2f56e24` |
| Software License NFTs | Polygon & Mumbai | `0x3cE643dc61bb40bB0557316539f4A93016051b81` |
| OpenGSN Paymaster     | Polygon & Mumbai | `0x137F8009fc7795dD8a004fdb38852F54368194e8` |

### PolygonScan

To interact with the Valist Registry via PolygonScan, click below:

{% embed url="<https://polygonscan.com/address/0xD504d012D78B81fA27288628f3fC89B0e2f56e24#code>" %}


# Subgraph

The Valist Subgraph indexes multiple Valist contracts and consolidates it into a simple GraphQL interface.

### Polygon Mainnet

You can find the deployed Polygon Mainnet subgraph here:

{% embed url="<https://thegraph.com/hosted-service/subgraph/valist-io/valist>" %}
Polygon Mainnet Hosted Subgraph
{% endembed %}

HTTP Endpoint: [https://api.thegraph.com/subgraphs/name/valist-io/valist](<https://api.thegraph.com/subgraphs/name/valist-io/valist&#xA;>)

### Polygon Mumbai

You can find the deployed Polygon Mumbai subgraph here:

{% embed url="<https://thegraph.com/hosted-service/subgraph/valist-io/valistmumbai>" %}

HTTP Endpoint: [https://api.thegraph.com/subgraphs/name/valist-io/valistmumbai](<https://api.thegraph.com/subgraphs/name/valist-io/valistmumbai&#xA;>)

### Self-hosted

The source code for the Valist Subgraph can be found here, which contains everything you need to get started:

{% embed url="<https://github.com/valist-io/valist-subgraph>" %}

For this, you will need to deploy your own graph node. Here's a docker-compose file that can help get you started -- however please note **this is not secure out of the box, you will need to configure your database and networking/firewall properly.**

{% embed url="<https://gist.github.com/awantoch/decee0e9117a0dd0bc4c54535cc04e1e#file-docker-compose-yml>" %}


# Gas Tank

The Valist OpenGSN Gas Tank is what powers the metatransaction system. Here you can find a convenient web app to view the current balance and easily fund the tank.

The Valist OpenGSN Gas Tank is what powers the meta-transaction system. Here you can find a convenient web app to view the current balance and easily fund the tank.

To view the current balance, click the app below:

{% embed url="<https://gastank.valist.io/>" %}

You can also deposit MATIC directly into the Valist Paymaster contract.

Paymaster address: `0x137F8009fc7795dD8a004fdb38852F54368194e8`

{% embed url="<https://polygonscan.com/address/0x137F8009fc7795dD8a004fdb38852F54368194e8>" %}


