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

diam-pay-sdk

v1.1.1

Published

A Node.js SDK for interacting with Diam-Pay APIs.

Readme

The Diam-Pay SDK is a Node.js library for interacting with the Diam-Pay Payment Gateway APIs, enabling easy integration of payment processing features into your Node.js applications.

Installation

Install the Diam-Pay SDK with npm: npm install diam-pay-sdk

Usage

Initialize the SDK const DiamPaySDK = require('diam-pay-sdk'); const sdk = new DiamPaySDK();

Set Your API Key

Before using the SDK methods that require authorization, you need an API key. You can generate this by calling the createOrganisationToken method and using the response's apiKey. Here's how to set up your API key after generating it:

Create Account

const accountDetails = { org_name: "YourOrgName", user_id: "YourUserId", type: "user" };

sdk.createAccount(accountDetails) .then(response => console.log('Account created:', response)) .catch(error => console.error('Error creating account:', error));

Create Organisation Token

const orgDetails = { org_name: "YourOrgName" };

sdk.createOrganisationToken(orgDetails) .then(response => console.log('Organisation token created:', response)) .catch(error => console.error('Error creating organisation token:', error));

Generate Deposit Address

const depositDetails = { userId: "YourUserId", userOrg: "YourOrgName", asset: "BTC", // Use "ETH" or "BSC" as needed network: "1" // Use "1" for BTC, "2" for ETH, "3" for BSC };

sdk.generateDepositAddress(depositDetails) .then(response => console.log('Deposit address generated:', response)) .catch(error => console.error('Error generating deposit address:', error));

Transfer Asset

const transferDetails = { senderUserId: "SenderUserId", senderOrg: "SenderOrgName", recipientUserId: "RecipientUserId", recipientOrg: "RecipientOrgName", amount: "1", asset: "ETHwUSDT" // Specify the asset to transfer };

sdk.transferAsset(transferDetails) .then(response => console.log('Asset transfer initiated:', response)) .catch(error => console.error('Error transferring asset:', error));

WebSocket Listeners

const btcListener = sdk.connectToBtcListener();

btcListener.on('message', (data) => { console.log('BTC Listener data:', data); });

const ethListener = sdk.connectToEthListener();

ethListener.on('message', (data) => { console.log('ETH Listener data:', data); });

Contributing

Contributions are welcome! If you discover a bug or have a feature suggestion, please open an issue in the project's GitHub repository.

License

This SDK is licensed under the ISC license. Full license details are available in the LICENSE file in the source repository.