@blockchaincommons/envelope - v1.0.0-beta.4
    Preparing search index...

    Function validateAttachment

    • Validates that this envelope is a valid attachment, in the reference's order (validate_attachment): the payload is read (NotWrapped when the object is not wrapped), then the vendor and the conformsTo, then the attachment is rebuilt from them and must be equivalent to this envelope (which also checks that the predicate is 'attachment').

      Parameters

      Returns void

      EnvelopeError with code InvalidAttachment when the envelope is not an assertion or does not rebuild; NotWrapped, NonexistentPredicate, AmbiguousPredicate or Cbor from the parts.