class RubyCoin::Feathercoin::Address
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
RubyCoin::Address::new
# File lib/ruby_coin/feathercoin/address.rb, line 4 def initialize(*args) super(CURVE_TYPE, *args) end
Public Instance Methods
address()
click to toggle source
# File lib/ruby_coin/feathercoin/address.rb, line 8 def address encode_address end
private_key()
click to toggle source
# File lib/ruby_coin/feathercoin/address.rb, line 16 def private_key key = compressed? ? @private_key + '01' : @private_key hex = PRIKEY_VER + key sum = checksum(hex) number_to_base((hex + sum).to_i(16), ADDR_CHARS) end
version_hash(hex)
click to toggle source
# File lib/ruby_coin/feathercoin/address.rb, line 12 def version_hash(hex) PUBKEY_VER + hash160(hex) end
Private Instance Methods
encode_address()
click to toggle source
# File lib/ruby_coin/feathercoin/address.rb, line 25 def encode_address hash = version_hash(public_key) sum = checksum(hash) number_to_base((hash + sum).to_i(16), ADDR_CHARS) end