Litecoin JS library.
Last updated 2 years ago by backcopy .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install litecoinjs 
SYNC missed versions from official npm registry.


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.


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


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.


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.


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
	} catch (error) {
		console.error(`ERROR: ${error}`);


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.


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


No stable release, TBD.


  • Edin Jusupovic


LitecoinJS is licensed under the MIT license.


No acknowledgments yet.

Current Tags

  • 1.4.0                                ...           latest (2 years ago)

8 Versions

  • 1.4.0                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.2                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (17)
Dev Dependencies (5)
Dependents (0)

Copyright 2014 - 2017 © |