abstract struct Fremkit::Address
- Fremkit::Address
- Struct
- Value
- Object
Overview
This represents an address and contains general helper methods.
To obtain a workable object, #check_format needs to be over-
loaded to check that the address' format is correct.
Direct Known Subclasses
Defined in:
common/address.crConstructors
- 
        .new(bytes : Array(UInt8), little : Bool = false)
        
          Turns the list of bytes into an address. 
- 
        .new(str : String, little : Bool = false)
        
          Turns a hex string representing an address into an address. 
Instance Method Summary
- #bytes : Array(UInt8)
- 
        #check_format : Bool
        
          This should be overloaded to check that the size of the @bytesarray corresponds to a valid address.
- 
        #format_size : Int32
        
          This should be overloaded to allocate the right size of bytes into @bytes 
- 
        #format_str : String
        
          Default address format descriptor, overload if needed. 
- #from_bytes(bytes : Array(UInt8))
- #hex_str : String
- #little : Bool
- #to_i : BigInt
- 
        #to_s
        
          Returns a nicely readable and concise string representation of this object, typically intended for users. 
Instance methods inherited from class Object
  
  
    
      from_rlp(rlp : Bytes) : Tuple(self, UInt32)
    from_rlp, 
    
  
    
      to_rlp : Bytes
    to_rlp
    
  
    
    
  Class methods inherited from class Object
  
  
    
      from_rlp(rlp : Bytes) : Tuple(self, UInt32)
    from_rlp
    
  
  
Constructor Detail
Turns the list of bytes into an address. #little specifies
the endianness of those bytes.
Turns a hex string representing an address into an address.
#little is true if bytes should be stored in little-endian
order
Instance Method Detail
This should be overloaded to check that the size of
the @bytes array corresponds to a valid address.
This should be overloaded to allocate the right size of bytes into @bytes