Class: AdequateCryptoAddress::Sol
- Inherits:
-
Object
- Object
- AdequateCryptoAddress::Sol
- Defined in:
- lib/adequate_crypto_address/sol.rb
Constant Summary collapse
- ALPHABET_TYPE =
:bitcoin- MAX_LENGTH =
a 32-byte key encodes to at most 44 Base58 characters
64
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
Instance Method Summary collapse
-
#address_type ⇒ Object
:solana when the address decodes to a 32-byte key, otherwise nil.
-
#initialize(address_string) ⇒ Sol
constructor
A new instance of Sol.
- #valid?(_type = nil) ⇒ Boolean
Constructor Details
#initialize(address_string) ⇒ Sol
Returns a new instance of Sol.
10 11 12 |
# File 'lib/adequate_crypto_address/sol.rb', line 10 def initialize(address_string) @address = address_string end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
8 9 10 |
# File 'lib/adequate_crypto_address/sol.rb', line 8 def address @address end |
Instance Method Details
#address_type ⇒ Object
:solana when the address decodes to a 32-byte key, otherwise nil.
19 20 21 |
# File 'lib/adequate_crypto_address/sol.rb', line 19 def address_type valid_format? ? :solana : nil end |
#valid?(_type = nil) ⇒ Boolean
14 15 16 |
# File 'lib/adequate_crypto_address/sol.rb', line 14 def valid?(_type = nil) valid_format? end |