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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@circles-sdk/profiles

v0.29.2

Published

A TypeScript package for managing user profiles in the Circles ecosystem. This package provides methods to create, retrieve, and search profiles stored on IPFS through the Circles Profile Service.

Readme

@circles-sdk/profiles

A TypeScript package for managing user profiles in the Circles ecosystem. This package provides methods to create, retrieve, and search profiles stored on IPFS through the Circles Profile Service.

Installation

npm install @circles-sdk/profiles

Usage

First, initialize the Profiles class with your profile service URL:

import { Profiles } from '@circles/profiles';

const profiles = new Profiles('https://rpc.aboutcircles.com/profiles');

Creating a Profile

const profile = {
  name: 'John Doe',
  description: 'Web3 Developer',
  imageUrl: 'https://example.com/image.jpg',
  previewImageUrl: 'https://example.com/preview.jpg',
  location: 'Berlin, Germany',
  geoLocation: [52.5200, 13.4050]
};

const cid = await profiles.create(profile);
console.log('Profile created with CID:', cid);

Retrieving Profiles

Get a single profile:

const profile = await profiles.get('QmYourCID');
if (profile) {
  console.log('Profile:', profile);
}

Get multiple profiles:

const cids = ['QmCID1', 'QmCID2', 'QmCID3'];
const profilesMap = await profiles.getMany(cids);
console.log('Profiles:', profilesMap);

Searching Profiles

Basic Search

Search by name (partial match):

const nameResults = await profiles.searchByName('John');
console.log('Profiles matching name:', nameResults);

Search by description (partial match):

const descResults = await profiles.searchByDescription('developer');
console.log('Profiles matching description:', descResults);

Search by address (exact match):

const addressResults = await profiles.searchByAddress('0x123...');
console.log('Profile for address:', addressResults);

Search by CID (exact match):

const cidResults = await profiles.searchByCID('QmYourCID');
console.log('Profile for CID:', cidResults);

Search by registeredName (exact match):

const nameResults = await profiles.searchByRegisteredName('Jo');
console.log('Profile for registeredName:', nameResults);

Search by location (partial match):

const locationResults = await profiles.searchByLocation('Berlin');
console.log('Profiles matching location:', locationResults);

Search with multiple criteria:

const results = await profiles.search({
  name: 'John',
  description: 'developer',
  // address, CID, and registeredName are optional
});
console.log('Search results:', results);

Search by multiple addresses in a batch:

const addresses = ['0x123...', '0x456...', '0x789...'];
const results = await profiles.searchByAddresses(addresses);
console.log('Profiles for addresses:', results);

Search with Complete Profile Data

All search methods accept an optional SearchOptions parameter with a fetchComplete flag to retrieve full profile data including images:

// Search by name with complete profile data
const completeProfiles = await profiles.searchByName('John', { fetchComplete: true });
console.log('Complete profiles:', completeProfiles);

// Search with multiple criteria and complete profile data
const completeResults = await profiles.search({
  name: 'John',
  description: 'developer',
}, { fetchComplete: true });
console.log('Complete search results:', completeResults);

Types

Profile

interface Profile {
  name: string;
  description?: string;
  previewImageUrl?: string;
  imageUrl?: string;
  location?: string;
  geoLocation?: [number, number];
  extensions?: Record<string, any>;
}

GroupProfile

interface GroupProfile extends Profile {
  symbol: string;
}

SearchResultProfile

export interface SearchResultProfile extends Pick<Profile, 'name' | 'description'> {
  CID: string;
  lastUpdatedAt: number;
  address: string;
  registeredName: string | null;
  // Optional fields for complete profiles
  imageUrl?: string;
  previewImageUrl?: string;
  location?: string;
  geoLocation?: [number, number];
}

SearchOptions

interface SearchOptions {
  /**
   * Whether to fetch complete profile data including images.
   */
  fetchComplete?: boolean;
}

SearchCriteria

interface SearchCriteria {
  name?: string;
  description?: string;
  address?: string;
  CID?: string;
  registeredName?: string;
  location?: string;
}