Skip to main content
The modules/sdk module is a single published artifact that re-exports every internal Tessellation module under stable package paths. Metagraph developers depend on it instead of individual internal modules.
The SDK is published to Sonatype Central as io.constellationnetwork:tessellation-sdk. All other Tessellation modules are marked publish / skip := true and are not available on Maven Central.

What the SDK exposes

The SDK aggregates the following internal modules into one artifact:
Internal moduleWhat it provides
sharedCore types: Transaction, Block, GlobalSnapshot, Address, Hash, Signed
keytoolKey management, PKCS12 keystore operations
kernelRecursion schemes, Cell abstractions
node-sharedP2P networking, consensus, gossip, Rewards trait
currency-l0CurrencyL0App, OverridableL0, currency snapshot types
currency-l1CurrencyL1App, OverridableL1, data application L1 service
dag-l1Block consensus, CustomContextualTransactionValidator
All of these are bundled into the SDK JAR and re-exported under the io.constellationnetwork.sdk package hierarchy.

Key SDK entry points

SecurityProvider[F]

A type alias for the internal io.constellationnetwork.security.SecurityProvider[F], exposed at io.constellationnetwork.sdk.security.
// sdk/security/package.scala
type SecurityProvider[F[_]] = io.constellationnetwork.security.SecurityProvider[F]

object SecurityProvider {
  def apply[F[_]: SecurityProvider]: SecurityProvider[F] = implicitly

  def forAsync[F[_]: Async]: Resource[F, SecurityProvider[F]] =
    io.constellationnetwork.security.SecurityProvider.forAsync
}

keypair.generate[F]

Generates a cryptographic key pair using the active SecurityProvider.
// sdk/keytool/keypair/package.scala
def generate[F[_]: Async: SecurityProvider]: F[KeyPair] =
  KeyPairGenerator.makeKeyPair[F]

Why provided scope

When you declare the SDK dependency in your metagraph project, use provided scope:
libraryDependencies += "io.constellationnetwork" %% "tessellation-sdk" % tessellationVersion % Provided
provided means the SDK classes are available at compile time but are not bundled into your metagraph JAR. The node runtime already ships the SDK implementation — adding it twice would cause ClassCastException errors when the node loads your metagraph.

How the SDK is built

Internally, the sdk SBT project depends on all other modules with % "provided" scope and then copies their compiled classes and sources into its own JAR:
lazy val sdk = (project in file("modules/sdk"))
  .dependsOn(
    keytool % "provided",
    kernel % "provided",
    shared % "provided",
    nodeShared % "provided",
    currencyL0 % "provided",
    currencyL1 % "provided",
    dagL1 % "provided"
  )
  .settings(
    name := "tessellation-sdk",
    // ...
    Compile / packageBin / mappings ++= Seq(
      (keytool / Compile / packageBin / mappings).value,
      (kernel / Compile / packageBin / mappings).value,
      // ... all other modules
    ).flatten
  )

SDK pages

Getting started

Set up your metagraph project and wire up the SDK dependency.

Extension points

All overridable hooks in CurrencyL0App and CurrencyL1App.

Data applications

Custom data blocks with per-metagraph consensus logic.

Custom rewards

Override the default reward distribution for your metagraph.

Custom validators

Add metagraph-specific transaction validation rules.

Build docs developers (and LLMs) love