cryptoconditions: Interledger Crypto-Conditions

[ bsd3, crypto, finance, library, network ] [ Propose Tags ]

Please see README.md


[Skip to Readme]
Versions 0.1.0.0, 0.2.2.1, 0.2.2.2, 0.2.3.0, 0.2.4
Dependencies aeson, asn1-encoding, asn1-parse, asn1-types, base (>=4.7 && <5), base64-bytestring, bytestring, containers, cryptonite, memory, text [details]
License BSD-3-Clause
Copyright Copyright (C) 2017 Scott Sadler
Author Scott Sadler
Maintainer Scott Sadler <scott@scottsadler.de>
Category Crypto, Finance, Network
Home page https://github.com/libscott/cryptoconditions-hs
Source repo head: git clone https://github.com/libscott/cryptoconditions-hs
Uploaded by ssadler at Thu Mar 1 14:18:04 UTC 2018
Distributions NixOS:0.2.4
Downloads 487 total (24 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2018-03-01 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for cryptoconditions-0.2.4

[back to package description]

Crypto Conditions

Targeting spec: draft-thomas-crypto-conditions-02 of December 20, 2016

Current status

Supports all standard condition types except RSA.

Needs more testing. Some tests exist.

Design

This approach to Crypto Conditions in Haskell has the goals:

  • Simple to understand and work with
  • Easily extensible

The bottleneck to achieving these goals is extensibility; Haskell does not support dynamic dispatch like OOP languages, and runtime type casting in Haskell is very unnatural and somewhat unsafe.

The solution is to decouple the condition type from the implementation, such that the core algorithms and serialization can work with instances of an "IsCondition" class, and a polymorphic data type can be implemented separately to support the desired condition types and behaviours.

The module Network.CryptoConditions supports the standard condition types, library authors wishing to extend CryptoConditions should copy and paste this file into their own project and define their own Condition type.