Sui JSON-RPC Skill

Use this skill to run Sui JSON-RPC operations through uxc + JSON-RPC.

Reuse the uxc skill for shared execution and error-handling guidance.

Prerequisites

Scope

This skill covers a safe read-first Sui JSON-RPC surface:

This skill does not cover:

Endpoint And Discovery

This skill targets the public Sui fullnode endpoint:

For pubsub, use a Sui provider WebSocket endpoint that you have verified actually accepts JSON-RPC subscriptions. Do not assume the public HTTPS fullnode host automatically supports the same wss:// hostname for pubsub.

uxc JSON-RPC discovery depends on OpenRPC or rpc.discover. Sui exposes a discoverable method surface, so help-first flow works directly against the endpoint.

Authentication

The default public endpoint used by this skill does not require authentication.

If a user later points the same workflow at a private Sui RPC provider, verify its auth model first before reusing this skill unchanged.

Core Workflow

  1. Use the fixed link command by default:

    • command -v sui-jsonrpc-cli
    • If missing, create it: uxc link sui-jsonrpc-cli https://fullnode.mainnet.sui.io
    • sui-jsonrpc-cli -h
  2. Inspect operation schema first:

    • sui-jsonrpc-cli sui_getLatestCheckpointSequenceNumber -h
    • sui-jsonrpc-cli sui_getCheckpoint -h
    • sui-jsonrpc-cli sui_getObject -h
  3. Prefer read/setup validation before any deeper query:

    • sui-jsonrpc-cli sui_getChainIdentifier
    • sui-jsonrpc-cli sui_getLatestCheckpointSequenceNumber
    • sui-jsonrpc-cli suix_getReferenceGasPrice
  4. Execute with key/value or positional JSON:

    • key/value: sui-jsonrpc-cli sui_getCheckpoint id=254502592
    • positional JSON: sui-jsonrpc-cli sui_getObject '{"object_id":"0x6"}'
  5. Use uxc subscribe start directly for pubsub streams:

    • uxc subscribe start wss://<verified-sui-rpc-host> suix_subscribeEvent '{"params":[{"Package":"0x2"}]}' --sink file:$HOME/.uxc/subscriptions/sui-events.ndjson
    • uxc subscribe start wss://<verified-sui-rpc-host> suix_subscribeTransaction '{"params":[{"FromAddress":"0x..."}]}' --sink file:$HOME/.uxc/subscriptions/sui-transactions.ndjson
    • uxc subscribe status <job_id>
    • uxc subscribe stop <job_id>

Recommended Read Operations

Recommended Subscription Operations

Guardrails

References