added chain ID check to avoid replay attacks

This commit is contained in:
hueso
2025-05-09 14:25:56 -03:00
parent d220e615e9
commit e2b44c10f6
2 changed files with 15 additions and 9 deletions

View File

@@ -15,23 +15,25 @@
Chamado pelo vendedor antes de fazer `deposit` no smart contract.
#### Parametros requeridos:
- `nomeParticipante`
- `chainID`
- `tipoDocumento`
- `numeroDocumento`
- `numeroConta`
- `tipoConta`
- `codigoIspb`
``` exemplo
curl --request POST \
--url http://localhost:5000/register \
--header 'content-type: application/json' \
--data '{
"nomeParticipante": "João Silva",
"chainID": "1337",
"tipoDocumento": 1,
"numeroDocumento": 12345678900,
"numeroConta": 1234567890123456,
"numeroAgencia": 123,
"tipoConta": 1
"tipoConta": 1,
"codigoIspb": 0
}'
```
#### Retorna em formato JSON:
@@ -64,7 +66,7 @@ Chamado pelo comprador após pagar o Pix
curl http://localhost:5000/release/123
```
#### Retorna em formato JSON:
- `pixTarget`
- `chainid`-`pixTarget`
- `amount`: valor em wei
- `pixTimestamp`
- `signature`: assinatura ethereum compatível