anchor.diff:    (:export #:multihash
              #:simple-multihash
              ;; accessors
  -           #:multihash-octets
  -           #:multihash-hex-string
  -           #:multihash-b58-string
  +           #:octets
  +           #:hex-string
  +           #:b58-string
              ;; readers
  -           #:multihash-hash-code
  -           #:multihash-hash-name
  -           #:multihash-hash-length
  -           #:multihash-digest
  +           #:hash-code
  +           #:hash-name
  +           #:hash-length
  +           #:digest
              ;; high level multihash creation
              #:multihash-object
              #:%to-octets))
  
positive.code: 
  ;;; tl;dr: A multihash is a hash digest with 5 bytes of metadata prepended
  
  (defgeneric multihash-octets (object))
  (defgeneric (setf multihash-octets) (object octets))
  
  (defgeneric multihash-hex-string (object))
  (defgeneric (setf multihash-hex-string) (object string))
  
  (defgeneric multihash-b58-string (object))
  (defgeneric (setf multihash-b58-string) (object string))
  
  (defgeneric multihash-hash-code (object))
  (defgeneric multihash-hash-name (object))
  (defgeneric multihash-hash-length (object))
  (defgeneric multihash-digest (object))
  
  ;;;
  
  
negative.code: (defclass simple-multihash (multihash)
    ((%decoded
       :initform nil
       :accessor decoded
       :type decoded-multihash)
     (%octets
       :initarg :octets
       :accessor octets
       :type multihash-octets)))
  
  (defmethod print-object ((object simple-multihash) stream)
    (print-unreadable-object (object stream :type t :identity t)
      (format stream "~S" (b58-string object))))
  
  (defmethod (setf octets) :after ((object simple-multihash) octets)
    (setf (decoded object)
          (decode (octets object))))
  
  (defmethod hex-string ((object simple-multihash))
    (to-hex-string (octets object)))
  
  (defmethod (setf hex-string) ((object simple-multihash) (hex-string string))
    (setf (octets object)
          (from-hex-string hex-string)))
  
  (defmethod (setf b58-string) :after ((object simple-multihash) hex-string)
    (setf (decoded object)
          (decode (octets object))))
  
  (defmethod b58-string ((object simple-multihash))
    (to-base58 (octets object)))
  
  (defmethod (setf b58-string) ((object simple-multihash) (b58-string string))
    (setf (octets object)
          (from-base58 b58-string)))
  
  (defmethod (setf b58-string) :after ((object simple-multihash) b58-string)
    (setf (decoded object)
          (decode (octets object))))
  
  (defmethod hash-code ((object simple-multihash))
    (decoded-multihash-code (decoded object)))
  
  (defmethod hash-name ((object simple-multihash))
    (decoded-multihash-name (decoded object)))
  
  (defmethod hash-length ((object simple-multihash))
    (decoded-multihash-length (decoded object)))
  
  (defmethod digest ((object simple-multihash))
    (decoded-multihash-digest (decoded object)))
  
  (defmethod hash-code :before ((object simple-multihash))
    (when (null (decoded object))
      (setf (decoded object)
            (decode (octets object)))))
  
  (defmethod hash-name :before ((object simple-multihash))
    (when (null (decoded object))
      (setf (decoded object)
            (decode (octets object)))))
  
  (defmethod hash-length :before ((object simple-multihash))
    (when (null (decoded object))
      (setf (decoded object)
            (decode (octets object)))))
  
  (defmethod digest :before ((object simple-multihash))
    (when (null (decoded object))
      (setf (decoded object)
            (decode (octets object)))))
  
  ;;;
  
  