Oracle used to produce prices / results for bets. Check out our basic demo page under:
Set up a Python virtual environment (optional)
python3 -m venv ./venvInstall dependencies:
pip install -r ./requirements.txtBuild the internal Rust library, requires Rust/Cargo, install it as a Python module:
cd dlcplazacryptlib && maturin develop && cd ..(or with venv:)
cd dlcplazacryptlib && VIRTUAL_ENV='../venv' ../venv/bin/maturin develop && cd ..Set up the secret key used:
python3 ./dlcplazacryptlib/save_secret.py --set --file secret.secEnter your securely generated secret mnemonic, be sure to back it up!
Prepare .env file; copy sample and change settings as needed:
cp env-sample .envCreate the empty initial DB:
python3 ./server/__setup_db.pythen, if all fine:
mv ./ora.db ./oda.BAK.db
mv ./_new_ora.db ./ora.dbStart the server:
./start_oracle_server_dev.sh(or: )
fastapi run server/main.pySee status
curl http://localhost:8000/api/v0/oracle/oracle_statusRun more sample calls:
python3 ./server/test_api.pySee API doc: http://localhost:8000/docs
See demo web page: http://localhost:8000/demo/
Run some tests:
python ./server/test_oracle.py-
General info, such as the oracle public key
-
Oracle status, inc. number of event, future events, server, time, etc.
-
Get events, with various filters — time range, symbol.
-
Events also include nonces
-
For (past) events with outcome, outcome is also included, including the attestation signatures
-
Same but get only event IDs
-
Get one event by ID