https://github.com/consensysmesh/stow-json-validator
stow-json-validator to be used for IRIS score oracles
https://github.com/consensysmesh/stow-json-validator
Last synced: 9 months ago
JSON representation
stow-json-validator to be used for IRIS score oracles
- Host: GitHub
- URL: https://github.com/consensysmesh/stow-json-validator
- Owner: ConsenSysMesh
- License: apache-2.0
- Created: 2018-10-04T00:28:38.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-06T22:26:25.000Z (over 7 years ago)
- Last Synced: 2025-10-09T02:03:00.549Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 145 KB
- Stars: 2
- Watchers: 12
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stow-json-validator
#endpoints:
POST - https://3h867xtb9a.execute-api.us-east-1.amazonaws.com/dev2/validateJSON
# Test command
```
curl -X POST \
'https://3h867xtb9a.execute-api.us-east-1.amazonaws.com/dev2/validateJSON?dataHash=0xa1fe2d5ed0ac4e35be7b62a436a4dc4b4568f997dce06ed57e0f7fda900f8916' \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d '{"foo":"bar"}'
```
# Node client
```
var request = require("request");
var options = { method: 'POST',
url: 'https://3h867xtb9a.execute-api.us-east-1.amazonaws.com/dev2/validateJSON',
qs: { dataHash: '0xa1fe2d5ed0ac4e35be7b62a436a4dc4b4568f997dce06ed57e0f7fda900f8916' },
headers:
{ 'cache-control': 'no-cache',
'content-type': 'application/json' },
body: { "foo": "bar" },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
```
# A sample contract has been deployed
Ropsten contract address: [0xBaE08285e604529A379bd46E4A4B2Cc9f0bd5515](https://ropsten.etherscan.io/address/0xbae08285e604529a379bd46e4a4b2cc9f0bd5515)