// Delete will delete unpublished operation for suffix.
Delete will delete unpublished operation for suffix.
// Delete will delete unpublished operation for suffix .
func (s *Store) Delete(op *operation.AnchoredOperation) error {
	key, err := hashing.CalculateModelMultihash(op.OperationRequest, sha2_256)
	if err != nil {
		return fmt.Errorf("failed to generate key for unpublished operation for suffix[%s]: %w", op.UniqueSuffix, err)
	}
	if err := s.store.Delete(key); err != nil {
		return fmt.Errorf("failed to delete unpublished operation with key[%s] for suffix[%s]: %w", key, op.UniqueSuffix, err)
	}
	return nil
}
func ( s * Store ) Delete ( op * operation . AnchoredOperation ) error { key , err := hashing . CalculateModelMultihash ( op . OperationRequest , sha2_256 ) if err != nil { return fmt . Errorf ( " " , op . UniqueSuffix , err ) } if err := s . store . Delete ( key ) ; err != nil { return fmt . Errorf ( " " , key , op . UniqueSuffix , err ) } return nil }
Delete will delete unpublished operation for suffix.
Delete will delete unpublished operation for suffix .