Represents an immutable block of data that is uniquely referenced with a cid.

example

  const block = new Block(Uint8Array.from([0, 1, 2, 3]), new CID('...'))

### Hierarchy

- Block

## Index

### Constructors

- constructor

### Properties

- cid
- data

### Accessors

- [Symbol.toStringTag]
- [blockSymbol]
- _cid
- _data

### Methods

- isBlock

## Constructors

### constructor

- new Block(data: Uint8Array, cid: CID): Block

- - Defined in index.js:15

  #### Parameters

  - ##### data: Uint8Array

    The data to be stored in the block as a Uint8Array.

  - ##### cid: CID

    The cid of the data

  #### Returns Block

## Properties

### cid

cid: CID

### data

data: Uint8Array

## Accessors

### [Symbol.toStringTag]

- get [Symbol.toStringTag](): string

- - Defined in index.js:60

  #### Returns string

### [blockSymbol]

- get [blockSymbol](): boolean

- - Defined in index.js:64

  #### Returns boolean

### _cid

- get _cid(): CID

- - Defined in index.js:55

  The cid of the data this block represents.

  deprecated

  #### Returns CID

### _data

- get _data(): Uint8Array

- - Defined in index.js:44

  The data of this block.

  deprecated

  #### Returns Uint8Array

## Methods

### Static isBlock

- isBlock(other: any): other is Block

- - Defined in index.js:74

  Check if the given value is a Block.

  #### Parameters

  - ##### other: any

  #### Returns other is Block