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

@qorechain/evm

v0.5.0

Published

QoreChain EVM adapter: thin, type-safe conveniences over viem for the QoreChain EVM Engine, including ERC-20 helpers and bindings for QoreChain precompiles.

Downloads

416

Readme

@qorechain/evm

A thin, type-safe adapter over viem for the QoreChain EVM Engine. It does not reimplement an EVM client — viem is a peer dependency — it adds QoreChain-specific conveniences: a chain-aware client factory with EVM chain-id auto-detection, ERC-20 helpers, contract deploy/call wrappers, and typed bindings for QoreChain's EVM precompiles.

Install

viem is a peer dependency, so install it alongside this package:

pnpm add @qorechain/evm viem
# or: npm install @qorechain/evm viem

Quickstart

Connect

The numeric EVM chain id is auto-detected at connect time via eth_chainId. You can also pass chainId explicitly to skip detection.

import { createEvmClient } from "@qorechain/evm";

const client = await createEvmClient({
  rpcUrl: "http://localhost:8545", // or pass an endpoints object: { endpoints: { evmRpc, evmWs } }
});

console.log("chain id:", await client.getChainId());

The native currency defaults to QOR with 18 decimals (the EVM convention). This is the EVM-side representation and is distinct from the Cosmos uqor base denomination (10^6). Override with { decimals } if your node differs; confirm the canonical value against your target node.

Read an ERC-20 balance

import { erc20 } from "@qorechain/evm";

const token = "0x...";
const holder = "0x...";

const balance = await erc20.balanceOf(client.publicClient, token, holder);
const meta = await erc20.metadata(client.publicClient, token); // { name, symbol, decimals }

Sign and send

Pair with @qorechain/sdk's deriveEvmAccount(mnemonic), which returns the privateKey:

import { evmAccountFromPrivateKey, writeContract, ERC20_ABI } from "@qorechain/evm";

const account = evmAccountFromPrivateKey("0x..."); // privateKey from deriveEvmAccount
const wallet = client.getWalletClient(account);

const hash = await writeContract(wallet, {
  address: token,
  abi: ERC20_ABI,
  functionName: "transfer",
  args: ["0xrecipient", 1_000n],
});

Call a precompile

QoreChain exposes on-chain precompiles for post-quantum verification, AI-based risk/anomaly checks, and live consensus parameters. These are available on QoreChain network nodes; on a default or community node a call may return a "not available" error.

import { precompiles } from "@qorechain/evm";

const params = await precompiles.rlConsensusParams(client.publicClient);
// { blockTime, baseGasPrice, validatorSetSize, epoch }

const { valid } = { valid: await precompiles.pqcVerify(client.publicClient, {
  pubkey: "0x...",
  signature: "0x...",
  message: "0x...",
}) };

The precompile addresses and interface ABIs are also exported directly: PRECOMPILE_ADDRESSES, IQORE_PQC_ABI, IQORE_AI_ABI, IQORE_CONSENSUS_ABI.

License

Apache-2.0