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

sage-soneium

v1.1.1

Published

TypeScript client for connecting to the Soneium blockchain

Readme

Soneium Blockchain Client

A TypeScript client for connecting to the Soneium blockchain, with support for Account Abstraction (ERC-4337).

Features

  • Connect to Soneium mainnet and testnet (Minato)
  • Send transactions
  • Check balances and block numbers
  • Account Abstraction support (ERC-4337)
  • Sponsored (gasless) transactions

Setup

  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Configure environment variables in .env file (already set up for testnet)

Demo Scripts

1. Basic Testnet Connection

This script demonstrates a basic connection to the Soneium testnet, checking the current block number and an address balance:

node dist/testnet-demo.js

2. Sending a Transaction

This script demonstrates sending a transaction on the Soneium testnet:

  1. Edit src/send-transaction-demo.ts and replace:

    • YOUR_PRIVATE_KEY with your private key
    • RECIPIENT_ADDRESS with the recipient's address (optional)
    • AMOUNT_TO_SEND with the amount to send (optional)
  2. Build and run:

npm run build
node dist/send-transaction-demo.js

3. Account Abstraction (Gasless Transactions)

This script demonstrates using Account Abstraction to send a sponsored (gasless) transaction:

  1. Edit src/account-abstraction-demo.ts and replace:

    • YOUR_PRIVATE_KEY with your private key
    • YOUR_SCS_API_KEY with your SCS API key (get one from Startale)
    • RECIPIENT_ADDRESS with the recipient's address (optional)
    • AMOUNT_TO_SEND with the amount to send (optional)
  2. Build and run:

npm run build
node dist/account-abstraction-demo.js

Getting Testnet Tokens

To get testnet SON tokens, you can use the Soneium faucet:

  1. Visit the Soneium Faucet
  2. Enter your wallet address
  3. Complete the verification
  4. Receive testnet SON tokens

Soneium Testnet Information

  • Network Name: Soneium Minato (Testnet)
  • Chain ID: 999
  • RPC URL: https://soneium-minato.rpc.scs.startale.com
  • Explorer: https://explorer.minato.soneium.org
  • Currency Symbol: SON
  • Currency Decimals: 18

Using the Client in Your Code

import { SoneiumClient } from './dist';

// Create a client connected to the testnet
const client = new SoneiumClient('testnet');

// Connect a wallet (for sending transactions)
const address = client.connectWallet('0x...');

// Get the current block number
const blockNumber = await client.getBlockNumber();
console.log(`Current block number: ${blockNumber}`);

// Get the balance of an address
const balance = await client.getBalance('0x...');
console.log(`Balance: ${balance}`);

// Send a transaction
const txHash = await client.sendTransaction({
  to: '0x...',
  value: 1000000000000000000n, // 1 SON
});
console.log(`Transaction hash: ${txHash}`);

Account Abstraction Example

import { sendSponsoredTransaction } from './dist';

// Send a sponsored transaction
const txHash = await sendSponsoredTransaction(
  '0xYourPrivateKey',
  '0xRecipient',
  '0.01', // Amount in SON
  'your-scs-api-key',
  'testnet'
);
console.log(`Sponsored transaction hash: ${txHash}`);