Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TSA1
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hernan Hegykozi
TSA1
Commits
6a9c97c3
Commit
6a9c97c3
authored
3 years ago
by
Hernan Hegykozi
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
f7aaff7a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+51
-5
51 additions, 5 deletions
README.md
with
51 additions
and
5 deletions
README.md
+
51
−
5
View file @
6a9c97c3
...
...
@@ -9,17 +9,18 @@ Permite instalarla por fuera del nodo transaccional (opentx) , tanto en un serve
# Instalacion en Docker
Iniciar la consola en el servidor donde se encuentra alojado el servicio de docker
*
Luego descargar
la apliac
io
n
*
Luego descargar
el repositor
io
```
sudo git clone https://gitlab.bfa.ar/hhegykozi/tsa1.git
cd
[nombre_repo]
cd
tsa1
```
*
Compilar la imagen
```
docker build -t bfa/apitsa1:latest .
```
El contenedor posee 3 variables de entorno que deben ser enviadas al momento de su ejecucion
:
*
El contenedor posee 3 variables de entorno que deben ser enviadas al momento de su ejecucion
```
ACCOUNTADDRESS: 0x25UHf0...... (direccion de la cuenta)
...
...
@@ -27,7 +28,7 @@ ACCOUNTPRIVATEKEY: 58HYUF5GHY5D...... (Clave privada de la cuenta)
SERVER: http://10.0.0.6:8545 (URL del servidor donde se encuentra el nodo transaccional opentx)
```
Crear el contenedor
:
*
Crear el contenedor
```
docker run -d --name apitsa1 -p 3030:3030 -e ACCOUNTADDRESS='0x25UHf0......' -e ACCOUNTPRIVATEKEY='58HYUF5GHY5D......' -e SERVER='http://10.0.0.6:8545' bfa/apitsa1
```
...
...
@@ -45,7 +46,7 @@ cd [nombre_repo]
npm install
```
*
Modificar el archivo api/config.js
*
Modificar el archivo api/config.js
.
Se debe modificar account, privateKey y server
```
...
...
@@ -71,9 +72,54 @@ exports.account = account;
exports.contract = contract;
exports.server = server;
```
*
Iniciar la apliacion
```
npm start
```
# Probar la aplicación
*
Verificar el RD temporal
Request:
```
POST /verify/ HTTP/1.1
Host: 127.0.0.1:3030
Content-Type: application/json
{
"file_hash": "1277da84a1656e2fa197c7bc378741434632fa1928d69e6cb3780a7b06bc373r",
"rd": "MXgtMTI3N2RhODRhMTY1NmUyZmExOTdjN2JjMzc4NzQxNDM0NjMyZmExOTI4ZDY5ZTZjYjM3ODBhN2IwNmJjMzczci04MDcwMzVkZjQ2NWRkMmNjYjNiYWZhYWJhNTIzNTI0Njc4MTQ1MDhiNmUxZGQ2NmJiNzgxYjM0M2IyM2IzM2FiMDEtMHg0YTY4NDIzMzU0Y2IwNTIwNWIyZmE3YzU0ZjU3MDdhZmE2NTAxNWVlNDlkMDVlNGIyYjE4NGM1ZTRiMzlhNmZkLTIxODMwNTkw"
}
```
Response:
```
{
"attestation_time": "22/03/2022 17:14:15",
"messages": "El archivo 1277da84a1656e2fa197c7bc378741434632fa1928d69e6cb3780a7b06bc373r fue ingresado en el bloque 21830590 el 22/03/2022 17:14:15",
"permanent_rd": "MXgtMTI3N2RhODRhMTY1NmUyZmExOTdjN2JjMzc4NzQxNDM0NjMyZmExOTI4ZDY5ZTZjYjM3ODBhN2IwNmJjMzczci04MDcwMzVkZjQ2NWRkMmNjYjNiYWZhYWJhNTIzNTI0Njc4MTQ1MDhiNmUxZGQ2NmJiNzgxYjM0M2IyM2IzM2FiMDEtMHg0YTY4NDIzMzU0Y2IwNTIwNWIyZmE3YzU0ZjU3MDdhZmE2NTAxNWVlNDlkMDVlNGIyYjE4NGM1ZTRiMzlhNmZkLTIxODMwNTkw",
"status": "success"
}
```
*
Realizar el stamp
Request:
```
POST /stamp/ HTTP/1.1
Host: 127.0.0.1:3030
Content-Type: application/json
{
"file_hash": "1277da84a1656e2fa197c7bc378741434632fa1928d69e6cb3780a7b06bc373r"
}
```
Response:
```
{
"temporary_rd": "MHgtMjRlZDYzNTcwZGYwZTIwODQzOTJiYTY3NTcwYmVjNjY2ZGYxYTJjZTRkNGNkMjE5ZDNlMGQ3NWEyYzQ3YjU4MjAxLTB4YjgxOGI4NTgxNThlYWU3Y2MxMDhlZTZjZTg5MTY0OWY1ODM4MDg5MWIxNTk2NWQ4NjBhNDY3YjIyOWY2Nzk2OA==",
"status": "success"
}
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment