SDK Reference
RelationalClient
Fetch visualization graphs, creator topology, and attestation summaries via on-chain contracts.
Initialization
Important: The SDK defaults to Base Sepolia. For Base Mainnet, you must pass custom contract addresses (see Getting Started).
import { JsonRpcProvider } from 'ethers';
import { createRelationalClient } from '@influence-protocol/sdk';
// Default (Base Sepolia)
const provider = new JsonRpcProvider(process.env.RPC_URL);
const client = createRelationalClient(provider);
// For Base Mainnet, pass custom config:
const mainnetClient = createRelationalClient(provider, {
visualizationAssembler: '0x...', // Base Mainnet address
relationalResolver: '0xdaabbfc98a09f542f5f3f13694284ca96dd32934',
illuminationAnalyzer: '0x4b2f2a03ed6744df981198fc3c231953179db699',
});Pass a custom configuration if you deploy contracts to a different network. AI agents should read the contracts property in the workflow spec.
Key Methods
getParticipantGraph(address)Returns nodes + edges + metadata for a wallet.
getCreatorTopology(address)Summarizes creator activity and unique participants.
getParticipantSummaries(address, opts)Paginated summaries for lightweight UIs.
getInfluencerMetrics(address)Pulls the protocol-level InfluenceBreakdown pillars (creator / portfolio / network / consistency) straight from IlluminationAnalyzer.
Hosted REST Endpoints
Every SDK read is mirrored at https://sdk.stayradiant.xyz/api. Use them directly when you need lightweight integrations or to orchestrate AI agents without bundling the on-chain client.
curl "https://sdk.stayradiant.xyz/api/participants/0xabc.../summaries?limit=25"
# -> { "data": { "address": "...", "items": [...], "total": 127 }, "meta": { "generatedAt": "..." } }fetch('/api/attestations?uids=0x123,0x456').then(res => res.json());/api/attestations?uids=– batch fetch records, or passcreatorToken/participantto list UIDs./api/attestations/[uid]– canonical attestation payload./api/participants/[address]/graphand/journey– visualization assembler mirrors./api/creators/[address]/topologyand/summaries./api/metrics/[address]– Illumination Analyzer output.
Agent Notes
- Always normalize addresses before calling methods (checksum not required, but preferred).
- Pagination defaults to
offset=0,limit=50; include explicit options when crawling large datasets. - Graph responses are returned as plain objects—no BigNumber wrappers—so serialization is straightforward.
Machine-readable workflow: /agents/workflows/fetch_participant_graph
Upcoming: Subgraph Adapter
Once the public subgraph is deployed, the SDK will expose an optional adapter for cached reads while keeping contract calls canonical. Track the progress in the changelog.