Skip to content

BeeJS modularisation #413

@nugaon

Description

@nugaon

In the upcoming period we would like to split the bee-js library into several reusable modules that give more freedom over swarm primitives. Currently the bee-js mostly does API wrapping of the go Bee client. This functionality will resign in bee-js-client with no extra logic around that. Additional packages are the following:

  • @ethersphere/swarm-utils: Contains common interfaces and utility functions that we use across our projects like byte operations, base types and assert functions.
  • @ethersphere/chunker: Provides functionalities related to chunks e.g. BMT hashing and its interfaces.
  • @ethersphere/soc: Single Owner Chunk in memory representation with corresponding utility functions for constructing and mutating this primitive: signer/identifier functions and validating ownership.
  • @etherpshere/feeds: Swarm Feeds that rely on the soc library and make flexible structure for easily defining new feed types. The interface for constructing such a feed type will await for custom indexing schema and its corresponding lookup algorithm. With that, you will be able to optimize feed lookups with cashing on client-side or even creating totally new type of feed structures for different use-cases. Of course, it also ships its own primitive that allows different feeds be used in a unified way in other swarm projects.
  • @ethersphere/mantaray: we have currently the mantaray-js library but we would like to rename it and use it with the @ethersphere prefix.
  • @ethersphere/bee-js: as mentioned above the current API wrapping will be extracted, but bee-js will not disappear. all above mentioned modules will be exposed from this library in a way that javascript dApp developers firmly onboard to the Swarm ecosystem, but still use the power of most of the introduced features. Some planned features here are:
    • manifests functionalities that is based on mantaray primitive but provides high-level CRUD operations
    • working on feeds with JSON objects
    • chunk streaming upload

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low: Not priority right nowdif:hardHaving worked on the specific codebase is importantkind:architectureCore architecture of projecttype:issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions