This folder contains server component written in TypeScript using [Express](https://expressjs.com). The server provides various microservices, like remote file checking, retiring and updating metadata.
To spin up the server in a watch mode for local development, execute:
```bash
npm install
npm start
```
## ✨ API Documentation
### 1. Url Checker
Url Checker returns if file exists, size and additional information about requested file. This service is used as a solution to frontend CORS restrictions.
Retires asset from Commons Marketplace. To verify owner, he needs to sign `You are retiring <asset did>` with crypto wallet and send in both signature and did.
"signature": "<signatureof`You are retiring <asset did>`>"
}
```
**Return Value**
```json
{
"status": "success"
}
```
**Return Value (wrong signature)**
```json
{
"status": "error",
"message": "Not owner of asset"
}
```
### 3. Update asset
Updates asset on Commons Marketplace. To verify owner, he needs to sign `You are updating <asset did>` with crypto wallet and send in both signature and did.