https://github.com/cowprotocol/ipfs-block-put
https://github.com/cowprotocol/ipfs-block-put
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/cowprotocol/ipfs-block-put
- Owner: cowprotocol
- License: gpl-3.0
- Created: 2023-08-02T11:34:51.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-04T09:39:35.000Z (almost 3 years ago)
- Last Synced: 2025-02-05T08:18:31.766Z (over 1 year ago)
- Language: Rust
- Size: 25.4 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-GPL
Awesome Lists containing this project
README
This project provides an API to pin a raw IPFS block with Pinata.
The official [Pinata API](https://docs.pinata.cloud/reference/pinningpinfiletoipfs) unfortunately cannot do this, which is why this workaround is needed. This program accepts HTTP `post` requests to `/put_block`. The body of the request is interpreted as the raw bytes of an IPFS block. The block is sent to an IPFS node through the `/api/v0/block/put` route in the [RPC API](https://docs.ipfs.tech/reference/kubo/rpc/). Then resulting CID is pinned with Pinata. The resulting CID is returned in the body of the response.
# Release
Use Github to create releases. This causes the `release` Github action to run, which creates a statically linked x86_64-unknown-linux-musl binary and uploads it to the release. There is no need for a docker image.