@luxfi/brand-types

Open in Hanzo Edit with Hanzo

Neutral TypeScript types for white-label brand identity, application descriptors, and federation discovery.

What's inside

  • BrandConfig, BrandTheme — runtime brand identity (name, domains, social, theme overlay)
  • AppKind, AppDescriptor — describes one application surface (market / exchange / explorer / etc.)
  • FederationPeer, ChainBinding, MergedBrand — federation discovery glue
  • WellKnownBrand — payload at /.well-known/brand.json (identity only, owned by brand team)
  • WellKnownApp — payload at /.well-known/<appId>.json (federation graph, references the brand by URL)

What it is not

  • Not a runtime: importing this at runtime is an empty module (types are erased).
  • Not opinionated about transport: how you fetch brand.json or /.well-known/<app>.json is up to you.
  • Not branded: this package contains zero literal brand names. Consumers supply the values.

Install

pnpm add -D @luxfi/brand-types   # or: bun add -D, npm i -D

Use

import type { BrandConfig, MergedBrand, AppKind } from '@luxfi/brand-types'

const brand: BrandConfig = {
  name: 'Example',
  title: 'Example — App',
  description: 'An example deployment.',
  shortName: 'EX',
  appDomain: 'app.example.test',
}

To add app-specific fields, extend locally:

import type { BrandConfig as CanonicalBrandConfig } from '@luxfi/brand-types'

export interface BrandConfig extends CanonicalBrandConfig {
  walletConnectProjectId?: string
  insightsHost?: string
}

Specs

Implements the schema referenced by:

  • LP-0010 — Lux Brand Discovery
  • HIP-0303 — Hanzo Brand Discovery
  • ZIP-0031 — Zoo Brand Discovery

License

BSD-3-Clause. See LICENSE.

S
Description
Neutral TypeScript types for white-label brand identity (LP-0010 / HIP-0303 / ZIP-0031 schema). Zero brand data, zero runtime deps.
Readme BSD-3-Clause
73 KiB
Languages
TypeScript 100%