{"library":"sdk-utils","title":"sdk-utils","description":"The `sdk-utils` library provides essential utilities for interacting with the Ethereum blockchain and various cryptocurrency wallets. It focuses on simplifying wallet connections (e.g., WalletConnect, MetaMask, WalletLink) and common blockchain operations like retrieving token balances. The package is currently at version 1.0.174 and appears to be under active development, indicated by its incremental patch versions. While a specific release cadence isn't provided, its key differentiator lies in abstracting away the complexities of different wallet providers and offering a unified interface for dApp integration, primarily within the Binance Smart Chain (BSC) ecosystem given its keywords. It ships with TypeScript types, facilitating safer development.","language":"javascript","status":"active","last_verified":"Sun Apr 19","install":{"commands":["npm install sdk-utils"],"cli":null},"imports":["import { connect } from 'sdk-utils'","import { T } from 'sdk-utils'","import { getBalance } from 'sdk-utils'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import { connect, T, getBalance } from 'sdk-utils';\n\nT.setTraceShow(true); // Enable logging\nT.trace('----Initializing SDK----', 'Connecting to wallet');\n\nconnect('walletconnect', (res) => {\n    // Listener for account or chain changes after initial connection\n    T.trace('----Wallet Change Event----', res);\n}).then((data) => {\n    // Result of the initial connection/login attempt\n    T.trace('----Wallet Connected----', data);\n    // Example: Fetching USDT balance on Ethereum mainnet\n    return getBalance('0xdac17f958d2ee523a2206206994597c13d831ec7');\n}).then((balance) => {\n    T.trace('-----USDT Balance----', balance); // Display Ethereum USDT balance\n}).catch(error => {\n    T.trace('----Connection Error----', error);\n    console.error('Failed to connect or get balance:', error);\n});","lang":"javascript","description":"Demonstrates how to connect to a cryptocurrency wallet (e.g., WalletConnect), enable SDK logging, and retrieve an ERC-20 token balance from a given contract address.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}