Code Monkey home page Code Monkey logo

purescript-cip30's Introduction

Purescript interface to Cardano Wallets over Cip30

Implements FFI for purescript to the Cardano XCip-30 wallet interface. See the js or typescript docs to match the functions: With this library we can interact with cardano in browser wallets like Nami or Eternl if they support Cip30.

By Cip30 standard the cardano object is injected to the window. Note that it takes some time to inject the object so it might be beneficial to add 1 sec delay before your first function invokation to interact with the wallet. Otherwise no cardano object will be available and code will end up with error.

Most likely that you will use this library in pair with CSL. Note that Cbor-strings of this library are Hex-encoded strings in terms of CSL. So for example if function signTx takes tx argument as Cbor we can get that from CSL tx by converting it to Hex-encoded string with to_hex method. Also to get meaningful data from return type of Cip30 function we can use CSL's from_hex method.

This library is low-level implementation so the export type are kept aligned with original implementation in Cip30. Use CSL converters like to_hex/fro_hex or to_bytes/from_bytes to match the types.

The only improvement on tpye level which was take is to turn JS style promises to the more convenient for Purescript Aff-type.

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.