Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Commit

Permalink
Add instructions to actually use the bip38 bitcoin wallet with androi…
Browse files Browse the repository at this point in the history
…d / ios
  • Loading branch information
makevoid committed Jul 12, 2015
1 parent 070ca6e commit f1d4df1
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 43 deletions.
10 changes: 10 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
source "http://rubygems.org"


gem "ffi" #, platforms: "linux"
gem "scrypt" #, platforms: "linux"


gem "escper"
gem "bitcoin-ruby", require: "bitcoin", git: "https://github.com/lian/bitcoin-ruby.git"
gem "rqrcode_png"
13 changes: 13 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,19 @@ GEM
escper (1.2.2)
rmagick
serialport
ffi (1.9.8)
ffi-compiler (0.1.3)
ffi (>= 1.0.0)
rake
rake (10.4.2)
rmagick (2.13.3)
rqrcode (0.4.2)
rqrcode_png (0.1.5)
chunky_png
rqrcode
scrypt (1.2.1)
ffi-compiler (>= 0.0.2)
rake
serialport (1.3.1)

PLATFORMS
Expand All @@ -24,4 +32,9 @@ PLATFORMS
DEPENDENCIES
bitcoin-ruby!
escper
ffi
rqrcode_png
scrypt

BUNDLED WITH
1.10.4
9 changes: 9 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
task default: :run

task :build do
puts `bundle install`
end

task :run do
ruby "bin/paperbank"
end
59 changes: 35 additions & 24 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# PaperBank

### Usage

Install

rake build

Run

rake




### Install on Raspberry PI

This section has been moved to:

- [Installation (Condensed)](http://paperbank.it/install/raspberry/short/)
- [Installation (Full)](http://paperbank.it/install/raspberry/)

### Install on Linux

This is a much standard install, It works on Debian and should work on ubuntu (some apt package names may change)

- [Install on Linux (Debian)](http://paperbank.it/install/linux/)

### Install on Mac OS

For users: **Coming soon**.

For "hackers" that want it now:

Open "OSX CUPS webpage":http://localhost:631, add your usb thermal printer as Generic printer, then go into the code and change all the lines where the output is piped directly to usb (as it's possible in linux) [/dev/usb/ldX] to cups commands (you need to write contents to a file and then issue the print command passing that file as argument)


### Website

## [Paperbank.it](http://paperbank.it)
Expand Down Expand Up @@ -104,28 +139,6 @@ rasp pi links:
- [olinuxino](https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO/open-source-hardware)


### Install on Raspberry PI

This section has been moved to:

- [Installation (Condensed)](http://paperbank.it/install/raspberry/short/)
- [Installation (Full)](http://paperbank.it/install/raspberry/)

### Install on Linux

This is a much standard install, It works on Debian and should work on ubuntu (some apt package names may change)

- [Install on Linux (Debian)](http://paperbank.it/install/linux/)

### Install on Mac OS

For users: **Coming soon**.

For "hackers" that want it now:

Open "OSX CUPS webpage":http://localhost:631, add your usb thermal printer as Generic printer, then go into the code and change all the lines where the output is piped directly to usb (as it's possible in linux) [/dev/usb/ldX] to cups commands (you need to write contents to a file and then issue the print command passing that file as argument)


#### notes:

put something inside the the LAN hole so no-one can accidentally connect an ethernet cable, a piece of sponge will do in most cases, a chewing gum is a bit extreme and not recommended if you want to use that ethernet port again :)
Expand Down Expand Up @@ -195,5 +208,3 @@ You can use whichever wallet you prefer, blockchain, coinbase [insert your favou
- why Ruby?

It was very fast to implement and to tinker with, you can go and rewrite it in your own favourite language.


6 changes: 6 additions & 0 deletions bin/paperbank
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env ruby -KU

require_relative '../paperbank'

bank = PaperBank.new
bank.print_sequence
38 changes: 19 additions & 19 deletions paperbank.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
if defined?(Bundler)
require 'bundler/setup'
Bundler.require :default
else
require 'escper' # https://github.com/michaelfranzl/ruby-escper
require 'rqrcode_png'
require 'bitcoin' # bitcoin-ruby
end
require 'bundler/setup'
Bundler.require :default

require 'io/console'

Expand All @@ -23,7 +17,7 @@
end

# note: sudo chmod 666 /dev/usb/lp1
PRINTER = "/dev/usb/lp1" # lp0 on rasp pi, on debian 7 is lp1 by default
PRINTER = "/dev/usb/lp0" # lp0 on rasp pi or ubuntu, on debian 7 is lp1 by default


class PaperBank
Expand All @@ -37,10 +31,10 @@ def print_sequence
prepare

print_one
sleep 6
print_one
sleep 6
print_one
# sleep 6
# print_one
# sleep 6
# print_one
end

private
Expand Down Expand Up @@ -73,6 +67,18 @@ def print_one
print_send priv
line
line
# howto
print_send "To use this wallet:"
print_send "- for Android:"
print_send " - Download 'Mycelium'"
print_send " - Select 'Cold storage' from the prefs menu"
print_send "- for iOS:"
print_send " - Download 'BreadWallet'"
print_send "- Select 'Scan QR Code'"
print_send "- Enter the password"
print_send "- Yay! You should have the funds in your wallet now."
space
space
end

def clean
Expand All @@ -81,9 +87,3 @@ def clean
end

end


# main

bank = PaperBank.new
bank.print_sequence

0 comments on commit f1d4df1

Please sign in to comment.