Skip to content

etherstudy/leeyeon-wallet-core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

leeyeon-wallet-core

leeyeon wallet core module

Build

npm install
npm install --global webpack
npm install --global webpack-cli
webpack

Install npm package from GitHub

npm install git+https://github.com/etherstudy/leeyeon-wallet-core.git

Usage

To use wallet in Node.js, just require it:

var wallet = require("./wallet.js");

A minified, browserified file dist/wallet.min.js is included for use in the browser. Including this file simply attaches the wallet object to window:

<script src="wallet.min.js"></script>

Start

wallet.start(    
    {
        "name"   : "ropsten",
        "type"   : "http",  // or wss
        "network": {"http"	: "https://ropsten.infura.io",
                    "wss"	: "wss://ropsten.infura.io/ws",
                    "api"	: "https://api-ropsten.etherscan.io",
                    "href"	: "https://ropsten.etherscan.io"},
        "erc20s" : {"<<ADDRESS>>":["<<NAME>>","<<ICON>>"]},
        "erc721s": {}
    }
);

Create

wallet.account.create(password);

create keyobject

Login & out

wallet.login(password,keyObject,error,success);
wallet.logout(callback=null);

login&out

GetBalance

wallet.utils.getBalance(address,token,callback=null);

getbalance

Account

wallet.account.decrypt(password,keyObject);

keyobject2account

Transfer (Ethereum)

wallet.tx.transfer(password,keyObject,to,gasPrice,weiAmount,error=null,hash=null,success=null);

transfer

Transaction List

wallet.logs.txlistAll(address,token,callback);

txlistall

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published