XDI client library for JavaScript