ipfs 1.0.3

  • Readme
  • Changelog
  • Installing
  • new59

An IPFS client library for Dart developers.

Created from templates made available by Stagehand under a BSD-style license.

Usage #

A simple usage example:

import 'package:ipfs/ipfs.dart';

void main() {

  Ipfs ipfs = Ipfs();

  // This method will return a list of peers in the swarm
  ipfs.getPeers(); 

  // The cid or content identifier has to be of type string
  String cid = 'bafybeifx7yeb55armcsxwwitkymga5xf53dxiarykms3ygqic223w5sk3m';

  // Fetches an ipfs object 
  ipfs.getObject(cid);

  // Traverses through a DAG given its root cid
  ipfs.resolveDag(cid);

}

The response should be

Features and bugs #

Please file feature requests and bugs at the issue tracker.

1.0.0 - 1.0.1 #

  • Add Usage

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  ipfs: ^1.0.3

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:ipfs/ipfs.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
26
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
82
Overall:
Weighted score of the above. [more]
59
Learn more about scoring.

We analyzed this package on Jan 16, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health suggestions

Fix lib/src/sharedlib/ffi.dart. (-1 points)

Analysis of lib/src/sharedlib/ffi.dart reported 2 hints:

line 1 col 8: Unused import: 'dart:convert'.

line 2 col 8: Unused import: 'dart:ffi'.

Fix lib/src/http_api_base.dart. (-0.50 points)

Analysis of lib/src/http_api_base.dart reported 1 hint:

line 4 col 26: Use lowercase_with_underscores when specifying a library prefix.

Format lib/src/ipfs-api.dart.

Run dartfmt to format lib/src/ipfs-api.dart.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (dio).

The package description is too short. (-8 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example.

None of the files in the package's example/ directory matches known example patterns.

Common filename patterns include main.dart, example.dart, and ipfs.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.5.0 <3.0.0
chopper ^3.0.1+1 3.0.1+1
dio ^2.1.16 2.2.2 3.0.8
grpc ^2.1.3 2.1.3
path ^1.6.0 1.6.4
protobuf ^1.0.1 1.0.1
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
convert 2.1.1
cookie_jar 1.0.1
crypto 2.1.4
fixnum 0.10.11
googleapis_auth 0.2.11+1
http 0.12.0+4
http2 1.0.0
http_parser 3.1.3
logging 0.11.4
meta 1.1.8
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
build_runner any
chopper_generator any
pedantic ^1.8.0 1.9.0
test ^1.6.0