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

@lindascan/lindastation

v1.0.3

Published

Javascript API Library for estimating Linda energy and bandwidth consumption based on Linda network.

Readme

What is Linda Station SDK?

Linda Station SDK - Developer Document

Linda Station SDK is a library for estimating Linda energy and bandwidth consumption based on Linda network. Developers can quickly review energy and bandwidth points information before deploying/triggering a smart contract or make a transaction.

Compatibility

  • Version built for Node.js v6 and above
  • Version built for browsers with more than 0.25% market share

Linda Station SDK is also compatible with frontend frameworks such as:

  • Angular
  • React
  • Vue

You can also ship Linda Station SDK in a Chrome extension.

Installation

Linda Station SDK - NPM Package

NPM

> npm install @lindascan/lindastation

Yarn

> yarn add @lindascan/lindastation

Build Steps

If you'd like to download and build locally, please follow the steps below.

> git clone https://github.dev/Lindscan/lindascan-lindastation
> cd lindastation-sdk
> yarn install
> yarn build
> yarn test

Usage

Install LindaWeb

NPM

> npm install lindaweb

Yarn

> yarn add lindaweb

Initialize LindaWeb and create Linda Station SDK instance

import LindaStation from '@lindascan/lindastation';
import LindaWeb from '@lindacoin/lindaweb';

const fullNode = new HttpProvider('https://api.lindagrid.lindacoin.org');
const solidityNode = new HttpProvider('https://api.lindagrid.lindacoin.org');
const eventServer = new HttpProvider('https://api.lindagrid.lindacoin.org');

const privateKey = 'your private key';

const lindaWeb = new LindaWeb(
    fullNode,
    solidityNode,
    eventServer,
    privateKey
);

// Constructor params are the lindaWeb object and specification on if the net type is on main net or test net/private net
const lindaStation = new LindaStation(lindaWeb);

// If you want to reset or switch node net work, just try to re-config your lindaWeb and reset in lindaStation sdk.
const newLindaWeb = new LindaWeb(
    fullNode,
    solidityNode,
    eventServer,
    privateKey
);
lindaStation.setLindaWeb(lindaWeb);

APIs

LindaStation-SDK provides three parts of calculators and some of utils can be used easily to estimate energy, bandwidth and super representatives data. There are also some sample usages provided in test directory.

Energy Calculators

// 1. Converter between frozen energy and lind amount.
const res = await lindaStation.energy.lind2FrozenEnergy(1);
const res = await lindaStation.energy.lind2FrozenEnergy(10e5, { unit: 'sun' });

const res = await lindaStation.energy.frozenEnergy2Lind(666.74484);
const res = await lindaStation.energy.frozenEnergy2Lind(666.74484, { unit: 'sun' });

// 2. Converter between burned energy and lind amount.
const res = await lindaStation.energy.lind2BurnedEnergy(1);
const res = await lindaStation.energy.lind2BurnedEnergy(10e5, { unit: 'sun' });

const res = await lindaStation.energy.burnedEnergy2Lind(10e4);
const res = await lindaStation.energy.burnedEnergy2Lind(10e4, { unit: 'sun' });

// 3. Calculator of max energy limit for deploying or triggering contract.
const res = await lindaStation.energy.getMaxEnergyLimit('your hex address', 1000);

Bandwidth Calculators

// 1. Converter between frozen bandwidth points and lind amount.
const res = await lindaStation.bp.lind2FrozenBandwidth(1);
const res = await lindaStation.bp.lind2FrozenBandwidth(10e5, { unit: 'sun' });

const res = await lindaStation.bp.frozenBandwidth2Lind(7300.356788039041);
const res = await lindaStation.bp.frozenBandwidth2Lind(7300.356788039041, { unit: 'sun' });

// 2. API for getting account bandwidth.
const res = await lindaStation.bp.getAccountBandwidth('4165519569C1A1E81646902142DD56A791DEBCB0D8');

Super Representatives Calculators

// 1. Calculator for estimating rank and votes reward by votes amount.
// existed SR/Candidate
const res = await lindaStation.witness.calculateSrReward(1000, '41928c9af0651632157ef27a2cf17ca72c575a4d21');
// New SR/Candidate
const res = await lindaStation.witness.calculateSrReward(1000);

// 2. API for getting current SR reward list.
const res = await lindaStation.witness.getSrVoteRewardList();

Other tools

// 1. Convert between lind and sun.
const res = await lindaStation.apis.fromLind(1);
const res = await lindaStation.apis.toLind(10e5);

// 2. Get account resource by name.
const res = await lindaStation.apis.getResourceByName('EnergyWeight');
const res = await lindaStation.apis.getResourcesByName(['TotalNetLimit', 'TotalNetWeight']);

// 3. Get proposals by name.
const res = await lindaStation.apis.getChainParameterByName('getEnergyFee');
const res = await lindaStation.apis.getChainParametersByName(['getTotalEnergyCurrentLimit', 'getEnergyFee']);