| name | peer-explorer |
| description | Look up deposits, intents, addresses, maker portfolios, verifier stats, and transaction history on the Peer protocol via Peerlytics API. Use when the user wants to inspect a specific deposit, intent, address, maker, or verifier, search across entities, or view maker/taker history. |
Peer Protocol Explorer
Overview
The explorer surfaces on-chain Peer protocol state through the Peerlytics API. Look up any deposit, intent, address, maker portfolio, or verifier -- plus search across all entities and pull maker/taker history.
SDK: @peerlytics/sdk (v0.0.2+)
Base URL: https://peerlytics.xyz
Auth: X-API-Key header or x402 USDC micropayment (no key required)
Setup
npm install @peerlytics/sdk
import { Peerlytics } from '@peerlytics/sdk';
const client = new Peerlytics({ apiKey: process.env.PEERLYTICS_API_KEY });
const client = new Peerlytics({ baseUrl: 'https://peerlytics.xyz' });
Endpoints
1. Search
Universal search across deposits, intents, and addresses. The API auto-detects the query type (address, tx/intent hash, deposit ID).
const results = await client.search('0xabc...def');
Filter by type or role:
const results = await client.search('0xabc...def', {
type: 'address',
role: 'owner',
limit: 20,
offset: 0,
});
2. Deposit Detail
Get a single deposit with its intents and linked data (payment details, expired intents, maker's other deposits).
const deposit = await client.getDeposit('escrow_123', { limit: 50 });
3. Intent Detail
Get a single intent with its linked deposit and related intents.
const intent = await client.getIntent('0xhash...');
4. Address Profile
Get all activity for an address -- intents, deposits, and aggregate stats.
const addr = await client.getAddress('0xabc...def', { limit: 50 });
5. Maker Portfolio
Get a maker's full portfolio -- summary stats, per-deposit breakdown, currency/platform allocations.
const maker = await client.getMaker('0xmaker...');
6. Verifier Stats
Get stats, currency breakdown, and recent activity for a verifier address.
const verifier = await client.getVerifier('0xverifier...', { limit: 50 });
7. List Deposits
List deposits with filters. Returns enriched deposits with USD values and payment method details.
const deposits = await client.getDeposits({
depositor: '0xmaker...',
status: 'ACTIVE',
accepting: true,
platform: ['venmo', 'wise'],
currency: ['USD', 'EUR'],
limit: 20,
offset: 0,
});
8. List Intents
List intents with filters. Returns enriched intents with USD values and lifecycle data.
const intents = await client.getIntents({
owner: '0xtaker...',
status: ['FULFILLED', 'SIGNALED'],
depositId: ['escrow_123', 'escrow_456'],
verifier: '0xverifier...',
limit: 50,
offset: 0,
});
9. Maker History
Get a maker's historical performance -- deposit stats, intent outcomes, currency/platform breakdown.
const history = await client.getMakerHistory('0xmaker...');
10. Taker History
Get a taker's intent history, success metrics, and trust tier.
const history = await client.getTakerHistory('0xtaker...');
Common Patterns
Check if an address is a maker or taker
const addr = await client.getAddress('0x...');
const isMaker = addr.stats.deposits_total > 0;
const isTaker = addr.stats.intents_total > 0;
const role = isMaker && isTaker ? 'both' : isMaker ? 'maker' : 'taker';
Get a maker's best-performing deposit
const maker = await client.getMaker('0xmaker...');
const best = maker.deposits
.filter(d => d.status === 'active')
.sort((a, b) => (b.apr ?? 0) - (a.apr ?? 0))[0];
Find all fulfilled intents for a deposit
const intents = await client.getIntents({
depositId: 'escrow_123',
status: 'FULFILLED',
limit: 100,
});
Search and inspect a transaction
const results = await client.search('0xtxhash...');
if (results.intents.length > 0) {
const detail = await client.getIntent(results.intents[0].intentHash);
console.log(detail.intent.lifecycle);
}
Pagination
All list endpoints support limit and offset. Responses include hasMore to indicate additional pages.
let offset = 0;
const limit = 50;
let allDeposits: EnrichedDeposit[] = [];
do {
const page = await client.getDeposits({ status: 'ACTIVE', limit, offset });
allDeposits.push(...page.deposits);
offset += limit;
if (!page.hasMore) break;
} while (true);
Error Handling
The SDK throws typed errors:
| Error | Status | When |
|---|
NotFoundError | 404 | Deposit/intent/address not found |
ValidationError | 400 | Invalid parameters |
RateLimitError | 429 | Too many requests (includes retryAfter seconds) |
PeerlyticsError | Other | General API error |
import { NotFoundError, RateLimitError } from '@peerlytics/sdk';
try {
const deposit = await client.getDeposit('nonexistent');
} catch (err) {
if (err instanceof NotFoundError) {
console.log('Deposit not found');
} else if (err instanceof RateLimitError) {
console.log(`Rate limited, retry after ${err.retryAfter}s`);
}
}
Full Response Schemas
See references/explorer-api.md for complete type definitions.
Environment
| Value |
|---|
| Peerlytics API | https://peerlytics.xyz |
| Auth | X-API-Key header or x402 micropayment |
export PEERLYTICS_API_KEY="..."