Contents
§ API · DocsIdentity layer
Check a wallet
Check that a wallet belongs to one verified iPhone. One iPhone holds one account. Queries are free: read the Registry on-chain, call the REST API, or use an SDK.
https://api.atlayer.dev, RPC https://rpc.atlayer.dev. Registry 8y2C3ibLtr4MvRisRQ572LTVhkBK4iheUKSto5ZhP5BE, Launchpad D9vkWN56hxemLUwhVtpGNuYEALLoijzRfQqa13RFVRXs. Registration is not live yet: it opens with the iPhone app. The SDKs are not published yet.§ 1Overview
A user verifies once, in the @layer iPhone app. Apple App Attest proves a genuine copy of the app on a genuine iPhone. Apple DeviceCheck limits each phone to one account. The account and its one approved wallet live in the on-chain Registry program.
Your app can then ask: is this wallet the approved wallet of a verified account? Use the answer to resist Sybil attacks, where one person poses as many wallets.
The on-chain Registry is the source of truth. The REST API and the SDKs are conveniences on top of it.
§ 2What a check proves
That this wallet is now the approved wallet of one verified iPhone account. It proves a unique iPhone, not a unique person. Do not tell your users that it proves more.
What a check never reveals
A name, the phone model or any personal data.
Privacy
The account ID is the same for every app, so apps can link a user's activity across apps. Verification status is public.
§ 3Check a wallet
Is this wallet the approved wallet of a verified account?
Request
curl https://api.atlayer.dev/v1/wallets/WALLET_ADDRESSResponse
200OK · application/json
{
"wallet": "WALLET_ADDRESS",
"verified": true,Approved wallet of a verified account
"account_id": "9f2c3a5d81b04e67c2a9f0d3b6e18c47a5d29e0f3b7c61d84e0a2f95c3b7e41a",
"verified_since": "2026-10-01T12:00:00Z",
"status": "active"
}Fields
| Field | Type | Meaning |
|---|---|---|
wallet | string | The wallet you asked about (base58) |
verified | boolean | true only while this wallet is the approved wallet of an active (not frozen, not closed) account that is not a demo account |
account_id | string | null | The account ID: 64 lowercase hex characters (32 bytes). The same ID for every app |
verified_since | string | null | When this wallet became the approved wallet (RFC 3339, UTC). Null if the account is closed, the wallet was replaced, or the account is a demo account |
status | "active" | "frozen" | "closed" | "demo" | "pending" | null | The account status. null: the wallet has no account. pending: the indexer has not stored the registration yet |
The response can have more fields, for the launchpad's wallet lookup. Do not depend on them.
Cases
| Case | verified | status |
|---|---|---|
| Approved wallet of an active account | true | "active" |
| Wallet of a frozen account | false | "frozen" |
| Wallet of a deleted account | false | "closed" (with its former account_id) |
| Wallet of the App Review demo account (not a verified iPhone) | false | "demo" |
| Registered on-chain, not indexed yet | false | "pending" |
| Wallet replaced by a wallet switch | false | null |
| Wallet that never had an account | false | null |
The API reads an indexer, about one confirmation behind the chain. For a decision that must be exact, use the on-chain check.
The account ID
account_id · 32 bytes
- 100–1FBytes32, random
- 2hexText form64 characters
- 36 + 4Short forma3f9c2…e81b
- 4—Appsthe same ID in every app
Same ID, same seal.
The seal is a picture of the ID, not a proof. It helps people tell accounts apart at a glance. To trust a wallet, check it with this endpoint or assert_verified.
FIG. 1A sample account ID, byte by byte. The bar under each byte shows its value.
Errors
| Status | Meaning |
|---|---|
400 | The address is not a base58 32-byte address. A batch with more than 100 wallets, or with one bad address, fails as a whole. |
401 | The API key is unknown or revoked, or a webhook call has no x-api-key. |
404 | No webhook with this id for your key. |
415, 422 | A JSON body without content-type: application/json, or of the wrong shape. |
429 | Over the rate limit. retry-after gives the wait in seconds. |
500 | Server error. |
Every error is {"error": string}.
§ 4Check many wallets
It checks up to 100 wallets in one request. The answers come in the same order, each with the five fields of the single check.
curl -X POST https://api.atlayer.dev/v1/wallets/batch \
-H "content-type: application/json" \
-d '{"wallets": ["WALLET_1", "WALLET_2"]}'
{ "wallets": [ { "wallet": "WALLET_1", "verified": true, ... }, ... ] }§ 5Webhooks
Get every Registry event that changes a wallet's status. Webhooks need an API key (free, see limits). Each key can have up to 5. The URL must be public https.
Endpoints
| Endpoint | Does |
|---|---|
POST /v1/webhooks | Creates one from {"url"}. 200 with {"id", "url", "secret"}. The secret is shown once |
GET /v1/webhooks | Lists yours: [{"id", "url", "failures", "created_at"}] |
DELETE /v1/webhooks/{id} | Deletes one. 204, or 404 if your key has no webhook with this id |
Create
curl -X POST https://api.atlayer.dev/v1/webhooks \
-H "x-api-key: YOUR_KEY" \
-H "content-type: application/json" \
-d '{"url": "https://example.com/layer-events"}'
{ "id": "...", "url": "https://example.com/layer-events", "secret": "..." }Deliveries
- Each POST has up to 100 events, in the order the indexer stored them.
- Check
x-signature-sha256: the hex HMAC-SHA256 of the raw body. The key is the secret string exactly as you got it (its 64 characters). Do not hex-decode it. - Answer 2xx to take the batch. Otherwise the same batch comes again after 1 s, 2 s, 4 s and so on, up to 1 hour apart.
- Answer within 10 seconds. Redirects are not followed.
- Event IDs increase. Use them to drop a repeat.
- A new webhook gets the events from the time you create it. Earlier events are not sent. Deliveries stop while the key is revoked.
POST https://example.com/layer-events
x-signature-sha256: <hex HMAC-SHA256 of the raw body, keyed with the secret string>
{ "events": [ {
"id": 1042,
"kind": "wallet_approved",
"account": "USER_ACCOUNT_ADDRESS",
"account_id": null,
"wallet": "NEW_WALLET",
"old_wallet": "OLD_WALLET",
"status": null,
"signature": "TRANSACTION_SIGNATURE",
"slot": 380000123,
"time": "2026-10-13T05:00:00Z"
} ] }Event kinds
| kind | Meaning |
|---|---|
registered | A new account. account_id and wallet are set |
wallet_approved | The account switched wallets. wallet is the new one, old_wallet lost its approval |
device_rebound | The account was restored on the same phone |
closed | The account was deleted. account_id and wallet are set |
status_changed | Frozen or unfrozen. status is set |
§ 6Free use and limits
The identity layer is free to use. The on-chain check costs only your own compute. Every API endpoint is free. There are no paid tiers.
Without a key, per IP address
120requests a minute
With a free API key, by default
1,200requests a minute
- Send the key in the
x-api-keyheader. Each key gets its own limit. Webhooks need a key. - Over the limit, the answer is 429 with
retry-afterin seconds. An unknown or revoked key gets 401, and the request also counts against your IP's limit.
To get a free key, write to [email protected].
§ 7Market data
The launchpad's market API is open and needs no key. It reads the same indexer. U64 amounts are decimal strings: lamports for SOL, base units for tokens (6 decimals). services/market/API.md has every type.
| Endpoint | Answer |
|---|---|
GET /v1/tokens?sort=new|progress|graduated&q=&cursor=&limit= | A page of tokens and next_cursor. limit 1 to 100 (30) |
GET /v1/tokens/{mint} | One token with its curve, caps and fees, or 404 |
GET /v1/tokens/{mint}/trades?limit= | Trades, newest first. limit 1 to 200 (50) |
GET /v1/tokens/{mint}/candles?interval=&limit= | Candles (1m, 5m, 15m, 1h, 1d), oldest first. limit up to 1,000 (300) |
GET /v1/tokens/{mint}/holders | The 100 largest holders |
GET /v1/stats | Registration counts and the last 30 days. Demo accounts are left out |
GET /v1/stream | Websocket: live trades, tokens and candles |
- A token has
status("bonding"or"graduated"),price_change_24h_bps,in_app_only_until(null: any approved wallet can buy) andhidden(moderation hid it; holders can always sell). - A launch of the App Review demo account is not in the lists or the stream. Its own pages answer with
demo: true. In trades and holders, a demo account hasaccount_id: null. - The websocket takes
{"subscribe": topic}and{"unsubscribe": topic}, at most 50 topics. A topic is{"kind": "tokens"}or{"kind": "token", "mint", "interval"?}. It sendstrade,tokenandcandlemessages. At most 5 open streams per IP; one more gets 429. - The attestation archive is open too:
GET /v1/archive?after=&limit=andGET /v1/archive/roots?after=&limit=(limit1 to 100, default 50).
§ 8On-chain check
Your Solana program can check a wallet with no API call:
- 1Derive the WalletLink address from the seeds
["wallet", wallet]under the Registry program. - 2Confirm that the Registry program owns the WalletLink.
- 3Load the UserAccount that the WalletLink points to.
- 4Check that the UserAccount is active and that its approved wallet is this wallet.
- 5Check that the UserAccount is not the App Review demo account.
The attest-verify crate does all five with assert_verified(wallet, wallet_link, account). It returns VerifiedAccount { address, account_id, model_class, created_at }. Its errors are ProgramError::Custom(9000 + n): 9000 WrongOwner, 9001 WrongAddress, 9002 WrongAccountType, 9003 NotApprovedWallet, 9004 NotActive, 9005 UnknownModel, 9006 DemoAccount. It is not on crates.io. Add it as a git dependency from the repository (onchain/crates/attest-verify).
The launchpad uses assert_registered, which does steps 1 to 4 only. It accepts the demo account and gives it very small caps.
use attest_verify::assert_verified;
// In your instruction handler. The caller passes the wallet's
// WalletLink and UserAccount. Require the wallet to sign as well:
// assert_verified does not check the signature.
let verified = assert_verified(
&ctx.accounts.wallet.key(),
&ctx.accounts.wallet_link,
&ctx.accounts.account,
)
.map_err(ProgramError::from)?;
// verified.account_id is the same for every wallet the account
// approves, so key your per-person state on it.Illustrative. The final API is in sdk/ts and sdk/rust.
§ 9Registry program
The Registry holds the identities. docs/INTERFACES.md has the byte layouts and the signed messages.
Addresses
| Program | Address |
|---|---|
| Registry | 8y2C3ibLtr4MvRisRQ572LTVhkBK4iheUKSto5ZhP5BE |
| secp256r1 precompile | Secp256r1SigVerify1111111111111111111111111 |
Devnet: live
Accounts
| Account | Seeds | Key fields |
|---|---|---|
Config | ["config"] | Admin multisig, registrar key, app ID hash, cooldowns, pause flag, latest archive Merkle root |
UserAccount | ["account", account_id] | Account ID, device public key (33 bytes), device counter, approved wallet, last switch and restore times, phone model class, status (active or frozen, or demo active or demo frozen for an App Review demo account) |
WalletLink | ["wallet", wallet] | Owning account. One per wallet, so a wallet can never serve two accounts |
DeviceKey | ["device", key[0..1], key[1..33]] | Marks a device key as in use |
ModelTable | ["models"] | Phone model class to launch price and release date (admin-managed) |
ArchiveRoot | ["archive", day as u32 LE] | One per UTC day, written once: the attestation archive's Merkle root |
Instructions
| Instruction | Signed by | Checks |
|---|---|---|
initialize | Upgrade authority | Creates Config and ModelTable |
register_account | Registrar (wallet via the Ed25519 precompile) | Registrar key matches Config. Wallet not already linked. Device key not already used |
approve_wallet | New wallet (device key via the secp256r1 precompile) | Precompile checks. RP ID hash. Counter higher than stored. Expiry. Cooldown. Moves the WalletLink |
rebind_device | Registrar | Restore cooldown. Replaces the device key. Resets the counter |
close_account | Registrar | Deletes UserAccount, WalletLink and DeviceKey |
set_status | Admin | Freeze or unfreeze for abuse |
post_archive_root | Registrar | Writes the day's ArchiveRoot once |
update_config, update_models | Admin | Parameter and model-table changes |
verify_device_action | Launchpad, by CPI | Checks a device-signed action and advances the counter |
Device-signed actions use Solana's secp256r1 precompile. The precompile instruction sits directly before the instruction that uses it, holds exactly one signature, and keeps the signature, the key and the message inside its own data.
§ 10Launchpad program
The first app on @layer: a memecoin launchpad where every bonding-curve buyer is a verified account. It reads the Registry directly, so a trade needs no backend signature. Trade on the web at the launchpad, or from your own bot with the same approved wallet.
Address
| Program | Address |
|---|---|
| Launchpad | D9vkWN56hxemLUwhVtpGNuYEALLoijzRfQqa13RFVRXs |
Devnet: live
Accounts
| Account | Seeds | Key fields |
|---|---|---|
GlobalConfig | ["global"] | Admin multisig, fee settings, parameter bounds, graduation threshold, AMM target, pause flag, App Review demo cap and daily budget |
Launch | ["launch", mint] | Creator account, curve reserves, cap parameters, in-app-only end time, weighting flag, launch time, status, demo flag (made by the App Review demo account) |
BuyRecord | ["buy", launch, account_id] | Total tokens bought by this account on this launch |
AccountBudget | ["budget", account_id] | UTC day, SOL spent that day in early windows, or in every buy for an App Review demo account |
CreatorStats | ["creator", account_id] | Last launch time |
Instructions
| Instruction | Signed by | Checks |
|---|---|---|
create_launch | Approved wallet, plus device key via the precompile | Account active. Launch rate limit. Parameters within bounds. Mints the full supply to the curve vault, then revokes mint and freeze authority |
buy | Approved wallet, plus device key for in-app-only launches | WalletLink to Account, active and unfrozen. cap(t). Daily budget. Slippage. Updates reserves, BuyRecord and AccountBudget |
sell | Any holder | Slippage. Updates reserves |
graduate | Anyone (permissionless crank) | Threshold reached. Creates the AMM pool by CPI. Deposits liquidity. Burns or locks LP |
collect_fees | Fee recipients | Fee accounting |
close_buy_record | Anyone (permissionless crank) | Launch graduated. Closes the BuyRecord and refunds its rent to the wallet that paid it |
claim_raydium_fees | Fee recipient (creator's approved wallet or platform) | Creator Registry account live. Claims the locked Raydium LP fees |
graduate_meteora | Anyone (permissionless crank) | Threshold reached. Creates the Meteora DAMM pool by CPI and deposits liquidity |
claim_meteora_fees | Fee recipient (creator's approved wallet or platform) | Creator Registry account live. Claims the Meteora pool fees |
initialize | Upgrade authority, once | Creates the Global account |
update_global | Admin multisig | Bounded parameter changes |
§ 11SDKs
@atlayer/sdk (TypeScript, browsers and Node) and atlayer-sdk (Rust) wrap the on-chain check and the REST API. They use the same Rust core as the iPhone app, so they compute the same caps and build the same launchpad transactions. They never hold a key: your wallet signs. The packages are not published yet. The source is in sdk/ts and sdk/rust.
import { ApiClient, initCore, SolanaRpc, verifyWalletOnChain } from "@atlayer/sdk";
await initCore(); // loads the WebAssembly core once
// On-chain: the Registry's own check. Trusts only your RPC node.
const check = await verifyWalletOnChain(new SolanaRpc(RPC_URL), wallet);
if (check.verified) console.log(check.accountId, check.createdAt);
else console.log(check.reason); // "NotRegistered", "NotActive", ...
// REST: fast, free. An API key only raises the rate limit.
const api = new ApiClient({ baseUrl: API_URL });
const status = await api.getWallet(wallet);
const many = await api.getWalletStatuses(wallets); // up to 100Illustrative. The final API is in sdk/ts and sdk/rust.