Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mesh lower level APIs #168

Merged
merged 75 commits into from Nov 16, 2023
Merged

Mesh lower level APIs #168

merged 75 commits into from Nov 16, 2023

Conversation

SIDANWhatever
Copy link
Member

@SIDANWhatever SIDANWhatever commented Nov 12, 2023

This PR contains the critical feature updates of introducing the lower level transaction building APIs MeshTxBuilder, which implements according to the design of cardano-cli. Methods are named with the corresponding cardano-cli APIs in camel case. Currently it supports version 2 plutus script unlocking and minting, and it could be chained to a nested transaction with multiple smart contract interactions.

Key Features

MeshTxBuilder

MeshTxBuilder is an user-facing entrance for such APIs, where it could be passed in

  1. fetcher for easier tx building (without supplying value, address or ref scripts info like cardano-cli)
  2. submitter for transaction submission (it could be browser wallet instance or provider instance)
  3. evaluator for calculating redeemer exUnits needed
  4. isHydra for setting default protocol fee to 0.

The transaction building completes with .complete() to finishing the building process with querying performed also.

MeshTxBuilderCore

MeshTxBuilderCore contains all serialization APIs mapping to the existing cardano-cli APIs if possible. It is synchronous in nature and without external dependencies except cardano-serialization-lib. All methods could be used on a standalone basis.

The transaction building could be completed with .completeSync() to finishing the building process without querying blockchain also.

Other Fixes / Updates

  1. IFetcher
  • Adding fetchUTxOs method for tx building process
  1. BlockfrostProvider, MaestroProvider & KoiosProvider
  • Adding the fetchUTxOs implementation
  • Tango provider current server error, cannot create account for testing & development
  1. UTxO interface
  • Adding scriptHash?: string; flag for processing reference script transaction.

TODO

  • Completion of APIs (e.g. staking)
  • Collateral returns at complete (currently circular deps in CSL is observed, difficult to implement)

Related Issues

#20 , #100

@abdelkrimdev abdelkrimdev merged commit 8758497 into main Nov 16, 2023
2 checks passed
@abdelkrimdev abdelkrimdev deleted the feature/mesh-tx-builder branch November 16, 2023 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants