Starklings backend within a single Flask API
- Tested with Python >=3.8
Make sure you installed starlings at first :
cd ../
pip install poetry
poetry install
# or on MAC M1 :
CFLAGS=-I`brew --prefix gmp`/include LDFLAGS=-L`brew --prefix gmp`/lib poetry install
python -m venv starklings-venv
source starklings-venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
create .env file in the same directory as this with the fields defined in .env.DEFAULT
- Development
APP_SETTINGS=config.DevConfig python app.py
- Production
APP_SETTINGS=config.ProdConfig python app.py
/exercise
Exercise Validation route
- Headers
Key | Value |
---|---|
Content-Type | application/json |
Accept | application/json |
- Data (JSON)
Key | Value |
---|---|
wallet_address | String: Wallet that wants to verify exercise |
exercise | String: Concatenated path of the wanted exercise (e.g storage/storage01) |
exercise_data | String: Cairo file as a string |
- Return
On Validation
{
"result": "Exercice Succeed"
}
On Error
{
"error": "Cairo Error Msg"
"result": "Exercice Failed"
}