This package has been deprecated

Author message:

This package has been deprecated. Please use angular-ipfs-service

ng-ipfs-service
TypeScript icon, indicating that this package has built-in type declarations

1.1.5 • Public • Published

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"
      ]
    }
  }

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Published

Version History

  • Version
    Downloads (Last 7 Days)
    • Published

Package Sidebar

Install

npm i ng-ipfs-service

Weekly Downloads

0

Version

1.1.5

License

MIT

Unpacked Size

103 kB

Total Files

17

Last publish

Collaborators

  • ocknamo-bb