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

lightwallet

v1.0.4

Published

Lightwallet client for nodejs. A multi chain wallet by lightwallet.

Downloads

31

Readme

Lightwallet client for node js

A multi chains wallet by lightwallet.

LightWallet is an e-wallet service, allowing users to perform the functions of creating accounts, creating e-wallets, managing wallets, as well as performing the functions of transferring and receiving cryptocurrencies. Currently, LightWallet is supporting many of the most popular coins such as Bitcoin (BTC), Ethereum (ETH), LiteCoin (LTC), Stellar (XLM), Ripple (XRP), Tron (TRX), ... and the above tokens. respective coins. It can be simply understood as “Coinbase.com clone” but supports more chains and works at the API level, specialized for programmers who are not specialized in Blockchain, saving the cost of deploying products on blockchain.

Installation: npm install -s lightwallet

Getting started

If you logged in pass token in constructor (pass null if first time register or login)

const lightwallet = require('lightwallet')("eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJsaWdodHdhbGxldCIsImp0aSI6ImFkbWluLnNvbWVwcm9qZWN0QGdtYWlsLmNvbSJ9.kGVJqoUQzXJSm2FypkSr6on8547bQ68I-Lu4N16ZlKk");

Or you can register and login first

Register user

const lightwallet = require('lightwallet')(null);
let user = await lightwallet.register("[email protected]","passwordonlyfortest","https://somewhere.com/");

Login

const lightwallet = require('lightwallet')(null);
let result = await lightwallet.login("[email protected]","passwordonlyfortest");
expect(result.data).have.property("token")

Update user

let result = await lightwallet.update("[email protected]","passwordonlyfortest","https://somewhere.com/",true);
expect(result.data).equal("change notification url success!")

createAccount

one account mean subaccount of current user it have new address

let result = await lightwallet.createAccount("user"+new Date().getTime(),"TRX");
expect(result.data).have.property("id")		

List AllAccount

one account mean subaccount of current user it have new address

let result = await lightwallet.accounts();
expect(result.data).to.be.an('array');		

List AllAddress

let result = await lightwallet.getAddress();
expect(result.data).to.be.an('array');
		

Get Account detail

let result = await lightwallet.getAccount("[email protected]|[email protected]");
expect(result.data).have.property("email")
		

Send coin/token

let result = await lightwallet.send("[email protected]","[email protected]","TWCAqe8QtcmaRLvBSfF3YQSFCmq5wusNYU",1,"TRX","{gasValue:3}","0.00063","no description");		

Send coin/token

let result = await lightwallet.send("[email protected]","[email protected]","TWCAqe8QtcmaRLvBSfF3YQSFCmq5wusNYU",1,"TRX","{gasValue:3}","0.00063","no description");		

Check Hash

let result = await lightwallet.checkHash("0xf7c3d342381cad5286659752e63673fbab104634f620a2aa37bae189074ebd78","ETH");
expect(result.data.status).equal(200);	

Build and Test from source code

Clone this repository
git clone [email protected]:ngocbd/lightwallet-client-node.git
yarn

or

npm install
npm test

or

yarn test

image