Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
com.bloxbean.cardano:aiken-java-binding
Advanced tools
A Java binding for Aiken Smart Contract Language Library
Java binding for Aiken, a modern smart contract platform for Cardano Blockchain.
This library enables Java apps to evaluate script costs without relying on external services. It uses aiken-jna-wrapper to access Aiken Rust libraries.
Current Version:
Workaround : During the transaction cost evaluation, remove the reference inputs from the transaction and add the plutus script to the witness set. After calculating the script cost, you can add back the reference input again.
For another platform, please create a PR / request here
Maven (pom.xml)
<dependency>
<groupId>com.bloxbean.cardano</groupId>
<artifactId>aiken-java-binding</artifactId>
<version>${version}</version>
</dependency>
Gradle (build.gradle)
implementation 'com.bloxbean.cardano:aiken-java-binding:${version}'
You also need to provide cardano-client-lib
and jna
dependencies if not already there.
<dependency>
<groupId>com.bloxbean.cardano</groupId>
<artifactId>cardano-client-lib</artifactId>
<version>0.5.0</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.13.0</version>
</dependency>
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna-platform</artifactId>
<version>5.13.0</version>
</dependency>
You can use the TxEvaluator
class to evaluate script execution costs for a transaction. The evaluateTx
method returns a list
of redeemers with updated execution units. You can set these execution units in the final transaction's redeemers before submitting the transaction.
TxEvaluator txEvaluator = new TxEvaluator();
CostMdls costMdls = new CostMdls();
//Get cost models from protocol parameters or provide hardcoded value
costMdls.add(CostModelUtil.getCostModelFromProtocolParams(protocolParamsSupplier.getProtocolParams(), Language.PLUTUS_V2).orElseThrow());
//Evaluate
List<Redeemer> evalReedemers = txEvaluator.evaluateTx(txn, inputUtxos, costMdls);
FAQs
Unknown package
We found that com.bloxbean.cardano:aiken-java-binding demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.