Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
@hyperionbt/helios
Advanced tools
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. This library contains a reference compiler for Helios, as well as transaction building functions.
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, compile-time evaluation, and enums as tagged unions.
The Helios library contains a reference compiler for the Helios language, as well as transaction building functions. Everything is written in Javascript.
The Helios language and Helios API are covered extensively by the online book.
There is an online coding playground.
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 the sponsorship to be used for before sending funds.
The following Helios example is equivalent to the Plutus vesting contract from the Plutus playground:
spending vesting
struct VestingTranche {
time: Time // 'amount' is available after 'time'
amount: Value
func available_from(self, time: Time) -> Value {
if (time >= self.time) {
self.amount
} else {
Value::ZERO
}
}
func remaining_from(self, time: Time) -> Value {
self.amount - self.available_from(time)
}
}
struct VestingParams {
tranche1: VestingTranche
tranche2: VestingTranche
owner: PubKeyHash
func remaining_from(self, time: Time) -> Value {
self.tranche1.remaining_from(time) + self.tranche2.remaining_from(time)
}
}
const PARAMS: VestingParams = VestingParams{
/*parameters interpolated from surrounding js*/
}
// the compiler is smart enough to add an empty Datum and empty Redeemer as arguments to the actual main entrypoint function
func main(ctx: ScriptContext) -> Bool {
tx: Tx = ctx.tx;
now: Time = tx.time_range.start;
remaining_actual: Value = tx.value_locked_by(ctx.get_current_validator_hash());
remaining_expected: Value = PARAMS.remaining_from(now);
remaining_actual >= remaining_expected && tx.is_signed_by(PARAMS.owner)
}
You can compile this source into Plutus-Core using the helios.js
library:
import * as helios from "helios.js"
const src = `struct VestingTranche {
...
...
`;
console.log(helios.Program.new(src).compile().serialize());
// the output can be saved to a file, and that file can be used directly by cardano-cli
You can explore this example on the Helios playground.
FAQs
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. With this library you can compile Helios scripts and build Cardano transactions, all you need to bu
The npm package @hyperionbt/helios receives a total of 48 weekly downloads. As such, @hyperionbt/helios popularity was classified as not popular.
We found that @hyperionbt/helios demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 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.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.