Registry / web-framework / sdk-utils

sdk-utils

JSON →
library0.1.2jsnpmunverified

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.

npm install sdk-utils
INSTALL
IMPORT
SIG · SDK-UTILS
S
sdk-utils
web-frameworkjavascriptv0.1.2
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

connect
import { connect } from 'sdk-utils'
const connect = require('sdk-utils').connect
The library primarily uses ES Module syntax. Direct CommonJS `require` usage is not officially documented and may not work as expected.
T
import { T } from 'sdk-utils'
const T = require('sdk-utils').T
The `T` object appears to be a global utility for logging and tracing, as demonstrated by `T.setTraceShow()` and `T.trace()`.
getBalance
import { getBalance } from 'sdk-utils'
const getBalance = require('sdk-utils').getBalance
Used for fetching token balances, requiring an ERC-20 token contract address.

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.

import { connect, T, getBalance } from 'sdk-utils'; T.setTraceShow(true); // Enable logging T.trace('----Initializing SDK----', 'Connecting to wallet'); connect('walletconnect', (res) => { // Listener for account or chain changes after initial connection T.trace('----Wallet Change Event----', res); }).then((data) => { // Result of the initial connection/login attempt T.trace('----Wallet Connected----', data); // Example: Fetching USDT balance on Ethereum mainnet return getBalance('0xdac17f958d2ee523a2206206994597c13d831ec7'); }).then((balance) => { T.trace('-----USDT Balance----', balance); // Display Ethereum USDT balance }).catch(error => { T.trace('----Connection Error----', error); console.error('Failed to connect or get balance:', error); });
Debug
Known issues
gotchaThe package name `sdk-utils` is highly generic, leading to potential confusion with other utility packages across various ecosystems (e.g., AWS, Android, iOS, Decentraland). Developers should carefully verify the specific package they are installing.
fix
Always check the full package name on npm, associated GitHub repository, and documentation to ensure it matches the intended functionality for Ethereum/BSC utilities.
affects: >=1.0.0
gotchaThe package has several significant runtime dependencies (`web3`, `walletconnect`, `walletlink`, `bignumber.js`). This can lead to a larger bundle size for browser-based applications or potential version conflicts with other libraries in a project.
fix
Use a dependency analysis tool (e.g., `npm list --depth=0` or `yarn why`) to inspect the full dependency tree. Consider tree-shaking configurations if using a bundler like Webpack or Rollup to minimize final bundle size.
affects: >=1.0.0
gotchaExplicit release notes detailing breaking changes between minor or patch versions are not readily available in the provided documentation. Developers should exercise caution when updating to newer versions.
fix
Consult the project's repository (if available) for detailed changelogs or release notes before upgrading. Thoroughly test applications after any updates to identify potential regressions.
affects: >=1.0.0
Upgrade
Version history
0.1.2latest on npm
Audit
Dependencies
bignumber.jsrequiredRequired for handling large numbers and precise arithmetic, common in cryptocurrency operations.
walletconnectrequiredProvides functionality for connecting to WalletConnect-compatible mobile wallets.
web3requiredCore Ethereum JavaScript API for interacting with local or remote Ethereum nodes.
walletlinkrequiredEnables connection to Coinbase Wallet (formerly WalletLink).
Agent activity
13 hits · last 30 days
node
12
OpenAI (training)
1
Resources
sdk-utils — npm install sdk-utils · libregistry