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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@poolstream/client

v1.0.0

Published

To work with a collection of cryptocurrencies.

Downloads

72

Readme

What is PoolStream?

PoolStream PoolStream unifies access to various types of cryptocurrencies and their networks through a single API. This access is designed with a straightforward structure, excluding the complexity of smart contracts. Its functionality is limited to controlling fund transfers between wallets..

HomePage

poolstream.io

Compatibility

  • Version built for Node.js v20.18.0 and above

You can access either version specifically from the dist folder.

PoolStream is also compatible with frontend frameworks such as: a

  • Angular
  • React
  • Vue.

Installation

Node.js

npm install poolstream

or

yarn add poolstream

Production URL

To use it use the following endpoint:

https://api.poolstream.io

API_KEY

Access: dashboard.poolstream.io

Creating an Instance

First of all, in your typescript file, define PoolStream:

import {
  PoolStream,
  Transaction,
  Currency,
  WalletAddress,
  Balance,
  SignebleTransaction,
  SignedTransaction,
} from "poolstream";

When you instantiate PoolStream you can define

  • First Param. Ex.: "https://api.poolstream.io"

you can also set a

  • apiKey: Some features need this parameter.
const poolStream = new PoolStream({
  "https://api.poolstream.io",
  { apiKey: "your api key" },
});

Find a transaction. This method returns a list of transactions, as some cryptocurrencies encompass multiple fund transfers in one.

const transaction = poolStream.transaction(
  "usdt",
  "tron",
  "26cfbd7d5d7b68537773e8e9889469fd18749816a10ff25e33f25393553bcdb6"
);

Find many transaction. It is not mandatory to pass the filter, but if it is not passed, the method will return the latest transactions. The maximum number of transactions returned is defined in the site documentation.

  • start [ timestamp unix ]: The earliest timestamp a transaction can have to be included in search results.
  • end [ timestamp unix ]: The newest timestamp a transaction can have to be included in search results.
  • from: Transaction origin address.
  • to: Transaction destination address.
  • limit: Limit of results. If it is zero or less than zero, then it follows the default address defined in the site's documentation.
const filter = {
  start: 1729464035,
  end: 1730328030,
  from: "TV2SzAWinU4p7XiTd5UetwWHqRPaa1wT3z",
  to: "T9yutTZ2z6yGA7hHuHupndQwmaSrAizE7R",
  limit: 10,
};
const transactions = poolStream.transactions("usdt", "tron", filter);

Check the balance of one or more wallets.

const balance = poolStream.balance(
  "usdt",
  "tron",
  "TV2SzAWinU4p7XiTd5UetwWHqRPaa1wT3z"
);

or

const balance = poolStream.balance("usdt", "tron", [
  "TV2SzAWinU4p7XiTd5UetwWHqRPaa1wT3z",
  "T9yutTZ2z6yGA7hHuHupndQwmaSrAizE7R",
]);

Generate Wallet Address.

const balance = poolStream.generateWalletAddress("usdt", "tron");

Signs and submits the transaction to the network.

const txid = poolStream.signedAndSubmitTransaction("usdt", "tron", {
  from: "TV2SzAWinU4p7XiTd5UetwWHqRPaa1wT3z";
  to: "T9yutTZ2z6yGA7hHuHupndQwmaSrAizE7R";
  amount: 12000000, //int64
  fee: 350000 // int64
  privateKey: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
});

Licence

PoolStream is distributed under a Creative Commons Legal Code licence.