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 🙏

© 2026 – Pkg Stats / Ryan Hefner

bitriel-wallet-sdk

v1.1.17

Published

This is bitriel Wallet SDK

Readme

Bitriel Wallet SDK

Version License

A powerful TypeScript SDK for interacting with multiple blockchain networks, including the Selendra network, Polkadot ecosystem, and Ethereum EVM chains. This SDK provides a unified interface for wallet operations, token management, and transaction handling across different blockchain networks.

Features

  • 🌐 Multi-chain support:
    • Selendra Network
    • Polkadot Ecosystem
    • Ethereum EVM Chains
  • 💼 Unified wallet interface
  • 💰 Token management (ERC-20, native tokens)
  • 🔐 Secure account management
  • 📊 Real-time balance queries
  • 🔄 Network switching capabilities
  • 📝 Message signing
  • 🔍 Transaction history

Installation

# Using npm
npm install bitriel-wallet-sdk

# Using yarn
yarn add bitriel-wallet-sdk

# Using pnpm
pnpm add bitriel-wallet-sdk

Quick Start

import { BitrielWalletSDK } from "bitriel-wallet-sdk";

// Initialize the SDK
const sdk = new BitrielWalletSDK();

// Get supported networks
const networks = sdk.getSupportedNetworks();

// Connect to a network (e.g., Selendra Mainnet)
await sdk.connect("selendra");

// Get wallet state
const walletState = await sdk.getWalletState();

// Send a transaction
const txHash = await sdk.sendTransaction({
    to: "0x...",
    value: "1000000000000000000", // 1 SEL
});

// Sign a message
const signature = await sdk.signMessage("Hello, World!");

// Disconnect
await sdk.disconnect();

Supported Networks

Selendra Network

  • Mainnet
  • Testnet

Polkadot Ecosystem

  • Polkadot Mainnet
  • Kusama

Ethereum EVM Ecosystem

  • Ethereum Mainnet
  • Polygon Mainnet

API Reference

BitrielWalletSDK

Constructor

new BitrielWalletSDK(options?: SDKOptions)

Methods

Connection Management
  • connect(networkId: string): Promise<void>

    • Connects to the specified network
    • Throws an error if the network is not supported
    • Returns a promise that resolves when connected
  • disconnect(): Promise<void>

    • Disconnects from the current network
    • Cleans up resources and connections
Wallet Operations
  • getWalletState(): Promise<WalletState>

    • Returns the current wallet state including:
      • Address
      • Network
      • Balances (native and tokens)
      • Connection status
  • sendTransaction(tx: TransactionRequest): Promise<string>

    • Sends a transaction and returns the transaction hash
    • Supports both EVM and Polkadot transaction formats
    • Handles gas estimation and fee calculation
  • signMessage(message: string): Promise<string>

    • Signs a message using the current account
    • Returns the signature in the appropriate format for the network
Network Management
  • getSupportedNetworks(): NetworkConfig[]

    • Returns a list of all supported networks
    • Includes network details and configuration
  • getCurrentNetwork(): NetworkConfig | null

    • Returns the currently connected network
    • Returns null if not connected
Token Operations
  • getTokenBalance(tokenAddress: string): Promise<string>

    • Returns the balance of a specific token
    • Supports both ERC-20 and native tokens
  • getTokenInfo(tokenAddress: string): Promise<TokenInfo>

    • Returns detailed information about a token
    • Includes decimals, symbol, and name

Development Setup

  1. Clone the repository:
git clone https://github.com/bitriel/wallet-sdk.git
cd wallet-sdk
  1. Install dependencies:
pnpm install
  1. Build the project:
pnpm build
  1. Run tests:
pnpm test

Testing

The SDK includes comprehensive tests:

  • Unit tests: pnpm test
  • Watch mode: pnpm test:watch
  • Coverage report: pnpm test:coverage
  • Integration tests: pnpm test:execute

Troubleshooting

Common Issues

  1. Connection Failures

    • Ensure you have a stable internet connection
    • Check if the network is supported
    • Verify network configuration
  2. Transaction Failures

    • Check sufficient balance
    • Verify gas/fee settings
    • Ensure correct network selection
  3. Token Operations

    • Verify token contract address
    • Check token decimals
    • Ensure token is supported on the network

Contributing

We welcome contributions! Please follow these steps:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For support, please open an issue in the GitHub repository or contact the maintainers.