Gutenberg: is is possible to get the current permalink of the post?

Problem solved. I am using: select( ‘core/editor’ ).getEditedPostSlug() in a useSelect call. it gets the most recently updated slug. I want it to build a url which I show to the user in the DocumentSettings panel – the url is then used on another site (which access data via the Rest API) but makes use of the slug.

A large part of this seems to be about becoming familiar with the main modules and the documentation for each one. If it helps anyone else, this is the documentation for core/editor which you can use to get information about the current post.