This document describes:
- URL prefill parsing/hydration for profile pages (
/{name}) - The profile-menu paylink builder UI (
Create Paylink)
Allow links like https://zcash.me/{name}?... (or http://localhost:3000/{name}?...) to prefill:
- Memo text
- Crypto amount
- Fiat amount/currency
- Swap mode token selection for non-ZEC tickers
Also allow profile owners to generate a shareable paylink from the profile menu.
app/[slug]/page.tsxapp/[slug]/ProfilePage.tsxui/messaging/MemoComposer.tsxui/swap/SwapComposer.tsxui/verification/AmountAndWallet.tsx
ui/profile/ProfileCardActions.tsx(menu entry:Create Paylink)ui/profile/ProfileCard.tsx(opens/closes modal)ui/profile/CreatePrefillUrlModal.tsx(builder + preview)
If a non-canonical slug is visited, the app redirects to canonical slug and preserves query params.
Example:
/Savezcash?memo=Hi&ticker=ZEC&amount=0.01
redirects to canonical slug with the same query string.
memom(alias)
Memo is capped to 512 bytes.
tickerasset(alias)token(alias)
amountamt(alias)value(alias)zec(ZEC-specific alias)
Validation:
- Positive decimal only
- Up to 8 decimals
fiatcurrency(alias)
Fiat amount sources:
fiat_amountfiatAmount(alias)fiat_amt(alias)fiatValue(alias)- Fallback to shared
amountif explicit fiat amount is not provided
Validation:
- Positive decimal only
- Up to 2 decimals
base_layerbaseLayerbasechainnetworklayerblockchain
If missing and multiple base layers exist for a non-ZEC ticker, first token match is used.
memois applied.- If
fiat+ fiat amount exists, fiat is hydrated and conversion updates crypto amount. - If fiat prefill does not exist, crypto amount prefill is used (
zecor shared amount).
- Opens swap composer with selected token.
- Memo is ignored in swap mode.
- If only crypto amount is provided, crypto amount is applied.
- If fiat prefill is provided without crypto amount, fiat drives token conversion.
- If both crypto and fiat amounts are provided, crypto amount wins.
If URL includes memo with non-ZEC ticker:
- Memo is hidden in swap mode.
- If user switches token back to ZEC, memo appears in memo composer.
The modal is opened from Create Paylink in the profile menu.
Current builder behavior:
- User can choose request
tickerfrom:ZEC,BTC,ETH,SOL,USDC,USDT. - For tickers with multiple chains (for example some stablecoins), a
Networkselector appears and builder emitsbase_layer=.... - User can edit
Amount (<ticker>)and/orAmount (fiat)with fiat ticker selection. - Fiat and crypto amounts stay synchronized using current rate for selected ticker.
- Last modified amount field controls URL amount params:
- Last modified crypto field ->
amount=... - Last modified fiat field ->
fiat=...&fiat_amount=...
- Last modified crypto field ->
- For non-
ZEClinks,tickeris always included (even when fiat is last modified). - Memo input is capped to 512 bytes but only active for
ZEClinks. - If ticker is non-
ZEC, memo is disabled in builder and excluded from URL. - Builder includes
Close,Open URL,Copy URL,Share URL.
http://localhost:3000/SaveZcash?memo=Thanks&ticker=ZEC&amount=0.01
http://localhost:3000/SaveZcash?memo=Thanks&fiat=USD&fiat_amount=25.00
http://localhost:3000/SaveZcash?ticker=BTC&fiat=USD&fiat_amount=25.00
http://localhost:3000/SaveZcash?ticker=USDT&base_layer=eth&amount=50
http://localhost:3000/SaveZcash?ticker=BTC&amount=0.001