Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 1.06 KB

README.md

File metadata and controls

34 lines (23 loc) · 1.06 KB

@substreams/core

Substreams ESM core utility library

This is a work in progress. Your mileage may vary.

Install

npm install @substreams/core

⚠️Warning: This package is native ESM. If your project uses CommonJS, you'll have to convert to ESM or use the dynamic import() function. Please don't open issues for questions regarding CommonJS / ESM.

Usage

import { createSubstream } from "@substreams/core";

export async function fetchSubstream(url: string) {
  const response = await fetch(url);
  const blob = await response.blob();
  const array = await blob.arrayBuffer();

  return createSubstream(array);
}

Authors

License

MIT License