Class: Monerorequest::MoneroAddress
- Inherits:
-
Object
- Object
- Monerorequest::MoneroAddress
- Defined in:
- lib/monerorequest/monero_address.rb
Overview
provide a validator for a Monero main address
Class Method Summary collapse
Class Method Details
.valid?(address) ⇒ Boolean
6 7 8 9 10 11 12 13 |
# File 'lib/monerorequest/monero_address.rb', line 6 def self.valid?(address) return false unless address.is_a?(String) return false unless address[0] == "4" return false unless address[1] =~ /[0-9AB]/ return false unless address.length == 95 true end |