apiKey
Your JAW API key for authentication with JAW services.
Type: string
Required: In app-specific mode. Optional in cross-platform mode, which is the default.
In cross-platform mode the SDK sends whatever it has and the backend decides whether to answer. With a key, the request is attributed to the project that key belongs to, and the allowed domains below are what the key is checked against. Without a key, the caller is identified by the origin the request comes from, and only origins registered with JustaName are served, so ask the team to register yours before dropping the option.
App-specific mode always needs a key, because it hands one to the UI handler your application implements. JAW.create() rejects an app-specific configuration without one.
Usage
With Wagmi (Recommended)
import { jaw } from '@jaw.id/wagmi';
const connector = jaw({
apiKey: 'your-api-key-here',
});With Provider Directly
import { JAW } from '@jaw.id/core';
const jaw = JAW.create({
apiKey: 'your-api-key-here',
});Without a key
const connector = jaw({ appName: 'My DApp' });Requests then carry no api-key parameter, and the origin your application runs on is what names it. An origin nobody registered is refused.
How to Get an API Key
- Visit the JAW Dashboard
- Create a new project or select an existing one
- Navigate to the API Keys section
- Generate a new API key
Setting Up Allowed Domains
For security, you must configure which domains are allowed to use your API key:
- In the JAW Dashboard, go to your api-key settings
- Find the Allowed Domains section
- Add the domains where your application will run:
localhostfor local developmentyourdomain.comfor productionstaging.yourdomain.comfor staging environments
Requests from domains not in your allowed list will be rejected.