Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
# warpwallet
# WarpWallet

A brain wallet generator that uses [scrypt](https://en.wikipedia.org/wiki/Scrypt) and
[pbkdf2](https://en.wikipedia.org/wiki/PBKDF2) for key stretching.

A brain wallet generator that uses scrypt.

## Install

There's no npm module for WarpWallet since it's intended as a browser-only service. However,
it does use npm to manage its dependencies
it does use npm to manage its dependencies.

## Build

```sh
$ npm install -g iced-coffee-script
$ sudo npm install -g iced-coffee-script
$ npm install -d
$ npm install bitcore-mnemonic
$ icake build
```

IcedCoffeeScript uses Node.js for the build. There is a naming conflict with the node package
(Amateur Packet Radio Node Program), and the nodejs binary has been renamed from `node` to `nodejs`.
You may need to symlink `/usr/bin/node` to `/usr/bin/nodejs` to get things work.
Use: `sudo ln -s /usr/bin/nodejs /usr/bin/node`

## Test

```sh
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "warpwallet",
"version": "1.0.9",
"version": "1.1.0",
"description": "Open Source JavaScript Client-Side Bitcoin Wallet Generator Using scrypt",
"dependencies": {
"brew": "*",
Expand All @@ -13,7 +13,8 @@
"iced-utils": ">=0.1.1",
"icsify": "*",
"keybase-bitcoin": ">=0.0.0",
"triplesec": "keybase/triplesec#header_v3"
"triplesec": "keybase/triplesec#header_v3",
"bitcore-mnemonic": ">=1.1.1"
},
"repository": {
"type": "git",
Expand Down
8 changes: 7 additions & 1 deletion src/coffee/site.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ class Warper
$('#passphrase').on 'keyup', => @any_change()
$('#public-address').on 'click', -> $(@).select()
$('#private-key').on 'click', -> $(@).select()
$('#bip39-seed').on 'click', -> $(@).select()
$('#bip39-mnemonic').on 'click', -> $(@).select()
$('.what-salt').on 'click', => $('.salt-explanation').toggle()

any_change: ->
$('.progress-form').hide()
$('#private-key').val ''
$('#public-address').val ''
$('#bip39-seed').val ''
$('#bip39-mnemonic').val ''
$('#btn-submit').attr('disabled', false).show().html 'Generate'
pp = $('#passphrase').val()
salt = $('#salt').val()
Expand Down Expand Up @@ -94,7 +98,7 @@ class Warper

click_reset: ->
$('#btn-submit').attr('disabled', false).show().html 'Please enter a passphrase'
$('#passphrase, #public-address, #private-key').val ''
$('#passphrase, #public-address, #private-key', '#bip39-seed', '#bip39-mnemonic').val ''
if not window.SALT_DEFAULT?
$('#salt').val ''
$('#checkbox-salt-confirm').attr 'checked', false
Expand Down Expand Up @@ -137,6 +141,8 @@ class Warper
$('#btn-reset').attr('disabled', false).html 'Clear & reset'
$('#public-address').val res.public
$('#private-key').val res.private
$('#bip39-seed').val res.seeds[2].toString('hex')
$('#bip39-mnemonic').val res.mnemonic
@write_qrs res.public, res.private
return

Expand Down
4 changes: 2 additions & 2 deletions src/css/site.css
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ h1 .second-half {
.salt-summary {
text-decoration: underline
}
#public-address, #private-key {
#public-address, #private-key, #bip39-seed, #bip39-mnemonic {
cursor:pointer;
background-color: #fff
}
Expand Down Expand Up @@ -175,4 +175,4 @@ hr {
border-top: 1px solid #777;
margin: 1em 0;
padding: 0;
}
}
2 changes: 2 additions & 0 deletions src/iced/top.iced
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

{scrypt,pbkdf2,HMAC_SHA256,WordArray,util} = require 'triplesec'
generate = require('keybase-bitcoin').generate
mnemonic = require('bitcore-mnemonic')
params = require('../json/params.json')

#=====================================
Expand Down Expand Up @@ -47,6 +48,7 @@ exports.run = run = ({passphrase, salt, progress_hook}, cb) ->

out = generate seed_final
out.seeds = seeds
out.mnemonic = mnemonic.fromSeed(seed_final, mnemonic.Words.ENGLISH).toString()
cb out

#=====================================
Expand Down
Loading