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

@thirdwavelabs/web

v0.0.15

Published

Thirdwave JS Web

Downloads

569

Readme

INTRODUCTION

The Thirdwave JS SDK provides a service to lookup data about EVM wallets on the Ethereum, Binance, Polygon, Arbitrum, and Base chains. The SDK can be used in a browser via @thirdwavelabs/web or in a node environment with @thirdwavelabs/node.

GETTING STARTED

Installing the SDK and creating an API key are required before constructing a Thirdwave wallet service object.

Installation

Node

yarn add @thirdwavelabs/core @thirdwavelabs/node

# Or

npm install @thirdwavelabs/core @thirdwavelabs/node

Web

yarn add @thirdwavelabs/core @thirdwavelabs/web

# Or

npm install @thirdwavelabs/core @thirdwavelabs/web

Create an API key

Go to Thirdwave Lab's homepage to signup and create an access key. Once created, use the key as an argument to the wallet service class constructor.

Initialize SDK

Create a transport object and pass it to the ThirdwaveEvmWalletService constructor. This transport object represents a connection to Thirdwave's API. Keep a reference to it to make wallet lookups faster by reusing a connection.

import { ThirdwaveEvmWalletService } from '@thirdwavelabs/core';
import { createThirdwaveTransport } from '@thirdwavelabs/node';

const transport = createThirdwaveTransport({
  accessToken: 'twv_********************',
});

const service = new ThirdwaveEvmWalletService(transport);

USAGE

Retrieve a wallet

const wallet = await service.getOne('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045');
console.log(wallet);

Retrieve many wallets

getMany returns an AsyncGenerator that can be iterated upon with the for await syntax.

const  wallets = service.getMany([
  '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
  '0xceB69F6342eCE283b2F5c9088Ff249B5d0Ae66ea',
]);

for  await (const  wallet  in  wallets) {
  // typeof wallet is ThirdwaveEvmWallet
  console.log(wallet);
}

ThirdwaveEVMWallet Properties

See our documentation site for more detailed descriptions.

| Property | Type | Description | | ------------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | address | string | String representation of the wallet's address. | | balance | number | Current balance in USD of the wallet. | | botWarning | boolean | Indicates whether one more transaction patterns indicates the wallet exhibits bot-like behavior (e.g. not human). | | engagementScore | number | Rating on scale of 0 to 100 measuring on chain engagement for a wallet using transaction frequency, time since last activity, and outbound transaction value. See documentation site for more detail. | | erc20TokenBalance | number | The total sum in USD of all ERC20 tokens held by this wallet across Arbitrum, Base, Binance, Ethereum, Polygon chains. | | erc20TokenHoldings | Array | List of ERC20 holdings held across Arbitrum, Base, Binance, Ethereum, Polygon chains. | | firstSeenAt | Date | A timestamp indicating when the wallet first appeared on any EVM-compliant chain convered by Thirdwave. See documentation site for more detail. | | hodlerScore | number | A score from 0 to 100 measuring a wallet's propensity to hold or flip NFTs based on its trading history. See documentation site for more detail. | | nativeTokenBalance | number | The total sum of native currency held across Arbitrum, Base, Binance, Ethereum, Polygon chains. | | nativeTokenHoldings | Array | List of native holdings by blockchain. | | outboundTransactionCount | bigint | Total number of transactions that this wallet or account has executed over its lifetime. Note, this metric does not include received transactions. | | outboundTransactionValue | number | The amount of currency or tokens expended from the wallet or account over its lifetime. It sheds light on the account's consumption patterns, providing insights into expenditure behaviors or transactional habits. | | transactionPatterns | Array | A list of transaction patterns indicating whether the wallet exhibits bot-like behavior. |

ThirdwaveEVMWallet Functions

| Function | Description | | ---------------------------------- | -------------------------------------------------------------- | | getErc20TokenBalanceForBlockchain | Get the wallet's balance for a particular blockchain. | | getNativeTokenBalanceForBlockchain | Get the wallet's native balance for a particular blockchain. | | hasTransactionPattern | Check if the wallet exhibits a particular transaction pattern. | | toJson | Convert the wallet to JSON. | | toJsonString | Convert the wallet to a JSON string. |

ACKNOWLEDGEMENTS

Thanks to the teams at buf for their amazing work on connect-es.