Additional information
Become an ODD SDK jedi ð§
Debugging
Version
Check the ODD SDK version.
Debug Logs
Debug logging can be enabled through the configuration object.
When ODD SDK makes a change to the user's filesystem, it logs:
Next, ODD SDK links the change to make it available across the web.
When linking completes, the change is published and available to other browsers.
Program
When debug
mode is enabled, the program
is added to the global context object (window
for example):
Shorthands
An ODD program provides shorthand utility functions for easy access:
The shorthands include:
accountDID. Retrieves the account DID associated with the user's account.
agentDID. Retrieves the agent DID for the current device.
sharingDID. Retrieves the sharing DID for the current device.
WNFS File System Roots
WNFS comes with three separate top-level file systems "roots": public, pretty, and private.
Public
Not encrypted. Full metadata support. Starts with /public
.
Pretty
Not encrypted. No metadata. Represented simply as /p
to be nice and short when creating public URLs like /p/path/to/file.img
. It does not support versioning, use the Public or Private trees for that.
Private
Encrypted. Structured so that file metadata as well as contents are obscured. Starts with /private
.
More about roots. Learn more about roots in the Fission whitepaper.
Web Worker
Can I use my file system in a web worker? Yes, but depending on which type of session you want you may need to adjust your setup. To be more specific, when working without capabilities you can just create a program in your web worker. But when working with capabilities, it'll depend on how your chosen capabilities flow works. In the case of the current Fission auth lobby, access to the window object is needed when requesting capabilities, so that'll need to happen on the UI/main thread.
Feel free to reach out on our Discord if you need help.
Versions
Since the file system may evolve over time, a "version" is associated with each node in the file system (tracked with semver).
Last updated