Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions sui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
namespace-identifier: sui
title: Sui Ecosystem
author: William Robertson (@williamrobertson13)
discussions-to: https://github.com/ChainAgnostic/namespaces/pull/146
status: Draft
type: Informational
created: 2025-06-18
updated: 2025-06-18
---

# Namespace for Sui Chains

Sui is a smart contract platform that uses a Move-based, object-centric data model and is optimized for parallel execution. Transactions in Sui operate on objects rather than accounts, allowing independent operations to be executed in parallel without coordination. This enables high throughput while preserving safety and determinism.

A Sui network is maintained by a validator committee responsible for processing transactions, reaching consensus, and producing checkpoint digests — cryptographic summaries of network state at fixed intervals. These checkpoints serve as the canonical state and ensure consistency across nodes.

Each network is uniquely identified by its genesis checkpoint digest — the cryptographic hash of the very first checkpoint, signed by the original validator set. This digest anchors the network’s identity in verifiable history and validator consensus.

## Rationale

Because chain identity and state in Sui revolve around checkpoints and objects rather than blocks and accounts, standard CAIP identifiers (e.g., for chains, accounts, and assets) must be adapted accordingly.

This namespace defines how Sui’s architecture maps to cross-chain standards to support consistent and interoperable multi-chain tooling.

## Governance

Sui protocol upgrades and standards are coordinated by the Sui Foundation in collaboration with core contributors and the broader developer community. Changes are proposed through SIPs (Sui Improvement Proposals), with open discussion and reference implementations maintained on GitHub.

## References

- [Sui Docs] — Developer documentation and concept overviews for building on Sui.
- [Sui GitHub] — Official GitHub repository for the Sui smart contract platform.
- [Sui SIPs] — Official GitHub repository for Sui Improvement Proposals.

[Sui Docs]: https://docs.sui.io/
[Sui GitHub]: https://github.com/MystenLabs/sui
[Sui SIPs]: https://github.com/sui-foundation/sips

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
127 changes: 127 additions & 0 deletions sui/caip2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
---
namespace-identifier: sui-caip2
title: Sui Namespace - Chains
author: William Robertson (@williamrobertson13)
discussions-to: https://github.com/ChainAgnostic/namespaces/pull/146
status: Draft
type: Informational
created: 2025-06-18
updated: 2025-06-18
---

# CAIP-2

_For context, see the [CAIP-2][] specification._

## Introduction

The Sui namespace in CAIP-2 uses human-readable chain identifiers — such as `mainnet`, `testnet`, and `devnet` — to identify specific Sui networks. These identifiers are **stable**, **concise**, and **easy to communicate**, and can be resolved to a unique genesis checkpoint digest through a supported Sui RPC interface.

This design provides both developer ergonomics and cryptographic assurance, allowing developers to work with simple names while still supporting verifiable chain identification.

## Specification

### Semantics

A valid CAIP-2 identifier in the Sui namespace takes the form:

`sui:<network>`

Where `<network>` is one of the following reserved, stable identifiers:

- `mainnet`
- `testnet`
- `devnet`

### Syntax

#### Regular Expression

`^sui:(mainnet|testnet|devnet)$`

Only these exact network identifiers are currently supported.

#### Example

`sui:mainnet`

### Resolution Mechanics

To resolve a CAIP-2 `sui:<network>` identifier into a unique chain identitier, clients typically query a trusted full node associated with the specified network. While the `suix_getChainIdentifier` JSON-RPC method is commonly used for this purpose, resolution is not limited to JSON-RPC. Other interfaces, such as GraphQL, may also support retrieving the corresponding genesis checkpoint digest.

**Sample request**

```json
{
"jsonrpc": "2.0",
"id": 1,
"method": "suix_getChainIdentifier",
"params": []
}
```

**Sample response (for mainnet):**

```json
{
"jsonrpc": "2.0",
"id": 1,
"result": "35834a8a"
}
```

The response returns the first four bytes of the genesis checkpoint digest for the network.

## Rationale

This approach allows developers to use intuitive, readable CAIP-2 identifiers (e.g., `sui:mainnet`) while still achieving unambiguous and verifiable identification of the underlying chain through the genesis checkpoint digest.

The separation of **stable identifiers** (e.g., `sui:testnet`) from the **unambiguous chain identifier** (e.g., the identifier returned by `suix_getChainIdentifier`) is particularly important because:

- **`testnet` and `devnet` may be reset** by Sui maintainers, resulting in a new genesis state.
- When this happens, the **genesis checkpoint digest changes**, meaning the underlying chain identifier is no longer the same.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the Sui Foundation decides this, and announces this? Is there a canonical mapping anywhere? most CAIP-2 profiles define the underlying machine-readable (and immutable) identifier, since this creates CAIP-10s and CAIP-19s that survive changes at the governance/human level...

- If clients depended directly on the digest as the CAIP-2 identifier, each reset would break compatibility or require external coordination.
- By resolving the digest dynamically via RPC, clients can ensure they’re talking to the correct chain, without needing to change the CAIP-2 identifier they rely on.

This pattern balances human readability, forward compatibility, and security.

### Backwards Compatibility

There are no legacy identifiers or alternate forms for Sui chains.

## Test Cases

Below are manually composed examples:

#### Sui Mainnet

- **CAIP-2 Chain ID:** `sui:mainnet`
- **Resolved Chain Identifier:** `35834a8a`

#### Sui Testnet

- **CAIP-2 Chain ID:** `sui:testnet`
- **Resolved Chain Identifier:** `4c78adac` _(value depends on the current testnet)_

#### Sui Devnet

- **CAIP-2 Chain ID:** `sui:devnet`
- **Resolved Chain Identifier:** `aba3e445` _(value depends on the current devnet)_

## References

- [Sui Docs] - Developer documentation and concept overviews for building on Sui.
- [Sui RPC] - Reference documentation for interacting with Sui networks via RPC.
- [Sui GitHub] - Official GitHub repository for the Sui smart contract platform.
- [Sui Network Info] - Information regarding Sui networks and their release schedules.
- [CAIP-2] - Chain ID Specification.

[Sui Docs]: https://docs.sui.io/
[Sui RPC]: https://docs.sui.io/references/sui-api
[Sui GitHub]: https://github.com/MystenLabs/sui
[Sui Network Info]: https://sui.io/networkinfo
[CAIP-2]: https://chainagnostic.org/CAIPs/caip-2

## Copyright

Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).