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 🙏

© 2024 – Pkg Stats / Ryan Hefner

litecoinjs

v1.4.0

Published

Litecoin JS library.

Downloads

470

Readme

LitecoinJS

LitecoinJS is a javascript-based implementation of various litecoin functions enabling you to natively create litecoin addresses, create transactions, set custom transaction fees and more. LitecoinJS is based on the bitcoinjs code base comprising of mostly syntactic functionality tailored for litecoin.

SegWit is used for all functions including address generation and transaction creation.

LitecoinJS is designed to work on both regular client applications like browsers and also conventional server applications using NodeJS.

Don't trust. Verify.

All developers and users of this library are advised to review and verify any underlying code for its validity and suitability. It’s good practice to always verify all cryptography dependencies and the associated codebase with consideration for the potential of backdoors, especially in the form of advanced and hard to spot types like mathematical backdoors.

WARNING

LitecoinJS should be considered experimental, potentially unstable and not yet entirely suitable for production use.

Features

Getting Started

These instructions will get you a copy of LitecoinJS up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

If you are planning to use the NodeJS version of LitecoinJS it's advisable that you have the following software and configuration on your machine -

NodeJS 8.11.4

Installing with NodeJS

For NodeJS applications you can download the latest version of LitecoinJS by running the following command from terminal -

npm install litecoinjs

Installing with browsers

Client side applications can build the browser version of LitecoinJS by the following the browser build documentation. Building for browsers enables you to easily use all LitecoinJS functions in the browser.

Examples

See a quick demo of various examples below.

Create a litecoin address

const litecoinjs = require('litecoinjs');

async function newAddressExample(){
try {
    const addressPair = await litecoinjs.newAddress();
    const address = addressPair.address; // Example
    const wif = addressPair.wif; // Example 
    const wif = addressPair.publicKey; // Example
        console.log(addressPair); 
	} catch (error) {
		console.error(`ERROR: ${error}`);
	}
}

newAddressExample(); 

Once executed, the expected return information would look something like the following -

{ address: 'MBeeHGfof2EwNobqyyA5fK6bNRij5CrQAC',
  wif: 'T43wmV2KzF8qmXXvsRGUeBNS1tSFotzy8jCYQHpX1GWUYFzfnXAu',
  publicKey: '027fbb9e466252e80a282fd451091425fc47ca64adc55aacac479dc437eb8a71c3'}

The Wallet Import Format (WIF) is an encoded version of the private key associated with the generated address.

Running tests

You can execute the included automated unit tests by running the following command -

npm run test 

Linting tests -

npm run lint 

Code coverage tests -

npm run coverage 

Deployment & Production

It’s important to note that LitecoinJS is not anywhere near as extensively tested as the BitcoinJS implementation and might considerably vary in the codebase. You should run extensive testing & verification before deploying anything into production.

Built With

  • BitcoinJS - Initially derrived from the BitcoinJS codebase.

Contributing

Please read CONTRIBUTING.md for details on the LitecoinJS code of conduct, and the process for submitting pull & merge requests to LitecoinJS.

Versioning

No stable release, TBD.

Authors

  • Edin Jusupovic

License

LitecoinJS is licensed under the MIT license.

Acknowledgments

No acknowledgments yet.