Cardano Client Lib adapter
testkit-ccl adapts YanoDevnetTestKit to Cardano Client Lib’s
BackendService API. It is useful for Java tests where application code already
depends on CCL abstractions and should run against an in-process Yano devnet.
This module is intentionally separate from testkit so the base testkit does
not pull in cardano-client-backend.
Add the adapter
Section titled “Add the adapter”In a JUnit 5 project already using the Java testkit, add the matching adapter version:
testImplementation "org.yanoproject:yano-testkit-ccl:${yanoVersion}"What It Provides
Section titled “What It Provides”YanoBackendService.from(kit): creates a CCLBackendServicebacked by aYanoDevnetTestKit.
Implemented service areas include the pieces needed for common devnet transaction workflows:
UtxoServiceTransactionServiceEpochServiceBlockService
Unsupported CCL services fail loudly instead of returning misleading empty results.
Basic Usage
Section titled “Basic Usage”import com.bloxbean.cardano.client.backend.api.BackendService;import org.yanoproject.testkit.ccl.YanoBackendService;import org.yanoproject.testkit.devnet.YanoDevnetExtension;import org.yanoproject.testkit.devnet.YanoDevnetTestKit;import org.junit.jupiter.api.Test;import org.junit.jupiter.api.extension.RegisterExtension;
class CclIntegrationTest { @RegisterExtension static YanoDevnetExtension yano = YanoDevnetExtension.devnet().startNode();
@Test void usesCclBackendService(YanoDevnetTestKit kit) throws Exception { BackendService backendService = YanoBackendService.from(kit);
var tip = backendService.getBlockService().getLatestBlock().getValue(); var params = backendService.getEpochService().getProtocolParameters().getValue();
// Pass backendService to application code that expects CCL. }}Embedded Only
Section titled “Embedded Only”YanoBackendService is embedded and in-process. It reads and writes through the
public Yano testkit roles. It does not start a Yano app process and it does not
use HTTP.
For tests that need the production HTTP surface, use testkit’s
YanoAppProcess and a normal HTTP-backed CCL backend such as BFBackendService.
Protocol Parameters
Section titled “Protocol Parameters”Protocol parameters are mapped from Yano’s runtime snapshots when available. The fallback JSON mapper supports both Cardano node-style camel-case protocol params and Blockfrost-compatible snake-case protocol params.
Boundaries
Section titled “Boundaries”This adapter does not expose runtime internals and does not attempt to implement the full CCL backend surface. Add support only when a real Yano devnet workflow needs it, and prefer failing loudly for unsupported methods.