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

scrt-evm-js

v1.0.0

Published

The **SecretEvmJS** library provides a simple interface for interacting with an Ethereum-compatible blockchain using Secret Network functionalities. It includes methods for encrypting and decrypting data, as well as requesting funds from a faucet.

Readme

SecretEvmJS Library

The SecretEvmJS library provides a simple interface for interacting with an Ethereum-compatible blockchain using Secret Network functionalities. It includes methods for encrypting and decrypting data, as well as requesting funds from a faucet.

Features

  • RPC Integration: Interact with an EVM-compatible blockchain via RPC.
  • Encryption and Decryption: Leverage SCRT encryption and decryption mechanisms.
  • Faucet Interaction: Request funds from a faucet to test accounts.

Installation

To install the library, run:

npm install scrt-evm-js

API Reference

constructor(rpcUrl?: string, faucetUrl?: string)

Creates a new instance of SecretEvmJS.

  • rpcUrl: The RPC URL of the blockchain node (default: http://localhost:8545).
  • faucetUrl: The URL of the faucet service (default: http://localhost:8080).

getFunds(address: string, url?: string): Promise<void>

Requests funds for a specified address from the faucet.

  • address: The address to receive the funds.
  • url: Optional custom faucet URL (default: instance's faucetUrl).

encrypt(data: string | number): Promise<string>

Encrypts the provided data using SCRT encryption.

  • data: The data to encrypt (either a string or number).
  • Returns: A promise resolving to the encrypted data.

decrypt(data: string): Promise<string>

Decrypts the provided encrypted data.

  • data: The encrypted data to decrypt (hexadecimal string).
  • Returns: A promise resolving to the decrypted data.

Example Usage

Below is an example of how to use the library:

import { ScrtEvmClient } from 'scrt-evm-client';

async function main() {
    // Initialize the client
    const client = new ScrtEvmClient('http://localhost:8545', 'http://localhost:8080');

    // Request funds from the faucet
    const address = '0xYourEthereumAddressHere';
    console.log(`Requesting funds for ${address}...`);
    await client.getFunds(address);
    console.log('Funds received.');

    // Encrypt some data
    const dataToEncrypt = 12345;
    const encryptedData = await client.encrypt(dataToEncrypt);
    console.log('Encrypted Data:', encryptedData);

    // Decrypt the data
    const decryptedData = await client.decrypt(encryptedData);
    console.log('Decrypted Data:', decryptedData);
}

// Run the example
main().catch((error) => {
    console.error('Error:', error);
});

Requirements

  • Node.js: v14 or later.
  • TypeScript: v4 or later (if using TypeScript).

Development

Clone the repository:

git clone https://github.com/scrtlabs/scrt-evm-js.git
cd scrt-evm-js

Install dependencies:

npm install

Run tests:

npm test

Library Developer

Install Dependencies

To install the dependencies, run:

pnpm install

Build

To build the library, run:

pnpm build

It will build the library in the dist directory.

Test

To run tests, use:

pnpm test

License

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


Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch for your feature/fix.
  3. Submit a pull request.

For major changes, please open an issue first to discuss what you would like to change.


If you have any questions or issues, feel free to open an issue on GitHub.