// Verify will verify provided resolution result against resolution result that is assembled from
// from published and unpublished operations in provided resolution result.
Verify will verify provided resolution result against resolution result that is assembled from
from published and unpublished operations in provided resolution result.
// Verify will verify provided resolution result against resolution result that is assembled from // from published and unpublished operations in provided resolution result .
func (r *ResolutionVerifier) Verify(input *document.ResolutionResult) error {
	operations, err := getOperations(input.DocumentMetadata)
	if err != nil {
		return err
	}
	resolved, err := r.resolveDocument(input.Document.ID(), operations...)
	if err != nil {
		return fmt.Errorf("failed to resolve document with provided operations: %w", err)
	}
	err = checkResponses(input, resolved)
	if err != nil {
		return fmt.Errorf("failed to check input resolution result against assembled resolution result: %w", err)
	}
	return nil
}
func ( r * ResolutionVerifier ) Verify ( input * document . ResolutionResult ) error { operations , err := getOperations ( input . DocumentMetadata ) if err != nil { return err } resolved , err := r . resolveDocument ( input . Document . ID ( ) , operations ... ) if err != nil { return fmt . Errorf ( " " , err ) } err = checkResponses ( input , resolved ) if err != nil { return fmt . Errorf ( " " , err ) } return nil }
Verify will verify provided resolution result against resolution result that is assembled from
from published and unpublished operations in provided resolution result.
Verify will verify provided resolution result against resolution result that is assembled from from published and unpublished operations in provided resolution result .
// get operations from document metadata // resolve document using provided operations // verify that assembled resolution result equals input resolution result