一键导入
sui-client
Interact with Sui blockchain using @mysten/sui SDK. Use when building transactions, reading chain data, or managing staking positions on Sui.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Interact with Sui blockchain using @mysten/sui SDK. Use when building transactions, reading chain data, or managing staking positions on Sui.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Guides developers through using Cetus CLMM TypeScript SDK for liquidity management, pool operations, swaps, and reward collection. Use when working with Cetus Protocol's Concentrated Liquidity Market Maker (CLMM) or when the user mentions Cetus SDK, CLMM, liquidity pools, or DeFi on Sui.
Guides users on how to use the Cetus DLMM TypeScript SDK for liquidity management, trading operations, and fee calculations. Use this skill when users need to operate Cetus DLMM liquidity pools, manage positions, execute swaps, or calculate price fees.
Guides developers through using DeepBook V3 Margin Trading SDK for leverage trading, borrowing, lending, liquidation operations, and risk management on Sui blockchain. Use when working with DeepBook margin trading, margin pools, margin managers, take profit/stop loss orders, or liquidation functionality.
Enables Claude to effectively work with the Cetus Dynamic Liquidity Market Maker (DLMM) protocol on Sui blockchain. This skill provides comprehensive knowledge of the DLMM architecture, Move smart contracts, Rust SDK, and development workflows. Claude can assist with building, testing, and modifying DLMM contracts, creating swap simulations, implementing new features, and debugging protocol issues. The skill covers all 15 Move modules, multi-bin architecture, reward distribution, ACL system, and flash swap functionality. Trigger contexts include: working with Sui Move smart contracts for decentralized exchanges, implementing dynamic liquidity management, creating multi-bin AMM protocols, building swap simulations with Rust SDK, modifying DLMM protocol parameters, debugging pool operations, implementing reward systems, and working with Cetus DLMM interface codebase.
A Claude Code skill for working with the Cetus Aggregator SDK to execute optimized swaps across multiple Sui DEXs. Use this skill when you need to perform token swaps, find optimal routes across 30+ DEXs, execute gas-optimized transactions, or configure overlay fees on Sui blockchain.
Helps Claude Code understand DeepBook V3 SDK usage for order book trading, flash loans, fund management, and market data queries on Sui blockchain. Use when operating DeepBook DEX, executing trading strategies, or querying market data.
| name | sui-client |
| description | Interact with Sui blockchain using @mysten/sui SDK. Use when building transactions, reading chain data, or managing staking positions on Sui. |
Use this skill when working with Sui blockchain. JSON-RPC is deprecated - use gRPC or GraphQL.
// gRPC (recommended) - @mysten/sui/grpc
import { SuiGrpcClient } from "@mysten/sui/grpc";
const client = new SuiGrpcClient({ network: "mainnet" });
// GraphQL - @mysten/sui/graphql
import { SuiGraphQLClient } from "@mysten/sui/graphql";
const client = new SuiGraphQLClient({
network: "mainnet",
url: "https://your-graphql-endpoint/graphql",
});
| Feature | Import Path |
|---|---|
| gRPC Client | @mysten/sui/grpc |
| GraphQL Client | @mysten/sui/graphql |
| Transaction | @mysten/sui/transactions |
| Keypairs | @mysten/sui/keypairs/ed25519 |
| JSON-RPC (deprecated) | @mysten/sui/jsonRpc |
// Get single object
const obj = await client.getObject({
id: "0x...",
options: { showType: true, showContent: true },
});
// Get multiple objects
const objs = await client.multiGetObjects({
ids: ["0x...", "0x..."],
options: { showType: true },
});
// List owned objects
const owned = await client.listOwnedObjects({
owner: "0x...",
filter: { StructType: "0x2::coin::Coin" },
});
// Get dynamic field
const field = await client.getDynamicField({
parentId: "0x...",
name: { type: "...", value: "..." },
});
// List dynamic fields
const fields = await client.listDynamicFields({
parentId: "0x...",
limit: 50,
});
// List coins (paginated) - NOTE: NOT getCoins
const coins = await client.listCoins({
owner: "0x...",
coinType: "0x2::sui::SUI",
limit: 100,
cursor: "...",
});
// Get balance
const balance = await client.getBalance({
owner: "0x...",
coinType: "0x2::sui::SUI",
});
// List all balances
const balances = await client.listBalances({ owner: "0x..." });
// Get coin metadata
const meta = await client.getCoinMetadata({
coinType: "0x2::sui::SUI",
});
import { Transaction } from "@mysten/sui/transactions";
import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519";
const keypair = Ed25519Keypair.fromSecretKey("...");
const tx = new Transaction();
// Build transaction...
tx.moveCall({ target: "0x...::module::function" });
// Execute transaction
const result = await client.signAndExecuteTransaction({
transaction: tx,
signer: keypair,
options: { showEffects: true },
});
// Wait for transaction
const confirmed = await client.waitForTransaction({
digest: result.digest,
options: { showEffects: true },
});
// Simulate transaction (dry run)
const simulated = await client.simulateTransaction({
transaction: tx,
signer: keypair.getPublicKey(),
});
// Get transaction
const txResult = await client.getTransaction({
digest: "...",
options: { showEffects: true, showObjectChanges: true },
});
// Get reference gas price
const gasPrice = await client.getReferenceGasPrice();
// Get current system state (NOT getLatestSuiSystemState)
const state = await client.getCurrentSystemState();
// Get chain identifier
const chainId = await client.getChainIdentifier();
// Get protocol config
const config = await client.getProtocolConfig();
// Get current epoch
const epoch = await client.getCurrentEpoch();
// Get Move function metadata
const func = await client.getMoveFunction({
package: "0x...",
module: "...",
function: "...",
});
// Resolve address to .sui name
const name = await client.defaultNameServiceName({
address: "0x...",
});
// Verify zkLogin signature
const result = await client.verifyZkLoginSignature({
bytes: "...",
signature: "...",
intentScope: "TransactionData",
address: "0x...",
});
const client = new SuiGrpcClient({ network: "mainnet" });
// Direct service access
client.transactionExecutionService;
client.ledgerService;
client.stateService;
client.subscriptionService;
client.movePackageService;
client.signatureVerificationService;
client.nameService;
// MVR support (transaction simulation)
client.mvr.resolvePackage({ package: "0x..." });
client.mvr.resolveType({ type: "0x..." });
client.mvr.resolve({ packages: ["0x..."] });
import { graphql } from '@mysten/sui/graphql/schema';
const client = new SuiGraphQLClient({
network: 'mainnet',
url: 'https://.../graphql',
queries: {
myQuery: graphql(`
query getBalance($owner: SuiAddress!) {
address(owner: $owner) {
balance { totalBalance }
}
}
`)
}
});
// Execute predefined query
const result = await client.execute('myQuery', {
variables: { owner: '0x...' }
});
// Execute inline query
const inline = await client.query({
query: graphql(`query { ... }`),
variables: { ... }
});
getStakes / getStakesByIds - Staking queriesqueryEvents / subscribeEvent - Event queriesgetCoins - Use listCoins insteadContact your RPC provider for current endpoints. JSON-RPC (deprecated):
https://fullnode.mainnet.sui.io:443https://fullnode.testnet.sui.io:443https://fullnode.devnet.sui.io:443bun add @mysten/sui