Mesmo: A Compiled Cardano Native Library Exported to Four Languages
Cardano SDKs cover 95% of developer needs, and now Mesmo fills the missing 5% — in Python, Go, Rust, and JavaScript — with no library switch
Cardano's developer ecosystem is genuinely multilingual. Python teams build on pycardano, TypeScript teams on MeshJS or Lucid Evolution or Evolution SDK, Rust teams on pallas, Go teams on Apollo. These are good libraries, and if one of them serves your needs, you should use it.
Oftentimes, though, developers need to access extra features that sit outside of a certain library. Mesmo gives them that option. It’s a fallback that increments existing SDKs but that can’t stand on its own. Mesmo offers a way of reaching for a specific functionality your library of choice doesn't have yet — like a governance operation, offline latest PlutusVM costing, etc — without leaving that library, and without waiting for a feature request to reach the top of a maintainer's queue.
It works by taking Cardano Client Lib (CCL) — the mature Java SDK — and compiling it with GraalVM Native Image into an ordinary shared library (libmesmo.so / libmesmo.dylib / libmesmo.dll) with a plain C ABI. No JVM is involved at runtime. On top of that library sit four hand-built wrappers that make the whole thing feel native in each language.
What is Mesmo and why it matters
Most Cardano SDKs outside the JVM are maintained by individuals or small teams, frequently in their spare time. That is a remarkable achievement, but also a structural constraint.
For instance, every hard fork lands new functionalities that require updating the Cardano SDKs. The Conway era alone brought DRep registration and delegation, governance actions and voting, committee operations, treasury donations, and new certificate types. Each of those had to be understood, implemented, tested, and released in every SDK, in every language, by whoever had time.
It resulted in a familiar experience: A library covers 95% of developer needs, but the missing 5% are precisely the new thing a specific product roadmap depends on. The options have traditionally been to implement the primitive yourself, switch SDKs, or wait.
Cardano Client Lib, however, escapes this situation. Because the Cardano Foundation supports its maintenance, new protocol functionality is implemented and tested in step with hard forks rather than as spare-time permitting. Mesmo takes that continuously maintained feature surface and exports it to the four language ecosystems where the gaps are most often felt.
It allows developers to keep their library, then add Mesmo for the missing pieces.
Mesmo's core is stateless, meaning it holds no connections, runs no node protocols, and syncs no chain. This allows it to slot in alongside pycardano, MeshJS / Evolution / Evolution SDK, pallas or Haskell’s Atlas for exactly the operations developers need, with no rip-and-replace and no architectural commitment. If a library later gains the feature, you can drop Mesmo for that path just as easily.
Functionalities exposed through Mesmo — including those arriving with future hard forks — track the protocol closely, are covered by CCL's extensive test suite, and are additionally verified end-to-end in Mesmo's own CI: Every wrapper builds, signs, and submits every supported transaction type against a live devnet on every change.
What's inside Mesmo
Mesmo's native core performs the local operations: building, signing, hashing, and derivation. Transaction building is not a purely offline affair, of course: you cannot select inputs without knowing which UTXOs are actually spendable, or compute fees without current protocol parameters. That chain data enters through a small ChainDataProvider interface in each wrapper, with two implementations included — Yaci-Store and Blockfrost — and a shape simple enough (fetch UTXOs, fetch parameters) that plugging in your own indexer requires just a few lines.
Plutus script costing follows the same pluggable pattern: The TransactionEvaluator interface decides how execution units are computed. Supply nothing and the default applies: the Scalus UPLC virtual machine embedded in the native core evaluates the script in-process, so script transactions cost themselves without any external service. Prefer node-backed costing? A BlockfrostEvaluator implementation ships too, and the interface accepts your own.
Transaction submission stays in your code, where every language already has good HTTP clients. What Mesmo exposes:
- Accounts: managed account handles. Create new accounts or restore from seed phrases, then sign with typed roles (payment, stake, DRep, committee). Secrets will stay encapsulated in the handle.
- Transaction building: the declarative TxPlan model, such as payments, staking, Conway governance, native and Plutus scripts, multi-party composition
- Plutus: datum hashing, PlutusData CBOR/JSON conversion, and offline execution-unit costing via the embedded Scalus evaluator. Script transactions will build with no node access.
- Keys and crypto: CIP-1852 derivation for any role, Blake2b, Ed25519, mnemonics.
- Addresses and scripts: parsing, validation, byte/bech32 conversion, native-script hashing
Transactions are described declaratively as a TxPlan: say what should happen; UTXO selection, fees, and change are handled by the library. TxPlan is a capability of CCL's 0.8 line, which is why Mesmo builds on it. The current pin is CCL 0.8.0-pre5, and Mesmo tracks upstream releases closely.
Here is a complete TxPlan for the simplest possible transaction — send 5 ada from one address to another:
version: 1.0 transaction: - tx: from: addr_test1qz2fxv… # sender: inputs are selected from this address's UTXOs intents: - type: payment address: addr_test1qp9khl… # recipient amounts: - unit: lovelace quantity: "5000000" # 5 ADA
This code snippet provides the complete basis: from names the sender whose UTXOs fund the transaction, and each entry under intents declares one thing the transaction should do. Input selection, fee calculation, and the change output back to the sender all happen inside the library. Intents compose: Add a stake_delegation intent next to the payment and both land in one transaction.
Mesmo can build several transaction types. At the time of writing, these are the current options:
| Family | Supported |
|---|---|
| Payments | Ada and native-token payments, multiple recipients per transaction; transaction metadata; explicit input selection; read-only reference inputs (CIP-0031); multi-party composition (several senders in one transaction). |
| Staking | Stake address registration and deregistration; delegation to a pool; reward withdrawal. |
| Governance (Conway) | DRep registration; update, and deregistration; vote delegation; casting votes; submitting governance actions; treasury donations. |
| Stake pools | Pool registration, update, and retirement. |
| Native scripts | Minting and burning under native-script policies; spending from native-script addresses. |
| Plutus | Minting under Plutus policies; locking at and spending from script addresses, with execution units cost by the embedded Scalus evaluator or a pluggable remote one. |
The same document, byte-for-byte, produces the same transaction from every wrapper because it is the same code building it. And every row in the above table is exercised end-to-end in CI. This brings us to the question of trust.
If you're going to rely on a fallback library for exactly the features your main SDK lacks, the key question becomes: Do the transactions it builds actually get accepted by the network?
Mesmo answers that empirically. On every change, CI builds each supported transaction type — payments, staking certificates, governance actions, pool operations, native and Plutus scripts — in all four languages and submits them to a real Cardano devnet node. The node accepting the transaction is the test, not a mock of it. And the reverse is also proven: Transactions that should fail script validation are submitted and must be rejected on-chain, so error handling is as tested as the happy path.
The four wrappers
Each wrapper is a thin, idiomatic layer over the same C ABI consisting of 32 functions. Not just thin enough that behavior can't drift between languages (a parity check in CI enforces that all four bind the identical entry-point set), but also idiomatic enough that nothing feels foreign. The native library ships inside the package or is fetched on first build; there is nothing to install separately.
Python
pip install mesmo==0.1.0rc8
from mesmo import Mesmo, Network lib = Mesmo() # Create a new account with lib.accounts.create(Network.MAINNET) as account: print(account.info["base_address"]) # Or restore an existing account from a recovery phrase mnemonic = "test walk nut penalty hip pave soap entry language right filter choice" with lib.accounts.from_mnemonic(mnemonic, Network.MAINNET) as restored_account: print(restored_account.info["base_address"]) result = lib.quicktx.build(txplan_yaml, utxos, protocol_params) datum_hash = lib.plutus.data_hash("182a") lib.close()
Pure ctypes — no compiled extension module — and a single Mesmo instance is safe to share across threads, so it drops into Flask, FastAPI, or a worker pool without ceremony.
Go
go get github.com/bloxbean/mesmo/wrappers/go
import "github.com/bloxbean/mesmo/wrappers/go/mesmo" lib, _ := mesmo.New() defer lib.Close() // Create a new account account, _ := lib.Accounts.Create(mesmo.Mainnet) defer account.Close() // Or restore from mnemonic mnemonic := "test walk nut penalty hip pave soap entry language right filter choice" restored, _ := lib.Accounts.FromMnemonic(mnemonic, mesmo.Mainnet) defer restored.Close() result, _ := lib.QuickTx.Build(txplanYAML, utxos, protocolParams)
No cgo and no C toolchain: The library is loaded at runtime with purego, so cross-compilation workflows stay simple. A Mesmo object is safe to share across goroutines.
Rust
[dependencies] mesmo = "0.1.0-pre8"
use mesmo::{Mesmo, Network}; let lib = Mesmo::new()?; // Create a new account let account = lib.accounts().create(Network::Mainnet)?; // Or restore from recovery phrase let mnemonic = "test walk nut penalty hip pave soap entry language right filter choice"; let restored = lib.accounts().from_mnemonic(mnemonic, Network::Mainnet)?; let result = lib.quicktx().build(&txplan_yaml, &utxos, &protocol_params, None)?; // teardown is RAII — no close() to forget
The build script fetches the platform's native library once and sets the rpath, without any environment variables at runtime. Thread affinity is enforced at compile time by the type system rather than documented and hoped for.
JavaScript (Bun)
bun add @bloxbean/mesmo@0.1.0-pre8
import { Mesmo, MAINNET } from '@bloxbean/mesmo'; const lib = new Mesmo(); // Create a new account using account = lib.accounts.create(MAINNET); console.log(account.info.base_address); // Or restore from recovery phrase const mnemonic = 'test walk nut penalty hip pave soap entry language right filter choice'; using restored = lib.accounts.fromMnemonic(mnemonic, MAINNET); console.log(restored.info.base_address); const result = lib.quicktx.build(txplanYaml, utxos, protocolParams); lib.close();
The JavaScript wrapper targets Bun's built-in FFI and ships full TypeScript definitions.
Supported platforms
Prebuilt native libraries ship for:
- Linux x86_64 (glibc ≥ 2.17),
- Linux aarch64 (glibc ≥ 2.17),
- Alpine Linux x86_64 (musl),
- macOS Apple Silicon,
- and Windows x86_64.
What to know before using Mesmo
A fallback is only trustworthy if it plainly states costs, trade-offs, and capabilities. So, when using Mesmo, be mindful of the following:
- Binary size. You are adding a ~60 MB platform-specific native library to your dependency tree.
- Not a node client. By its own design, Mesmo doesn’t have node protocols, chain sync, or submission. Chain data for building comes through the
ChainDataProviderinterface (either the already included Yaci-Store and Blockfrost implementations or your own implementation). Submission is your HTTP stack's job. - Platform coverage. A fairly large number of platforms is supported.
- JavaScript means Bun, not Node. Node's FFI bridges (ffi-napi, koffi) crash against GraalVM native libraries (which were used to compile mesmo), so the JavaScript wrapper requires the Bun runtime. For teams committed to Node.js this is currently an adoption barrier that the planned WebAssembly target will eventually solve.
- Pre-release maturity. Mesmo tracks CCL's 0.8 pre-release line and is itself a pre-release as well; APIs can still change before the beta designation. The devnet-verified CI keeps behavior honest, but version-pinning discipline is on you until then.
If none of the gaps Mesmo fills apply to you, then we advise just continuing to use your ecosystem's native library.
Next steps
Mesmo’s roadmap has four main points:
- More chain-data providers. The initial version ships
ChainDataProviderimplementations for Yaci-Store and Blockfrost; additional out-of-the-box providers are planned — starting with Ogmios, Koios, and Dolos — so UTXO selection works against whichever data backend your infrastructure already runs. None of this is gated on a release, though: The interface is two methods (fetch UTXOs, fetch protocol parameters), so writing your own — aDolosProvider, say — is possible today in a few dozen lines. - Beta, in step with upstream. Mesmo currently builds on CCL 0.8.0-pre5 — a pre-release, because Mesmo's transaction model relies on TxPlan, which became available in Cardano Client Lib only with the 0.8 line. When cardano-client-lib graduates out of pre-release, Mesmo will move to a beta designation on the stable pin.
- A programmatic QuickTx builder in all four languages. Today, transactions are described as TxPlan YAML documents. A code-first QuickTx builder — expressed in each wrapper's own idiom, on top of the same core — is planned, so teams that prefer constructing transactions in code get the same single-implementation semantics.
- A WebAssembly target. Alongside the existing native platform builds, compiling the core to WebAssembly would bring Mesmo to the browser — and to the server without native-library bindings at all, for runtimes that can host wasm. Server-side wasm support varies across language ecosystems, so this lands as an additional target next to the native ones, not a replacement for them.
Beyond this list, the roadmap remains deliberately unfinished: Mesmo exists to fill the gaps developers actually hit, which means feedback and feature requests from the Cardano community drive what gets built next. If your SDK is missing something Mesmo doesn't cover yet, or you need a provider for a backend we haven't named, we encourage you to open an issue on GitHub. Concrete gap reports, filled by active projects, are the best prioritization signal a project like Mesmo can get.
Key Links: