0.0.2 • Published 4 years ago

react-native-goipfs v0.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

react-native-goipfs

Embeded go-ipfs instance exposed through a js class with asynchronous methods. Alpha software, use at your own risk, only android supported for now.

Getting started

$ npm install react-native-goipfs --save

Then you need to add:

maven { url "${rootDir.getPath()}/../node_modules/react-native-goipfs/android/local_repo" }

to your react native app's android/build.gradle allprojects.repositories like shown below

allprojects {
    repositories {
        maven { url "${rootDir.getPath()}/../node_modules/react-native-goipfs/android/local_repo" }
        mavenLocal()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url("$rootDir/../node_modules/react-native/android")
        }
        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

This won't be needed as soon as we publish the maven packages.

Usage

import IPFS from "react-native-goipfs";

const ipfs = new IPFS();

await ipfs.start();

const response = await ipfs.command("/id");
console.log(response);

await ipfs.stop();
0.0.2

4 years ago

0.0.1

4 years ago