Barge is a CLI tool that directly uses estuary api to stream/upload files to the filecoin network.
This project is based on the a sub module on Estuary under /cmd/barge.
- Go
- make
- filecoin-ffi (this is a submodule)
Clone this repo and run the following
make all
This will generate a barge
binary on the root folder that you can test.
./barge login <API KEY>
Initialize barge with the following command. This will create a configuration file which holds the estuary connection information.
./barge init
{
"estuary": {
"host": "http://localhost:3004",
"primaryshuttle": "http://localhost:3005",
"token": "<local API token>"
}
}
{
"estuary": {
"host": "https://api.estuary.tech",
"primaryshuttle": "https://shuttle-4.estuary.tech",
"token": "<Estuary API token>"
}
}
./barge plumb put-file <file path>
./barge plumb put-car <CAR file path>
Run Web
./barge web
Run Web and use the following endpoints to interact with the barge.
./barge web
curl --location --request POST 'http://localhost:3000/api/v0/plumb/file' \
--form 'file=@"website.png"'
curl --location --request POST 'http://localhost:3000/api/v0/plumb/car' \
--form 'file=@"file.car"'