Hub
upload/download small files, small files are aggregated into large file, and submit to unibase DA.
public hub
download
web browser: http://54.151.130.2:8080/api/download?name=<your file name>&owner=<your file owne>
shell
> wget http://54.151.130.2:8080/api/download?name=<your file name>\&owner=<your file owner> -O <saved name>
# or display
> curl http://54.151.130.2:8080/api/download?name=<your file name>\&owner=<your file owner>
upload
upload using json
# output: {"File":"0xabcd-0.vol","Start":0,"Size":41}
> curl -X POST http://54.151.130.2:8080/api/upload -d '{
"id": "test1",
"owner":"0xabcd",
"message":"Here is a story about llamas eating grass"
}'
private hub
> export CHAIN_TYPE=<your CHAIN_TYPE>
> git clone https://github.com/unibaseio/unibase-sdk-go.git
> cd app/hub
> go build
> ./hub init
# run
> ./hub daemon run -b 0.0.0.0:8086
Last updated