0.0.9 • Published 1 year ago

@dstanesc/ipfs-block-store v0.0.9

Weekly downloads
-
License
(Apache-2.0 AND M...
Repository
github
Last release
1 year ago

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.

0.0.9

1 year ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago