Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

docs: core-api/block #3990

Merged
merged 1 commit into from
Jan 10, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/core-api/BLOCK.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ An optional object which may have the following keys:

| Type | Description |
| -------- | -------- |
| `Promise<Block>` | A [Block][block] type object, containing both the data and the hash of the block |
| `Promise<Uint8Array>` | A Uint8Array containing the data of the block |

### Example

```JavaScript
const block = await ipfs.block.get(cid)
console.log(block.data)
console.log(block)
```

A great source of [examples][] can be found in the tests for this API.
Expand Down