0.0.21 • Published 4 months ago

@thirdwavelabs/node v0.0.21

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
4 months ago

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.

PropertyTypeDescription
addressstringString representation of the wallet's address.
balancenumberCurrent balance in USD of the wallet.
botWarningbooleanIndicates whether one more transaction patterns indicates the wallet exhibits bot-like behavior (e.g. not human).
engagementScorenumberRating 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.
erc20TokenBalancenumberThe total sum in USD of all ERC20 tokens held by this wallet across Arbitrum, Base, Binance, Ethereum, Polygon chains.
erc20TokenHoldingsArrayList of ERC20 holdings held across Arbitrum, Base, Binance, Ethereum, Polygon chains.
firstSeenAtDateA timestamp indicating when the wallet first appeared on any EVM-compliant chain convered by Thirdwave. See documentation site for more detail.
hodlerScorenumberA 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.
nativeTokenBalancenumberThe total sum of native currency held across Arbitrum, Base, Binance, Ethereum, Polygon chains.
nativeTokenHoldingsArrayList of native holdings by blockchain.
outboundTransactionCountbigintTotal number of transactions that this wallet or account has executed over its lifetime. Note, this metric does not include received transactions.
outboundTransactionValuenumberThe 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.
transactionPatternsArrayA list of transaction patterns indicating whether the wallet exhibits bot-like behavior.

ThirdwaveEVMWallet Functions

FunctionDescription
getErc20TokenBalanceForBlockchainGet the wallet's balance for a particular blockchain.
getNativeTokenBalanceForBlockchainGet the wallet's native balance for a particular blockchain.
hasTransactionPatternCheck if the wallet exhibits a particular transaction pattern.
toJsonConvert the wallet to JSON.
toJsonStringConvert the wallet to a JSON string.

ACKNOWLEDGEMENTS

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

0.0.20

4 months ago

0.0.21

4 months ago

0.0.19

4 months ago

0.0.18

4 months ago

0.0.16

4 months ago

0.0.17

4 months ago

0.0.11

6 months ago

0.0.12

6 months ago

0.0.13

6 months ago

0.0.14

6 months ago

0.0.15

6 months ago

0.0.10

7 months ago

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

7 months ago

0.0.6

7 months ago

0.0.3

7 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.2

8 months ago

0.0.1

8 months ago