The DAS API
The Digital Asset Standard (DAS) API exposes rich asset metadata for tokens, NFTs, and compressed cNFTs over provider-enabled RPC endpoints.
Recipe
Quick-reference recipe card - copy-paste ready.
// DAS methods use JSON-RPC on DAS-enabled provider URLs
const DAS_RPC = "https://mainnet.helius-rpc.com/?api-key=YOUR_KEY";
const body = {
jsonrpc: "2.0",
id: 1,
method: "getAsset",
params: { id: "ASSET_ID_OR_MINT" },
};
const res = await fetch(DAS_RPC, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(body),
});
const { result } = await res.json();
console.log(result?.content?.metadata?.name);When to reach for this:
- Rendering NFT galleries with names and images.
- Reading compressed cNFT trees without manual merkle parsing.
- Token-gating by asset ownership across collections.
- Wallet portfolio views beyond raw
getTokenAccountsByOwner.
Working Example
const DAS_RPC = process.env.DAS_RPC_URL!;
async function dasRpc<T>(method: string, params: unknown): Promise<T> {
const res = await fetch(DAS_RPC, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ jsonrpc: "2.0", id: 1, method, params }),
});
const json = await res.json();
if (json.error) throw new Error(json.error.message);
return json.result as T;
}
// Assets owned by wallet
const assets = await dasRpc<{ items: unknown[] }>("getAssetsByOwner", {
ownerAddress: "WALLET_PUBKEY",
page: 1,
limit: 50,
});
console.log("count:", assets.items?.length);
// Single asset detail
const asset = await dasRpc<unknown>("getAsset", { id: "ASSET_ID" });
console.log(asset);What this demonstrates:
- DAS extends JSON-RPC with asset-centric methods like
getAsset,getAssetsByOwner. - Pagination parameters vary by provider - check Helius/Triton docs.
- Combine with standard RPC for transactions and custom program accounts.
Deep Dive
How It Works
- Indexers behind the provider aggregate on-chain token metadata, MPL programs, and compression proofs.
getAssetreturns unified JSON for standard, compressed, and fungible assets where supported.- Not part of vanilla Solana RPC - must use DAS-enabled endpoint.
@solana/kithandles standard RPC; DAS often usesfetchor provider SDK until unified in kit.
Common DAS Methods
| Method | Purpose |
|---|---|
getAsset | Single asset by id |
getAssetsByOwner | Wallet portfolio |
getAssetsByGroup | Collection queries |
searchAssets | Filtered discovery |
TypeScript Notes
// Pair DAS reads with kit sends
import { createSolanaRpc } from "@solana/kit";
const txRpc = createSolanaRpc(process.env.RPC_URL!);
// DAS_RPC separate URL on same provider dashboardGotchas
- Vanilla public RPC - DAS methods return errors or 404. Fix: enable DAS on provider plan.
- Asset id confusion - mint, metadata PDA, and DAS id differ for cNFTs. Fix: use id returned by prior DAS query.
- Stale metadata - off-chain JSON lagging image updates. Fix: refresh policy + cache bust URIs.
- Pagination gaps - concurrent mints during paging miss items. Fix: cursor-based pagination if provider supports.
- Mixing DAS with raw GPA - duplicate logic paths. Fix: DAS for wallets; GPA for custom program state only.
Alternatives
| Alternative | Use When | Don't Use When |
|---|---|---|
getTokenAccountsByOwner | Simple SPL balances only | NFT metadata richness |
| Custom indexer | Full control of schema | Fast MVP gallery |
| Metaplex SDK reads | Low-level metadata PDA | Compressed asset ergonomics |
| Explorer APIs | Ad-hoc analytics | Production app dependency |
FAQs
Which providers support DAS?
Helius, Triton, and others advertise DAS - verify feature flag on your API key dashboard.
Does DAS cover compressed NFTs?
Yes - primary value is unified reads for Bubblegum cNFTs without manual proof decoding.
Can I use DAS on devnet?
Provider-dependent - many DAS features target mainnet; check devnet support matrix.
Is DAS in @solana/kit 7.0.0?
Standard kit RPC covers validator methods; DAS typically uses provider JSON-RPC via fetch or vendor SDK.
How do I get collection assets?
getAssetsByGroup with group key/value (e.g., collection verified address) per provider schema.
What is asset id for cNFT?
Provider-computed identifier - do not assume equals leaf address without checking getAsset response.
Rate limits on DAS?
Separate from standard RPC quotas - monitor 429 on portfolio endpoints.
Can DAS replace indexing?
For read-heavy wallets yes; analytics still need custom indexers for arbitrary program events.
How fresh is DAS data?
Sub-slot to seconds behind chain depending on indexer - not identical to processed reads.
How does DAS relate to state compression docs?
See Reading Compressed Assets DAS for cNFT-specific patterns.
Related
- RPC Basics - standard JSON-RPC
- Core RPC Methods - low-level account reads
- Reading Compressed Assets DAS - cNFT focus
- RPC Providers - who hosts DAS
Stack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.