Version 1 - mainnet - 0xf9...1f6e7b
Readme
Versions
1
Dependencies
0
Dependents
0
Analytics
On the way
This package provides the onchain core for typed, verifiable attestations on Sui: a way for one package to make a durable, public claim about a subject. For example, this package can be used to add audit reports to a package, KYC data to an account, or even to issue statements about packages on other chains.
The central type is Attestation<T>, a permanent object carrying a typed
payload T and the subject it describes. The attester recorded on it is the
package that defined T, determined at mint time rather than taken from the
transaction signer. Trust is anchored to package identity: an audit is credible
because its type comes from the auditor's own published package, so no other
party can forge one in their name.
Attestation<T> is permanent and key-only. No outside caller can
transfer, wrap, or destroy one; the only ways to move it are this package's
attest and revoke functions.Permit<T> gates every action. attest, revoke, and
register_display each require a Permit<T>, and Move lets only T's
defining package mint one. Each schema package therefore sets its own policy
for who may issue and revoke — an admin cap, a per-attestation cap, a
multisig, or no one at all.Registry is created when the package is published. Each
subject's attestations live at an address derived from it, which anyone can
compute offchain from the registry and subject ids. attest takes
&Registry, so every attestation is transferred to an address that this
registry's revoke can receive from.revoke sets an attestation's revoked_at_ms and
leaves the attestation at its subject's address. A consumer reads a subject's
attestations with a single type-filtered query and checks revoked_at_ms on
each.The layout is built so a consumer can find a subject's attestations in one query,
with no index to maintain. Every subject's attestations of type T live at an
address you derive yourself from the registry and the subject:
address = derive_address(registry, subject)
List the objects owned by that address, filtered to Attestation<T>, and you
have the subject's attestations. Revoked ones are there too: an attestation is
live while its revoked_at_ms is none.
Deriving the address means reproducing Sui's derived-object derivation, with the
subject's ID as the key (type 0x2::object::ID), so in practice you'll want a
small helper rather than a shell one-liner. examples/auditor shows a worked
GraphQL query against the attestation type, including how to read the rendered
Display fields.
You don't attest against this package directly. You write a small schema package
that defines your claim type T and exposes wrappers that mint a Permit<T>
and call in. The examples/auditor package in this repository is a complete,
copyable template, with a walkthrough for standing up a new attester end to end.
The repository also carries the design rationale (see DESIGN.md) and the Display-field conventions consumers rely on for cross-cutting behavior like expiration (see CONVENTIONS.md).
Testnet:
0x754da52dba4429dc141b4298c5afebb4697d7ff74a15580c0f3074f3f33f79e5Registry:
0x333d2e0d4eba57451e942bfc1ebffd0d4daf599ff719bab556e2882109df4db3Mainnet:
0xf918b2fc17085f4e48021be94ee43f9cc4437256acfd085f1e3d1a54d11f6e7bRegistry:
0x86875cdb65149c3a1c9653486c09ef7846a751823bb2a96d434fd01fbd4b052eBoth deployments use the current revocation model described above. See Published.toml for compiler and publication metadata and MAINNET.md for mainnet transaction IDs, custody, and pending MVR setup. The mainnet MVR name is not yet assigned.
You can install this package in your Move project by calling
mvr add @mysten/attestationsA typed attestation registry for Sui