applicationName/preferences.json
. The first part of the path (before the first "/") is called the dataDomain
and an application request permissions to a dataDomain.mySky.getJSON
and mySky.setJSON
methods, which can be read about in the skynet-js docs. Additionally, discoverable files for any UserID can be read using client.file.getJSON( userId, path)
without permissions or loading a MySky client.mySky.getJSONEncrypted
and mySky.setJSONEncrypted
methods, which can be read about in the skynet-js docs.dataDomain
, you're requesting full permissions for skyfiles using that "data domain". A MySky file's dataDomain is the root-level directory of its path.The MySky file saved atskyposts.hns/posts/123.json
has a dataDomain ofskyposts.hns
. To write to this file, you'd need permissions to theskyposts.hns
dataDomain.
skyapp.hns.siasky.net
requesting access to the dataDomain of skyapp.hns
will be automatically authorized and users will not be prompted for permissions. If that site is accessed using a skylink url like 30039k6ev3f6u2ftr1tei5vkn98ld7hjfbotctm9la1ofd1kv2rdlog.siasky.net
skyapp.hns
dataDomain, the user will be prompted for permissions.mySky.addPermissions
method. See the skynet-js documentation for Adding Custom Permissions for more info.await client.extractDomain(window.location.href)