Design of the Move Registry
The Move Registry (MVR, pronounced "mover") consists of two independent components:
PackageInfo
registration: Exists independently on each network.- MVR registration: A single source of truth located on Mainnet.
The following diagram shows the MVR design at a high level.
PackageInfo objects
The first step when publishing a package is to register its metadata object. This metadata object serves as a key source of information for:
- Locating the source code across different versions of the package.
- (Future) Providing text-based metadata (title, description, tags) for the package, which the MVR search engine can use.
This metadata object can be reused when authorizing any package upgrades to supply source information for the new version. Sui indexers can index the metadata as it cannot be stored within another object.
See Managing Package Metadata for examples of working with PackageInfo
objects.
MVR name
A MVR name consists of a SuiNS name and a package name, in the format <suins_name>/<pkg_name>
.
As an example, if your SuiNS name is myname.sui
, and your package name is mypackage
,
the MVR name can be @myname/mypackage
or myname.sui/mypackage
.
The MVR standard supports an optional /<version>
that allows you to specify which on-chain version
to resolve to. As an example, if your MVR name is @myname/mypackage
and there are multiple versions
of the package, you can specify @myname/mypackage/2
to use version 2.
MVR registration
MVR registration is separate from the PackageInfo
registration process. This separation is necessary because the PackageInfo
object acts as both the source of truth for package metadata and a proof of package ownership, whereas MVR registers applications that MVR tooling can resolve.
To register a package:
- Using your SuiNS name, register an application.
- Based on the network, associate the application name with a
PackageInfo
object:
- Mainnet: Associate the application name with a complete
PackageInfo
object, which provides the full metadata and ownership proof. - Other networks: Associate the application name with the
PackageInfo
object ID, acting as a pointer without ensuring a full mapping.
The registry that stores name resolution for MVR exists only on Mainnet
See Managing MVR Names for examples of MVR registration.