@dstanesc/ipfs-block-store
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -17,3 +17,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
const RECORD_SIZE_BYTES = 36; | ||
test("append root maintains original root offsets", () => __awaiter(void 0, void 0, void 0, function* () { | ||
test("demo ipfs cas usage in the context of @dstanesc/store-chunky-bytes", () => __awaiter(void 0, void 0, void 0, function* () { | ||
// connect to local ipfs service | ||
@@ -20,0 +20,0 @@ const ipfs = ipfsApi({ url: '/ip4/192.168.1.231/tcp/5001' }); |
{ | ||
"name": "@dstanesc/ipfs-block-store", | ||
"description": "IPFS based block store for the @dstanesc/store-chunky-bytes persistence", | ||
"version": "0.0.2", | ||
"description": "Simple content-addressable storage (CAS) based on IPFS", | ||
"version": "0.0.3", | ||
"homepage": "https://github.com/dstanesc/ipfs-block-store", | ||
@@ -6,0 +6,0 @@ "repository": "https://github.com/dstanesc/ipfs-block-store", |
@@ -1,5 +0,12 @@ | ||
# IPFS Based Block Store | ||
# IPFS Block Store | ||
IPFS based persistence layer for the [chunky bytes](https://www.npmjs.com/package/@dstanesc/store-chunky-bytes) module. | ||
Simple content-addressable storage (CAS) based on [IPFS](https://ipfs.tech/). | ||
## API | ||
```ts | ||
put: (block: { cid: any, bytes: Uint8Array }) => Promise<void> | ||
get: (cid: any) => Promise<Uint8Array> | ||
``` | ||
## Usage | ||
@@ -16,6 +23,5 @@ | ||
const { get, put } = blockStore({ /*cache,*/ ipfs }) | ||
``` | ||
More usage details in the [store tests](https://github.com/dstanesc/ipfs-block-store/blob/e5a1198cbe30d53f45f4a9f1ae663df9e4f1ed21/src/__tests__/block-store.test.ts#L12) | ||
## Build | ||
@@ -32,2 +38,2 @@ | ||
Licensed under either [Apache](./LICENSE-APACHE) or [MIT](./LICENSE-MIT) at your option. | ||
Licensed under either [Apache 2.0](http://opensource.org/licenses/MIT) or [MIT](http://opensource.org/licenses/MIT) at your option. |
@@ -12,3 +12,3 @@ import { create as ipfsApi } from 'ipfs-http-client' | ||
test("append root maintains original root offsets", async () => { | ||
test("demo ipfs cas usage in the context of @dstanesc/store-chunky-bytes", async () => { | ||
@@ -15,0 +15,0 @@ // connect to local ipfs service |
Sorry, the diff of this file is not supported yet
38
21803