/net-ipfs-http-client

InterPlanetary File System client for .Net (C#, VB, F# ...)

Primary LanguageC#MIT LicenseMIT

net-ipfs-http-client

Version

An easy to use .NET library for the IPFS HTTP Gateway API, and the Kubo RPC API v0.

Features

  • Targets .NET Standard 2.0
  • Asynchronous I/O to an IPFS server
  • Supports request cancellation
  • Requests compressed responses
  • Documentation website coming soon™️
  • C# style access to the ipfs core interface
    • Bitswap API
    • Block API
    • Config API
    • Dag API
    • Dht API
    • Misc API
    • FileSystem API
    • Key API
    • Name API
    • Object API
    • Pin API
    • PubSub API
    • Stats API
    • Swarm API

Getting started

Published releases of IPFS API are available on NuGet. To install, run the following command in the Package Manager Console.

PM> Install-Package IpfsShipyard.Ipfs.Http.Client

Or using dotnet

> dotnet add package IpfsShipyard.Ipfs.Http.Client

IpfsClient

Every feature of IPFS is a property of the IpfsClient). The following example uses FileSystem to read a text file

using Ipfs.Http;

var ipfs = new IpfsClient();

const string filename = "QmXarR6rgkQ2fDSHjSY5nM2kuCXKYGViky5nohtwgF65Ec/about";
string text = await ipfs.FileSystem.ReadAllTextAsync(filename);

License

The IPFS API library is licensed under the MIT license. Refer to the LICENSE file for more information.