You can encode the url's yourself in js, it's just url-encoded cryptString('-1|<broadlog id in base16>|<delivery id in base16>'). Not sure what -1 is. If you want to do it the hard way there's jsapi call nms.delivery.GetMirrorURL().
Ok. The problem is that this is not for a js context. I need to do it in an export workflow where I don't have access to js execution. I need to do it in Data extraction or Enrichment activity in a workflow.