Class: KadStorageAdapter

KadStorageAdapter

Wraps the supplied model for a kad/levelup compatible interface

new KadStorageAdapter(databaseModel)

Parameters:
Name Type Description
databaseModel object
Source:

Methods


createReadStream()

Returns a readable stream of all items
Source:
Returns:
Type
ReadableStream

del(key, callback)

Delete item by key
Parameters:
Name Type Description
key string 160 bit hex key
callback function
Source:

get(key [, options], callback)

Get item by key
Parameters:
Name Type Argument Description
key string 160 hex key
options object <optional>
Stubbed for levelup compatibility
callback function
Source:

put(key, value [, options], callback)

Put item by key
Parameters:
Name Type Argument Description
key string 160 bit hex key (hash of value)
value object Arbitrary base64 string
options object <optional>
Stubbed for levelup compatibility
callback function
Source: