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

@openzeppelin/tron-runtime

v0.1.0

Published

Shared stateless native-TRON transport primitives for OpenZeppelin TRON tooling

Readme

@openzeppelin/tron-runtime

Shared, framework-neutral, stateless native-TRON transport primitives — address codecs, native transaction construction, canonical serialization + transaction-id derivation, native-receipt note decoding, BigInt-safe JSON, and transport-error classification. (Framework-neutral w.r.t. Foundry / Hardhat / upgrades-core; it does depend on tronweb + ethers.)

Consumed by both the Foundry gateway (openzeppelin-foundry-upgrades-tron) and hardhat-tron. It contains mechanism only — it never owns policy (broadcast/retry, receipt-polling/finality, recovery) or classification of internal transactions; each consumer keeps those, because Foundry waits for solidified inclusion while hardhat-tron uses unconfirmed receipts and recovery-mines on TRE.

Status: 0.1.0 — stable. Every export below is a settled contract: no experimental or provisional exports. The 0.x major means the API may still evolve, but a breaking change only ships in a minor bump (0.2.0) with a changelog entry — patch releases (0.1.x) never break existing callers. Published to npm with build provenance. Requires Node >=22.

Public API

Single entry point (deep imports into dist/* are unsupported):

import { toEvmAddress, jsonParseBigSafe } from '@openzeppelin/tron-runtime';

Each export carries TSDoc (parameters / return value / thrown errors) your editor surfaces on hover.

| Export | Purpose | | --- | --- | | toEvmAddress(a) · toTronHexAddress(a) · toBase58Address(a) | Address codecs — EVM 0x (lowercase, canonical) / TRON 41… / Base58 T…; consumers adapt casing (e.g. ethers.getAddress(...)). | | serializeSignedTransaction(tx) | Serialize a signed transaction to hex; verify its embedded txID. | | nativeTxIdFromSignedBytes(bytes) | Re-derive the txid from canonical signed bytes. | | jsonParseBigSafe(text) | JSON.parse that preserves integers ≥ 2^53 in TVM responses. | | decodeInternalTransactionNote(note) | Decode a raw internal-tx note to UTF-8 (null if absent/non-string) — the shared receipt primitive. | | buildCreate(tronWeb, opts, signer) | Build and sign a CreateSmartContract (contract deploy). | | buildCall(tronWeb, opts, signer) | Build and sign a TriggerSmartContract (contract call). | | signBuiltTransaction(tronWeb, tx, key) | Sign a builder's output JSON and serialize it. | | retryableTransportError(error) | Heuristic: is a transport/node error transient and retryable? | | normalizeAddress(a) | Return all three address forms at once: { evm, tronHex, base58 }. | | nativeContractAddress(txid, owner) | Derive the address a native deploy creates. |

Types: NormalizedAddress, BuiltTransaction, Signer, BuildCreateOptions, BuildCallOptions.

Receipt traces stay raw by design: the package decodes internal-transaction notes (decodeInternalTransactionNote) and stops there — each consumer keeps its own receipt wrapper and its own classification policy, so no full-trace normalizer is exported.

Design

Mechanism, not policy. The package holds no long-lived client, no broadcast/poll loop, and no durable state; the caller injects the transport (a TronWeb instance) and the signing key. Deciding when a transaction is final, how to retry, whether to recover a mined-but-unconfirmed deploy, and what an internal transaction means is left to each consumer. See SECURITY.md for the guarantees and boundaries.

License

MIT