From 6b2a66a8a6ad5cebd604ceeafd2b75bf8db1d953 Mon Sep 17 00:00:00 2001 From: Renzo Ontivero <renn.carp@gmail.com> Date: Thu, 4 Feb 2021 16:38:54 -0300 Subject: [PATCH] Update README.md --- README.md | 65 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 45 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 39af52c..6f3ac7a 100755 --- a/README.md +++ b/README.md @@ -1,29 +1,54 @@ -# README # +# API REST - Sello de Tiempo v1 # -This README would normally document whatever steps are necessary to get your application up and running. +Esta aplicación está basada en el proyecto de Patricio Kumagae https://gitlab.bfa.ar/pkumagae/TsaAPI que está desarrollado con Python. La aplicación fue re escrita en **NodeJS** utilizando el framework de desarrollo **SailsJS**. -### What is this repository for? ### +Permite interactuar con el smartContract https://gitlab.bfa.ar/pkumagae/SmartContractsOTS/blob/master/ProofOfExistence.sol que está deployado en: +**Ropsten** +**Rinkeby** +**Rsk** +**Blockchain Federal Argentina** -* Quick summary -* Version -* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo) +En el archivo custom/config.js.default se encuentran las direcciones y ABI del contrato deployado en cada blockchain mencionada. -### How do I get set up? ### +### Prerequisitos ### +NodeJS +Npm -* Summary of set up -* Configuration -* Dependencies -* Database configuration -* How to run tests -* Deployment instructions +### Cómo comenzar ? ### -### Contribution guidelines ### +* Descargar el repositorio e ingresar +``` +cd [nombre_repo] +``` -* Writing tests -* Code review -* Other guidelines +* Instalar sails +``` +sudo npm install -g sails +``` +* Instalar dependencias +``` +sudo npm install +``` -### Who do I talk to? ### +* Configurar el archivo custom. Los datos requeridos están comentados en el código del archivo. +``` +sudo nano config/custom.js.default +``` +* Reemplazar el nombre y quitar el default +``` +sudo mv config/custom.js.default config/custom.js +``` -* Repo owner or admin -* Other community or team contact \ No newline at end of file +### Testing de casos de uso ### +Para revisar los endpoints disponibles, visualizar el archivo config/routes.js + +* Método sellado: +Se debe acceder por POST a http://localhost:1337/[nombre_blockchain]/stamp +y enviar un parámetro con el nombre **file_hash** que va a contener el hash a enviar. + +* Método verificar: +Se debe acceder por GET a http://localhost:1337/[nombre_blockchain]/verify/[comprobante_ots]/[file_hash] + +### Dudas ? ### + +* renn.carp@gmail.com -- GitLab