dart_ipfs_client 0.0.1 copy "dart_ipfs_client: ^0.0.1" to clipboard
dart_ipfs_client: ^0.0.1 copied to clipboard

A client library for the IPFS HTTP API.

example/main.dart

import 'dart:convert';

import 'package:logging/logging.dart';

import 'package:dart_ipfs_client/dart_ipfs_client.dart';

void _setupLogging() {
  Logger.root.level = Level.ALL;
  Logger.root.onRecord.listen((event) {
    print('${event.level.name}: ${event.time}: ${event.message}');
  });
}

void main(List<String> arguments) async {
  _setupLogging();
  var ipfs = Ipfs(url: 'http://127.0.0.1:5001');
  var addRes = await ipfs.add(utf8.encode('Hello World!'));
  print(addRes.body.toJson());

  var catRes = await ipfs.cat(addRes.body.hash);
  print(catRes.body.toJson());
}
7
likes
30
pub points
8%
popularity

Publisher

unverified uploader

A client library for the IPFS HTTP API.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

chopper, json_annotation, json_serializable

More

Packages that depend on dart_ipfs_client