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
3b1809c1
Commit
3b1809c1
authored
3 years ago
by
Hernan Hegykozi
Browse files
Options
Downloads
Patches
Plain Diff
Update README.md
parent
6a9c97c3
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
+101
-5
101 additions, 5 deletions
README.md
with
101 additions
and
5 deletions
README.md
+
101
−
5
View file @
3b1809c1
...
...
@@ -35,10 +35,10 @@ docker run -d --name apitsa1 -p 3030:3030 -e ACCOUNTADDRESS='0x25UHf0......' -e
# Instalacion en servidor
*
Descargar la apliacion
*
Descargar la apli
c
acion
```
sudo git clone https://gitlab.bfa.ar/hhegykozi/tsa1.git
cd
[nombre_repo]
cd
tsa1
```
*
Instalar los modulos NPM
...
...
@@ -47,7 +47,7 @@ npm install
```
*
Modificar el archivo api/config.js.
Se debe modificar a
ccount
, privateKey y server
Se debe modificar a
ddress
, privateKey y server
```
var account = {
...
...
@@ -80,7 +80,7 @@ npm start
# Probar la aplicación
*
Verificar el RD temporal
###
Verificar el RD temporal
###
Request:
```
...
...
@@ -103,7 +103,7 @@ Response:
"status": "success"
}
```
*
Realizar el stamp
###
Realizar el stamp
###
Request:
```
...
...
@@ -123,3 +123,99 @@ Response:
"status": "success"
}
```
### Obtener el balance de una cuenta ###
Sin pasarle parametros devuelve el balance de la cuenta asociada enviada en la configuracion
Request:
```
GET /balance/ HTTP/1.1
Host: 127.0.0.1:3030
```
Response:
```
{
"account": "0x338a7a87b3dcc3c8c63bd0409d6e675a6aae6cg7",
"balanceETH": "1.55546250499755617 ETH",
"balanceWEI": "1555462504997556170"
}
```
Pasando el parametro account
Request:
```
GET /balance/?account=0x3h89E7d699ACFf56594cDe73092Ba43f02436A57 HTTP/1.1
Host: 127.0.0.1:3030
```
Response:
```
{
"account": "0x3h89E7d699ACFf56594cDe73092Ba43f02436A57",
"balanceETH": "7.737860586 ETH",
"balanceWEI": "7737860586000000000"
}
```
### Obtener datos de un bloque ###
Request:
```
GET /block/?number=21961817 HTTP/1.1
Host: 127.0.0.1:3030
```
Response:
```
{
"difficulty": "2",
"extraData": "0x343639393161646132613235343434363865622e3030353035363966666462396edc8946ba336de3b994ff463a4868d64330de7fd4dcbf425576bf3901f846a50b21d9cf7b1a5739487bff9bdb34366ebccbf3faf15cc56b5cb9af85c73c410901",
"gasLimit": 8000000,
"gasUsed": 47033,
"hash": "0x2e83ff804d214040f0ec6a066c29cbb4bad15a2610195304c88a63a50e19ea48",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000",
"miner": "0x0000000000000000000000000000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": 21961817,
"parentHash": "0x8a8b539e5bfddd979c09bfc183ab4d370eeb891af2d6bacb353638ae118fb91f",
"receiptsRoot": "0x7e8e6d8f7457ad41d316e0b98360ae524fc7eface7f8f9a6dda3fde2dad5b62d",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": 758,
"stateRoot": "0x95d120ee9f478a2e61fd0e7fed89e79153b1e6c9d92b514070b5e5ec7cb0a8cf",
"timestamp": 1648645078,
"totalDifficulty": "30658168",
"transactions": [
"0xb3fcd5ac121376b89e3e7b9ef34897c8a76f4db394ddf587eed62ba7ecb95996"
],
"transactionsRoot": "0xcb55dcfeed55c76a6e43e51c6020ea485e8cff6f51619b81b2177e393f3d0ca8",
"uncles": []
}
```
### Obtener datos de una transacción ###
Request:
```
GET /tx/?hash=0xb3fcd5ac121376b89e3e7b9ef34897c8a76f4db394ddf587eed62ba7ecb95996 HTTP/1.1
Host: 127.0.0.1:3030
```
Response:
```
{
"blockHash": "0x2e83ff804d214040f0ec6a066c29cbb4bad15a2610195304c88a63a50e19ea48",
"blockNumber": 21961817,
"from": "0x2b89E7d699ACFf56594cDe73092Ba43f02436A56",
"gas": 147033,
"gasPrice": "1000000000",
"hash": "0xb3fcd5ac121376b89e3e7b9ef34897c8a76f4db394ddf587eed62ba7ecb95996",
"input": "0xae7145db000000000000000000000000000000007085cc4b26f852d56dfbd80a70271d37",
"nonce": 584696,
"to": "0x618D74a94f584D1466379F4E20c04d37e685b26F",
"transactionIndex": 0,
"value": "0",
"type": 0,
"v": "0x17f44053",
"r": "0xb2831f661c4871ee37ab403bbaba89a9bae4d03d21c41c31c80352459522ee23",
"s": "0x785f1d18e865e4403a1dab0e1d6461bd5c45ac2833b95ac7e5c375a63290e604"
}
```
\ No newline at end of file
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