Under Construction This DApp is in development

API & SDK

OmniSocial offers powerful ways to interact with the protocol and user data — whether you're building an app, bot, extension, or analytics dashboard.

While a full SDK is in development (@omni/query, @omni/wallet, and more), you can already use the GraphQL endpoint, subgraph schema, and wallet libraries directly.

🔍 GraphQL API

OmniSocial’s data is indexed using The Graph, accessible via a public GraphQL endpoint:

https://api.thegraph.com/subgraphs/name/omnisocial/omnitopia

✅ No API key required. Supports read-only access to personas, posts, DAOs, tips, votes, and more.

Example Query – Fetch All Personas

query AllPersonas {
  personas(first: 5) {
    id
    handle
    label
    createdAt
  }
}

Example Query – Posts by Persona

query PostsByPersona($personaId: String!) {
  posts(where: { persona: $personaId }, orderBy: timestamp, orderDirection: desc) {
    id
    content
    timestamp
    tipAmount
  }
}

Use any GraphQL client such as Apollo, urql, or plain fetch:

const res = await fetch(GRAPHQL_URL, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ query, variables })
});

🧪 Planned SDK Modules

🛠 These libraries are actively being built and will be published as installable packages once stable.

@omni/query

React hook + utility wrapper for fetching GraphQL data

import { usePersona, useFeed } from '@omni/query';

const { persona } = usePersona(handle);
const { posts } = useFeed(persona.id);

@omni/wallet

Utility toolkit for OmniWallet integration and smart wallet abstraction

  • Create or connect to a social wallet

  • Handle 2FA flows and SBT-based recovery

  • Sign actions via abstracted execute() calls

🧰 Tools & External Integration

  • The Graph Hosted Explorer: thegraph.com/explorer → search "omnisocial"

  • Block Explorers: View OmniSocial contracts on Polygon zkEVM

  • Public Contract ABIs: Hosted on GitHub and in the OmniSocial monorepo.

🧑‍💻 Contributing or Extending

Want to extend the SDKs or add custom resolvers? → Open issues or PRs on our GitHub: github.com/OmniSocialBlockchain

Last updated

Was this helpful?