BUILD
WITH SEPBASE
Discover configuration before calling the contract.
Start with the deployment manifest. It publishes the current network, contract, pricing rules, asset details, and integration URLs in one place.
The SDK validates the manifest and ABI before returning reads. The HTTP API exposes the same public name data without requiring a wallet connection.
The SDK and React integration packages are release-ready in packages/sdk and packages/react, but are not yet published to the public npm registry. Use workspace:* inside this monorepo; the install command applies after the first package release.
# After the public package release
pnpm add @sepbase/sdk @sepbase/react
import { createSepbaseClient } from "@sepbase/sdk";
const sepbase = await createSepbaseClient(
"https://sepbase.vercel.app/deployment-manifest.json"
);
const address = await sepbase.resolveName("alice");
const primary = await sepbase.reverseLookup("0xYourAddress");
const quote = await sepbase.quoteName("alice", 1);/deployment-manifest.jsonRuntime chain, contract, asset, and endpoint metadata.
OPEN WELL-KNOWN MANIFEST/.well-known/chain-name-service.jsonStable discovery document for other applications.
OPEN CONTRACT ABI/abi/ChainNameService.jsonCanonical JSON ABI with a published checksum.
OPEN OPENAPI/api/openapi.jsonMachine-readable read-only HTTP API contract.
OPEN BLOCKSCOUT HANDOFF/integrations/blockscout-bens.mdBENS prerequisites, semantics, and event mapping.
OPEN LLMS.TXT/llms.txtCompact integration map for AI-assisted development.
OPENShow a name only when both directions still agree.
const identity = await sepbase.verifyAddress(
"0x78de409a6306550882328E2a67160471368387FF"
);
const displayName = identity.verified
? identity.primaryName
: identity.account;
// Name-first verification is also available.
const recipient = await sepbase.verifyName("alice", identity.account);Use the primary name only when verified is true. Otherwise display the checksummed address.
Owner, lifecycle, resolution, primary, and expiry reads are pinned to one block.
Verify again before a payment or other address-sensitive confirmation.
SepbaseIdentity never displays an unverified name and exposes stable loading, verified, unverified, and error states.
Explorer-native search requires an external BENS-compatible subgraph and Blockscout configuration. The public handoff document maps the required work without adding an indexer to this dApp.
Read SEPBASE without a wallet library.
The read-only API returns name, profile, resolution, pricing, and market data with the network context needed by another application.
/api/name/{label}Lifecycle, owner, resolution, profile, and listing.
/api/resolve/{label}Forward resolution for a canonical label.
/api/reverse/{address}Forward-confirmed primary name for an address.
/api/marketCurrent validated fixed-price listings.
/api/metadata/{tokenId}ERC-721 metadata for a registered token.
/api/image/{tokenId}Deterministic onchain-name image representation.
curl "https://sepbase.vercel.app/api/name/alice?durationYears=1"
curl "https://sepbase.vercel.app/api/reverse/0x78de409a6306550882328E2a67160471368387FF"
curl "https://sepbase.vercel.app/api/market?cursor=0&limit=24"Quote first. Preserve every slippage guard.
const amount = await publicClient.readContract({
address: manifest.contract,
abi,
functionName: "quote",
args: ["alice", 1]
});
const rewardBps = await publicClient.readContract({
address: manifest.contract,
abi,
functionName: "referralRewardBps"
});
const { request } = await publicClient.simulateContract({
account: owner,
address: manifest.contract,
abi,
functionName: "register",
args: [
"alice",
1,
owner,
referrer,
amount, // expectedAmount guard
rewardBps // expectedRewardBps guard
],
value: manifest.settlement.kind === "native" ? amount : undefined
});
const hash = await walletClient.writeContract(request);Pass the current quote as expectedAmount. For ERC-20 settlement, approve that exact base-unit amount first.
Pass the current reward rate as expectedRewardBps. Attribution is recorded onchain; claims use pull payments.
Pass the current market fee as expectedFeeBps. The fee is captured on each listing.
Pass the displayed listing price as expectedPrice. Seller proceeds remain protected until claimed.
Send users to the configured /r/{referrer} route. Attribution is scoped to schema, chain, and contract.
Index NameRegistered, NameRenewed, ReferralAttributed, NameListed, and NameSold; handle custom errors by machine name.
Portable across settlement assets, explicit about trust.
Used by the connected chain to pay transaction fees.
Native or one standard ERC-20 selected per deployment.
quote(label, years) applies the configured length tier in settlement base units.
Applied respectively to one-, two-, and three-character labels.
Current reward for a successful registration made through a referral.
Applied to new or updated listings, not retroactively changed.
Reads resolve against the deployment published in the manifest.