Skip to content

Game Fairness

Overview

The Game Fairness component enables users to verify the integrity of game results through provably fair tools. It also provides tabs for managing active seeds and viewing the history of rotated seeds.

Script URL

This web component is provided as a script and can be loaded from the CDN using the following URL pattern:

https://<cdn-url>/<bundle-version>/game-fairness.js

Example:

https://cdn.prod-gt-demo-games.gamnify.tech/v1.1.0/game-fairness.js

Both <cdn-url> and <bundle-version> values will be provided to you.

If making use of the browser's Subresource Integrity feature, the integrity hash will also be provided.

Component Details

Once the script is loaded, the Game Fairness component can be added to the page by using the element <gt-game-fairness>.

This component accepts the following attributes:

Attribute Type Required Description
roundId string The unique identifier of a game round. If provided, it automatically loads its seed data into the verifier.
token string The session token used to display and rotate seeds.

Example:

<gt-game-fairness 
  roundId="1234-5678-9012"
  token="auth-token-value"
></gt-game-fairness>

Events

The following is a list of all available events supported by this component.

Details on how to listen for and dispatch events can be found here.

Outgoing Events

gtGameFairness.out.error – Fairness error occurred

Payload:

{
  code: string | number;
}

Note:

Additional data may be passed as part of the payload where relevant.

gtGameFairness.out.init – Fairness initialized

Payload:

{
  roundId?: string;
}

gtGameFairness.out.seedCopied – Seed value copied to clipboard

Payload:

{
  seedType: 'client' | 'server';
}