Skip to main content

Function: normalizeTokenName()

Gala Launchpad SDK 9.0.0-rc.5


Gala Launchpad SDK 9.0.0-rc.5 / index / normalizeTokenName

Function: normalizeTokenName()

normalizeTokenName(tokenName): string

Defined in: packages/launchpad-sdk/dist/utils/tokenNameNormalizer.d.ts:34

Normalizes a launchpad token name for consistent API usage.

All token names are stored lowercase in the backend. This utility ensures consistent normalization across all SDK services.

Current normalizations:

  • .trim() - Remove leading/trailing whitespace
  • .toLowerCase() - Convert to lowercase

Parameters​

tokenName​

string

The token name to normalize

Returns​

string

Normalized token name (trimmed and lowercased)

Example​

import { normalizeTokenName } from '../utils/tokenNameNormalizer';

const normalized = normalizeTokenName(' MyToken ');
console.log(normalized); // 'mytoken'