https://github.com/jackallabs/canine-provider
Jackal Labs implementation of a Jackal Storage Provider
https://github.com/jackallabs/canine-provider
blockchain cloud cosmos storage
Last synced: 6 months ago
JSON representation
Jackal Labs implementation of a Jackal Storage Provider
- Host: GitHub
- URL: https://github.com/jackallabs/canine-provider
- Owner: JackalLabs
- License: mit
- Created: 2022-11-04T19:37:29.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-21T22:06:42.000Z (11 months ago)
- Last Synced: 2024-07-21T23:22:38.510Z (11 months ago)
- Topics: blockchain, cloud, cosmos, storage
- Language: Go
- Homepage:
- Size: 73.4 MB
- Stars: 7
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README

# Jackal Storage Provider[](https://github.com/JackalLabs/canine-provider/actions/workflows/build.yml)
[](https://github.com/JackalLabs/canine-provider/actions/workflows/test.yml)
[](https://github.com/JackalLabs/canine-provider/actions/workflows/golangci.yml)## Overview
The storage provider is a web server that accepts incoming files from users and creates contracts for the users to approve. These contracts last until the user either cancels them or the provider itself goes offline.## API
You can explore the provider API [here](https://www.postman.com/navigation-pilot-71533452/workspace/jackal-storage-api)
## Quickstart
This assumes you have either already set up a node or are using another RPC provider in your `~/.jackal-storage/config/client.toml` file.To quickly set up a storage provider, one must initialize their provider & announce themselves to the network. Then they start the provider from their account of choice which stores files in the `~/.jackal-storage/storage` folder (this can be changed with the --home flag).
```sh
$ jprovd client config chain-id {current-chain-id}$ jprovd client gen-key
$ jprovd init {IP_ADDRESS} {STORAGE_IN_BYTES} {KEYBASE_IDENTITY}
$ jprovd start
```## Posting files
Files can be uploaded through a POST request to `localhost:3333/upload` with form data.
### Form Data
| Key | Data |
|--------|------------|
| file | {filedata} |
| sender | {address} |### Response
The response will be a JSON response formatted as:
```JSON
{
"CID": "jklc1...",
"FID": "jklf1..."
}
```## Getting files
Gettings files is as easy as running a GET request at `localhost:3333/download/{FID}`. This will return the file as a blob to the browser.