dart_ipfs_client 0.0.1
dart_ipfs_client: ^0.0.1 copied to clipboard

A client library for the IPFS HTTP API.

dart_ipfs_client #

A client library for the IPFS HTTP API, implemented in Dart.

Usage #

Requires running IPFS daemon.

import 'package:dart_ipfs_client/dart_ipfs_client.dart';

void main(List<String> arguments) async {
  var ipfs = Ipfs(url: '');
  var addRes = await ipfs.add(utf8.encode('Hello World!'));

  var catRes = await ipfs.cat(addRes.body.hash);


  Bytes: null,
  Hash: Qmf1rtki74jvYmGeqaaV51hzeiaa6DyWc98fzDiuPatzyy,
  Name: Qmf1rtki74jvYmGeqaaV51hzeiaa6DyWc98fzDiuPatzyy,
  Size: 20
{Body: Hello World!}