Giter VIP home page Giter VIP logo

jswallet's Introduction

JSWallet

Screen Shot

This is a companion to my Medium tutotial.

It is not production code and should be used for educational puproses only.

It seems that at this moment, testnet is experiencing a tremendous amount of tranffic which has rendered the network practically unusable. The faucets are down and the transactions are stuck. We will all have to wait for while.

Installation

git clone https://github.com/mmick66/jswallet.git
cd jswallet
npm install
npm start

Design Principles

Key derivation is the beating heart of a Bitcoin Wallet and most security concerns have to do with this first step.

My code is mainly intended as an illustration of the following pattern:

Key Derivation

Building

This project was built using electron-forge. I have had problems building it in some machines and apparently the issue is not uncommon. In theory it should work like so...

npm publish

Warnings

As stated above this is not production code. It is set to work with testnet by default but by a simple change in the env.js it could well function with real bitcoins!

jswallet's People

Contributors

irgeek avatar mmick66 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

jswallet's Issues

Transactions are wrongly signed

Thank you for your medium post and this repo.
I've noticed that your transactions are wrongly signed in case there are more than 1 input. Problematic line of code is this:

txb.sign(0, key);

That line is signing only the first (zero index) input, but it should iterate over all inputs and sign with their corresponding index. The same thing is wrong in the medium post.

Ubuntu Build Problem

hi

in ubuntu, npm run start
cannot start the app.

node: v10.15.1
os: Linux Mint 19.1 Tessa 64bit

Digest method not supported

I have just forked your repo and after npm install, I started project which runs correctly. But when I create an address it gives me this error....surfing internet but not got the solution yet

internal/crypto/hash.js:33 Uncaught (in promise) Error: Digest method not supported
at new Hash (internal/crypto/hash.js:33)
at createHash (crypto.js:97)
at ripemd160 (/home/jahangir/Desktop/jswallet-master/node_modules/bitcoinjs-lib/src/crypto.js:4)
at Object.hash160 (/home/jahangir/Desktop/jswallet-master/node_modules/bitcoinjs-lib/src/crypto.js:16)
at HDNode.getIdentifier (/home/jahangir/Desktop/jswallet-master/node_modules/bitcoinjs-lib/src/hdnode.js:130)
at HDNode.getFingerprint (/home/jahangir/Desktop/jswallet-master/node_modules/bitcoinjs-lib/src/hdnode.js:134)
at HDNode.derive (/home/jahangir/Desktop/jswallet-master/node_modules/bitcoinjs-lib/src/hdnode.js:274)
at HDNode.deriveHardened (/home/jahangir/Desktop/jswallet-master/node_modules/bitcoinjs-lib/src/hdnode.js:283)
at /home/jahangir/Desktop/jswallet-master/node_modules/bitcoinjs-lib/src/hdnode.js:308
at Array.reduce ()
at HDNode.derivePath (/home/jahangir/Desktop/jswallet-master/node_modules/bitcoinjs-lib/src/hdnode.js:304)
at Function.create (wallet.class.js? [sm]:153)
at validateFormHashed.then.values (wallets.content.component.jsx? [sm]:105)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.