Skip to content

Constants

ts
import { API_BASE_URL, CDN_BASE_URL, WYNNCRAFT_API_VERSION, assetUrl } from "@wynnjs/api";
ExportValue / signatureDescription
API_BASE_URLhttps://api.wynncraft.com/v3Default base URL for all requests
CDN_BASE_URLhttps://cdn.wynncraft.comBase URL for CDN assets
WYNNCRAFT_API_VERSION3.7.2Wynncraft API release this client targets
assetUrl(path)(path: string) => stringJoin a relative media path to CDN_BASE_URL

Versions

VersionMeaning
npm package (package.json)Client release (3.0.0, …)
WYNNCRAFT_API_VERSIONUpstream API alignment (3.7.2, …)

Bump the npm version for client changes. Update WYNNCRAFT_API_VERSION when schemas and methods are realigned to a new Wynncraft API release.

CDN assets

Some responses include partial media paths. Complete them with assetUrl:

ts
const url = assetUrl("nextgen/badges/rank_owner.svg");
// https://cdn.wynncraft.com/nextgen/badges/rank_owner.svg

Leading slashes on path are stripped. Recipes for player badges, news banners, and leaderboards: CDN assets cookbook.

See also the official media URL notes and the Changelog.

Unofficial TypeScript tooling for the Wynncraft API