generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #622 from ipfs/release-v0.21.0
Release v0.21.0
- Loading branch information
Showing
18 changed files
with
612 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
car-file-fetcher | ||
fetcher | ||
hello.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# CAR File Fetcher | ||
|
||
This example shows how to download a UnixFS file or directory from a gateway that implements | ||
[application/vnd.ipld.car](https://www.iana.org/assignments/media-types/application/vnd.ipld.car) | ||
responses of the [Trustles Gateway](https://specs.ipfs.tech/http-gateways/trustless-gateway/) | ||
specification, in a trustless, verifiable manner. | ||
|
||
It relies on [IPIP-402](https://specs.ipfs.tech/ipips/ipip-0402/) to retrieve | ||
the file entity via a single CAR request with all blocks required for end-to-end | ||
verification. | ||
|
||
## Build | ||
|
||
```bash | ||
> go build -o fetcher | ||
``` | ||
|
||
## Usage | ||
|
||
First, you need a gateway that complies with the Trustless Gateway specification. | ||
In our specific case, we need that the gateway supports CAR response type. | ||
|
||
As an example, you can verifiably fetch a `hello.txt` file from IPFS gateway at `https://trustless-gateway.link`: | ||
|
||
``` | ||
./fetcher -g https://trustless-gateway.link -o hello.txt /ipfs/bafkreifzjut3te2nhyekklss27nh3k72ysco7y32koao5eei66wof36n5e | ||
``` |
Binary file not shown.
Oops, something went wrong.