Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

blockstore-level

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blockstore-level - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

8

dist/src/index.d.ts

@@ -1,2 +0,2 @@

import type { Options, Pair } from 'interface-blockstore';
import type { Pair } from 'interface-blockstore';
import { BaseBlockstore } from 'blockstore-core';

@@ -7,3 +7,3 @@ import { Level } from 'level';

import type { MultibaseCodec } from 'multiformats/bases/interface';
import type { AwaitIterable } from 'interface-store';
import type { AbortOptions, AwaitIterable } from 'interface-store';
export interface LevelBlockstoreInit extends DatabaseOptions<string, Uint8Array>, OpenOptions {

@@ -26,3 +26,3 @@ /**

open(): Promise<void>;
put(key: CID, value: Uint8Array): Promise<void>;
put(key: CID, value: Uint8Array): Promise<CID>;
get(key: CID): Promise<Uint8Array>;

@@ -32,4 +32,4 @@ has(key: CID): Promise<boolean>;

close(): Promise<void>;
getAll(options?: Options | undefined): AwaitIterable<Pair>;
getAll(options?: AbortOptions | undefined): AwaitIterable<Pair>;
}
//# sourceMappingURL=index.d.ts.map

@@ -45,2 +45,3 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {

await this.db.put(__classPrivateFieldGet(this, _LevelBlockstore_instances, "m", _LevelBlockstore_encode).call(this, key), value);
return key;
}

@@ -47,0 +48,0 @@ catch (err) {

{
"name": "blockstore-level",
"version": "1.0.0",
"version": "1.0.1",
"description": "Blockstore implementation with level(up|down) backend",

@@ -148,5 +148,5 @@ "license": "Apache-2.0 OR MIT",

"dependencies": {
"blockstore-core": "^4.0.0",
"interface-blockstore": "^5.0.0",
"interface-store": "^4.0.0",
"blockstore-core": "^4.0.2",
"interface-blockstore": "^5.1.1",
"interface-store": "^5.0.1",
"level": "^8.0.0",

@@ -157,3 +157,3 @@ "multiformats": "^11.0.2"

"aegir": "^38.1.7",
"interface-blockstore-tests": "^5.0.0",
"interface-blockstore-tests": "^6.0.0",
"ipfs-utils": "^9.0.4",

@@ -160,0 +160,0 @@ "memory-level": "^1.0.0"

@@ -1,2 +0,2 @@

import type { Options, Pair } from 'interface-blockstore'
import type { Pair } from 'interface-blockstore'
import { BaseBlockstore, Errors } from 'blockstore-core'

@@ -10,3 +10,3 @@ import { Level } from 'level'

import * as Digest from 'multiformats/hashes/digest'
import type { AwaitIterable } from 'interface-store'
import type { AbortOptions, AwaitIterable } from 'interface-store'

@@ -65,5 +65,7 @@ export interface LevelBlockstoreInit extends DatabaseOptions<string, Uint8Array>, OpenOptions {

async put (key: CID, value: Uint8Array): Promise<void> {
async put (key: CID, value: Uint8Array): Promise<CID> {
try {
await this.db.put(this.#encode(key), value)
return key
} catch (err: any) {

@@ -113,3 +115,3 @@ throw Errors.putFailedError(err)

async * getAll (options?: Options | undefined): AwaitIterable<Pair> {
async * getAll (options?: AbortOptions | undefined): AwaitIterable<Pair> {
for await (const { key, value } of this.#query({ values: true })) {

@@ -116,0 +118,0 @@ yield { cid: this.#decode(key), block: value }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc