template-archive icon indicating copy to clipboard operation
template-archive copied to clipboard

Implement contract instantiation and signing via Cicero-Server

Open martinhalford opened this issue 2 years ago • 1 comments

Feature Request 🛍️

The recent POC .slc changes provide the capability to sign .cta templates, plus instantiate and sign .slc contract instances.

These features are currently only available via the CLI.

The current Cicero-Server provides an API to trigger, parse and draft templates.

The proposal is to extent the Cicero-Server to include template sign and contract instantiate and sign functions.

Possible Solution

The proposal is to add sign(template), instantiate(contract) and sign(contract) as endpoints to the Cicero Server API.

sign(template)

  • Input: template (cta)
  • Action: execute sign function and update template with signature.json
  • Output: updated/mutated template (cta) file.

instantiate(contract)

  • Input: template (cta) & data (json)
  • Action: execute instantiate function, including adding initial state
  • Output: new contract (slc) file saved to file system - pass back filename & location of new contract (slc) file.

sign(contract)

  • Input: contract (slc)
  • Action: execute sign function and update contract signatures with signature.json
  • Output: updated/mutated contract (slc) file.

Knock-on requirements

Will need to extend trigger and draft functions to support contract (slc) inputs in addition to existing template (cta) files.

martinhalford avatar Sep 29 '21 00:09 martinhalford

That sounds great! Would instantiate allow you to create something server side? (not sure I know if the architecture would make sense for that kind of server-side support)

jeromesimeon avatar Sep 29 '21 12:09 jeromesimeon