Hello World

Author: Accord Project

helloworld@0.13.0 Clause ^0.21.0 013548af7cdb87262b84296331e1a2e93a9f8b4ec8a8616a5290c8d389921db6

This is the Hello World of Accord Project Templates. Executing the clause will simply echo back the text that occurs after the string `Hello` prepended to text that is passed in the request.

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

Hello World

This is the Hello World of Accord Project Templates. Executing the clause will simply echo back the text that occurs after the string Hello prepended to text that is passed in the request.

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.helloworld.HelloWorldClause",
    "name": "Fred Blogs",
    "clauseId": "dab391e9-aecd-4f0d-8713-8fa823bbfd12"
}

Template Model

namespace org.accordproject.helloworld

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 HelloWorldClause 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": "6cd5ad71-cd1d-11ea-920c-ade26666d144"
}

Request Types

Type Sample JSON
org.accordproject.helloworld.MyRequest
{
    "$class": "org.accordproject.helloworld.MyRequest",
    "input": "Aliqua anim irure.",
    "transactionId": "6cd58660-cd1d-11ea-920c-ade26666d144",
    "timestamp": "2020-07-23T15:48:05.190-04:00"
}

Response Types

Type Sample JSON
org.accordproject.helloworld.MyResponse
{
    "$class": "org.accordproject.helloworld.MyResponse",
    "output": "Consectetur reprehenderit eiusmod exercitation.",
    "transactionId": "6cd5ad70-cd1d-11ea-920c-ade26666d144",
    "timestamp": "2020-07-23T15:48:05.191-04: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.