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

@venturialstd/circle

v0.0.7

Published

Circle API Integration Module for Venturial

Readme

@venturialstd/circle

A comprehensive NestJS module for integrating with Circle's User-Controlled Wallets and Developer-Controlled Wallets APIs.

Features

  • Wallet Management: Create and manage wallets across multiple blockchains
  • Wallet Sets: Organize wallets into sets for better management
  • Transaction Management: Create and track transactions on various blockchains
  • Token Balance Tracking: Monitor token balances for wallets
  • NFT Balance Tracking: Track NFT balances for wallets
  • Challenge Management: Handle user challenges for wallet operations
  • API Operation Logging: Comprehensive logging of all Circle API operations
  • Real-time Settings: Dynamic configuration via SettingsService

Installation

npm install @venturialstd/circle

Usage

Import the Module

import { Module } from '@nestjs/common';
import { CircleModule } from '@venturialstd/circle';

@Module({
  imports: [CircleModule],
})
export class AppModule {}

Configure Settings

Before using the module, configure Circle API settings through the Settings module:

  • GLOBAL:CIRCLE:GENERAL:API_KEY - Your Circle API key (required)
  • GLOBAL:CIRCLE:GENERAL:ENTITY_SECRET - Entity secret for developer-controlled wallets (optional)
  • GLOBAL:CIRCLE:GENERAL:BASE_URL - Circle API base URL (optional, defaults to https://api.circle.com)

Use the Services

import { Injectable } from '@nestjs/common';
import {
  CircleWalletService,
  CircleTransactionService,
} from '@venturialstd/circle';

@Injectable()
export class WalletService {
  constructor(
    private readonly circleWalletService: CircleWalletService,
    private readonly circleTransactionService: CircleTransactionService,
  ) {}

  async createWallet(blockchains: string[], walletSetId: string) {
    return this.circleWalletService.createWallets(blockchains, walletSetId);
  }

  async createTransaction(walletId: string, amounts: string[], destinationAddress: string) {
    return this.circleTransactionService.createTransaction(
      walletId,
      amounts,
      destinationAddress,
    );
  }
}

Testing

The module includes a comprehensive test application that you can run locally.

Setup

  1. Copy the example environment file:
cd test
cp env.template .env
  1. Update the .env file with your database credentials.

  2. Create the database:

createdb circle_test
  1. Run migrations:
npm run migration:run
  1. Start the test server:
npm run test:dev

The test server will start on http://localhost:3004 with all endpoints available for testing.

Available Scripts

  • npm run build - Build the module
  • npm run test:dev - Start the test server
  • npm run test:watch - Start the test server with auto-reload
  • npm run migration:generate --name=MigrationName - Generate a new migration
  • npm run migration:run - Run pending migrations
  • npm run migration:revert - Revert the last migration

Entities

CircleWallet

Represents a wallet created via Circle API.

CircleWalletSet

Represents a set of wallets for organization.

CircleTransaction

Represents a transaction on a blockchain.

CircleTokenBalance

Represents token balances for a wallet.

CircleNFTBalance

Represents NFT balances for a wallet.

CircleChallenge

Represents user challenges for wallet operations.

CircleApiOperation

Logs all Circle API operations for debugging and auditing.

Services

All services extend TypeOrmCrudService from @dataui/crud-typeorm for consistent CRUD operations.

CircleWalletService

  • createWallets() - Create wallets via Circle API
  • listWallets() - List wallets from Circle API
  • getWallet() - Get a wallet from Circle API

CircleTransactionService

  • createTransaction() - Create a transaction via Circle API
  • listTransactions() - List transactions from Circle API
  • getTransaction() - Get a transaction from Circle API

CircleTokenBalanceService

  • getWalletTokenBalance() - Get token balances for a wallet

CircleNFTBalanceService

  • getWalletNFTBalance() - Get NFT balances for a wallet

CircleChallengeService

  • listChallenges() - List challenges for a user

CircleApiService

  • makeApiCall() - Make API calls to Circle with automatic logging
  • getApiKey() - Get API key from settings
  • getBaseUrl() - Get base URL from settings

License

MIT

Support

For issues and questions, please open an issue on the repository.