Giter VIP home page Giter VIP logo

Comments (4)

shonfeder avatar shonfeder commented on May 27, 2024

Is this the correct type for what you're proposing?

enum Counterparty {
    Collective(Set<Signatory>),
    Singular(Signatory)
}

from themis-contract.

thanethomson avatar thanethomson commented on May 27, 2024

Is this the correct type for what you're proposing?

Sure, that's how you'd implement it in Rust 👍

from themis-contract.

shonfeder avatar shonfeder commented on May 27, 2024

I just picked rust syntax thinking it would be most perspicuous in this context, but guess I should have used TypeScript. The type reflecting this structure should be the same, regardless of the syntax.

from themis-contract.

thanethomson avatar thanethomson commented on May 27, 2024

We are no longer going to implement this model in v0.2 (currently on branch prototype/v2, soon to be merged to master).

We're now requiring that contracts expose a signatories array that, at a minimum, is of the following (Dhall) type:

let Signatory : Type =
  { id : Text
  , name : Text
  , email : Text
  }

let signatories : List Signatory =
  [ { id = "signatory1"
    , name = "Harry Henderson"
    , email = "[email protected]"
    }
  ]

in { signatories = signatories }

You can add any additional arbitrary fields to the signatory type (these will be passed through to your contract when rendering), but any notion of counterparties/organizations/etc. is totally up to you to define in your own contract. This is the only way we're going to get flexibility, while also providing Themis Contract with the minimum amount of information it needs to facilitate its signing mechanics.

from themis-contract.

Related Issues (20)

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.