Search Apps Documentation Source Content File Folder Download Copy Actions Download

Private Realms

Introduction

This document describes the private flag in gnomod.toml.
This flag is optional and can only be used by realms.

Note

The private flag does not make a realm secret or hidden.
All code remains open-source and visible on-chain.

Declaring a Private Realm

To mark a realm as private, add the following private value in your gnomod.toml file:

1module = "gno.land/r/demo/privaterealm"
2gno = "0.9"
3private = true

Rules of a Private Realm

A realm marked as private follows strict rules:

  • It cannot be imported by other packages.
  • It can be re-uploaded and the new version fully overwrites the old one.
  • Memory, pointers, or types defined in this package cannot be stored elsewhere.

These restrictions aim to achieve one main goal:

Tip

Private realms are swappable.
You can redeploy or update them without impacting other realms.

Use Cases

Private realms are useful when:

  • The realm represents a home realm for a specific user (r/username/home).
  • The realm is designed to evolve and may need to be replaced later.
  • You want to ensure that no external state depends on its internal types or values.