getPublicKey is part of the onboarding tools provided by Scatter. By requesting a public key from a user they are given the chance to either give you an existing public key, or create one on the fly which is then store within their Scatter.
scatter.getPublicKey(blockchain).then(publicKey => {
//...
})