-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export low level functions for feeds and soc #379
Comments
Indeed the low-level details of soc and feeds are not exposed because we did not see clearly how people would use them and what would be a good level of abstraction. Could you please share an example of what exactly you are trying to do? Without knowing that I can suggest that manipulating the index of a feed can be done by writing single owner chunks with the |
Sure, I want to download a feed update at a specific index. I know that it is possible to do using the
Hum... so if I understand it correctly, I could read a feed update in a specific index using the
But given that I have the data of a chunk how to get the owner? I would need to create a |
Right now the only type of feeds that are implemented in Bee are sequential type, meaning that if you know the index of the latest feed update you will immediately know how many updates were and can easily fetch any of them by using their numeric id. In bee-js there is only one utility function regarding working with sequential feed indexes (
There is ongoing work to add stream uploading of chunks but not downloading them as far as I know. The best option right now is to issue multiple requests parallely.
That's correct, this functionality is not yet exposed. We are currently researching how it would be best to expose this functionality, we are considering creating separating packages that could be possibly used without even using bee-js. Stay tuned! |
Thank you very much. Yeah, I just started to do my own implementation of it here, but I'll definitely keep a eye on the next releases. |
Hi, currently some very useful low level functions are not exported. To list few:
makeSingleOwnerChunkFromData
,uploadSingleOwnerChunkData
,recoverChunkOwner
anddownloadSingleOwnerChunk
from the soc api, andmakeFeedIdentifier
,uploadFeedUpdate
,downloadFeedUpdate
, etc, from the feeds api.Have those functions exported could allow developers to create more powerful dapps using bee-js. For instance, I want to control the index of a feed, but I cannot do that with the current api. On the other hand, if functions like
findNextIndex
anduploadFeedUpdate
were exported I could do that.Some dapps will have a different way to create and manage chunks and would be nice if bee-js was flexible enough to allow that.
So I'm wondering if these functions can be exported. Currently, I'm forced to basically replicate most of the feed and soc functions in my own code just to be able to manipulate few parameters like the index since most of these functions have a high level of dependencies between themselves and they are not exported. This seems to remove the necessity to use bee-js as a library for my app.
There is any way that I can manipulate the index of a feed for example? Or get the owner of a soc in the current api?
The text was updated successfully, but these errors were encountered: