A comprehensive toolkit for building, deploying, and managing blueprints on the Tangle Network.
The Blueprint SDK is a modular Rust toolkit for building decentralized servicesโcalled Blueprintsโthat run across networks like Tangle, EigenLayer, and standard EVM chains.
Blueprints turn complex on-chain and off-chain infrastructure into reproducible, deployable units of logicโthink Infrastructure-as-Code for crypto systems. With one SDK, you can design anything from oracles and MPC networks to agent-based AI services or zk-proof markets, and deploy them seamlessly.
The SDK unifies:
- Job orchestration and routing across async, event-driven systems
- P2P networking with secure message handling and round-based protocol support
- Cryptographic primitives and keystore management for signing, verification, and MPC
- EVM and EigenLayer extensions for direct smart contract and restaking integrations
- Testing and benchmarking utilities for reproducible environments and performance tuning
In short, Blueprints let developers move from concept to distributed protocol with minimal friction.
We also have a documentation site on all things Tangle to help you get started.
The following components make up the SDK, providing everything from job creation and routing utilities to specialized tools for networking and testing.
blueprint-sdk- Main crate for the Tangle Blueprint SDK, re-exporting all of the followingblueprint-benchmarking- Utilities for benchmarking blueprintsblueprint-build-utils- Utilities for simplifying build-time tasks (e.g., building contracts, installing dependencies)blueprint-chain-setup- (Meta-crate) Utilities for setting local testnetsblueprint-chain-setup-anvil- Utilities for setting up Anvil testnets
blueprint-clients- (Meta-crate) Clients for interacting with Tangle, Eigenlayer, and other networksblueprint-client-core- Core client primitives and traitsblueprint-client-tangle- Client for interacting with the Tangle EVM contractsblueprint-client-eigenlayer- Client for interacting with the Eigenlayer Networkblueprint-client-evm- Client for interacting with the EVM Network
blueprint-contexts- Extensions for adding functionality to custom blueprint context typesblueprint-context-derive- Derive macros for implementing context extension traitsblueprint-core- Core components for building blueprints, primarily job system primitivesblueprint-crypto- (Meta-crate) Cryptographic utilitiesblueprint-crypto-core- Core cryptographic utilities (traits, types)blueprint-crypto-bls- Utilities for working with BLS signatures and keysblueprint-crypto-bn254- Utilities for working with BN254 signatures and keysblueprint-crypto-ed25519- Utilities for working with Ed25519 signatures and keysblueprint-crypto-hashing- Cryptographic hashing utilitiesblueprint-crypto-k256- Utilities for working with secp256k1 signatures and keysblueprint-crypto-sr25519- Utilities for working with sr25519 signatures and keys
blueprint-keystore- Flexible keystore implementation, supporting local and remote signersblueprint-macros- Utility macros for simplifying blueprint developmentblueprint-manager- A program executor that connects to the Tangle network and runs protocols dynamically on the flyblueprint-manager-bridge- IPC bridge for manager-blueprint communication
blueprint-metrics(Meta-crate) Utilities for collecting metricsblueprint-metrics-rpc-calls- Utilities for collecting metrics from RPC calls
blueprint-networking- P2P networking support for blueprintsblueprint-networking-round-based-extension- A networking compatibility layer for round-based MPC protocolsblueprint-networking-agg-sig-gossip- Aggregated signature gossip extensionblueprint-networking-gossip-primitives- Gossip protocol primitives
blueprint-pricing-engine- Pricing engine for computing resource costsblueprint-producers-extra- Additional protocol-independent event producersblueprint-profiling- Profiling utilities for performance analysisblueprint-qos- Quality of Service monitoring and metricsblueprint-router- A job router for dynamically scheduling jobsblueprint-runner- The blueprint job runner, executing jobs in a protocol-specific mannerblueprint-std- Standard library extensions, for use within the SDKblueprint-stores- (Meta-crate) Storage providers for blueprintsblueprint-store-local-database- A local JSON key-value database
blueprint-remote-providers- Remote cloud provider integrations (AWS, GCP, Azure, etc.)blueprint-tangle-aggregation-svc- Tangle aggregation service for BLS signature aggregationblueprint-tangle-extra- Tangle-specific producers, consumers, and extractorsblueprint-evm-extra- EVM specific extensions for blueprintsblueprint-eigenlayer-extra- Eigenlayer specific extensions for blueprintsblueprint-faas- FaaS (Function-as-a-Service) execution supportblueprint-auth- Authentication and authorization utilitiesblueprint-testing-utils- (Meta-crate) Utilities for testing blueprintsblueprint-core-testing-utils- Core testing utility primitivesblueprint-anvil-testing-utils- Utilities for creating and interacting with Anvil testnetsblueprint-eigenlayer-testing-utils- Utilities for creating end-to-end tests for Eigenlayer blueprints
Ensure you have the following installed:
- Rust
- OpenSSL Development Packages
sudo apt update && sudo apt install build-essential cmake libssl-dev pkg-configbrew install openssl cmakeYou can install the Tangle CLI in two ways:
Install the latest stable version of cargo-tangle using the installation script:
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/tangle-network/blueprint/releases/download/cargo-tangle/v0.1.1-beta.7/cargo-tangle-installer.sh | shInstall the latest git version of cargo-tangle using the following command:
cargo install cargo-tangle --git https://github.com/tangle-network/blueprint --forceAfter installation, you can create, build, register, and run your first blueprint against the Tangle EVM:
# Create a new blueprint named "my_blueprint"
cargo tangle blueprint create --name my_blueprint
# Navigate into the blueprint directory and build
cd my_blueprint
cargo build
# Deploy your blueprint to the Tangle Network
# Write the contract coordinates used by your service
cat > settings.env <<'EOF'
BLUEPRINT_ID=0
SERVICE_ID=0
TANGLE_CONTRACT=0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9
RESTAKING_CONTRACT=0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
STATUS_REGISTRY_CONTRACT=0xdC64a140Aa3E981100a9BecA4E685f962f0CF6C9
EOF
# Register the operator with the on-chain contracts (optional)
cargo tangle blueprint register-tangle \
--http-rpc-url https://rpc.tangle.tools \
--ws-rpc-url wss://rpc.tangle.tools \
--keystore-path ./keystore \
--tangle-contract 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9 \
--restaking-contract 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 \
--status-registry-contract 0xdC64a140Aa3E981100a9BecA4E685f962f0CF6C9 \
--blueprint-id 0
# Capture the preregistration payload (TLV file written to ./data by default)
cargo tangle blueprint preregister \
--http-rpc-url http://127.0.0.1:8545 \
--ws-rpc-url ws://127.0.0.1:8546 \
--keystore-path ./keystore \
--settings-file ./settings.env
# Run the blueprint manager against local Anvil (or a real RPC)
cargo tangle blueprint run \
--protocol tangle \
--http-rpc-url http://127.0.0.1:8545 \
--ws-rpc-url ws://127.0.0.1:8546 \
--keystore-path ./keystore \
--settings-file ./settings.envThe preregistration flow mirrors the production pipeline: the CLI boots the manager
in REGISTRATION_MODE_ON, launches the blueprint with REGISTRATION_CAPTURE_ONLY=1,
and waits for it to emit registration_inputs.bin under
./data/blueprint-<id>-*/. Each blueprint can use the helper
blueprint_sdk::registration::write_registration_inputs to persist its TLV payload
when BlueprintEnvironment::registration_mode() returns true.
cargo tangle blueprint run and cargo tangle blueprint preregister accept --preferred-source
(native, container, or wasm) plus --vm/--no-vm so you can control how the manager fetches and
executes artifacts. Pass --save-runtime-prefs to write those choices back to settings.env
(PREFERRED_SOURCE / USE_VM) so future commands inherit the same behavior.
Every CLI action that submits a transaction now reports tx_submitted / tx_confirmed
lines (or JSON objects when --json is used), making it easy to track hashes and block
confirmations in logs or CI pipelines.
And your blueprint is ready to go!
When targeting real Tangle networks, provide a blueprint definition manifest that mirrors the on-chain schema. The file can be JSON, YAML, or TOML and must describe the blueprint metadata, jobs, and artifact sources (container images or native binaries). Once authored, pass it via --definition:
cargo tangle blueprint deploy tangle \
--network testnet \
--definition ./definition.jsonAt minimum the manifest requires metadata_uri, manager, at least one job, and one source. Fields such as schemas or blueprint-specific config are optional and default to empty values. See MIGRATION_EVM_ONLY.md for a detailed example.
The blueprint-anvil-testing-utils crate exposes harness_builder_from_env for TangleHarness, which replays the LocalTestnet.s.sol broadcast so every integration test runs against deterministic contract state. Useful commands:
# Client integration tests (Anvil-backed)
cargo test -p blueprint-client-tangle --test anvil
# Pricing engine QoS listener
cargo test -p blueprint-pricing-engine --test evm_listener
# Blueprint runner end-to-end harness
cargo test -p blueprint-manager --test tangle_runner
# Example blueprint harness (router + runner wired together)
cargo test -p hello-tangle-blueprint --test anvilEach suite boots its own Anvil container via testcontainers, so Docker is required when running locally or in CI.
Note: The harness loads
crates/chain-setup/anvil/snapshots/localtestnet-state.jsonand falls back to the bundledlocaltestnet-broadcast.jsonif the snapshot is missing or fails validation. Refresh fixtures withscripts/fetch-localtestnet-fixtures.sh, and setRUN_TNT_E2E=1to opt into the longer suites.
For a keystore-to-runner walkthrough (keys, env vars, harness commands, and manual
TangleClient snippets) see docs/operators/anvil.md.
For additional commands, advanced configurations, and complete CLI usage, see the official CLI reference.
For support or inquiries:
- Issues: Report bugs or request features via GitHub Issues.
- Discussions: Engage with the community in GitHub Discussions.
- For real-time assistance and announcements:
- Join our Discord server
- Join our Telegram channel
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
We welcome feedback and contributions to improve this blueprint. Please open an issue or submit a pull request on our GitHub repository. Please let us know if you fork this blueprint and extend it too!
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
