From cbb25294e172125d07f1a710ca84ff984a3d808d Mon Sep 17 00:00:00 2001 From: Tara Miwa Tritt Date: Mon, 15 Apr 2019 11:32:27 -0400 Subject: [PATCH 1/7] Removing JSON support reference Cleaning up example --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b432813..06b3d10 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The Ricardian Contract Specification gives a set of requirements that a Ricardia By conforming to a common specification, contracts can be validated and presented in a common way. For instance, Resources must contain a SHA-256 hash value which will allow a validating user agent to check the resource contents and ensure that the resource at the URL has not been altered. Since resources can be used to represent the user or company that is proposing the contract, it is important that the resource URL for the contract is correct and has not been altered since the contract was published. -Ricardian contracts should be written in the English language. The contract itself consists of a set of metadata values supplied in JSON format or YAML format, followed by the body of the contract, written using a subset of [CommonMark](https://commonmark.org/) with [Handlebars](https://handlebarsjs.com/)-based variable substitution. +Ricardian contracts should be written in the English language. The contract itself consists of a set of metadata values supplied in YAML format, followed by the body of the contract, written using a subset of [CommonMark](https://commonmark.org/) with [Handlebars](https://handlebarsjs.com/)-based variable substitution. Future versions may add support for metadata values supplied in JSON format. ### Metadata Fields @@ -120,8 +120,6 @@ icon: https://app.com/create-post.png#00506E08A55BCF269FE67F202BBC08CFF55F9E3C7C --- I, {{author}}, author of the blog post "{{title}}", certify that I am the original author of the contents of this blog post and have attributed all external sources appropriately. -{{$resources.content}} - {{$clauses.legalese}} ``` @@ -132,7 +130,7 @@ I, {{author}}, author of the blog post "{{title}}", certify that I am the origin { "name": "createpost", "type": "createpost", - "ricardian_contract": "---\n{\n \"title\": \"Create Post\",\n \"summary\": \"Create a blog post \\\"{{title}}\\\" by {{author}} tagged as \\\"{{tag}}\\\"\",\n \"icon\": {\n \"type\": \"image\",\n \"hash\": \"00506E08A55BCF269FE67F202BBC08CFF55F9E3C7CD4459ECB90205BF3C3B562\",\n \"urls\": [\n \"https://app.com/create-post.png\",\n \"https://dev.app.com/create-post.png\"\n ]\n },\n \"resources\": {\n \"content\": {\n \"type\": \"image\",\n \"hash\": \"1324FECCDDBB89089089090\",\n \"urls\": [\n \"https://app.com/user-1/profile-pic.jpg\",\n ]\n }\n }\n}\n---\nI, {{author}}, author of the blog post \"{{title}}\", certify that I am the original author of the contents of this blog post and have attributed all external sources appropriately.\n\n{{$resources.content}}\n\n{{$clauses.legalese}}" + "ricardian_contract": "---\n{\n \"title\": \"Create Post\",\n \"summary\": \"Create a blog post \\\"{{title}}\\\" by {{author}} tagged as \\\"{{tag}}\\\"\",\n \"icon\": {\n \"type\": \"image\",\n \"hash\": \"00506E08A55BCF269FE67F202BBC08CFF55F9E3C7CD4459ECB90205BF3C3B562\",\n \"urls\": [\n \"https://app.com/create-post.png\",\n \"https://dev.app.com/create-post.png\"\n ]\n },\n \"resources\": {\n \"content\": {\n \"type\": \"image\",\n \"hash\": \"1324FECCDDBB89089089090\",\n \"urls\": [\n \"https://app.com/user-1/profile-pic.jpg\",\n ]\n }\n }\n}\n---\nI, {{author}}, author of the blog post \"{{title}}\", certify that I am the original author of the contents of this blog post and have attributed all external sources appropriately.\n\n{{$clauses.legalese}}" } ], From 439c6e83ed58a9bde4867bdbc5e241fca5863072 Mon Sep 17 00:00:00 2001 From: Tara Miwa Tritt Date: Mon, 15 Apr 2019 11:39:07 -0400 Subject: [PATCH 2/7] Fix example to user YAML not JSON format --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 06b3d10..e7f223c 100644 --- a/README.md +++ b/README.md @@ -127,11 +127,11 @@ I, {{author}}, author of the blog post "{{title}}", certify that I am the origin ```json "actions": [ - { - "name": "createpost", - "type": "createpost", - "ricardian_contract": "---\n{\n \"title\": \"Create Post\",\n \"summary\": \"Create a blog post \\\"{{title}}\\\" by {{author}} tagged as \\\"{{tag}}\\\"\",\n \"icon\": {\n \"type\": \"image\",\n \"hash\": \"00506E08A55BCF269FE67F202BBC08CFF55F9E3C7CD4459ECB90205BF3C3B562\",\n \"urls\": [\n \"https://app.com/create-post.png\",\n \"https://dev.app.com/create-post.png\"\n ]\n },\n \"resources\": {\n \"content\": {\n \"type\": \"image\",\n \"hash\": \"1324FECCDDBB89089089090\",\n \"urls\": [\n \"https://app.com/user-1/profile-pic.jpg\",\n ]\n }\n }\n}\n---\nI, {{author}}, author of the blog post \"{{title}}\", certify that I am the original author of the contents of this blog post and have attributed all external sources appropriately.\n\n{{$clauses.legalese}}" - } + { + "name": "createpost", + "type": "createpost", + "ricardian_contract": "\n---\ntitle: Create Post\nsummary: Create a blog post \"{{title}}\" by {{author}} tagged as \"{{tag}}\"\nicon: https://app.com/create-post.png#00506E08A55BCF269FE67F202BBC08CFF55F9E3C7CD4459ECB90205BF3C3B562\n---\nI, {{author}}, author of the blog post \"{{title}}\", certify that I am the original author of the contents of this blog post and have attributed all external sources appropriately.\n\n{{$clauses.legalese}}\n" + } ], ... From f625b4e9e084126bc6780244973e04a409e3f316 Mon Sep 17 00:00:00 2001 From: Tara Miwa Tritt Date: Mon, 15 Apr 2019 11:41:26 -0400 Subject: [PATCH 3/7] Removing extra new line in example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e7f223c..7a47edd 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,7 @@ I, {{author}}, author of the blog post "{{title}}", certify that I am the origin { "name": "createpost", "type": "createpost", - "ricardian_contract": "\n---\ntitle: Create Post\nsummary: Create a blog post \"{{title}}\" by {{author}} tagged as \"{{tag}}\"\nicon: https://app.com/create-post.png#00506E08A55BCF269FE67F202BBC08CFF55F9E3C7CD4459ECB90205BF3C3B562\n---\nI, {{author}}, author of the blog post \"{{title}}\", certify that I am the original author of the contents of this blog post and have attributed all external sources appropriately.\n\n{{$clauses.legalese}}\n" + "ricardian_contract": "\n---\ntitle: Create Post\nsummary: Create a blog post \"{{title}}\" by {{author}} tagged as \"{{tag}}\"\nicon: https://app.com/create-post.png#00506E08A55BCF269FE67F202BBC08CFF55F9E3C7CD4459ECB90205BF3C3B562\n---\nI, {{author}}, author of the blog post \"{{title}}\", certify that I am the original author of the contents of this blog post and have attributed all external sources appropriately.\n\n{{$clauses.legalese}}" } ], From 0a886892be3183e8e1276797fd065d2dac540b31 Mon Sep 17 00:00:00 2001 From: Tara Miwa Tritt Date: Mon, 15 Apr 2019 11:42:15 -0400 Subject: [PATCH 4/7] Update formatting of example --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7a47edd..a13cb62 100644 --- a/README.md +++ b/README.md @@ -127,11 +127,11 @@ I, {{author}}, author of the blog post "{{title}}", certify that I am the origin ```json "actions": [ - { - "name": "createpost", - "type": "createpost", - "ricardian_contract": "\n---\ntitle: Create Post\nsummary: Create a blog post \"{{title}}\" by {{author}} tagged as \"{{tag}}\"\nicon: https://app.com/create-post.png#00506E08A55BCF269FE67F202BBC08CFF55F9E3C7CD4459ECB90205BF3C3B562\n---\nI, {{author}}, author of the blog post \"{{title}}\", certify that I am the original author of the contents of this blog post and have attributed all external sources appropriately.\n\n{{$clauses.legalese}}" - } + { + "name": "createpost", + "type": "createpost", + "ricardian_contract": "\n---\ntitle: Create Post\nsummary: Create a blog post \"{{title}}\" by {{author}} tagged as \"{{tag}}\"\nicon: https://app.com/create-post.png#00506E08A55BCF269FE67F202BBC08CFF55F9E3C7CD4459ECB90205BF3C3B562\n---\nI, {{author}}, author of the blog post \"{{title}}\", certify that I am the original author of the contents of this blog post and have attributed all external sources appropriately.\n\n{{$clauses.legalese}}" + } ], ... From 738d2b64aa6de4645840a18f433d97bd9c538806 Mon Sep 17 00:00:00 2001 From: Tara Miwa Tritt Date: Mon, 15 Apr 2019 11:46:05 -0400 Subject: [PATCH 5/7] Remove resource mention in icon metadata --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index a13cb62..cdb4261 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ Ricardian contracts should be written in the English language. The contract itse * `icon` -- *Required* * Provides a user-friendly graphical representation of the intent of the action * Is required to be a 256x256 pixel PNG image - * Must be a valid Resource (*see below*) * Must include the SHA-256 hash. Contracts containing an icon without hashes will be rejected. * This icon may be displayed alongside the Ricardian contract From e83b290ce7b0d2097f7c155dd06463443ecaeba8 Mon Sep 17 00:00:00 2001 From: Tara Miwa Tritt Date: Mon, 15 Apr 2019 12:27:56 -0400 Subject: [PATCH 6/7] Remove extra new line from example --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cdb4261..1275b0a 100644 --- a/README.md +++ b/README.md @@ -129,7 +129,7 @@ I, {{author}}, author of the blog post "{{title}}", certify that I am the origin { "name": "createpost", "type": "createpost", - "ricardian_contract": "\n---\ntitle: Create Post\nsummary: Create a blog post \"{{title}}\" by {{author}} tagged as \"{{tag}}\"\nicon: https://app.com/create-post.png#00506E08A55BCF269FE67F202BBC08CFF55F9E3C7CD4459ECB90205BF3C3B562\n---\nI, {{author}}, author of the blog post \"{{title}}\", certify that I am the original author of the contents of this blog post and have attributed all external sources appropriately.\n\n{{$clauses.legalese}}" + "ricardian_contract": "---\ntitle: Create Post\nsummary: Create a blog post \"{{title}}\" by {{author}} tagged as \"{{tag}}\"\nicon: https://app.com/create-post.png#00506E08A55BCF269FE67F202BBC08CFF55F9E3C7CD4459ECB90205BF3C3B562\n---\nI, {{author}}, author of the blog post \"{{title}}\", certify that I am the original author of the contents of this blog post and have attributed all external sources appropriately.\n\n{{$clauses.legalese}}" } ], From d410d5e59e6c5ccdd298cc5778a6639459bf3277 Mon Sep 17 00:00:00 2001 From: Tara Miwa Tritt Date: Mon, 15 Apr 2019 14:22:00 -0400 Subject: [PATCH 7/7] Update version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1275b0a..516e684 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## EOSIO.CDT Ricardian Contract Specification ![EOSIO Alpha](https://img.shields.io/badge/EOSIO-Alpha-blue.svg) -**Spec Version**: v0.1.0 +**Spec Version**: v0.1.1 ### General Information In conjunction with [Ricardian Template Toolkit](https://github.com/EOSIO/ricardian-template-toolkit/), this specification is a new addition to the [EOSIO.CDT](https://github.com/EOSIO/eosio.cdt) suite of tooling.