Packages

A User-Friendly Component-Based Cardano SDK for Elixir.

Current section

Files

Jump to
sutra_cardano priv blueprint_generator redeemer_simple.eex
Raw

priv/blueprint_generator/redeemer_simple.eex

defmodule <%= @module_name %> do
@moduledoc """
Redeemer functions for <%= @purpose %> validator.
Redeemer type: <%= @title %>
"""
alias Sutra.Cardano.Blueprint
# Schema for this redeemer (resolved from blueprint)
@schema <%= inspect(@schema, limit: :infinity, printable_limit: :infinity) %>
@doc """
Create <%= @title %> redeemer.
Encodes the value according to the schema and returns Plutus data.
"""
def <%= @func_name %>(value) do
Blueprint.encode(value, @schema)
end
end