Skip to content

@xtandard/links/deeplinks

Deep links (ADR 0008): builders for the OS association files served from a short domain’s /.well-known/, Play Store install-referrer tagging, and the coarse fingerprint used for probabilistic deferred deep-link matching. Zero dependencies; edge-safe.

import { … } from "@xtandard/links/deeplinks";
Name Summary
buildAppleAppSiteAssociation Build an apple-app-site-association document (universal links + web credentials) for an iOS app config.
buildAssetLinks Build an assetlinks.json document for Android app configs.
deferredFingerprint The coarse fingerprint for probabilistic deferred matching: a daily-salted hash of IP + OS family. The same visitor tapping a link in the browser and opening the freshly installed app minutes later usually shares both. IPs are never stored.
isPlayStoreUrl True for Google Play listing URLs (play.google.com/store/apps/details, market://).
wellKnownResponse Serve a domain’s association files. Returns null for other paths or when the domain has no matching app config.
withInstallReferrer Tag a Play Store URL with the install referrer so the freshly installed app can read the click id via the Play Install Referrer API: &referrer=xl_id%3D{clickId}. Non-Play URLs are returned unchanged.
Name Summary
AASA_PATH Path of the Apple association file.
ASSETLINKS_PATH Path of the Android Digital Asset Links file.