github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/docs/concepts/namespaces.md (about)

     1  ---
     2  id: namespaces
     3  ---
     4  
     5  # Namespaces
     6  
     7  Namespaces provide users with the exclusive capability to publish contracts under their designated namespaces, similar to GitHub's user and organization model.
     8  
     9  This feature is currently a work in progress (WIP). To learn more about namespaces, please checkout https://github.com/gnolang/gno/issues/1107.
    10  
    11  # Package Path
    12  
    13  A package path is a unique identifier for each package/realm. It specifies the location of the package source code which helps differentiate it from others. You can use a package path to:
    14  
    15  - Call a specific function from a package/realm. (e.g using `gnokey maketx call`)
    16  - Import it in other packages/realms.
    17  
    18  Here's a breakdown of the structure of a package path:
    19  
    20  - Domain: The domain of the blockchain where the package is deployed. Currently, only `gno.land/` is supported.
    21  - Type: Defines the type of package.
    22      - `p/`: [Package](packages.md)
    23      - `r/`: [Realm](realms.md)
    24  - Namespace: A namespace can be included after the type (e.g., user or organization name). Namespaces are a way to group related packages or realms, but currently ownership cannot be claimed. (see [Issue #1107](https://github.com/gnolang/gno/issues/1107) for more info)
    25  - Remaining Path: The remaining part of the path.
    26      - Can only contain alphanumeric characters (letters and numbers) and underscores.
    27      - No special characters allowed (except underscore).
    28      - Cannot consist solely of underscores. It must have at least one allowed alphanumeric character.
    29      - Cannot start with a number. It should begin with a letter.
    30      - Cannot end with a trailing slash (`/`).
    31  
    32  Examples:
    33  
    34  - `gno.land/p/demo/avl`: This signifies a package named `avl` within the `demo` namespace.
    35  - `gno.land/r/gnoland/home`: This signifies a realm named `home` within the `gnoland` namespace.