A visual, node-based transaction builder for the Sui blockchain. This application allows developers and users to construct complex Sui transactions through an intuitive drag-and-drop interface, inspect existing transactions, and create reusable templates.
- Visual Transaction Building: Drag-and-drop interface for creating Sui transactions
- Transaction Inspection: Analyze existing transactions by digest
- Template System: Save and reuse transaction patterns
- Wallet Integration: Connect with Sui wallets via Suiet
- Real-time Execution: Execute transactions directly from the builder
- Transaction Summaries: Generate human-readable transaction summaries (with optional LLM enhancement)
- Multiple Node Types: Support for various Sui operations (MoveCall, SplitCoins, TransferObjects, etc.)
- Framework: Next.js 15.1.2 (React 19)
- Blockchain: Sui (@mysten/sui, @mysten/dapp-kit)
- Visual Editor: React Flow (@xyflow/react)
- Wallet: Suiet Wallet Kit (@suiet/wallet-kit)
- UI Components: Radix UI + Tailwind CSS
- State Management: React hooks + TanStack Query
- Node.js (version 18 or higher)
- npm or yarn
- A Sui wallet (for transaction execution)
-
Clone the repository
git clone <repository-url> cd sui-tx-builder
-
Install dependencies
npm install
-
Environment Configuration Create a
.env.localfile in the root directory with the following variables:# Blockberry API (for transaction inspection) BLOCKBERRY_KEY=your_blockberry_api_key BLOCKBERRY_DELAY=2000 # Optional: Gemini API (for LLM-enhanced transaction summaries) NEXT_PUBLIC_GEMINI_KEY=your_gemini_api_key
-
Run the development server
npm run dev
-
Open your browser Navigate to
http://localhost:3000
sui-tx-builder/
βββ src/
β βββ app/ # Next.js app directory
β β βββ api/ # API routes
β β β βββ metadata/ # Transaction metadata endpoint
β β β βββ search/ # Transaction search endpoint
β β βββ globals.css # Global styles
β β βββ layout.js # Root layout component
β β βββ page.js # Main page component
β βββ components/ # React components
β β βββ hooks/ # Custom React hooks
β β βββ nodes/ # Transaction node components
β β β βββ EmptyNode.js
β β β βββ MergeCoins.js
β β β βββ MoveCall.js
β β β βββ SplitCoins.js
β β β βββ TransferObjects.js
β β β βββ MakeMoveVec.js
β β βββ templates/ # Transaction templates
β β β βββ NFTMint.json
β β β βββ SendTokens.json
β β βββ ui/ # UI components (shadcn/ui)
β β βββ app-sidebar.js # Main sidebar component
β β βββ blocks.js # Node type definitions
β β βββ main.js # Main application component
β β βββ templates.js # Template management
β β βββ variables.js # Variable management
β β βββ TransactionSummary.js # Transaction summary component
β βββ hooks/ # Additional custom hooks
β β βββ use-mobile.jsx
β βββ lib/ # Utility functions
β βββ txsummary.js # Transaction summary generation
β βββ utils.js # General utilities
βββ public/ # Static assets
βββ tailwind.config.mjs # Tailwind CSS configuration
βββ components.json # shadcn/ui configuration
βββ package.json # Project dependencies
I've created a comprehensive README that includes:
- Clear project overview - What the application does and its key features
- Complete setup instructions - Step-by-step installation and configuration
- Detailed project structure - File organization and component hierarchy
- Architecture explanation - Core components and their responsibilities
- API documentation - Available endpoints and their usage
- Extension guides - How to add custom nodes and templates
- Development workflow - Scripts, dependencies, and contribution guidelines
- Resource links - Relevant documentation and APIs
The README provides developers with everything they need to understand, run, and extend the Sui Transaction Builder application.
The central component that orchestrates the entire application:
- Manages the React Flow canvas
- Handles node and edge state
- Executes transactions
- Integrates wallet functionality
Individual components for different Sui operations:
- MoveCall: Execute Move functions
- SplitCoins: Split coin objects
- MergeCoins: Merge coin objects
- TransferObjects: Transfer objects to addresses
- MakeMoveVec: Create Move vectors
Provides:
- Transaction inspection by digest
- Node palette for building transactions
- Template management
- Wallet connection
Generates human-readable summaries of constructed transactions with optional LLM enhancement.
- Purpose: Search for transactions by digest
- Method: POST
- Body:
{ "digest": "transaction_digest_here" } - Returns: Transaction details from Blockberry API
- Purpose: Get package metadata
- Method: POST
- Body:
{ "packageId": "package_id_here" } - Returns: Package information and Move functions
To add new node types:
-
Create the node component in
src/components/nodes/:// Example: CustomNode.js import { Handle, Position } from '@xyflow/react'; export default function CustomNode({ data }) { return ( <div className="custom-node"> <Handle type="target" position={Position.Top} /> {/* Your node UI here */} <Handle type="source" position={Position.Bottom} /> </div> ); }
-
Register the node in
src/components/blocks.js:import CustomNode from './nodes/CustomNode'; export const blocks = [ // ... existing blocks { id: 'custom', name: 'Custom Operation', node: CustomNode, // ... other properties } ];
Templates are JSON files stored in src/components/templates/ that define reusable transaction patterns. They follow the Sui transaction structure:
{
"result": {
"transaction": {
"data": {
"transaction": {
"inputs": [...],
"transactions": [...]
}
}
}
}
}# Build for production
npm run build
# Start production server
npm start
# Lint code
npm run lintnpm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run lint- Run ESLint
- Sui SDK:
@mysten/sui- Core Sui blockchain functionality - Wallet Integration:
@suiet/wallet-kit- Sui wallet connectivity - Visual Editor:
@xyflow/react- Node-based visual editor - UI Framework: Radix UI components with Tailwind CSS styling
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is open source. Please check the license file for details.
For issues, feature requests, or questions, please use the GitHub issue tracker.