> ## Documentation Index
> Fetch the complete documentation index at: https://docs.glider.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# tRPC Feature Flags API

> Feature flag reads for global public surfaces and authenticated user-specific rollout decisions.

The `featureFlags.*` namespace is available on the tRPC base endpoint:

* Base endpoint: `POST /v1/trpc`
* Namespace: `featureFlags.*`

## Procedures

* `featureFlags.getGlobalFlags`
  * Auth: public
  * Purpose: read global yes/no feature flag defaults for public client surfaces
    that must not depend on wallet login state
  * Input:
    * required `featureKeys`, 1-50 non-empty feature keys
  * Response:
    * `flags`: object keyed by requested feature key. A key resolves to `true`
      only when the feature row exists, `is_active = true`, and
      `default_state = true`; missing or inactive keys resolve to `false`.
  * Does not evaluate per-user overrides, codes, percentage rollouts, country,
    plan, or app-version targeting.

* `featureFlags.getUserFlags`
  * Auth: wallet session or API key with wallet context
  * Purpose: evaluate user-specific feature flags with overrides, redeemed
    codes, rollouts, and defaults
  * Input:
    * optional `country`
    * optional `planTier`
    * optional `appVer`
  * Response:
    * `flags`: evaluated feature flags for the authenticated wallet user
    * `redeemedDescriptions`: descriptions for redeemed feature-code gated
      access

## Runtime Notes

* Use `getGlobalFlags` for public UI gates such as default-on browse surfaces or
  global execution-route kill switches.
* Use `getUserFlags` only when the product behavior actually depends on the
  authenticated user, rollout bucket, override, or redeemed code state.
