Giter Club home page Giter Club logo

cardano-transaction-lib's Introduction

cardano-transaction-lib

Hercules-ci Cachix Cache PureScript code documentation

cardano-transaction-lib (CTL) is a Purescript library for building smart contract transactions on Cardano. It aims to port the functionality and interface of Plutus off-chain code to the browser environment and NodeJS.

Table of Contents

Documentation

Please explore our documentation to discover how to use CTL, how to set up its runtime, and how it compares to Plutus/PAB:

You can also access PureScript documentation for CTL and its dependencies for the most recent develop version, or generate it yourself.

Light wallet support

Support is planned for the following light wallets:

Roadmap

  • Stage 1 Build a simple transaction in the browser that works with at least one light wallet (Nami)
  • Stage 2 Once we can construct a simple user-to-user transaction, we will try to use the library to submit the tx with nami
  • Stage 3 Once we have a simple working transaction, we will seek to build a Plutus smart contract transaction with datum from scratch
  • Stage 4 Once we can construct Plutus smart contract transactions, we will seek to build a library/DSL/interface such that transactions can be built using constraints and lookups - as close as possible to a cut-and-paste solution from Plutus' Contract monad code in Haskell (but with no guarantee that code changes are not necessary)
    • Stage 4.1 Investigate supporting compatibility with the Vasil hardfork and improvements to our initial Contract API
  • Stage 5 Once we have a basic Contract-style API, we will further refine its public interface, expand wallet support (see below), expose a test interface (DONE - see here), provide a more ergonomic JS/TS API, support stake validators (DONE), and support CIP workflows on the public testnet (In progress)
  • Stage 6 Once CTL's Contract interface has been stabilized, we will add support for even more wallets and attempt to deprecate CTL's currently required Haskell server (DONE)

Architecture

CTL is directly inspired by the Plutus Application Backend (PAB). Unlike PAB, however, CTL is a library and not a standalone process. Over the course of CTL's development, several questions have been raised as to how best create PAB-as-a-library:

  1. How do we get the transaction in the right format?
    • This is handled by cardano-serialization-lib, a Rust library available as WASM
  2. How do we query the chain?
    • This has been solved using Ogmios & Kupo
    • We will support an alternative BlockFrost backend as well in the future
  3. How do we query for datums (i.e. the datums themselves and not just their hashes)?
    • Kupo solves this problem
  4. How do we get wallet data?
    • This is done via browser-based light wallet integration in the browser based on CIP-30
  5. How closely should we follow Plutus' Contract API?
    • CTL's Contract model is significantly less restrictive than Plutus' and allows for arbitrary effects within the Contract monad
    • Certain features cannot be directly translated into Purescript from Haskell due to differences between the two languages
    • Some of the Plutus conventions do not make sense for us, due to differences between on-chain and off-chain

Additional resources/tools:

Available support channels info

You can find help, more information and ongoing discusion about the project here:

cardano-transaction-lib's People

Contributors

aciceri avatar adamczykm avatar amirmrad avatar aske avatar benjmhart avatar bladyjoker avatar bradley-heather avatar brainrake avatar errfrom avatar firefrorefiddle avatar geometer1729 avatar gnumonik avatar jy14898 avatar kirill-havryliuk avatar klntsky avatar luis-omega avatar mangoiv avatar marijanp avatar mitchycola avatar nalane avatar ngua avatar pb99u069 avatar przembot avatar rmgaray avatar rynov avatar ssorc3 avatar szg251 avatar uhbif19 avatar vvtran avatar zmrocze avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.