cardano-client-lib icon indicating copy to clipboard operation
cardano-client-lib copied to clipboard

Aiken Tx Evaluator support

Open satran004 opened this issue 1 year ago • 2 comments

Goal: Application should be able to perform offline script cost evaluation

Description Offline script cost evaluation is now possible with Aiken. This capability is exposed for Java applications through aiken-java-binding project.

In CCL 0.5.0, transaction evaluation is done through TransactionEvaluator interface. Currently we have only two implementations for this interface Blockfrost and Ogmios.

Tasks:

  • Add a new submodule 'aiken'
  • Add Tx evaluator support using Aiken
  • Use aiken-java-binding project to implement TransactionEvaluator interface

satran004 avatar Jun 14 '23 03:06 satran004

CCL compatible AikenTransactionEvaluator is now available in aiken-java-binding 0.0.7. A Java app needs to add aiken-java-binding dependency to use that.

Sample usage:

 Result<String> result = quickTxBuilder.compose(tx)
                .feePayer(senderAddress)
                .withSigner(SignerProviders.signerFrom(sender))
                .withTxEvaluator(new AikenTransactionEvaluator(backendService))
                .completeAndWait(System.out::println);

satran004 avatar Jun 19 '23 12:06 satran004

This issue needs some more work to provide better support in case of reference inputs.

satran004 avatar Jul 14 '23 04:07 satran004