Git Product home page Git Product logo

helios's Introduction

Helios Lang

Helios is a Domain Specific Language that compiles to Plutus-Core (i.e. Cardano on-chain validator scripts). Helios is a non-Haskell alternative to Plutus.

Helios is purely functional, strongly typed, and has a simple curly braces syntax. It notably supports closures, functions with optional arguments and multiple return values, OOP-like methods, enums as tagged unions, and generics.

The Helios library is written in Javascript, with complete Typescript type-coverage. This library lets you compile Cardano smart contracts and create Cardano transactions. Helios is all you need to build 100% client-side dApps for Cardano.

Example: time-lock

spending time_lock

struct Datum {
    lockUntil:   Time
    owner:       PubKeyHash // the owner can always unlock the assets
    beneficiary: PubKeyHash // beneficiary can only unlock the assets after 'lockUntil'
}

func main(datum: Datum, _, ctx: ScriptContext) -> Bool {
    tx: Tx = ctx.tx;
    now: Time = tx.time_range.start;

    tx.is_signed_by(datum.owner) || (
        tx.is_signed_by(datum.beneficiary) &&
        now > datum.lockUntil
    )
}

User guide

The Helios language and Helios API are covered extensively by the online book.

Online playground

There is an online coding playground.

VSCode plugin

There is a VSCode plugin called Helios that can be installed through the extensions marketplace. Currently it only supports syntax highlighting and syntax error diagnostics. Please help us improve this extension by contributing to the helios-ide-plugins repository.

Sponsoring

For sponsoring we prefer using the Cardano blockchain itself (instead of Patreon or Github's sponsor system).

Our Cardano address is the same one where the helioslang adahandle is located:

addr1qxyd3shxugqkrkdpwgjq522cu7h4lkr8qnz9uemd4w68p970n6h44fq8ujuyu807vll9atjpc8z6zl0pyv6n2neezysqv5rjvd

Please join our Discord and tell us what you'd like your sponsorship to be used for before sending funds.

Acknowledgements

Early contributors who deserve special acknowledgement:

helios's People

Contributors

caike avatar christianschmitz avatar gavinharris-dev avatar hai-kreate avatar inimrod avatar lley154 avatar nielstron avatar novadev94 avatar sk-saru avatar sk-shishi avatar sonfam03 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.