Skip to content

Use Nexus social data

Use this guide when your application needs Blurt social views that are easier to consume from Nexus: ranked posts, account feeds, communities, profiles, notifications, referrals and discussion-oriented data.

Nexus is an indexed/social Layer 2 view derived from Blurt blockchain activity. It is excellent for discovery and application screens, but it is not the Layer 1 consensus source. When exact chain state matters, route back to Layer 1 helpers.

When Nexus is the right surface

NeedUseNotes
Trending, hot, created or payout feedsclient.nexus.getRankedPosts()Good first choice for discovery pages.
Posts by account, blog, comments, replies or feedclient.nexus.getAccountPosts()Use option objects for pagination-heavy code.
Community lists and community detailsclient.nexus.listCommunities(), getCommunity()Useful for topic discovery and community screens.
Profilesclient.nexus.getProfile()Indexed profile view, not a replacement for Layer 1 account authority data.
NotificationsaccountNotifications(), unreadNotifications()Application-facing notification views.
ReferralsreferralAccounts(), referralAccountsCount()Referral/affiliate lookup helpers.
Full chain objectLayer 1 helpers, not NexusUse client.condenser when consensus fields matter.

For the conceptual boundary, read Layer 1 and Nexus Layer 2.

Query ranked posts

ts
const posts = await client.nexus.getRankedPosts({
    sort: 'trending',
    tag: 'blurt',
    limit: 10,
    observer: null
});

for (const post of posts) {
    console.log(post.author, post.permlink, post.title);
}

Prefer option objects for new code because they make filters, cursors and observer semantics explicit.

The historical positional form remains supported for compatibility, but it is harder to read once pagination or nullable cursors are involved.

List account posts

ts
const posts = await client.nexus.getAccountPosts({
    account: 'beblurt',
    sort: 'posts',
    limit: 5,
    observer: null
});

console.log(posts.map((post) => post.title));

Use account-post queries for profile pages, post histories, comments, replies and feed-like surfaces. For pagination, carry the last item cursor according to the helper's option type and the API reference.

Discover communities

ts
const communities = await client.nexus.listCommunities({
    query: 'blurt',
    limit: 10,
    observer: null
});

for (const community of communities) {
    console.log(community.name, community.title);
}
ts
const community = await client.nexus.getCommunity('blurt-101010', null);
console.log(community.title);

Community names such as blurt-101010 are identifiers. Display titles are user-facing labels and can change independently.

Load a profile

ts
const profile = await client.nexus.getProfile('beblurt', null);
console.log(profile.name);

Use profiles for social presentation. Use Layer 1 account data when you need balances, authorities or protocol account state.

Understand observer values

Many Nexus helpers accept an observer value. The observer can affect visibility, muted content, subscription context or account-specific presentation.

Use null when you want a neutral public view:

ts
const post = await client.nexus.getPost('author', 'permlink', null);

Use an account name only when your application intentionally wants observer-aware data.

Trust and freshness model

Nexus data is indexed. That has product benefits and tradeoffs:

  • it is convenient for social screens and discovery;
  • it can combine and normalize data for applications;
  • it may lag the latest Layer 1 block;
  • it should not be described as Layer 1 consensus truth;
  • it should be cross-checked with Layer 1 helpers when your workflow depends on exact chain state.

A common pattern is:

text
1. Use Nexus to discover the post, account, community or feed item.
2. Use Layer 1 helpers only if your workflow needs canonical chain fields.
3. Use broadcast helpers only after user intent, authority and key handling are explicit.

Compatibility notes

  • Positional Nexus signatures remain supported for existing consumers.
  • Option objects are preferred for new code with filters, observer values or pagination.
  • listPopComunities remains available with its historical spelling but is deprecated.
  • New code should use listPopCommunities.

Validated examples

API details

Use the API reference for exact option shapes, pagination fields, overloads and return types: