src/ecc/signature.js
function recover(data, encoding = "utf8") {
        if (typeof data === "string") {
            data = Buffer.from(data, encoding);
        }
        assert(Buffer.isBuffer(data), "data is a required String or Buffer");
        data = hash.sha256(data);

        return recoverHash(data);
    }
function recover(data, encoding = "utf8") {
        if (typeof data === "string") {
            data = Buffer.from(data, encoding);
        }
        assert(Buffer.isBuffer(data), "data is a required String or Buffer");
        data = hash.sha256(data);

        return recoverHash(data);
    }
Recover the public key used to create this signature using full data.

@arg {String|Buffer} data - full data
@arg {String} [encoding = 'utf8'] - data encoding (if string)

@return {PublicKey}