{"id":19907591,"url":"https://github.com/jaerith/wonkarestservice","last_synced_at":"2026-04-30T20:32:35.160Z","repository":{"id":38006348,"uuid":"173368846","full_name":"jaerith/wonkarestservice","owner":"jaerith","description":"This ASP.NET REST service will demonstrate how to use the Wonka rules engine, which provides the ability to simulate/execute rules within a .NET domain and execute them within the Ethereum blockchain.","archived":false,"fork":false,"pushed_at":"2023-03-03T04:08:22.000Z","size":2074,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-30T20:32:33.416Z","etag":null,"topics":["asp-net","csharp","ethereum","nethereum","rest-api","solidity"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaerith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-01T21:13:27.000Z","updated_at":"2020-08-01T18:20:55.000Z","dependencies_parsed_at":"2024-11-12T20:45:47.310Z","dependency_job_id":"24daae7a-b583-406d-9d33-d44cd01ee5d4","html_url":"https://github.com/jaerith/wonkarestservice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jaerith/wonkarestservice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaerith%2Fwonkarestservice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaerith%2Fwonkarestservice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaerith%2Fwonkarestservice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaerith%2Fwonkarestservice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaerith","download_url":"https://codeload.github.com/jaerith/wonkarestservice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaerith%2Fwonkarestservice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32476682,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asp-net","csharp","ethereum","nethereum","rest-api","solidity"],"created_at":"2024-11-12T20:43:12.925Z","updated_at":"2026-04-30T20:32:35.140Z","avatar_url":"https://github.com/jaerith.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wonka REST Service\nThis ASP.NET REST service will demonstrate how to use the [Wonka rules engine](https://github.com/Nethereum/Wonka), which provides the ability to simulate/execute rules within a .NET domain and execute them within the Ethereum blockchain.\n\n![screenshot](https://github.com/jaerith/wonkarestservice/blob/master/images/api_swagger_screenshot.png)\n\n# Features\nUpon starting, this web service will present a number of different controllers, each of which provides an endpoint for different functionality in the Wonka:\n\n1. **Account** -\u003e This controller was part of the .NET template, but it could be used for securing the REST API.\n2. **Chain** -\u003e This controller allows the caller to retrieve metadata and data directly from the running testchain.\n3. **Grove** -\u003e This controller allows the caller to create a Grove, which will first create an instance in the .NET cache and then serialize it to the Registry contract on the testchain.  A Grove is a container for RuleTrees.\n4. **Invoke** -\u003e This controller will invoke a RuleTree.  The POST method will run it within the .NET domain; the PUT method will run it on the testchain.\n5. **Registry** -\u003e Under construction\n6. **Report** -\u003e This controller will retrieve the reports that are generated and cached by the Invoke controller.  (They are only stored in the .NET cache, not on the testchain.)\n7. **RuleTree** -\u003e This controller allows the caller to create a RuleTree, which will first create an instance in the .NET cache and then serialize it to the Wonka Engine on the testchain.\n8. **RuleTreeOwner** -\u003e This controller allows the caller to register a potential owner of a RuleTree, providing the details of their identity on the testchain.  (A RuleTreeOwner can only own one RuleTree.)\n9. **TrxState** -\u003e This controller allows the caller to instantiate a TrxState associated with an existing RuleTree.  A TrxState provides quorum functionality to a RuleTree (i.e., a number of people vote to allow a RuleTree's invocation).\n10. **TrxStateConfirm** -\u003e This controller allows a member of a TrxState to vote on the quorum of its RuleTree's invocation.\n11. **TrxStateOwner** -\u003e This controller will add a member to the TrxState, who can then take part in the quorum of a RuleTree's invocation.\n\n# Quick Setup\n\n1. You could run the Ethereum client of your own choice, but this project was developed with a specific Linux testchain and has numerous steps of initialization that depend on the testchain's usage.  So, unless you want to alter the initialization of the web service (which involves dozens of values in the configuration files), it is recommended that you use the 'ganache-linux' testchain found among [the Nethereum testchains](https://github.com/Nethereum/TestChains). \n2. Download [the Solidity portion](https://github.com/Nethereum/Wonka/tree/master/Solidity/WonkaEngine) of the Wonka project and then deploy the contracts to the Ethereum node by using the test script './Solidity/WonkaEngine/test/testdeploy.js'.\n3. Once you have decided on the URL for the web service, set that URL as the value for \u0026lt;Web3HttpUrl\u0026gt; in the files 'VATCalculationExample.init.xml' and 'WonkaRegistry.init.xml' within the WonkaData folder of the service.\n4. Place the RuleTree markup files [VATCalculatePrecheck.xml](https://github.com/jaerith/wonkarestservice/blob/master/WonkaRestService/WonkaData/VATCalculatePrecheck.xml) and [VATCalculationExample.xml](https://github.com/jaerith/wonkarestservice/blob/master/WonkaRestService/WonkaData/VATCalculationExample.xml) on a hosted server whose URL will be used in future payloads.\n5. Publish the service, adjust [the samples](https://github.com/jaerith/wonkarestservice/tree/master/WonkaRestService/SamplePostPutPayloads) (like replacing the URLs of the markup files), and then run them in their designated order.  Enjoy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaerith%2Fwonkarestservice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaerith%2Fwonkarestservice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaerith%2Fwonkarestservice/lists"}