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

helios-web3

v0.1.1

Published

Web3.js extended for use with heliosprotocol

Readme

=========================== Web3.js for Helios Protocol

This is web3.js for Helios Protocol. It is currently under active development.

How to use

If you are building an application in nodejs:

.. code:: bash

    $ npm install helios-web3

If you are building a application to run in the browser:

  1. Copy the compiled browser file from the dist directory, and then include it into your html file normally

  2. Access web3 from within your javascript using either of the window variables:

    .. code:: bash
    
        web3
        heliosWeb3
  3. Access Helios functions using:

    .. code:: bash
    
        web3.hls
        heliosWeb3.hls

If you would like to develop helios-web3:

  1. Clone this repo

    .. code:: bash
    
        $ git clone https://github.com/Helios-Protocol/helios-web3.js
  2. Install using npm

    .. code:: bash
    
        $ cd helios-web3.js
        $ npm install

How to compile the browser version using browserify:

.. code:: bash

$ browserify export_for_website.js -o dist/helios_web3.js

Documentation

Documentation is a work in progress

Many of the functions used on Ethereum's web3.js will work on Helios as long as they are applicable. You can see the documentation for that here <https://web3js.readthedocs.io>_.

Here we will show documentation for Helios specific functionality.

web3.hls.getBlock()

This has been removed. Use getBlockByNumber of getBlockByHash instead.


web3.hls.getBlockByHash(blockHash [, returnTransactionObjects = false] [, callback])

Parameters blockHash is the hex hash of the block. If returnTransactionsObjects is false, only the hashes of transactions are included in the block, otherwise the transaction objects are included in the block.

Returns "chainAddress" "sender" -> The address that signed the block. "extraData" "gasLimit" "gasUsed" "hash" "logsBloom" "number" "parentHash" "rewardHash" "accountHash" "receiptsRoot" "timestamp" "accountBalance" "transactionsRoot" "receiveTransactionsRoot" "transactions" "receiveTransactions" "rewardBundle"

example transactions includes "gasUsed", unlike eth includes "isReceive": false

example receiveTransactions hash: "0xb52610ea9fefb6a2af025edc8e56d07c78d7446f1f0fe34005672ec3127ed965" isRefund: "0x0" remainingRefund: "0" sendTransactionHash: "0xe5b564e507e45e24b789164aecb124f451ffc446c6f1c12a0a11ef0678eedf8e" from: "0xdb4ca426d53b59f60370274ffb19f2268dc33ddf" senderBlockHash: "0xd69c6653e39d625ce19eb445563a55712666972d695e8ac904f988166b085d10" value: "14000000000000000000000" isReceive: true

this needs updating

web3.hls.getBlockByNumber(blockNumber, chainAddress [, returnTransactionObjects = false] [, callback])


**Parameters**
blockNumber is an integer, chainAddress is a hex encoded address of the chain on which the block lives.

web3.hls.getNewestBlocks([numberOfBlocksToReturn = 10 (max 10), startIdx = 0, afterHash, chainAddress = None, includeTransactions = False] [, callback])

Gets a list of new blocks starting from start_idx and increasing the index to a max of numberOfBlocksToReturn, but it will stop when it hits the block with hash = afterHash. includeTransactions tells it whether to include transactions. Returns a list of the same kind of blocks as the getBlock function. Returns newest to oldest blocks.

web3.hls.getBlockNumber(chainAddress [, callback])


**Parameters**
Same as web3.hls.getBlockNumber with the addition of chainAddress and beforeTimestamp.
chainAddress is the address of the chain that you would like the block number for. if beforeTimestamp
is specified, it will return the latest block number before the timestamp. It will produce an error if
there are no matching blocks.

**Returns**
Same as web3.hls.getBlockNumber

web3.hls.getHistoricalGasPrice([callback])

Returns A list of [timestamp, gas_price] entries for as far back as the node saves.

web3.hls.getTransactionReceipt(hash [, callback])

Same as with ethereum web3 except it returns 1 additional parameter:
"is_receive"


web3.hls.getTransactionByHash(tx_hash)

Gets the canonical transaction corresponding to the hash.