Newts Parading Majestically
    Wondering what’s next for npm?Check out our public roadmap! »

    @redbud-hk/web3-core-subscriptions
    TypeScript icon, indicating that this package has built-in type declarations

    1.5.3 • Public • Published

    web3-core-subscriptions

    NPM Package Dependency Status Dev Dependency Statustus]deps-image]deps-url Dev Dependency Status

    This is a sub-package of web3.js

    This subscriptions package is used within some web3.js packages.

    Please read the documentation for more.

    Installation

    Node.js

    npm install web3-core-subscriptions

    Usage

    const Web3Subscriptions = require('@redbud-hk/web3-core-subscriptions');
    
    const sub = new Web3Subscriptions({
        name: 'subscribe',
        type: 'eth',
        subscriptions: {
            'newBlockHeaders': {
                subscriptionName: 'newHeads',
                params: 0,
                outputFormatter: formatters.outputBlockFormatter
            },
            'pendingTransactions': {
                params: 0,
                outputFormatter: formatters.outputTransactionFormatter
            }
        }
    });
    sub.attachToObject(myCoolLib);
    
    myCoolLib.subscribe('newBlockHeaders', function(){ ... });

    Keywords

    none

    Install

    npm i @redbud-hk/web3-core-subscriptions

    DownloadsWeekly Downloads

    0

    Version

    1.5.3

    License

    LGPL-3.0

    Unpacked Size

    31.8 kB

    Total Files

    11

    Last publish

    Collaborators

    • avatar
    • avatar