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

synq-sdk

v0.1.0

Published

SDK for synqpay - subscriptions, payments, and access control on Avalanche

Downloads

8

Readme

synqpay SDK

TypeScript/React SDK for integrating Avalanche-based payments and subscriptions into your app.

Installation

npm install synq-sdk

Or use locally:

# In your Next.js app
import { CheckoutButton } from '../sdk/ui/CheckoutButton'

Quick Start

1. Add Checkout Button

import { CheckoutButton } from 'synq-sdk'

export default function Page() {
  return (
    <CheckoutButton 
      amount={0.01}
      planId="your-plan-uuid"
      label="Subscribe Now"
    />
  )
}

2. Show Subscription Status

import { SubscriptionStatus } from 'synq-sdk'

export default function Dashboard({ wallet }: { wallet: string }) {
  return (
    <SubscriptionStatus 
      wallet={wallet}
      showDetails={true}
    />
  )
}

3. Verify Payments (Backend)

import { verifyPayment } from 'synq-sdk'

const result = await verifyPayment(
  txHash,
  merchantAddress,
  0.01,
  planId
)

if (result.verified) {
  console.log('Payment confirmed!')
  if (result.subscription) {
    console.log('Subscription created:', result.subscription.subscription_id)
  }
}

4. Check Access

import { checkAccess } from 'synq-sdk'

const { access } = await checkAccess(
  walletAddress,
  merchantAddress,
  planId
)

if (access) {
  // Grant access to premium content
}

5. AI Agents Panel (Merchants)

import { AIAgentsPanel } from 'synq-sdk'

export default function MerchantPage({ merchantWallet }: { merchantWallet: string }) {
  return (
    <AIAgentsPanel 
      merchantWallet={merchantWallet}
      onAgentComplete={(agent, result) => {
        console.log(`Agent ${agent} completed:`, result)
      }}
    />
  )
}

6. Merchant Dashboard Widget

import { MerchantDashboard } from 'synq-sdk'

export default function Dashboard({ merchantWallet }: { merchantWallet: string }) {
  return (
    <MerchantDashboard 
      merchantWallet={merchantWallet}
      showChart={true}
    />
  )
}

Components

CheckoutButton

Pre-built checkout button for payments and subscriptions.

Props:

  • amount?: number - Payment amount in AVAX (default: 0.01)
  • planId?: string - Optional subscription plan ID
  • label?: string - Button text (default: "Subscribe")
  • className?: string - Custom CSS classes
  • onCheckout?: () => void - Callback when button clicked

SubscriptionStatus

Display subscription status for a wallet.

Props:

  • wallet: string - Wallet address to check
  • showDetails?: boolean - Show expiration date (default: true)
  • className?: string - Custom CSS classes

AIAgentsPanel

Embeddable AI agents panel for merchants.

Props:

  • merchantWallet: string - Merchant wallet address
  • className?: string - Custom CSS classes
  • onAgentComplete?: (agent: string, result: any) => void - Callback when agent completes

Agents:

  • invoice - Generates invoices for verified payments
  • renew - Manages expired subscriptions
  • analytics - Generates revenue insights

MerchantDashboard

Embeddable dashboard widget showing merchant statistics.

Props:

  • merchantWallet: string - Merchant wallet address
  • className?: string - Custom CSS classes
  • showChart?: boolean - Show revenue chart (default: false)

API Reference

Client Functions

verifyPayment(txHash, merchant, amount, planId?)

Verifies a payment transaction on-chain and optionally creates a subscription.

Returns: VerifyResponse

checkAccess(wallet, merchant, planId?)

Checks if a wallet has active subscription access.

Returns: AccessResponse

getSubscriptionStatus(wallet)

Gets subscription status for a wallet.

Returns: SubscriptionStatus

listSubscriptions({ merchant?, customer? })

Lists subscriptions filtered by merchant or customer.

cancelSubscription(subscriptionId)

Cancels an active subscription.

createCheckoutUrl({ amount, planId? })

Generates a checkout URL with parameters.

UI Components

<CheckoutButton />

Pre-built button that redirects to checkout.

Props:

  • amount?: number - Payment amount (default: 0.01)
  • planId?: string - Plan ID for subscription
  • label?: string - Button text (default: "Subscribe")
  • className?: string - Custom CSS classes
  • onCheckout?: () => void - Callback before redirect

<SubscriptionStatus />

Shows subscription status with automatic loading.

Props:

  • wallet: string - Customer wallet address
  • className?: string - Custom CSS classes
  • showDetails?: boolean - Show expiry date (default: true)

Types

All TypeScript types are exported:

import type { 
  CheckoutOptions,
  VerifyResponse,
  SubscriptionStatus,
  Plan,
  Subscription,
  AccessResponse
} from 'synq-sdk'

Building

cd sdk
npm run build

Outputs to sdk/dist/ with TypeScript declarations.

Local Development

In your main app's package.json:

{
  "scripts": {
    "build:sdk": "cd sdk && npm run build"
  }
}

Then:

npm run build:sdk

License

MIT