Helps Claude Code understand Sui blockchain transaction building, providing guidelines and examples for Transaction class, commands, input types, gas configuration, and serialization...
Transaction building is a core functionality of Sui blockchain development. The Sui TypeScript SDK provides the Transaction class, allowing developers to create, serialize, sign, and execute blockchain transactions using a fluent builder pattern. This skill helps Claude Code understand how to assist users in building various types of transactions on Sui.
// Import Transaction class
import { Transaction } from '@mysten/sui/transactions';
// Create new transaction
const tx = new Transaction();
import { Transaction } from '@mysten/sui/transactions';
const tx = new Transaction();
// Split 100 units of SUI from gas coin
const [coin] = tx.splitCoins(tx.gas, [100]);
// Transfer the split coin to specified address
tx.transferObjects([coin], '0xSomeSuiAddress');
// Execute transaction using signAndExecuteTransaction
const result = await client.signAndExecuteTransaction({
signer: keypair,
transaction: tx
});
Location: https://github.com/MystenLabs/ts-sdks/tree/main/packages/typescript/src/transactions/Transaction.ts
The Transaction class is the core of transaction building, providing the following key features:
Location: https://github.com/MystenLabs/ts-sdks/tree/main/packages/typescript/src/transactions/TransactionData.ts
Handles transaction data structure and serialization:
Location: https://github.com/MystenLabs/ts-sdks/tree/main/packages/typescript/src/transactions/Commands.ts
Defines all available transaction operations:
This skill follows a progressive disclosure pattern. The main file provides an overview and quick start, while detailed information is available in the reference directory.
For detailed information about transaction commands including SplitCoins, MergeCoins, TransferObjects, MoveCall, MakeMoveVec, and Publish, see Transaction Commands.
Learn about different input types including pure values, object references, and transaction results in Input Types.
Understand gas coin usage, price setting, budget configuration, and optimization in Gas Configuration.
Details about building transaction bytes, deserialization, and offline building in Transaction Serialization.
Explore transaction intents, sponsored transactions, plugin system, and async support in Advanced Features.
Common patterns for transaction building, signing, execution, testing, and error handling in Usage Patterns.
Integration with SuiClient, BCS, keypairs, wallets, and external systems in Integration Points.
Complete end-to-end workflows for common scenarios including SUI transfers, NFT minting, and offline building in Workflows.
Performance optimization, error handling, security considerations, and code quality guidelines in Best Practices.
https://github.com/MystenLabs/ts-sdks/tree/main/packages/typescript/src/transactions/https://github.com/MystenLabs/ts-sdks/tree/main/packages/typescript/src/transactions/__tests__/https://github.com/MystenLabs/ts-sdks/tree/main/packages/typescript/src/transactions/types.tsThis skill helps Claude Code understand Sui transaction building, providing practical code examples and usage guidelines. When users need to build Sui blockchain transactions, referencing this skill can provide accurate TypeScript code and best practices.