1.1.5 • Published 3 years ago

ng-ipfs-service v1.1.5

Weekly downloads
9
License
MIT
Repository
github
Last release
3 years ago

NgIpfsService

Wrapper service of ipfs-core for Angular application.

This library was generated with Angular CLI version 11.1.1.

Installation

$ npm install ng-ipfs-service

Features

Start Ipfs node and inject to your application.

Methods

NgIpfsService.start([options])

Start Ipfs node.

Returns

Promise<void>

options

options of IPFS.crate

NgIpfsService.get()

Get Ipfs Instance.

Returns

Promise<IPFS>

API of IPFS

IPFS Core API

Application setting

custom-webpack setting

Using custom webpack config is recommened in order to provide more better node polyfills.

// extra-webpack.config.ts
import { Configuration, ProvidePlugin } from 'webpack';
import NodePolyfillPlugin from 'node-polyfill-webpack-plugin';

export default {
  plugins: [
    new NodePolyfillPlugin(),
    new ProvidePlugin({
      // eslint-disable-next-line @typescript-eslint/naming-convention
      Buffer: ['buffer', 'Buffer'],
      global: ['global'],
      process: 'process/browser',
    }),
  ],
} as Configuration;

tsconfig.json

  • Sorry, "strict" mode is not supported now.
  • Set the "skipLibCheck" to "true".
  • Set the "allowSyntheticDefaultImports" to true.
  • Set stream path to stream-browserify as follow.
  "compilerOptions": {
    "skipLibCheck": true,
    "allowSyntheticDefaultImports": true,
    "paths": {
      "stream": [
        "node_modules/stream-browserify"
      ]
    }
  }
1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.2

3 years ago

1.0.2

3 years ago

0.1.0

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.1

3 years ago