Class: Mastercoin::Cli::SimpleSend

Inherits:
Thor
  • Object
show all
Defined in:
bin/simple_send

Instance Method Summary collapse

Instance Method Details

#adviseObject



40
41
42
43
44
45
46
47
# File 'bin/simple_send', line 40

def advise
  simple_send = Mastercoin::SimpleSend.new(currency_id: options[:currency_id], amount: options[:amount], receiving_address: options[:receiving_address])
  puts "Step 1: Send all funds in your wallet to the address which owns the MasterCoins (the following sends must come from that address)
Step 2: Send exactly 0.00006 BTC from your address to each of the following 3 addresses in one transaction:
The Exodus Address:    1EXoDusjGwvnjZUyKkxZ4UHEf77z6A5S4P
The recipient address: #{options[:receiving_address]}
The data address:      #{simple_send.encode_to_address}"
end

#decode_from_address(address) ⇒ Object



15
16
17
# File 'bin/simple_send', line 15

def decode_from_address(address)
  puts Mastercoin::SimpleSend.decode_from_address(address).to_s
end

#decode_from_public_key(public_key) ⇒ Object



10
11
12
# File 'bin/simple_send', line 10

def decode_from_public_key(public_key)
  puts Mastercoin::SimpleSend.decode_from_compressed_public_key(public_key).to_s
end

#encode_to_addressObject



31
32
33
34
# File 'bin/simple_send', line 31

def encode_to_address
  simple_send = Mastercoin::SimpleSend.new(currency_id: options[:currency_id], amount: options[:amount], receiving_address: options[:receiving_address])
  puts simple_send.encode_to_address
end

#encode_to_public_keyObject



22
23
24
25
# File 'bin/simple_send', line 22

def encode_to_public_key
  simple_send = Mastercoin::SimpleSend.new(currency_id: options[:currency_id], amount: options[:amount])
  puts simple_send.encode_to_compressed_public_key
end