panacea-dep-consumer

module
v0.0.0-...-9d64e4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2023 License: Apache-2.0

README

panacea-dep-consumer

A HTTP server for DEP(Data Exchange Protocol) consumers

Features

  • Request the storing a data to consumer after success to verifying the data from the oracle.

Installation

make build
make test
make install

consumerd -listen-addr="" -panacea-grpc-addr="" -data-dir=""
# ex) consumerd -listen-addr="127.0.0.1:8080" -grpc-addr="http://127.0.0.1:9090"
# The `-panacea-grpc-addr` value should be with URL scheme such as `http`, `https`, and `tcp`.
# The `-data-dir` value is the path which the data will be stored.

Request Store a Data

curl -v -X POST "http://${YOUR_HTTP_SERVER}/v1/deals/${dealID}/data/${dataHash}" -d "@<file-path>" -H "Authorization: Bearer ${ORACLE_JWT}"

## The ORACLE_JWT is an JWT which is signed by oracle private key.

If the storing a data success, the response will show following message:

success to store data

And the data will be stored in ${DATA_DIR}/${dealID} directory with the file name ${dataHash}. The ${DATA_DIR} is specified in flag -data-dir when starting the service.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL