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

impact-x-sdk

v0.1.0

Published

TypeScript SDK for the Impact-X Stacks crowdfunding app.

Readme

impact-x-sdk

TypeScript SDK for the Impact-X crowdfunding app on Stacks. It wraps the Impact-X campaign registry contract, IPFS metadata flows, campaign aggregation, and USDC to USDCx bridge helpers.

Install

npm install impact-x-sdk @stacks/connect @stacks/transactions viem

Quick Start

import { ImpactXCampaignService, ImpactXStacksClient } from 'impact-x-sdk';

const stacks = new ImpactXStacksClient({
  network: 'testnet',
});

const campaign = await stacks.fetchCampaign(1);
console.log(campaign);

const campaigns = new ImpactXCampaignService({ network: 'testnet' });
const fullCampaign = await campaigns.getFullCampaign(1);
console.log(fullCampaign?.title, fullCampaign?.endorsements);

Configuration

import { ImpactXStacksClient } from 'impact-x-sdk';

const client = new ImpactXStacksClient({
  network: 'mainnet',
  contract: {
    address: 'SP...',
    name: 'campaign-registry-v2',
  },
});

The SDK defaults to Impact-X testnet values. Mainnet requires a campaign registry address until the production contract is finalized.

Contract Writes

Write calls use @stacks/connect by default. In a browser app with a connected Stacks wallet:

import { ImpactXStacksClient } from 'impact-x-sdk';

const client = new ImpactXStacksClient({ network: 'testnet' });

await client.createCampaign({
  ipfsHash: 'Qm...',
  goalInUSDC: 100,
  durationInDays: 30,
});

await client.donate(1, 10);
await client.endorseCampaign(1);
await client.postCampaignUpdate(1, 'Qm...');

For tests or custom wallet adapters, inject stacksRequest:

const client = new ImpactXStacksClient({
  stacksRequest: async (_method, params) => {
    console.log(params.functionName, params.functionArgs);
    return { txid: '0xabc' };
  },
});

IPFS Helpers

import { uploadCampaignMetadata, uploadJSONToIPFS, fetchFromIPFS } from 'impact-x-sdk';

const cid = await uploadCampaignMetadata({
  title: 'Open source builder fund',
  description: 'Funding public goods builders.',
  story: '<p>Long-form campaign story.</p>',
  imageUrl: 'https://example.com/image.png',
  category: 'Technology',
  targetAmount: 1000,
  createdAt: Date.now(),
}, { jwt: process.env.PINATA_JWT! });

const metadata = await fetchFromIPFS(cid);

const updateCid = await uploadJSONToIPFS({
  title: 'Milestone 1 shipped',
  body: 'We completed the first milestone.',
  createdAt: Date.now(),
}, { jwt: process.env.PINATA_JWT!, name: 'impact-x-update' });

Bridge Helpers

The bridge helpers wrap Circle xReserve style USDC deposits from Ethereum/Sepolia to USDCx on Stacks.

import { bridgeUSDCToStacks, checkMintStatus } from 'impact-x-sdk';

const result = await bridgeUSDCToStacks({
  amount: '10',
  recipientStacksAddress: 'ST...',
  walletClient,
  publicClient,
  network: 'sepolia',
});

const status = await checkMintStatus(result.hookData, 'testnet');

Main Exports

  • ImpactXStacksClient: contract reads and writes.
  • ImpactXCampaignService: hydrated campaign reads with IPFS metadata and social stats.
  • uploadCampaignMetadata, uploadJSONToIPFS, uploadImageToIPFS, fetchFromIPFS.
  • bridgeUSDCToStacks, checkMintStatus, getUSDCBalance, validateBridgeAmount.
  • filterCampaigns, usdcToMicro, microToUsdc, encodeStacksAddress.

Publish

npm run typecheck
npm test
npm run build
npm pack --dry-run
npm publish --access public

License

MIT