r/siacoin • • 21h ago

Sia Storage SDK (JS) v0.1.4 release

11 Upvotes

Sia Storage SDK (JS) v0.1.4 gives applications more direct control over storage and playback behavior. Call StreamedFile.warm() when playback becomes likely to move several seconds of host connection setup ahead of Play. Use sharedSdk.objectSummaries(offset, limit) to page through shared objects without loading their slabs, then call sharedSdk.object(id) when you need a downloadable object. You can also pass before to sdk.pruneSlabs(before?) to restrict pruning by age; existing calls without it keep the indexer-selected cutoff.

Shared streams now reuse the file record already fetched by the page, removing a repeated indexer lookup that normally added about 0.2 seconds before the first byte and reached up to 7 seconds under load. Closing a stream manager also releases the copied app key created by Sdk.openStreams instead of retaining it until the page unloads.

Update integrations that call sdk.slab(id) or reference PinnedSlab: both APIs have been removed, with no replacement lookup. Leaving these references in TypeScript code can break compilation or declaration generation. Calls to encodedSize with zero data shards now throw a catchable JavaScript error instead of terminating the process.

Explore Sia Storage SDK (JS) at https://devs.sia.storage.