Announcing SpaceKit: The First-Ever Swift Smart Contract Framework 🙌
After 10 months of development, I’m excited to introduce SpaceKit, the first smart contract framework built for Swift 🔥
This marks a major milestone for @MultiversX and every Lightspeed Chain, making it the first blockchain ecosystem where Swift developers can build decentralized applications
What I’ll cover in this post
1) SpaceKit’s Vision: A framework designed with developers in mind
2) Current Features: What’s available today
3) The SwiftVM: A Swift-based replica of SpaceVM for testing
4) Documentation & AI Assistance: Interactive tutorials and a GPT-trained assistant
5) The Future of SpaceKit: What’s next for the framework
A TL;DR is included at the end, but let’s go through the details
1) SpaceKit’s Vision: A Developer-First Smart Contract Framework
SpaceKit is designed to provide a smooth developer experience, leveraging Swift’s powerful and intuitive syntax while abstracting away unnecessary complexity
- Cross-platform support: Works on macOS, Linux, and Windows (via WSL)
- Flexible development environment: Use Xcode or VSCode
- Fully compatible with MultiversX and all future Lightspeed Chains
- A Unified Development Stack
The long-term goal of SpaceKit is to enable developers to build smart contracts, backends, and frontends within the same Swift-based ecosystem:
- Define contract endpoints
- Automatically generate interaction functions
- Develop entire decentralized applications using a single codebase
Currently, SpaceKit is in beta and focused on smart contract development, supporting the most important opcodes. You can already build anything from NFT collections to DeFi protocols, with more capabilities coming soon.
2) Current Features: What’s available today
SpaceKit is already packed with useful tools. Here’s a look at what’s possible:
- High-Level Type System: Work with Buffer, Vector, BigUint, and more instead of raw byte operations
- Intuitive Storage Management: Use @Storage annotations or custom storage mappers like WhitelistMapper, VecMapper, and SetMapper
- Blockchain & Transaction Data Access: Retrieve timestamps, payments, caller addresses, and other contextual information
- Flexible Coding Style: Write contracts using global functions, OOP-style structs, or simple @Codable annotated structs
- Simplified Contract Interactions: Deploy, upgrade, and call other contracts with minimal effort thanks to the @Proxy annotation
- No low-level complexity: SpaceKit abstracts away low-level intricacies, automatically determining whether the code is being compiled for the SpaceVM or SwiftVM. This eliminates the need for Self::Api and other generic constraints, allowing you to focus on building business logic without dealing with pointers or WebAssembly-specific details
- Async Calls with Callbacks: Mark functions with @Callback to handle asynchronous contract interactions
- Full ESDT Support: Issue, mint, burn, and manage fungible, non-fungible, and semi-fungible tokens
- Secure Randomness – Generate random numbers using SpaceVM’s built-in random features
- Event Emission: Use @Event to automatically generate event methods
- Command Line Interface: Initialize projects, compile to WebAssembly, and generate ABIs
- Rust Compatibility: Swift smart contracts can interact seamlessly with Rust contracts
- Cross-Platform Support: Fully functional on macOS, Linux, and Windows
- Code Editor Support: Full autocompletion and syntax highlighting, even for generated code
- Compatible with Any SpaceVM-Powered Blockchain
These features enable developers to build almost any type of smart contract
3) The SwiftVM: A Swift-Based Testing Environment
Testing is a critical part of smart contract development, and SpaceKit simplifies it with SwiftVM, a Swift-based replica of SpaceVM. This allows developers to:
- Run contract endpoints and check results
- Simulate failures and analyze error reasons
- Set up wallet balances and simulate transactions
- Define which address is calling the contract
- Test contract-to-contract interactions, both synchronous and asynchronous
- Ensure callbacks are working, even when the asynchronous call fails
- Issue and manage ESDT tokens within tests through a replica of the GoVM’s ESDT System smart contract
- Use Swift’s built-in debugger and breakpoints for in-depth testing
- This eliminates the need for external testing tools, allowing developers to test their contracts natively in Swift
4) Documentation & AI Assistance
To make onboarding easy, SpaceKit includes:
- An 11-Chapter Interactive Tutorial: Covers installation, contract development, ESDT management, and more
- 22+ Example Smart Contracts: Ranging from simple adders to fully functional multisigs
- A Repository with 568+ Tests: Demonstrates real-world testing scenarios
- Custom GPT Assistant: Provides instant answers to development questions
More documentation and learning resources will be added over time
5) The Future of SpaceKit
The roadmap includes several key milestones:
Short-Term: Incorporate developer feedback, refine documentation, and expand learning resources
Mid-Term: Improve the CLI and SwiftVM, reducing reliance on external tools
Long-Term: Develop a Swift-based backend framework, similar to NovaX, for seamless contract interactions
The ultimate vision is a fully integrated Swift ecosystem where developers can build smart contracts, backends, and even iOS/macOS frontends from the same codebase
TL;DR
- SpaceKit: The first Swift smart contract framework
- Developer-Focused: Works across platforms, with an intuitive API and minimal complexity
- Comprehensive Feature Set: Easy storage, event emission, async calls, and more
- SwiftVM: Test contracts directly in Swift with real debugging tools
- Extensive Documentation & AI Support: Tutorials, example contracts, and an AI assistant
- Future Plans: A full backend + frontend Swift ecosystem for dApp development
SpaceKit is here. Ready to start building? 🔥
- SpaceKit repository: https://t.co/ePX8BqnDNW
- Interactive tutorials: https://t.co/1kWTxnvtgr
- GPT assistant: https://t.co/n5Ws1OxhgH
6/ First piece of the puzzle: the MultiversX AI Agent Kit
An open-source framework for permissionless innovation around custom AI agents.
Build from scratch, in minutes, using @elizaOS and 250+ models.
Play with the new DeepSeek model — see how it stands compared to OpenAI, Google, Anthropic.
➡️ https://t.co/nx5jGm6g5d
A summary of this week’s #SovereignChains development progress 🛠️
#⃣ Added Sovereign SDK support in Chain Simulator repository - this is a requirement to be able to run the system tests
#⃣ Merged the latest @MultiversX mainnet release code into Sovereign SDK, bringing transaction pool optimizations and relayed v3.
#⃣ Refactoring and updates for the cross-chain smart contracts
#⃣ Analysis and debugging for block revers and forks
#⃣ Usual testing, fixes and updates as we continue to build forward! 🚀
A summary of this week’s #SovereignChains development progress 🛠️🔥
#️⃣ Finished Internal Testnet Setup: A big milestone! We can now test the chain in a realistic environment, run stress tests, and much more.
#️⃣ Cross-Chain Contracts progress: We worked on validator registration flow and updating the validator set at each epoch change. The contracts will verify that each cross-chain transfer was signed by the validators in that epoch.
#️⃣ Cross-Chain Tokens Indexing: Worked on indexing the cross-chain token properties into the Elastic database for easier access via explorers and APIs.
#️⃣ Usual fixes and updates as we continue to build forward! 🚀
🛠️ Andromeda is the next important release which will bring more than 2x speedup for transactions finality to the @MultiversX network.
This is just the beginning! Major updates will come this year to the protocol. 👀
Below is a short update about the Andromeda progress:
Do you have advanced technical questions about building on MultiversX?
Get the insights and answers you need during our dedicated Office Hours on Discord.
👉Please submit your questions in advance: https://t.co/cgUt9Wl2ey
📅Event link:
https://t.co/2ajz3HCc5f
This week in Sovereign Chains development: 🛠️
Beyond regular updates & bug fixes, we focused on enhancing Sovereign Deploy documentation!
🔹 3 deployment options:
1️⃣ One-Click deployment
2️⃣ Local Sovereign Chain
3️⃣ Distributed Sovereign Chain
We’ve also added guides for setting up APIs, wallet and other services for a full chain experience.
More documentation is currently under review and will go live in the coming days.
It is time to build! 🛠️⛓️
Mx.Blazor.DApp template got some updates. 🛠️
The code has been optimized a lot and all the MvX packages have been updated to the latest version.
#itistimetobuild#MultiversX
#SovereignChains are custom blockchains that can be built for app-specific needs.
They offer seamless interoperability and cross chain composability towards the #MultiversX main chain.
You can read more about Sovereign chains in the post below 👇🏻