solana-token-auth
v1.0.0
Published
Solana Token Authenticator SDK — verify token tickers in one line
Downloads
105
Maintainers
Readme
@sta/sdk — Solana Token Authenticator SDK
Verify Solana token tickers in one line. Is this BONK the real BONK?
Install
npm install @sta/sdkQuick Start
import { STA } from '@sta/sdk';
const sta = new STA({ apiKey: 'sta_your_key_here' }); // optional, higher rate limits
// Verify a contract address
const result = await sta.verify('EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v');
console.log(result.verified); // true
console.log(result.ticker); // "USDC"
// Quick boolean check
const isReal = await sta.isVerified('DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263');
// true
// Lookup by ticker symbol
const bonk = await sta.lookup('BONK');
console.log(bonk.mint); // "DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263"
// Batch verify (max 100 addresses)
const results = await sta.batchVerify([
'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v',
'DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263',
'SomeRandomFakeAddress12345678901234567890123',
]);
// Get enriched data (market + duplicates)
const enriched = await sta.verify('DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263', {
include: 'market,duplicates'
});
console.log(enriched.market?.price);
console.log(enriched.duplicates?.duplicateCount);API Key
Get a free API key for higher rate limits:
curl -X POST https://token-name-authenticator.vercel.app/api/v1/keys \
-H "Content-Type: application/json" \
-d '{"name": "My App", "email": "[email protected]"}'Rate limits: | Tier | Requests/min | |------|-------------| | No key | 30 | | Free | 100 | | Developer | 1,000 | | Enterprise | 10,000 |
Methods
| Method | Description |
|--------|-------------|
| verify(address) | Check if a contract address is verified |
| isVerified(address) | Quick boolean check |
| lookup(ticker) | Get the verified token for a ticker |
| batchVerify(addresses[]) | Verify up to 100 addresses at once |
| search(query) | Search tokens by name or ticker |
| tokens({ page, limit }) | List all verified tokens |
| duplicates(ticker) | Get duplicate count for a ticker |
| stats() | Get registry statistics |
REST API
All endpoints are also available as REST:
GET /api/v1/verify/{address}
GET /api/v1/verify/{address}?include=market,duplicates
POST /api/v1/verify/batch { "addresses": [...] }
GET /api/v1/lookup/{ticker}
GET /api/v1/tokens?page=1&limit=25
GET /api/v1/search?q=bonk
GET /api/v1/duplicates/{ticker}
GET /api/v1/stats
POST /api/v1/keys { "name": "...", "email": "..." }Pass your API key via X-API-Key header or ?apikey= query parameter.
License
MIT
