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

@safer-sh/common

v0.1.2

Published

Common utilities and configuration for SAFER wallet

Readme

@safer-sh/common

Common utilities and configuration module for Safer - a minimal Ethereum Safe multi-signature wallet client.


⚠️ Disclaimer ⚠️

This tool is NOT intended for production environments or for managing significant funds.

  • Only use this tool on trusted machines in a secure environment
  • Do not use this tool to manage large amounts of funds
  • Do not share data generated by this tool with untrusted third parties

Overview

The @safer-sh/common package provides shared utilities and configuration management for the Safer wallet ecosystem. It includes essential functionality for transaction handling, configuration management, and IPFS integration, all with minimal dependencies to reduce supply chain attack risks.

Installation

npm install @safer-sh/common

Key Components

SaferTransaction Class

The SaferTransaction class is the core data structure used throughout the Safer ecosystem to represent and manage transactions:

const { SaferTransaction } = require('@safer-sh/common');

// Create a new transaction object
const tx = new SaferTransaction({
  hash: '0x123...',
  safeAddress: '0xYourSafeAddress',
  to: '0xRecipientAddress',
  value: '1500000000000000000', // 1.5 ETH in wei
  data: '0x',
  operation: 0,
  nonce: 1
});

// Add metadata
tx.addMetadata({
  type: 'transfer',
  description: 'ETH transfer',
  createdAt: Date.now()
});

// Add a signature
tx.addSignature({
  owner: '0xOwnerAddress',
  signature: '0xSignatureData'
});

Configuration Management

The common package includes configuration providers for managing Safer settings:

const { configManager } = require('@safer-sh/common/config');

// Read configuration
const config = configManager.readConfig();

// Update configuration
configManager.updateConfig({
  rpcUrl: 'https://your-rpc-endpoint',
  chainId: 1,
  defaultSafe: '0xYourSafeAddress'
});

// Get configured wallets
const wallets = configManager.getWallets();

Transaction Management

The package provides transaction management with both file-based and IPFS storage options:

const { transactionManager } = require('@safer-sh/common/config');

// Save a transaction
await transactionManager.saveTransaction(txObject);

// Get a transaction by hash
const tx = await transactionManager.getTransaction(txHash);

// List all transactions
const allTxs = await transactionManager.listTransactions();

// Export to IPFS
const ipfsUri = await transactionManager.exportTransactionToIPFS(txHash);

// Import from IPFS
const importedTx = await transactionManager.importTransactionFromIPFS(ipfsUri);

Utilities

The package includes various utility functions for working with Ethereum addresses, transactions, and more:

const { utils } = require('@safer-sh/common/config/utils');

// Resolve owner from identifier (address, name, address tail, or index)
const ownerAddress = await utils.resolveOwnerFromIdentifier(identifier);

// Initialize a signer
const signer = await utils.initializeSigner(ownerConfig, provider);

// Parse chain ID or name
const chainId = utils.parseChain('sepolia');

Security Considerations

This package is designed with security in mind:

  • Minimal dependencies (primarily ethers.js)
  • File-based configuration with clear permissions
  • Support for secure transaction sharing via IPFS

License

MIT License

Related Packages