Hello Module

hellomodule@0.6.0 Clause ^0.20.0 00f20a5a9d8099158dbd2cc94c9050381aceba5e8c379c1391d93cf3c3459f00

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

Download 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": "16b028e5-165a-4d90-aa26-5959b014e4ea",
    "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": "5e430851-42fa-11ea-8b78-dde257dbceb0"
}

Request Types

Type Sample JSON
org.accordproject.hellomodule.MyRequest
{
    "$class": "org.accordproject.hellomodule.MyRequest",
    "input": "Id.",
    "transactionId": "5e42e140-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:49:27.892-05:00"
}

Response Types

Type Sample JSON
org.accordproject.hellomodule.MyResponse
{
    "$class": "org.accordproject.hellomodule.MyResponse",
    "output": "Consequat dolor fugiat.",
    "transactionId": "5e430850-42fa-11ea-8b78-dde257dbceb0",
    "timestamp": "2020-01-29T19:49:27.893-05: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.