Socket
Socket
Sign inDemoInstall

@dstanesc/ipfs-block-store

Package Overview
Dependencies
0
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @dstanesc/ipfs-block-store

Simple content-addressable storage (CAS) based on IPFS


Version published
Weekly downloads
1
Maintainers
1
Created
Weekly downloads
 

Readme

Source

IPFS Block Store

Simple content-addressable storage (CAS) based on IPFS and powered by the ipfs-client.

API

put: (block: { cid: any, bytes: Uint8Array }) => Promise<void>
get: (cid: any) => Promise<Uint8Array>

Usage

import { blockStore } from '@dstanesc/ipfs-block-store'

// ipfs api
import { create as ipfsApi } from 'ipfs-http-client'

// connect to a local ipfs service
const ipfs = ipfsApi({ url: '/ip4/192.168.1.231/tcp/5001' })

// optional cache
const cache = {}

// ipfs-block-store api
const { get, put } = blockStore({ /*cache,*/ ipfs  })

Build

npm run clean
npm install
npm run build
npm run test

Licenses

Licensed under either Apache 2.0 or MIT at your option.

FAQs

Last updated on 22 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc