JSPM

@web3/buzz

0.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q25496F
  • License MIT

Swarm JavaScript API

Package Exports

  • @web3/buzz

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@web3/buzz) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

🏗 Only raw text uploads/downloads supported for now, work on the full API is in progress.

Install

npm install @web3/buzz

Usage

import Buzz from '@web3/buzz'

// instantiate Buzz class with Swarm node provider
const buzz = new Buzz({ provider: 'http://localhost:8500' })

// upload raw text
buzz.upload('buzz')

// download raw text
buzz.download('f070f4f87c0018a4026ff2c14895e9ef525e81c4cf4d768e1bf658e570927a13')

Swarm URI schemes

Swarm version 1.8.0 introduced a set of 'long' URI schemes, which replaced the deprecated 'short' URI schemes. This library uses the long schemes by default but support for the short schemes can be toggled with the schemeType property:

const buzz = new Buzz({ provider: '...', schemeType: 'SHORT' })

Contributing

Setup

npm install

Build

npm run build

Test

npm test

Credits

  • Logo: Bee by alican from the Noun Project