# solid-ipfs

> Using Solid to store IPFS Hash privately

Latest version **0.0.2** (published 2018-12-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install solid-ipfs
pnpm add solid-ipfs
yarn add solid-ipfs
bun add solid-ipfs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2018-12-07 |
| First published | 2018-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 2.7 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | xieyang@dodora.cn |
| Maintainers | ivydom |
| Keywords | solid, ipfs, authing, hash |

## Links

- npm: https://www.npmjs.com/package/solid-ipfs
- Repository: https://github.com/Eximua/solid-ipfs
- Homepage: https://github.com/Eximua/solid-ipfs#readme
- Issues: https://github.com/Eximua/solid-ipfs/issues
- npm.io page: https://npm.io/package/solid-ipfs

## Dependencies (3)

- [rdflib](https://npm.io/package/rdflib.md) ^0.19.1
- [solid-authing](https://npm.io/package/solid-authing.md) ^0.0.2
- [solid-auth-client](https://npm.io/package/solid-auth-client.md) ^2.2.14

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2018-12-07
- 0.0.1 — 2018-12-07

## README

# solid-hash

Using Solid to store IPFS Hash privately or publicly.

## Install

```shell
$ npm install solid-ipfs --save
```

## Usage

```javascript
import SolidIPFS from 'solid-ipfs';

const main = async () => {
    const solidIpfs = new SolidIPFS({
        url: 'YOUR_SOLID_URL', // e.g. https://alicea.solid.authing.cn/inbox/
    });

    const result = await solidIpfs.storeHash({
        hash: 'YOUR_IPFS_HASH',
    });

    console.log(result, result ? '保存成功' : '保存失败');
}

main();
```

Then you can get IPFS hash list via `<YOURL_SOLID_URL>/ipfs/hash/`.

In Solid, the path with the suffix inbox is a private data storage area. Others are public and profile, all publicly accessible. So if you want to privatize the store, use inbox , otherwise you can choose public or profile.

### Private path example

1. [https://alicea.solid.authing.cn/inbox/](https://alicea.solid.authing.cn/inbox/)

```javascript
import SolidIPFS from 'solid-ipfs';

const main = async () => {
    const solidIpfs = new SolidIPFS({
        url: 'https://alicea.solid.authing.cn/inbox/', // inbox -> private
    });

    const result = await solidIpfs.storeHash({
        hash: 'YOUR_IPFS_HASH',
    });

    console.log(result, result ? '保存成功' : '保存失败');
}

main();
```

### Public path example

```javascript
import SolidIPFS from 'solid-ipfs';

const main = async () => {
    const solidIpfs = new SolidIPFS({
        url: 'https://alicea.solid.authing.cn/public/', // public -> public
    });

    const result = await solidIpfs.storeHash({
        hash: 'YOUR_IPFS_HASH',
    });

    console.log(result, result ? '保存成功' : '保存失败');
}

main();
```

1. [https://alicea.solid.authing.cn/profile/](https://alicea.solid.authing.cn/profile/)
2. [https://alicea.solid.authing.cn/public/](https://alicea.solid.authing.cn/public/)

## Using with [Authing](https://authing.cn)

Authing is an identity for EVERYONE and EVERYTHING, which likes Auth0.

We have integrated authing so that you can see statistics in the Authing dashboard after logging in/registering solid.

```javascript
import SolidIPFS from 'solid-ipfs';

const main = async () => {
    const solidIpfs = new SolidIPFS({
        url: 'https://alicea.solid.authing.cn/inbox/', // inbox -> private
        clientId: '<YOUR_AUTHING_CLIENT_ID>',
        secret: '<YOUR_AUTHING_CLIENT_SECRET>',
    });

    await solidIpfs.initInstance(); // MUST

    const result = await solidIpfs.storeHash({
        hash: 'YOUR_IPFS_HASH',
    });

    console.log(result, result ? '保存成功' : '保存失败');
}

main();
```

---
_Source: https://npm.io/package/solid-ipfs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
