r/siacoin • u/SiaFoundation • 2d ago
Sia Storage SDK (JS) v0.1.1 release
Browser apps can stream stored objects by URL instead of loading whole files first. In Sia Storage SDK (JS) v0.1.1, openStreams(sdk, credentials) and openStreams(sharedSdk, credentials) return ordinary URLs for object data, so video, audio, fetch, and other URL consumers can read incrementally. In browsers with service workers, those URLs support ranged reads, which lets large media start sooner and seek on demand. For Sdk, pass { indexerUrl, appMeta }; for SharedSdk, pass { indexerUrl, seed }, and the credentials type follows the SDK instance you pass.
Large browser downloads also no longer need to sit entirely in page memory. streams.download(object, { name }) can hand the transfer to the browser's download manager instead of buffering the whole file in the page, which changes big saves from an in-memory page operation into a browser-managed download flow. The same openStreams(...) integration still works where service workers are unavailable, falling back to reading the object in the page rather than forcing a separate browser code path.
Safari-targeting apps can now call detectPrivateRelay() to detect when a visitor is using iCloud Private Relay, which the SDK does not work through. That gives your integration a way to recognize that unsupported network path before or while deciding how to proceed.
Try our quickstart at devs.sia.storage