Class: BlobMapping

BlobMapping

Provides a representation of a blob mapping, which is a fully resolved blob. Acts as an interface for constructing a mapping to distribute through the network and derive a pointer.

new BlobMapping(filename [, params])

Parameters:
Name Type Argument Description
filename string Human readable file name with extension
params BlobMapping~cryptparams <optional>
Encryption parameters
Source:

Methods


<static> fromBlobPointer(pointer)

Accepts an ordered list of hashes to prepopulate the slice map
Parameters:
Name Type Description
pointer BlobPointer
Source:

abort()

Aborts slice map construction and empties the slice map
Source:

toBlobPointer()

Creates a BlobPointer from the full mapping
Source:
Returns:
Type
BlobPointer

writeToSliceMap(slice)

Writes the given buffer to the appropriate entry in the slice map
Parameters:
Name Type Description
slice buffer
Source:
Returns:
Type
Map | null

Type Definitions


cryptparams

Type:
  • object
Properties:
Name Type Description
password buffer N-length passphrase
salt buffer 16 byte salt
iv buffer 32 byte initialization vector
Source: