The hard work has been done in previous PRs in the js-sdk, so this is now just a case of updating a few call sites to use the new APIs.