
[](https://opensource.org/licenses/MIT)
[](https://github.com/BlockstreamResearch/smplx/workflows/ci.yml)
[](https://t.me/simplicity_community)
# Smplx
**A blazingly-fast, ux-first simplicity development framework.**
## What
Simplex is a Rust-based, comprehensive development framework for [Simplicity](https://github.com/BlockstreamResearch/SimplicityHL) smart contracts, aiming to provide a rich tooling suite for implementing, testing, and deploying smart contract on [Liquid](https://liquid.net/).
- CLI for managing simplicity-based projects.
- SDK with essential simplicity utilities.
- Liquid regtest for local integration testing.
- Extensive framework configuration.
> [!WARNING]
> The framework is at the extremely early stage of development, unforeseen breaking changes and critical bugs are expected.
## Installation
```bash
```
See the [simplexup manual](simplexup/README.md) for more details.
## Getting started
Add `smplx-std` dependency to cargo:
```bash
cargo add --dev smplx-std
```
Optionally, initialize a new project:
```bash
simplex init
```
## Usage
Simplex is a zero-config framework. However, it requires a `simplex.toml` file to exist in the project root. The default configuration is the following:
```toml
# Simplex config
[build]
src_dir = "./simf"
simf_files = ["*.simf"]
out_dir = "./src/artifacts"
[regtest]
mnemonic = "exist carry drive collect lend cereal occur much tiger just involve mean"
[test]
mnemonic = "exist carry drive collect lend cereal occur much tiger just involve mean"
[test.esplora]
url = "<esplora url>"
network = "<Liquid, LiquidTestnet, ElementsRegtest>"
[test.rpc]
url = "<rpc url>"
username = "<rpc username>"
password = "<rpc password>"
```
Where:
- `build` (`simplex build` config)
- `src_dir` - The simplicity contracts source directory.
- `simf_files` - A glob pattern incidating which contracts are in scope.
- `out_dir` - The output directory where contracts artifacts are generated.
- `regtest` (`simplex regtest` config)
- `mnemonic` - The signer's mnemonic regtest will send initial funds to.
- `test` (`simplex test` config)
- `esplora`
- `url` - Esplora API endpoint url
- `network` - Esplora network type (`Liquid`, `LiquidTestnet`, `ElementsRegtest`).
- `rpc`
- `url` - Elements RPC endpoint url
- `username` - Elements RPC username
- `password` - Elements RPC password
- `mnemonic` - The signer's mnemonic internal regtest will send initial funds to.
### CLI
Simplex CLI provides the following commands:
- `simplex init` - Initializes a Simplex project.
- `simplex config` - Prints the current config.
- `simplex build` - Generates simplicity artifacts.
- `simplex regtest` - Spins up local Electrs + Elements nodes.
- `simplex test` - Runs Simplex tests.
To view the available options, run the help command:
```bash
simplex -h
```
### Example
Check out the complete project examples in the `examples` directory to learn more.
## Contributing
We are open to any mind-blowing ideas! Please take a look at our [contributing guidelines](CONTRIBUTING.md) to get involved.
## Future work
- [ ] Comprehensive `simplex init` and `simplex clean` tasks.
- [ ] SDK support for confidential assets, taproot signer, and custom witness signatures.
- [ ] Local regtest 10x speedup.
- [ ] Regtest cheat codes.
- [ ] Browser compatibility.
- [ ] Simplicity dependencies management once the language adds [support for modules](https://github.com/BlockstreamResearch/SimplicityHL/issues/155).
- [ ] Comprehensive documentation.
## License
The framework is released under the MIT License.