Surfboard is an advanced, type-safe development platform for building on the Aptos blockchain. Imagine a surfboard that doesn't just float on the water but understands the ocean's currents, predicts wave patterns, and adapts to your riding styleβthat's Surfboard for Aptos development. We provide intelligent interfaces, reactive hooks, and a powerful CLI that transforms blockchain interaction from a technical chore into a fluid, intuitive experience.
Built with TypeScript from the seafloor up, Surfboard offers compile-time safety, runtime confidence, and developer ergonomics that make building decentralized applications feel like catching the perfect wave.
- Node.js 18+ or Bun 1.0+
- Aptos CLI (optional, for full feature set)
- TypeScript 5.0+ (recommended)
# Install via npm
npm install @surfboard/aptos
# Or using Bun
bun add @surfboard/aptos
# Install CLI globally
npm install -g @surfboard/cliDownload the complete package:
Most blockchain SDKs are like giving developers a toolbox and pointing them toward the ocean. Surfboard is differentβwe provide the board, the wetsuit, the tide charts, and a personal coach. Our approach centers on three principles:
- Type-Safety as a First-Class Citizen: Every interaction, from contract calls to transaction building, is fully typed
- Reactive by Design: Our hooks and observers respond to blockchain state changes automatically
- Context-Aware Intelligence: The SDK understands deployment environments, network conditions, and gas patterns
graph TB
A[Developer Application] --> B[Surfboard Core SDK]
B --> C[Type-Safe Interfaces]
B --> D[Reactive Hooks]
B --> E[Smart Contract Adapters]
C --> F[Aptos Blockchain]
D --> F
E --> F
G[Surfboard CLI] --> H[Project Scaffolding]
G --> I[Contract Deployment]
G --> J[State Monitoring]
H --> A
I --> F
J --> F
K[AI Integration Layer] --> L[OpenAI API]
K --> M[Claude API]
K --> B
style B fill:#4a90e2
style G fill:#50e3c2
style K fill:#b8e986
- Complete Move ABIs automatically converted to TypeScript interfaces
- Transaction builders with compile-time parameter validation
- Event filters with typed payloads and automatic decoding
- Resource accessors that understand your contract's state structure
- useAptosAccount(): React hook for wallet state with automatic reconnection
- useContractState(): Real-time monitoring of contract variables
- Transaction observers: Promise-based transaction lifecycle tracking
- Multi-network support: Switch between devnet, testnet, and mainnet seamlessly
- AI-assisted code generation: Describe your contract in plain English, get typed interfaces
- Gas optimization suggestions: Real-time analysis of transaction patterns
- Error prediction: Common pitfalls detected before transaction submission
- Contract simulation: Dry-run transactions with detailed outcome analysis
| Platform | Status | Notes |
|---|---|---|
| πͺ Windows | β Fully Supported | WSL2 recommended for CLI tools |
| π macOS | β Native Support | ARM and Intel architectures |
| π§ Linux | β Optimal Experience | All distributions supported |
| π³ Docker | β Container Ready | Official images available |
| βοΈ Cloud IDEs | β Browser Compatible | Gitpod, Codespaces, StackBlitz |
Create a .surfboardrc file in your project root:
# Surfboard Configuration Profile
version: "2026.1.0"
project:
name: "wave_runner_dapp"
type: "react-move"
packageManager: "bun"
networks:
default: "testnet"
endpoints:
testnet: "https://fullnode.testnet.aptoslabs.com/v1"
mainnet: "https://fullnode.mainnet.aptoslabs.com/v1"
local: "http://localhost:8080/v1"
ai:
enabled: true
providers:
- name: "openai"
model: "gpt-4-turbo"
role: "code_generation"
- name: "claude"
model: "claude-3-opus-20240229"
role: "security_analysis"
# Budget controls for AI features
monthlyCreditLimit: 1000
autoApproveUnder: 5
codegen:
strict: true
emitHooks: true
includeTests: true
formatter: "prettier"
deployment:
autoVerify: true
optimizer:
enabled: true
level: "aggressive"
gasTank:
enabled: true
refillThreshold: "0.5 APT"
ui:
theme: "surf"
responsiveBreakpoints:
mobile: 640
tablet: 1024
desktop: 1280
multilingual:
default: "en"
supported: ["en", "es", "zh", "ja", "ko"]
autoDetect: true
support:
mode: "hybrid"
channels:
- "documentation"
- "community_forum"
- "priority_slack"
responseTime:
standard: "24h"
priority: "4h"
critical: "1h"# Initialize a new Surfboard project
surfboard init wave-runner --template react-move --network testnet
# Generate typed interfaces from a Move contract
surfboard generate-interfaces ./contracts/WaveRunner.move --output ./src/types/
# Deploy with AI-assisted optimization
surfboard deploy ./contracts --network testnet --ai-optimize --simulate-first
# Start a development environment with hot reload
surfboard dev --port 3000 --open --monitor
# Analyze gas patterns across transactions
surfboard analyze-gas ./transactions/*.json --output report.html
# Generate multilingual documentation
surfboard docs generate --lang en,es,zh --format md,html
# Connect to AI code assistant
surfboard ai prompt "Create a hook for staking with cooldown periods"import { useAptosAccount, useContract, useTransaction } from '@surfboard/aptos';
import { WaveRunner } from './types/WaveRunner'; // Auto-generated types
export const StakeInterface: React.FC = () => {
const { account, connect, isConnected } = useAptosAccount();
const contract = useContract(WaveRunner, '0x1234...');
const stakeTx = useTransaction(async (amount: number) => {
// Fully typed transaction builder
return contract.stake({
amount: contract.types.u64(amount),
duration: contract.types.u64(30) // days
});
}, {
onSuccess: (result) => {
console.log('Staked successfully:', result.hash);
},
onError: (error) => {
console.error('Staking failed:', error.message);
}
});
return (
<div className="responsive-staking-ui">
<h2>πββοΈ Ride the Wave</h2>
{!isConnected ? (
<button onClick={connect}>Connect Wallet</button>
) : (
<StakeForm
onSubmit={stakeTx.execute}
isPending={stakeTx.isPending}
maxAmount={account.balance}
/>
)}
{/* Multilingual support built-in */}
<LanguageSelector />
{/* Real-time support access */}
<SupportWidget priority="standard" />
</div>
);
};import { AICodeAssistant } from '@surfboard/ai';
const assistant = new AICodeAssistant({
providers: ['openai', 'claude'],
context: 'aptos_move_development'
});
// Generate a complete contract from description
const contractCode = await assistant.generateContract(`
Create a liquidity pool contract with:
- Two token types (APT and a stablecoin)
- Constant product formula (x*y=k)
- 0.3% swap fee
- Liquidity provider rewards
- Include events for all major actions
`);
// Get security analysis
const auditReport = await assistant.auditContract(contractCode, {
checks: ['reentrancy', 'overflow', 'access_control']
});
// Generate corresponding frontend hooks
const frontendHooks = await assistant.generateHooks(contractCode, {
framework: 'react',
include: ['useSwap', 'useAddLiquidity', 'usePoolStats']
});Surfboard enables type-safe Aptos development with reactive blockchain hooks and AI-assisted smart contract creation. Our platform provides enterprise-grade Move language support with real-time transaction monitoring and multilingual documentation generation. Developers achieve rapid dApp deployment with gas optimization intelligence and cross-platform compatibility across Windows, macOS, and Linux environments.
- Code generation: GPT-4 Turbo for contract and interface creation
- Documentation: Automatic generation of usage examples and API docs
- Error explanation: Natural language descriptions of transaction failures
- Code translation: Convert between Move versions or to other languages
- Security analysis: Deep contract auditing with vulnerability detection
- Architecture review: High-level system design recommendations
- Best practices: Context-aware coding standards enforcement
- Complex logic verification: Mathematical proof checking for DeFi protocols
Surfboard employs a dual-AI approach where OpenAI handles creative generation tasks while Claude focuses on analytical and security-critical functions. This combination provides both innovation and reliability.
Surfboard includes built-in internationalization for:
- Developer documentation in 12 languages
- CLI output with locale-aware formatting
- Error messages translated for global teams
- UI components with automatic text extraction
- Contract comments that can be authored in native languages
Our support system operates on a tiered model:
- Documentation & Community: Comprehensive guides and community forums
- Priority Slack: Direct access to core maintainers for active projects
- Emergency Response: Critical issue resolution within 1 hour
- Architecture Review: Scheduled consultations for complex implementations
All support channels are available regardless of timezone, with follow-the-sun coverage across our global team.
While type safety is our foundation, Surfboard extends further with:
- Intent-based development: Describe what you want, get working code
- Contextual adaptation: SDK behavior adjusts based on project phase
- Predictive analytics: Anticipate network conditions and gas prices
- Collaborative features: Multi-developer state synchronization
Our UI components automatically adapt to:
- Device capabilities: Mobile, tablet, desktop, and embedded systems
- Network conditions: Offline mode, slow connection optimizations
- User preferences: Theme, language, and interaction patterns
- Regulatory contexts: Jurisdiction-specific interface variations
Surfboard SDK & CLI (2026 Edition) - Usage Agreement
Surfboard is provided as a development acceleration tool for the Aptos blockchain. While we implement extensive testing, security reviews, and AI-assisted validation, users acknowledge that:
- Blockchain development involves inherent risks including financial loss, security vulnerabilities, and regulatory considerations
- AI-generated code should be reviewed by qualified developers before production use
- Surfboard Labs is not liable for losses resulting from software bugs, security breaches, or incorrect AI suggestions
- Users are responsible for compliance with local laws and regulations
- The Aptos blockchain and its ecosystem components are independent projects
- All AI features consume third-party API credits subject to separate terms
- Support response times are targets, not guarantees, for non-critical issues
Always conduct independent audits, security reviews, and testing before deploying to production environments. Start with testnet deployments and gradually increase value exposure.
Surfboard is released under the MIT License. See the LICENSE file for complete details.
Key permissions:
- β Commercial use
- β Modification
- β Distribution
- β Private use
- β Patent use
Requirements:
- π License and copyright notice preservation
- π Same license for substantial portions
Limitations:
β οΈ No liabilityβ οΈ No warranty
Ready to catch the perfect development wave? Download the complete Surfboard package including SDK, CLI tools, example projects, and documentation:
Surfboard (2026 Edition) β Where Aptos development meets the flow state. Built by developers, for developers, with an eye toward the horizon of what blockchain interfaces can become.