Examples

As inspiration, we provide several simple examples in different programming languages to interact with Walrus through the various interfaces. They are located at https://github.com/MystenLabs/walrus-docs/tree/main/examples and described below.

In addition, we have built actual applications on top of Walrus. The prime example is Walrus Sites, with code available in the https://github.com/MystenLabs/walrus-sites repository.

And for an example of how to build a static website and store it as a Walrus Site with GitHub actions, just look at the CI workflow we use to publish this very site.

Python

The Python examples folder contains a number of examples:

JavaScript

A JavaScript example is provided showing how to upload and download a blob through a web form using the HTTP API.

Move

For more complex applications, you may want to interact with Walrus on-chain objects. For that purpose, the currently deployed Walrus contracts are included in our GitHub repository.

Furthermore, we provide a simple example contract that imports and uses the Walrus objects.