Hello Module

Author: Accord Project

hellomodule@0.6.1 Clause ^0.20.10 57ba4a5c3a961841ea82d4007eb71b4ff0996fadc220153d143273732c8b65bc

This is the Hello World of Accord Project Templates, with two Ergo modules.

Download Archive Download Compiled Archive Open in Template Studio Open in VSCode Web

Hello Module

This is the Hello World of Accord Project Templates, with two Ergo modules.

Template Text

Name of the person to greet: "Fred Blogs". Thank you!

Name of the person to greet: "Fred Blogs".
Thank you!
Name of the person to greet: {{name}}.
Thank you!
{
    "$class": "org.accordproject.hellomodule.HelloModuleClause",
    "clauseId": "03c20a3b-0313-4876-88d4-bea5b9901c96",
    "name": "Fred Blogs"
}

Template Model

namespace org.accordproject.hellomodule

import org.accordproject.cicero.contract.* from https://models.accordproject.org/cicero/contract.cto
import org.accordproject.cicero.runtime.* from https://models.accordproject.org/cicero/runtime.cto

transaction MyRequest extends Request {
  o String input
}

transaction MyResponse extends Response {
  o String output
}

/**
 * The template model
 */
asset HelloModuleClause extends AccordClause {
  /**
   * The name for the clause
   */
  o String name
}

// this is a change!

Model Dependencies

Template Logic

Find the full logic for this template on on GitHub.

State Types

Type Sample JSON
org.accordproject.cicero.contract.AccordContractState
{
    "$class": "org.accordproject.cicero.contract.AccordContractState",
    "stateId": "d5846c32-c07a-11ea-ad77-8b5ce7c057ac"
}

Request Types

Type Sample JSON
org.accordproject.hellomodule.MyRequest
{
    "$class": "org.accordproject.hellomodule.MyRequest",
    "input": "Aliquip.",
    "transactionId": "d5846c30-c07a-11ea-ad77-8b5ce7c057ac",
    "timestamp": "2020-07-07T18:53:58.899+01:00"
}

Response Types

Type Sample JSON
org.accordproject.hellomodule.MyResponse
{
    "$class": "org.accordproject.hellomodule.MyResponse",
    "output": "Irure enim ut.",
    "transactionId": "d5846c31-c07a-11ea-ad77-8b5ce7c057ac",
    "timestamp": "2020-07-07T18:53:58.899+01:00"
}

Events Types

Type Sample JSON
org.accordproject.base.Event
{
    "abstract": "this is an abstract type"
}

Technical Integration

Please refer to the Cicero documentation for details and examples of how to integrate a call to a Cicero template into your application.

View the Latest code for this template on GitHub.