npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@backchain/agora

v0.2.0

Published

Backchain Agora — Decentralized social protocol

Downloads

110

Readme

@backchain/agora

Agora module for the Backchain DeFi ecosystem on opBNB. On-chain social protocol for posts, replies, reposts, follows, tips, and more.

Install

npm install @backchain/agora

Quick Start

import { AgoraModule } from '@backchain/agora';

const agora = new AgoraModule(context); // context from @backchain/core
await agora.createProfile('alice', 'ipfs://Qm...');
const postId = await agora.createPost('Hello Backchain!', 'general', 0);
await agora.like(postId);

API

Write Methods

createProfile(username: string, metadataURI: string): Promise<TransactionResult> Register an on-chain profile. username must be unique across the protocol. metadataURI is an IPFS or Firebase URL pointing to a JSON object with the shape { avatar, banner, bio, links, location }. Calling again updates the profile.

createPost(content: string, tag: string, contentType: number): Promise<TransactionResult> Publish a new root post. content is stored on-chain (keep it short; use a URI for long-form). tag is a freeform category string. contentType is an integer the frontend uses to render the post (e.g., 0 = text, 1 = link, 2 = image URI).

createReply(parentId: bigint, content: string, contentType: number): Promise<TransactionResult> Post a reply to an existing post or reply. parentId is the post ID being replied to.

createRepost(originalId: bigint, content: string): Promise<TransactionResult> Repost an existing post with optional commentary. content may be empty for a plain repost.

editPost(postId: bigint, newContent: string): Promise<TransactionResult> Edit the content of a post. Only the original author can edit. Edits are recorded on-chain.

deletePost(postId: bigint): Promise<TransactionResult> Soft-delete a post. Only the original author can delete. The post record remains on-chain but is flagged as deleted.

like(postId: bigint): Promise<TransactionResult> Like a post. Each address can like a post once. Calling again unliked the post.

follow(address: string): Promise<TransactionResult> Follow another user's profile. Calling again with the same address unfollows.

tipPost(postId: bigint, amount: bigint): Promise<TransactionResult> Send a BNB tip directly to the author of a post. amount is in wei. A small protocol fee is deducted from the tip before forwarding.

Read Methods

getPost(postId: bigint): Promise<Post> Returns full post data: author, content, tag, content type, like count, reply count, repost count, parent ID, and timestamps.

getUserProfile(address: string): Promise<Profile> Returns the on-chain profile for an address: username, metadata URI, follower count, following count, post count, and registration timestamp.

License

MIT