Environment and credentials
The full set of environment variables a tied-agent app needs, grouped by concern, plus how each credential is issued and why nothing is hardcoded.
Every value your app needs is an environment variable. No host, secret, or instrument id is hardcoded, which is what lets the same build run against a sandbox and against production by changing config only. This page is the single reference: each group links to the page that explains it in depth.
Secrets marked server only must never reach the browser. Only the NEXT_PUBLIC_* values are safe to
expose. See the tied-agent walkthrough for why the browser holds
only an opaque session cookie.
Identity (OIDC)
Your confidential OIDC client, and where to send users to sign in. Explained in Authentication and the walkthrough.
| Variable | Server only | Purpose |
|---|---|---|
ASSETERA_ISSUER | Issuer URL, for example https://auth.<base_domain>/realms/assetera | |
ASSETERA_CLIENT_ID | Your tenant's confidential client id | |
ASSETERA_CLIENT_SECRET | yes | Client credential (or use private_key_jwt instead of a shared secret) |
ASSETERA_REDIRECT_URI | Your callback, for example https://<your-app>/api/auth/callback |
The same client handles tied-agent registration and sign-in. The BFF reads the returned access token's
sub and uses it as the customer key for MetaKYC.
Marketplace API
The multi-tenant API your BFF proxies to. Your tenant claim scopes every response.
| Variable | Server only | Purpose |
|---|---|---|
ASSETERA_API_BASE | Marketplace API base URL | |
ASSETERA_INSTRUMENT_PAIR_ID | The single token_pairs id a tied-agent app sells (convention for the single-instrument starter) |
KYC (MetaKYC SDK)
Verification runs through @asseteragmbh/metakyc. Full setup in
KYC integration.
| Variable | Server only | Purpose |
|---|---|---|
METAKYC_BASE_URL | MetaKYC service URL | |
METAKYC_CLIENT_ID | Your MetaKYC tenant / client id (may be tenantId) | |
METAKYC_API_KEY | yes | Session-token creation |
METAKYC_SECRET_KEY | yes | Session-token creation |
NEXT_PUBLIC_METAKYC_BASE_URL | Same URL, browser side | |
NEXT_PUBLIC_METAKYC_CLIENT_ID | Same client id, browser side |
Wallet
The delivery wallet the RWA is sent to. Your server registers it, see Register a client's wallet.
| Variable | Server only | Purpose |
|---|---|---|
COMPLIANCE_API_URL | Compliance API base URL, for wallet registration | |
NEXT_PUBLIC_ASSETERA_WALLET_URL | The wallet URL from Assetera, to offer the Assetera Wallet | |
WALLETCONNECT_PROJECT_ID | Optional, for connecting an external wallet by QR |
To offer the Assetera Wallet, add NEXT_PUBLIC_ASSETERA_WALLET_URL and follow
Assetera Wallet. Your app needs only the @asseteragmbh/wallet-connector
package and this URL. It never handles wallet tokens.
Session store
The BFF session that holds tokens server-side. On a serverless host (for example Vercel) this must be a hosted store, not in-memory, so sessions survive across function invocations.
| Variable | Server only | Purpose |
|---|---|---|
SESSION_PASSWORD | yes | 32+ char secret that encrypts the session cookie (iron-session) |
REDIS_URL | yes | Hosted session/token store |
A starting .env
# --- Identity (OIDC) ---
ASSETERA_ISSUER=
ASSETERA_CLIENT_ID=
ASSETERA_CLIENT_SECRET= # server only
ASSETERA_REDIRECT_URI=
# --- Marketplace API ---
ASSETERA_API_BASE=
ASSETERA_INSTRUMENT_PAIR_ID=
# --- KYC (MetaKYC) ---
METAKYC_BASE_URL=
METAKYC_CLIENT_ID=
METAKYC_API_KEY= # server only
METAKYC_SECRET_KEY= # server only
NEXT_PUBLIC_METAKYC_BASE_URL=
NEXT_PUBLIC_METAKYC_CLIENT_ID=
# --- Wallet ---
COMPLIANCE_API_URL=
NEXT_PUBLIC_ASSETERA_WALLET_URL=
WALLETCONNECT_PROJECT_ID= # optional
# --- Session store ---
SESSION_PASSWORD= # server only, 32+ chars
REDIS_URL= # server onlyHow each credential is issued
Provisioning is done with the Assetera team, not self-serve (see Partner onboarding). You supply your app's URLs; Assetera issues the credentials bound to your tenant.
| Credential | Issued by | You provide | Delivered as |
|---|---|---|---|
OIDC client id + secret (or private_key_jwt) | Assetera Identity | Your redirect URI and app origin | Confidential client bound to your tenant |
| MetaKYC client id + API/secret keys | Assetera Compliance | Your tenant details | Tenant-scoped MetaKYC credentials |
| Instrument entitlement (pair id) | Assetera / issuer | Which instrument you sell | The token_pairs id enabled for your tenant |
| Wallet URL | Assetera | Your site origins | The URL for NEXT_PUBLIC_ASSETERA_WALLET_URL, see Assetera Wallet |
For a DSP relying on its own onboarding, the pack replaces MetaKYC SDK credentials with the agreed identity federation and reliance-data contract. Do not request or store MetaKYC keys when your integration does not run Assetera-led onboarding.
Rotate secrets through the Assetera team, never share them across environments, and keep every server-only
value out of the repo and out of any NEXT_PUBLIC_* variable.
Troubleshooting
Fix common Assetera Wallet integration problems: blocked pop-ups, an origin that is not listed, a pop-up that never answers, and a declined signature.
How Assetera works
The platform at a glance: standards-based identity, one multi-tenant Marketplace API, on-chain settlement, and a compliance layer Assetera runs in every partnership model.