Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.
estuary-upload / 1.0.0

estuary-upload 1.0.0

Install from the command line:
Learn more about npm packages
$ npm install @numbersprotocol/estuary-upload@1.0.0
Install via package.json:
"@numbersprotocol/estuary-upload": "1.0.0"

About this version

estuary-upload

Usage

In code

import { Estuary } from 'estuary-upload';

const estuary = new Estuary('<api-key>');
const cid = await estuary.addFromPath('my-file.jpg');
console.log(
  `The file is uploaded to Estuary with CID ${cid} preserved!`
);

CLI tool to add all files in a directory

$ export ESTUARY_API_KEY=<api-key>
$ npm run add-dir <file-dirpath>

...
  'bafkreia2254bseihmsqw7fzxsk54p7nqmitn2ibhnjiafxtql6by54idv4',
  'bafkreigrov5qj25vp2vawsjlav5v3veihagovvddjodlydspmy2mtmks5q',
  ... 900 more items
]

Run Test

Unit Test

$ npm run unit

Integration Test

The integration test will fetch an image (size ~20MB) from public IPFS gateway and upload it to Estuary.

  1. Set API key
$ export ESTUARY_API_KEY=<api-key>
  1. Run test
$ npm run integration

Details


Assets

  • estuary-upload-1.0.0.tgz

Download activity

  • Total downloads 0
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all