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

@azothpay/api

v1.0.0

Published

Browser-compatible JavaScript client for AzothPay API - streaming payments and subscriptions on Ethereum

Readme

@azothpay/api

Browser-compatible JavaScript client library for AzothPay API - a streaming payments and subscriptions protocol on Ethereum blockchain.

Installation

npm install @azothpay/api

Peer Dependencies

This package requires ethers to be installed:

npm install ethers

Usage

Basic Setup

import { AzothPayApiClient } from '@azothpay/api';

const client = new AzothPayApiClient(
  'https://azothpay.com',
  'usdt', // contract type
  'your-api-key'
);

Creating a Subscription

import { ethers } from 'ethers';

// Connect to Ethereum provider
const provider = new ethers.providers.Web3Provider(window.ethereum);
const signer = provider.getSigner();

// Create subscription
const params = {
  author: '0x...', // Content creator address
  subscriptionRate: '1000000000000000', // Rate in wei
  projectId: 1
};

// Option 1: Get transaction and sign manually
const transaction = await client.createSubscription(params);
const receipt = await client.signAndSendTransactionAndWait(transaction, signer);

// Option 2: Create and send in one call
const receipt = await client.createSubscriptionAndSend(params, signer);

Meta Transactions (Gasless)

import { AzothPayMetaApiClient } from '@azothpay/api/meta';

const metaClient = new AzothPayMetaApiClient(
  'https://api.azothpay.example.com',
  'usdt',
  'your-api-key'
);

// Create subscription via meta transaction
const params = {
  from: '0x...', // User address
  author: '0x...', // Content creator address
  subscriptionRate: '1000000000000000',
  projectId: 1
};

const result = await metaClient.createSubscriptionViaMetaTransaction(
  params,
  signer,
  contractAddress,
  chainId,
  relayerAddress
);

API Methods

AzothPayApiClient

  • getApiInfo() - Get API information and status
  • getAvailableContracts() - Get list of available contracts
  • createSubscription(params) - Create a new subscription
  • cancelSubscription(author, params) - Cancel a subscription
  • listSubscriptions(address) - List user's active subscriptions
  • makePayment(params) - Make a one-time payment
  • depositFunds(params) - Deposit funds to user account
  • withdrawFunds(params) - Withdraw funds from user account
  • getBalance(address) - Check user balance and streaming rates
  • claimProject(params) - Claim project ID for fee settings
  • configureFees(projectId, params) - Configure protocol fees
  • getProjectInfo(projectId) - Get project information
  • createBatchSubscriptions(params) - Create multiple subscriptions
  • processBatchPayments(params) - Batch payments to multiple recipients
  • liquidateAccount(params) - Liquidate underfunded accounts
  • getAnalytics(params) - Get streaming payment analytics
  • registerWebhook(params) - Register a webhook endpoint
  • listWebhooks() - List registered webhooks

AzothPayMetaApiClient

  • getNonce(address) - Get nonce for meta transactions
  • prepareSubscriptionMetaTransaction(params) - Prepare subscription meta transaction
  • prepareCancelSubscriptionMetaTransaction(author, params) - Prepare cancel subscription meta transaction
  • preparePaymentMetaTransaction(params) - Prepare payment meta transaction
  • prepareDepositMetaTransaction(params) - Prepare deposit meta transaction
  • prepareWithdrawMetaTransaction(params) - Prepare withdraw meta transaction
  • signMetaTransaction(transactionData, signer, contractAddress, chainId, relayerAddress) - Sign a meta transaction
  • executeMetaTransaction(signedTransaction) - Execute a signed meta transaction

License

MIT