> For the complete documentation index, see [llms.txt](https://deenz.gitbook.io/bq2/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://deenz.gitbook.io/bq2/guides/functionalities/credential-issuer-rating.md).

# Credential Issuer Rating

After a user has obtained a credential, they can anonymously rate the credential issuer via a [Semaphore proof](https://semaphore.appliedzkp.org/docs/guides/proofs). This can be done by calling the `generateRateCredentialIssuerProof` function inside the `@bq-core/lib` library with the following parameters:

* `identity`: the [Semaphore identity](https://semaphore.appliedzkp.org/docs/guides/identities) of the user broadcasting the signal and generating the proof.
* `groupOrMerkleProof`: the group to which the user belongs, which must be the credentials group in order to rate the credential issuer.
* `rate`: from 0 to 100, the rating the user gives to the credential issuer.
* `snarkArtifacts`: the [`zkey`](https://github.com/0xdeenz/bq-core-v2/blob/main/packages/lib/snark-artifacts/semaphore.zkey) and [`wasm`](https://github.com/0xdeenz/bq-core-v2/blob/main/packages/lib/snark-artifacts/semaphore.wasm) trusted setup files, taken from [PSE SNARK artifacts](https://www.trusted-setup-pse.org/).

{% hint style="info" %}
The external nullifier being used to prevent double-signaling is the string `bq-rate`.
{% endhint %}

Users can then send these proofs to the [Credentials.sol](/bq2/technical-reference/contracts.md) contract by calling the [`rateIssuer`](/bq2/technical-reference/contracts.md#rating-the-credential-issuer) function, which verifies them and aggregates the ratings given for the credential.
