{"id":13421577,"url":"https://github.com/ethersphere/bee-js","last_synced_at":"2026-01-16T14:27:07.156Z","repository":{"id":37924236,"uuid":"310355817","full_name":"ethersphere/bee-js","owner":"ethersphere","description":"Javascript client library for connecting to Bee decentralised storage","archived":false,"fork":false,"pushed_at":"2026-01-14T05:32:09.000Z","size":17803,"stargazers_count":64,"open_issues_count":29,"forks_count":30,"subscribers_count":17,"default_branch":"master","last_synced_at":"2026-01-14T05:46:32.658Z","etag":null,"topics":["bee","decentralized","javascript","javascript-library","swarm","typescript"],"latest_commit_sha":null,"homepage":"https://bee-js.ethswarm.org/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethersphere.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-11-05T16:23:53.000Z","updated_at":"2026-01-06T16:18:59.000Z","dependencies_parsed_at":"2024-01-17T21:56:20.332Z","dependency_job_id":"fd6373c1-5016-4c58-8e2e-5c9444cdf5f6","html_url":"https://github.com/ethersphere/bee-js","commit_stats":{"total_commits":519,"total_committers":16,"mean_commits":32.4375,"dds":0.6551059730250481,"last_synced_commit":"3d0511cbc432ad0685c15d0707ea4dea33c1e667"},"previous_names":[],"tags_count":96,"template":false,"template_full_name":null,"purl":"pkg:github/ethersphere/bee-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethersphere%2Fbee-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethersphere%2Fbee-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethersphere%2Fbee-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethersphere%2Fbee-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethersphere","download_url":"https://codeload.github.com/ethersphere/bee-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethersphere%2Fbee-js/sbom","scorecard":{"id":384090,"data":{"date":"2025-08-11","repo":{"name":"github.com/ethersphere/bee-js","commit":"6f3d7a409485ae7ca66e21566d99f9539007bf8f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.3,"checks":[{"name":"Code-Review","score":4,"reason":"Found 12/30 approved changesets -- score normalized to 4","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":10,"reason":"27 commit(s) and 7 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/check.yaml:1","Warn: no topLevel permission defined: .github/workflows/pre-release.yaml:1","Warn: no topLevel permission defined: .github/workflows/publish_npmjs.yaml:1","Warn: no topLevel permission defined: .github/workflows/release_github.yaml:1","Warn: no topLevel permission defined: .github/workflows/tests.yaml:1","Warn: no topLevel permission defined: .github/workflows/update_bee.yaml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check.yaml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/check.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check.yaml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/check.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/check.yaml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/check.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/check.yaml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/check.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pre-release.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/pre-release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pre-release.yaml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/pre-release.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pre-release.yaml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/pre-release.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_npmjs.yaml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/publish_npmjs.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_npmjs.yaml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/publish_npmjs.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_npmjs.yaml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/publish_npmjs.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release_github.yaml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/release_github.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yaml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/tests.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yaml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/tests.yaml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update_bee.yaml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/update_bee.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/update_bee.yaml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/update_bee.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/update_bee.yaml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/update_bee.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/update_bee.yaml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/update_bee.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/update_bee.yaml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/update_bee.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/update_bee.yaml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/update_bee.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/update_bee.yaml:88: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/update_bee.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/update_bee.yaml:98: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/update_bee.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/update_bee.yaml:109: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/update_bee.yaml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/update_bee.yaml:118: update your workflow using https://app.stepsecurity.io/secureworkflow/ethersphere/bee-js/update_bee.yaml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/tests.yaml:31","Warn: npmCommand not pinned by hash: .github/workflows/tests.yaml:34","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  14 third-party GitHubAction dependencies pinned","Info:   4 out of   6 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/publish_npmjs.yaml:9"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T16:10:43.471Z","repository_id":37924236,"created_at":"2025-08-18T16:10:43.471Z","updated_at":"2025-08-18T16:10:43.471Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28479394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bee","decentralized","javascript","javascript-library","swarm","typescript"],"created_at":"2024-07-30T23:00:25.510Z","updated_at":"2026-01-16T14:27:07.150Z","avatar_url":"https://github.com/ethersphere.png","language":"TypeScript","funding_links":[],"categories":["Software Development","Projects"],"sub_categories":["JavaScript","Libraries"],"readme":"# Bee-JS\n\n[![](https://img.shields.io/badge/made%20by-Swarm-blue.svg?style=flat-square)](https://swarm.ethereum.org/)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fethersphere%2Fbee-js.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fethersphere%2Fbee-js?ref=badge_shield)\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)\n![](https://img.shields.io/badge/Node.js-%3E%3D18.0.0-orange.svg?style=flat-square)\n![](https://img.shields.io/badge/runs%20in-browser%20%7C%20node%20%7C%20webworker%20%7C%20electron-orange)\n\n\u003e JavaScript SDK for the Swarm decentralised storage.\n\n\u003e Supports Node.js 18+, Vite and Webpack.\n\n\u003e Write your code in CJS, MJS or TypeScript.\n\n\u003e Intended to be used with Bee version 2.5.0.\n\n## Quick start\n\nStart a Swarm project using TypeScript:\n\n```sh\nnpm init swarm-app@latest my-dapp node-ts\n```\n\nor using Vite and TypeScript:\n\n```sh\nnpm init swarm-app@latest my-dapp vite-tsx\n```\n\nSupported types are `node`, `node-esm`, `node-ts` and `vite-tsx`. Replace `my-dapp` with your project name.\n\n## Install\n\n```sh\nnpm install @ethersphere/bee-js\n```\n\n## Import\n\n### CJS\n\n```js\nconst { Bee } = require('@ethersphere/bee-js')\n```\n\n### MJS and TypeScript\n\n```ts\nimport { Bee } from '@ethersphere/bee-js'\n```\n\n### Script tag\n\nLoading this module through a script tag will make the `BeeJs` object available in the global namespace.\n\n```html\n\u003cscript src=\"https://unpkg.com/@ethersphere/bee-js/dist/index.browser.min.js\"\u003e\u003c/script\u003e\n```\n\n## Overview\n\n### Type interfaces\n\n`NumberString` is a branded type for marking strings that represent numbers. It interops with `string` and `bigint`\ntypes. Where `NumberString` is present, `number` is disallowed in order to avoid pitfalls with unsafe large values.\n\n### Byte primitives\n\nAll the classes below extend `Bytes`, therefor the following methods are available on all of them: `toUint8Array`,\n`toHex`, `toBase64`, `toBase32`, `toUtf8`, `toJSON`, `static keccak256`, `static fromUtf8`.\n\nThe `toString` method uses `toHex`.\n\n`Bytes` and its subclasses may be constructed with `new` from `Uint8Array` or hex `string`.\n\n#### Elliptic\n\n| Name       | Description               | Methods                                                |\n| ---------- | ------------------------- | ------------------------------------------------------ |\n| PrivateKey | 32 bytes private key      | `publicKey`, `sign`                                    |\n| PublicKey  | 64 bytes public key       | `address`, `toCompressedUint8Array`, `toCompressedHex` |\n| EthAddress | 20 bytes Ethereum address | `toChecksum`                                           |\n| Signature  | 65 bytes signature        | `recoverPublicKey`                                     |\n\n#### Swarm\n\n| Name          | Description                         | Methods                         |\n| ------------- | ----------------------------------- | ------------------------------- |\n| Reference     | 32/64 bytes reference (chunk, feed) | `toCid`                         |\n| Identifier    | 32 bytes identifier (SOC, Feed)     | -                               |\n| TransactionId | 32 bytes transaction ID             | -                               |\n| FeedIndex     | 8 bytes feed index (BE)             | `static fromBigInt`, `toBigInt` |\n| Topic         | 32 bytes topic                      | `static fromString`             |\n| PeerAddress   | 32 bytes peer address               | -                               |\n| BatchId       | 32 bytes batch ID                   | -                               |\n| Span          | 8 bytes span (LE)                   | `static fromBigInt`, `toBigInt` |\n\n### Tokens\n\n| Name | Description                 | Methods                                                                                          |\n| ---- | --------------------------- | ------------------------------------------------------------------------------------------------ |\n| DAI  | ERC20 DAI token (18 digits) | `static fromDecimalString`, `static fromWei`, `toWeiString`, `toWeiBigInt`, `toDecimalString`    |\n| BZZ  | ERC20 BZZ token (16 digits) | `static fromDecimalString`, `static fromPLUR`, `toPLURString`, `toPLURBigInt`, `toDecimalString` |\n\n### Swarm chunks\n\n| Name             | Description                                                                                     | Creation                    |\n| ---------------- | ----------------------------------------------------------------------------------------------- | --------------------------- |\n| Chunk            | Span, max. 4096 bytes payload; address dervied from content                                     | `makeContentAddressedChunk` |\n| SingleOwnerChunk | Identifier, signature, span, max. 4096 bytes payload; address derived from identifier and owner | `makeSingleOwnerChunk`      |\n\n### Swarm primitives\n\n| Name         | Description                                          | Methods                                                                                                                                         |\n| ------------ | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |\n| MantarayNode | Compact trie with reference values and JSON metadata | `addFork`, `removeFork`, `calculateSelfAddress`, `find`, `findClosest`, `collect`, `marshal`, `unmarshal`, `saveRecursively`, `loadRecursively` |\n| MerkleTree   | Streaming BMT of chunks                              | `append`, `finalize`, `static root`                                                                                                             |\n\n### Swarm objects\n\n| Name       | Description             | Creation             |\n| ---------- | ----------------------- | -------------------- |\n| SOCWriter  | SingleOwnerChunk writer | `bee.makeSOCWriter`  |\n| SOCReader  | SingleOwnerChunk reader | `bee.makeSOCReader`  |\n| FeedWriter | Feed writer             | `bee.makeFeedWriter` |\n| FeedReader | Feed reader             | `bee.makeFeedReader` |\n\n### Bee API\n\n- ❌❌✅ - Full node only\n- ❌✅✅ - Light node and full node\n- ✅✅✅ - Ultra-light node, light node and full node\n\n| JS Call                              | Bee Endpoint                                                                                                                                             | Bee Mode |\n| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |\n| `uploadFile`                         | `POST /bzz` [🔗](https://docs.ethswarm.org/api/#tag/BZZ/paths/~1bzz/post)                                                                                | ❌✅✅   |\n| `uploadFilesFromDirectory` _Node.js_ | `POST /bzz` [🔗](https://docs.ethswarm.org/api/#tag/BZZ/paths/~1bzz/post)                                                                                | ❌✅✅   |\n| `uploadFiles`                        | `POST /bzz` [🔗](https://docs.ethswarm.org/api/#tag/BZZ/paths/~1bzz/post)                                                                                | ❌✅✅   |\n| `uploadCollection`                   | `POST /bzz` [🔗](https://docs.ethswarm.org/api/#tag/BZZ/paths/~1bzz/post)                                                                                | ❌✅✅   |\n| `uploadData`                         | `POST /bytes` [🔗](https://docs.ethswarm.org/api/#tag/Bytes/paths/~1bytes/post)                                                                          | ❌✅✅   |\n| `uploadChunk`                        | `POST /chunks` [🔗](https://docs.ethswarm.org/api/#tag/Chunk/paths/~1chunks/post)                                                                        | ❌✅✅   |\n| `streamDirectory` _Node.js_          | `POST /chunks` [🔗](https://docs.ethswarm.org/api/#tag/Chunk/paths/~1chunks/post)                                                                        | ❌✅✅   |\n| `streamFiles` _Browser_              | `POST /chunks` [🔗](https://docs.ethswarm.org/api/#tag/Chunk/paths/~1chunks/post)                                                                        | ❌✅✅   |\n| `SOCWriter.upload`                   | `POST /soc/:owner/:identifier` [🔗](https://docs.ethswarm.org/api/#tag/Single-owner-chunk/paths/~1soc~1%7Bowner%7D~1%7Bid%7D/post)                       | ❌✅✅   |\n| `FeedReader.download`                | `GET /feeds/:owner/:topic` [🔗](https://docs.ethswarm.org/api/#tag/Feed/paths/~1feeds~1%7Bowner%7D~1%7Btopic%7D/get)                                     | ✅✅✅   |\n| `FeedWriter.updateFeed`              | `POST /soc/:owner/:identifier` [🔗](https://docs.ethswarm.org/api/#tag/Single-owner-chunk/paths/~1soc~1%7Bowner%7D~1%7Bid%7D/post)                       | ❌✅✅   |\n| `downloadFile`                       | `GET /bzz/:reference` [🔗](https://docs.ethswarm.org/api/#tag/BZZ/paths/~1bzz~1%7Breference%7D/get)                                                      | ✅✅✅   |\n| `downloadFile`                       | `GET /bzz/:reference/:path` [🔗](https://docs.ethswarm.org/api/#tag/BZZ/paths/~1bzz~1%7Breference%7D~1%7Bpath%7D/get)                                    | ✅✅✅   |\n| `downloadReadableFile`               | `GET /bzz/:reference` [🔗](https://docs.ethswarm.org/api/#tag/BZZ/paths/~1bzz~1%7Breference%7D/get)                                                      | ✅✅✅   |\n| `downloadData`                       | `GET /bytes/:reference` [🔗](https://docs.ethswarm.org/api/#tag/Bytes/paths/~1bytes~1%7Breference%7D/get)                                                | ✅✅✅   |\n| `downloadReadableData`               | `GET /bytes/:reference` [🔗](https://docs.ethswarm.org/api/#tag/Bytes/paths/~1bytes~1%7Breference%7D/get)                                                | ✅✅✅   |\n| `downloadChunk`                      | `GET /chunks/:reference` [🔗](https://docs.ethswarm.org/api/#tag/Chunk/paths/~1chunks~1%7Baddress%7D/get)                                                | ✅✅✅   |\n| `createFeedManifest`                 | `POST /feeds/:owner/:topic` [🔗](https://docs.ethswarm.org/api/#tag/Feed/paths/~1feeds~1%7Bowner%7D~1%7Btopic%7D/post)                                   | ❌✅✅   |\n| `isConnected`                        | `GET /`                                                                                                                                                  | ✅✅✅   |\n| `getHealth`                          | `GET /health` [🔗](https://docs.ethswarm.org/api/#tag/Status/paths/~1health/get)                                                                         | ✅✅✅   |\n| `getReadiness`                       | `GET /readiness` [🔗](https://docs.ethswarm.org/api/#tag/Status/paths/~1readiness/get)                                                                   | ✅✅✅   |\n| `getNodeInfo`                        | `GET /node` [🔗](https://docs.ethswarm.org/api/#tag/Status/paths/~1node/get)                                                                             | ✅✅✅   |\n| `getChainState`                      | `GET /chainstate` [🔗](https://docs.ethswarm.org/api/#tag/Status/paths/~1chainstate/get)                                                                 | ❌✅✅   |\n| `getRedistributionState`             | `GET /redistributionstate` [🔗](https://docs.ethswarm.org/api/#tag/RedistributionState/paths/~1redistributionstate/get)                                  | ❌❌✅   |\n| `getReserveState`                    | `GET /reservestate` [🔗](https://docs.ethswarm.org/api/#tag/Status/paths/~1reservestate/get)                                                             | ❌❌✅   |\n| `getStatus`                          | `GET /status` [🔗](https://docs.ethswarm.org/api/#tag/Node-Status/paths/~1status/get)                                                                    | ✅✅✅   |\n| `getWallet`                          | `GET /wallet` [🔗](https://docs.ethswarm.org/api/#tag/Wallet/paths/~1wallet/get)                                                                         | ❌✅✅   |\n| `getTopology`                        | `GET /topology` [🔗](https://docs.ethswarm.org/api/#tag/Connectivity/paths/~1topology/get)                                                               | ✅✅✅   |\n| `getAddresses`                       | `GET /addresses` [🔗](https://docs.ethswarm.org/api/#tag/Connectivity/paths/~1addresses/get)                                                             | ✅✅✅   |\n| `getPeers`                           | `GET /peers` [🔗](https://docs.ethswarm.org/api/#tag/Connectivity/paths/~1peers/get)                                                                     | ✅✅✅   |\n| `getAllBalances`                     | `GET /balances` [🔗](https://docs.ethswarm.org/api/#tag/Balance/paths/~1balances/get)                                                                    | ❌✅✅   |\n| `getPeerBalance`                     | `GET /balances/:peer` [🔗](https://docs.ethswarm.org/api/#tag/Balance/paths/~1balances~1%7Baddress%7D/get)                                               | ❌✅✅   |\n| `getPastDueConsumptionBalances`      | `GET /consumed` [🔗](https://docs.ethswarm.org/api/#tag/Balance/paths/~1consumed/get)                                                                    | ❌✅✅   |\n| `getPastDueConsumptionPeerBalance`   | `GET /consumed/:peer` [🔗](https://docs.ethswarm.org/api/#tag/Balance/paths/~1consumed~1%7Baddress%7D/get)                                               | ❌✅✅   |\n| `getAllSettlements`                  | `GET /settlements` [🔗](https://docs.ethswarm.org/api/#tag/Settlements/paths/~1settlements/get)                                                          | ❌✅✅   |\n| `getSettlements`                     | `GET /settlements/:peer` [🔗](https://docs.ethswarm.org/api/#tag/Settlements/paths/~1settlements~1%7Baddress%7D/get)                                     | ❌✅✅   |\n| `getChequebookAddress`               | `GET /chequebook/address` [🔗](https://docs.ethswarm.org/api/#tag/Chequebook/paths/~1chequebook~1address/get)                                            | ❌✅✅   |\n| `getChequebookBalance`               | `GET /chequebook/balance` [🔗](https://docs.ethswarm.org/api/#tag/Chequebook/paths/~1chequebook~1balance/get)                                            | ❌✅✅   |\n| `getLastCheques`                     | `GET /chequebook/cheque` [🔗](https://docs.ethswarm.org/api/#tag/Chequebook/paths/~1chequebook~1cheque/get)                                              | ❌✅✅   |\n| `getLastChequesForPeer`              | `GET /chequebook/cheque/:peer` [🔗](https://docs.ethswarm.org/api/#tag/Chequebook/paths/~1chequebook~1cheque~1%7Bpeer-id%7D/get)                         | ❌✅✅   |\n| `getLastCashoutAction`               | `GET /chequebook/cashout/:peer` [🔗](https://docs.ethswarm.org/api/#tag/Chequebook/paths/~1chequebook~1cashout~1%7Bpeer-id%7D/get)                       | ❌✅✅   |\n| `cashoutLastCheque`                  | `POST /chequebook/cashout/:peer` [🔗](https://docs.ethswarm.org/api/#tag/Chequebook/paths/~1chequebook~1cashout~1%7Bpeer-id%7D/post)                     | ❌✅✅   |\n| `depositTokens`                      | `POST /chequebook/deposit` [🔗](https://docs.ethswarm.org/api/#tag/Chequebook/paths/~1chequebook~1deposit/post)                                          | ❌✅✅   |\n| `withdrawTokens`                     | `POST /chequebook/withdraw` [🔗](https://docs.ethswarm.org/api/#tag/Chequebook/paths/~1chequebook~1withdraw/post)                                        | ❌✅✅   |\n| `getAllPendingTransactions`          | `GET /transactions` [🔗](https://docs.ethswarm.org/api/#tag/Transaction/paths/~1transactions/get)                                                        | ❌✅✅   |\n| `getPendingTransaction`              | `GET /transactions/:id` [🔗](https://docs.ethswarm.org/api/#tag/Transaction/paths/~1transactions~1%7BtxHash%7D/get)                                      | ❌✅✅   |\n| `rebroadcastTransaction`             | `POST /transactions/:id` [🔗](https://docs.ethswarm.org/api/#tag/Transaction/paths/~1transactions~1%7BtxHash%7D/post)                                    | ❌✅✅   |\n| `cancelTransaction`                  | `DELETE /transactions/:id` [🔗](https://docs.ethswarm.org/api/#tag/Transaction/paths/~1transactions~1%7BtxHash%7D/delete)                                | ❌✅✅   |\n| `createTag`                          | `POST /tags` [🔗](https://docs.ethswarm.org/api/#tag/Tag/paths/~1tags/post)                                                                              | ❌✅✅   |\n| `retrieveTag`                        | `GET /tags/:id` [🔗](https://docs.ethswarm.org/api/#tag/Tag/paths/~1tags~1%7Buid%7D/get)                                                                 | ❌✅✅   |\n| `getAllTags`                         | `GET /tags` [🔗](https://docs.ethswarm.org/api/#tag/Tag/paths/~1tags/get)                                                                                | ❌✅✅   |\n| `deleteTag`                          | `DELETE /tags/:id` [🔗](https://docs.ethswarm.org/api/#tag/Tag/paths/~1tags~1%7Buid%7D/delete)                                                           | ❌✅✅   |\n| `updateTag`                          | `PATCH /tags/:id` [🔗](https://docs.ethswarm.org/api/#tag/Tag/paths/~1tags~1%7Buid%7D/patch)                                                             | ❌✅✅   |\n| `pin`                                | `POST /pins/:reference` [🔗](https://docs.ethswarm.org/api/#tag/Pinning/paths/~1pins~1%7Breference%7D/post)                                              | ✅✅✅   |\n| `getAllPins`                         | `GET /pins` [🔗](https://docs.ethswarm.org/api/#tag/Pinning/paths/~1pins/get)                                                                            | ✅✅✅   |\n| `getPin`                             | `GET /pins/:reference` [🔗](https://docs.ethswarm.org/api/#tag/Pinning/paths/~1pins~1%7Breference%7D/get)                                                | ✅✅✅   |\n| `isReferenceRetrievable`             | `GET /stewardship/:reference` [🔗](https://docs.ethswarm.org/api/#tag/Stewardship/paths/~1stewardship~1%7Breference%7D/get)                              | ✅✅✅   |\n| `reuploadPinnedData`                 | `PUT /stewardship/:reference` [🔗](https://docs.ethswarm.org/api/#tag/Stewardship/paths/~1stewardship~1%7Breference%7D/put)                              | ❌✅✅   |\n| `unpin`                              | `DELETE /pins/:reference` [🔗](https://docs.ethswarm.org/api/#tag/Pinning/paths/~1pins~1%7Breference%7D/delete)                                          | ✅✅✅   |\n| `getGrantees`                        | `GET /grantee/:reference` [🔗](https://docs.ethswarm.org/api/#tag/ACT/paths/~1grantee~1%7Breference%7D/get)                                              | ❌✅✅   |\n| `createGrantees`                     | `POST /grantee` [🔗](https://docs.ethswarm.org/api/#tag/ACT/paths/~1grantee/post)                                                                        | ❌✅✅   |\n| `patchGrantees`                      | `PATCH /grantee/:reference` [🔗](https://docs.ethswarm.org/api/#tag/ACT/paths/~1grantee~1%7Breference%7D/patch)                                          | ❌✅✅   |\n| `pssSend`                            | `POST /pss/send/:topic/:target` [🔗](https://docs.ethswarm.org/api/#tag/Postal-Service-for-Swarm/paths/~1pss~1send~1%7Btopic%7D~1%7Btargets%7D/post)     | ❌✅✅   |\n| `pssSubscribe` _Websocket_           | `GET /pss/subscribe/:topic` [🔗](https://docs.ethswarm.org/api/#tag/Postal-Service-for-Swarm/paths/~1pss~1subscribe~1%7Btopic%7D/get)                    | ❌❌✅   |\n| `pssReceive`                         | `GET /pss/subscribe/:topic` [🔗](https://docs.ethswarm.org/api/#tag/Postal-Service-for-Swarm/paths/~1pss~1subscribe~1%7Btopic%7D/get)                    | ❌❌✅   |\n| `getPostageBatches`                  | `GET /stamps` [🔗](https://docs.ethswarm.org/api/#tag/Postage-Stamps/paths/~1stamps/get)                                                                 | ❌✅✅   |\n| `getGlobalPostageBatches`            | `GET /batches` [🔗](https://docs.ethswarm.org/api/#tag/Postage-Stamps/paths/~1batches/get)                                                               | ❌✅✅   |\n| `getPostageBatch`                    | `GET /stamps/:batchId` [🔗](https://docs.ethswarm.org/api/#tag/Postage-Stamps/paths/~1stamps~1%7Bbatch_id%7D/get)                                        | ❌✅✅   |\n| `getPostageBatchBuckets`             | `GET /stamps/:batchId/buckets` [🔗](https://docs.ethswarm.org/api/#tag/Postage-Stamps/paths/~1stamps~1%7Bbatch_id%7D~1buckets/get)                       | ❌✅✅   |\n| `createPostageBatch`                 | `POST /stamps/:amount/:depth` [🔗](https://docs.ethswarm.org/api/#tag/Postage-Stamps/paths/~1stamps~1%7Bamount%7D~1%7Bdepth%7D/post)                     | ❌✅✅   |\n| `topUpBatch`                         | `PATCH /stamps/topup/:batchId/:amount` [🔗](https://docs.ethswarm.org/api/#tag/Postage-Stamps/paths/~1stamps~1topup~1%7Bbatch_id%7D~1%7Bamount%7D/patch) | ❌✅✅   |\n| `diluteBatch`                        | `PATCH /stamps/dilute/:batchId/:depth` [🔗](https://docs.ethswarm.org/api/#tag/Postage-Stamps/paths/~1stamps~1dilute~1%7Bbatch_id%7D~1%7Bdepth%7D/patch) | ❌✅✅   |\n| `createEnvelope`                     | `POST /envelope/:reference` [🔗](https://docs.ethswarm.org/api/#tag/Envelope/paths/~1envelope~1%7Baddress%7D/post)                                       | ❌✅✅   |\n| `getStake`                           | `GET /stake` [🔗](https://docs.ethswarm.org/api/#tag/Staking/paths/~1stake/get)                                                                          | ❌❌✅   |\n| `depositStake`                       | `POST /stake` [🔗](https://docs.ethswarm.org/api/#tag/Staking/paths/~1stake~1%7Bamount%7D/post)                                                          | ❌❌✅   |\n\n### Utils\n\n#### General\n\n- `getCollectionSize`\n- `getFolderSize`\n\n#### PSS\n\n- `makeMaxTarget`\n\n#### Erasure Coding\n\n- `approximateOverheadForRedundancyLevel`\n- `getRedundancyStat`\n- `getRedundancyStats`\n\n#### Stamps\n\n- `getAmountForTtl`\n- `getDepthForCapacity`\n- `getStampCost`\n- `getStampEffectiveBytes`\n- `getStampMaximumCapacityBytes`\n- `getStampTtlSeconds`\n- `getStampUsage`\n\n## Usage\n\n### Upload via Swarm Gateway\n\n```js\nimport { Bee, NULL_STAMP, SWARM_GATEWAY_URL } from '@ethersphere/bee-js'\n\nmain()\n\nasync function main() {\n  const bee = new Bee(SWARM_GATEWAY_URL)\n  const { reference } = await bee.uploadData(NULL_STAMP, 'Hello, World!')\n  console.log(reference.toHex())\n}\n```\n\n### Create or select an existing postage batch\n\nSwarm incentivizes nodes in the network to store content, therefor all uploads require a paid\n[postage batch](https://docs.ethswarm.org/docs/learn/technology/contracts/postage-stamp).\n\n```js\nimport { Bee } from '@ethersphere/bee-js'\n\nasync function getOrCreatePostageBatch() {\n  const bee = new Bee('http://localhost:1633')\n  let batchId\n\n  const batches = await bee.getPostageBatches()\n  const usable = batches.find(x =\u003e x.usable)\n\n  if (usable) {\n    batchId = usable.batchID\n  } else {\n    batchId = await bee.buyStorage(Size.fromGigabytes(1), Duration.fromDays(7))\n  }\n}\n```\n\n\u003e The following examples all assume an existing batchId.\n\n### Upload simple data (Browser + Node.js)\n\n```js\nimport { Bee } from '@ethersphere/bee-js'\n\nconst bee = new Bee('http://localhost:1633')\n\nconst uploadResult = await bee.uploadData(batchId, 'Bee is awesome!')\nconst data = await bee.downloadData(uploadResult.reference)\n\nconsole.log(data.toUtf8()) // prints 'Bee is awesome!'\n```\n\n### Upload data from a file input (React)\n\n```js\nimport { Bee } from '@ethersphere/bee-js'\n\nconst bee = new Bee('http://localhost:1633')\nconst result = await bee.uploadFile(batchId, file)\n```\n\n### Upload multiple files or a directory (React)\n\n```js\nimport { Bee } from '@ethersphere/bee-js'\n\nconst bee = new Bee('http://localhost:1633')\nconst result = await bee.uploadFiles(batchId, fileList)\n```\n\n### Upload arbitrary large file (Node.js)\n\n```js\nimport { Bee } from '@ethersphere/bee-js'\nimport { createReadStream } from 'fs'\n\nconst bee = new Bee('http://localhost:1633')\nconst readable = createReadStream('./path/to/large.bin')\nconst uploadResult = await bee.uploadFile(batchId, readable)\n```\n\n### Upload arbitrary large directories (Node.js)\n\n```js\nimport { Bee } from '@ethersphere/bee-js'\nimport { createReadStream } from 'fs'\n\nconst bee = new Bee('http://localhost:1633')\nconst uploadResult = await bee.uploadFilesFromDirectory(batchId, './path/to/gallery/')\n```\n\n### Customize http/https agent and headers\n\n```js\nconst bee = new Bee('http://localhost:1633', {\n  httpAgent: new http.Agent({ keepAlive: true }),\n  httpsAgent: new https.Agent({ keepAlive: true }),\n  headers: {\n    Authorization: 'Basic ' + Buffer.from('username:password').toString('base64'),\n  },\n})\n```\n\n## Contribute\n\nStay up to date by joining the [official Discord](https://discord.gg/GU22h2utj6) and by keeping an eye on the\n[releases tab](https://github.com/ethersphere/bee-js/releases).\n\nWe are using [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for our commit messages and pull\nrequests, following the [Semantic Versioning](https://semver.org/) rules.\n\nThere are some ways you can make this module better:\n\n- Consult our [open issues](https://github.com/ethersphere/bee-js/issues) and take on one of them\n- Help our tests reach 100% coverage!\n- Join us in our [Discord chat](https://discord.gg/wdghaQsGq5) in the #develop-on-swarm channel if you have questions or\n  want to give feedback\n\n### Setup\n\nInstall project dependencies:\n\n```sh\nnpm install\n```\n\nBuild the project:\n\n```sh\nnpm run build\n```\n\nAfter making changes, link the package to your project by running `npm link` in the Bee-JS project root, and\n`npm link @ethersphere/bee-js` in your project root.\n\n### Test\n\n[Code coverage](https://bah5acgza26tlmya36bdiu5cdfs3hh22hqthkhfv6cvq2ugxqrv5aw267ydlq.bzz.limo/)\n\nTests are currently run against a mainnet Bee nodes. This is temporary and this section will be revised in the future.\n\n## License\n\n[BSD-3-Clause](./LICENSE)\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fethersphere%2Fbee-js.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fethersphere%2Fbee-js?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethersphere%2Fbee-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethersphere%2Fbee-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethersphere%2Fbee-js/lists"}