Coder Social home page Coder Social logo

okapi-aiken's Introduction

Okapi

Okapi is a helper function library written aiken to make drafting cardano smart contracts easier and faster.

add the lib/okapi-aiken directory to your aiken project and import it with

use okapi-aiken/okapi as ok

now you can use any of the okapi helper functions to your validators

validator(o: VerificationKeyCredential) {
  fn spend(d: Datum, r: Redeemer, c: ScriptContext) -> Bool {
    ok.tx_signed_by(c.transaction, o)
  }
}

Okapi Function Library:

Token Datum && Metadata

CIP-68 Token prefixes

get_spend_ref

get_policy_id

get_own_input

get_own_script_hash

get_own_input_value

get_own_outputs

has_own_singleton_output

get_own_singleton_output

has_singleton_output

get_own_singleton_output_value

keep_own_lovelace_value

contains_single_token_of

contains_only_lovelace

tx_signed_by

tx_signed_by_no_list

tx_signed_by_list

token_metadata_name_check

compare_token_names

init_68_datum

make_token_names

make_token_prefix

token_pair_prefix

make_fraction_prefix

fraction_pair_prefix

has_one_singleton_asset_less

how_many_tokens

datum_match

has_ref_with_policy

get_ref_with_policy

has_in_with_policy

get_in_with_policy

has_out_with_policy

get_out_with_policy

has_ref_with_token

get_ref_with_token

has_in_with_token

get_in_with_token

has_out_with_token

get_out_with_token

has_ref_from_credential

get_ref_from_credential

has_input_from_credential

get_input_from_credential

has_output_from_credential

get_output_from_credential

validateList

withBurn

withdraw0

merkel0 listScriptInputs inputOutputs

okapi-aiken's People

Contributors

rhystmorgan avatar

Stargazers

Adrian Gora avatar Fabian Bormann avatar

Watchers

 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.