---
title: "QuartzUIProjectContract: declaration reference"
description: "Quartz UI 0.57.0-dev: QuartzUIProjectContract: declaration reference. Source-reviewed guidance, usage and limitations."
status: approved
visibility: public
sourceRevision: fe5b709ec900e282b50e58b819a25041945005f9
reviewedAt: 2026-09-24
---

# QuartzUIProjectContract: declaration reference

> **0.57.0-dev · beta source documentation.** Native, Blueprint, Editor and rendering examples are source-reviewed, not executed in Unreal during this scan. See [validation and limits](https://betterbuilt.games/docs/quartz-ui/evidence).

Pinned source (source: `Source/QuartzUIRuntime/Public/QuartzUIProjectContract.h`) · [integration recipe](https://betterbuilt.games/docs/quartz-ui/inventory#quartzuiprojectcontract) · [practical guide](https://betterbuilt.games/docs/quartz-ui/providers-contracts)

## FQuartzUIProjectPayloadDeclaration

**Public type.** One exact state/event/action payload DTO selected by a project asset.

**Prerequisites / integration:** Configured app, explicit reflected value types, saved assets and freshly generated app contract. Use the [QuartzUIProjectContract recipe](https://betterbuilt.games/docs/quartz-ui/inventory#quartzuiprojectcontract) in the host module `QuartzUIRuntime`.

**Minimal example / lifecycle:** Add fragment to RegisteredProjectContracts; regenerate app TypeScript. App asset closure determines stable identity; save/recook after changes.

**Avoid:** Mutating core catalog or registering same name across kinds. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: `Source/QuartzUIRuntime/Public/QuartzUIProjectContract.h#L16`)

## FQuartzUIProjectRequestDeclaration

**Public type.** One exact browser-to-Unreal request plus its asynchronous result DTO.

**Prerequisites / integration:** Configured app, explicit reflected value types, saved assets and freshly generated app contract. Use the [QuartzUIProjectContract recipe](https://betterbuilt.games/docs/quartz-ui/inventory#quartzuiprojectcontract) in the host module `QuartzUIRuntime`.

**Minimal example / lifecycle:** Add fragment to RegisteredProjectContracts; regenerate app TypeScript. App asset closure determines stable identity; save/recook after changes.

**Avoid:** Mutating core catalog or registering same name across kinds. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: `Source/QuartzUIRuntime/Public/QuartzUIProjectContract.h#L31`)

## UQuartzUIProjectContractAsset

**Public type.** Project-owned explicit fragment of one app's browser contract. Only these arrays are inspected; no UObject/class/asset-registry scan occurs.

**Prerequisites / integration:** Configured app, explicit reflected value types, saved assets and freshly generated app contract. Use the [QuartzUIProjectContract recipe](https://betterbuilt.games/docs/quartz-ui/inventory#quartzuiprojectcontract) in the host module `QuartzUIRuntime`.

**Minimal example / lifecycle:** Add fragment to RegisteredProjectContracts; regenerate app TypeScript. App asset closure determines stable identity; save/recook after changes.

**Avoid:** Mutating core catalog or registering same name across kinds. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: `Source/QuartzUIRuntime/Public/QuartzUIProjectContract.h#L50`)

## FQuartzUIResolvedAppContract

**Public type.** Fully merged immutable contract identity retained by one logical view.

**Prerequisites / integration:** Configured app, explicit reflected value types, saved assets and freshly generated app contract. Use the [QuartzUIProjectContract recipe](https://betterbuilt.games/docs/quartz-ui/inventory#quartzuiprojectcontract) in the host module `QuartzUIRuntime`.

**Minimal example / lifecycle:** Add fragment to RegisteredProjectContracts; regenerate app TypeScript. App asset closure determines stable identity; save/recook after changes.

**Avoid:** Mutating core catalog or registering same name across kinds. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: `Source/QuartzUIRuntime/Public/QuartzUIProjectContract.h#L74`)

## FQuartzUIProjectContractResolver

**Public type.** Explicit per-app loader, validator, merger, and effective-hash source.

**Prerequisites / integration:** Configured app, explicit reflected value types, saved assets and freshly generated app contract. Use the [QuartzUIProjectContract recipe](https://betterbuilt.games/docs/quartz-ui/inventory#quartzuiprojectcontract) in the host module `QuartzUIRuntime`.

**Minimal example / lifecycle:** Add fragment to RegisteredProjectContracts; regenerate app TypeScript. App asset closure determines stable identity; save/recook after changes.

**Avoid:** Mutating core catalog or registering same name across kinds. Match the exact declaration below; dependent DTOs/enums are values used by this owner, not independent systems.

Exact source line (source: `Source/QuartzUIRuntime/Public/QuartzUIProjectContract.h#L92`)

## Complete header

Source snapshot, not an additional example. Unreal annotations distinguish exposed Blueprint nodes from native-only/private methods.

```cpp
#pragma once

#include "CoreMinimal.h"
#include "Engine/DataAsset.h"
#include "QuartzUICoreContract.h"

#include "QuartzUIProjectContract.generated.h"

class UQuartzUIAppAsset;
class UQuartzUIProjectSettings;
class UQuartzUIProvider;
class UQuartzUIProviderSet;

/** One exact state/event/action payload DTO selected by a project asset. */
USTRUCT(BlueprintType)
struct QUARTZUIRUNTIME_API FQuartzUIProjectPayloadDeclaration
{
	GENERATED_BODY()

	/** Lowercase dotted wire name outside the reserved quartzui namespace. */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "QuartzUI|Contract")
	FName Name;

	/** Exact data-only USTRUCT reflected into TypeScript and checked at runtime. */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "QuartzUI|Contract")
	TObjectPtr<UScriptStruct> PayloadType;
};

/** One exact browser-to-Unreal request plus its asynchronous result DTO. */
USTRUCT(BlueprintType)
struct QUARTZUIRUNTIME_API FQuartzUIProjectRequestDeclaration
{
	GENERATED_BODY()

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "QuartzUI|Contract")
	FName Name;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "QuartzUI|Contract")
	TObjectPtr<UScriptStruct> PayloadType;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "QuartzUI|Contract")
	TObjectPtr<UScriptStruct> ResultType;
};

/**
 * Project-owned explicit fragment of one app's browser contract.
 * Only these arrays are inspected; no UObject/class/asset-registry scan occurs.
 */
UCLASS(BlueprintType, meta = (DisplayName = "QuartzUI Project Contract"))
class QUARTZUIRUNTIME_API UQuartzUIProjectContractAsset final : public UDataAsset
{
	GENERATED_BODY()

public:
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "QuartzUI|Contract")
	TArray<FQuartzUIProjectPayloadDeclaration> States;

	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "QuartzUI|Contract")
	TArray<FQuartzUIProjectPayloadDeclaration> Events;

	/** One-way UI intent; native returns an empty acknowledgement after dispatch. */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "QuartzUI|Contract")
	TArray<FQuartzUIProjectPayloadDeclaration> Actions;

	/** Validated request whose result may complete asynchronously. */
	UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "QuartzUI|Contract")
	TArray<FQuartzUIProjectRequestDeclaration> Requests;

	UFUNCTION(BlueprintPure, Category = "QuartzUI|Contract")
	int32 GetDeclarationCount() const;
};

/** Fully merged immutable contract identity retained by one logical view. */
struct QUARTZUIRUNTIME_API FQuartzUIResolvedAppContract
{
	FQuartzUIContractManifest Manifest;
	FString ContractHash;
	bool bHasProjectContracts = false;
	TArray<TObjectPtr<UQuartzUIProjectContractAsset>> LoadedAssets;
	TArray<TObjectPtr<UClass>> LoadedProviderClasses;
	TArray<TObjectPtr<UQuartzUIProviderSet>> LoadedProviderSets;

	const FQuartzUIContractMessageDeclaration* Find(FName Name) const;
	bool IsExact(
		EQuartzUIContractMessageKind Kind,
		FName Name,
		const UScriptStruct* PayloadType,
		const UScriptStruct* ResultType = nullptr) const;
};

/** Explicit per-app loader, validator, merger, and effective-hash source. */
class QUARTZUIRUNTIME_API FQuartzUIProjectContractResolver final
{
public:
	static constexpr int32 MaxContractsPerApp = 16;
	static constexpr int32 MaxDeclarationsPerAsset = 64;

	/** Null app and an app with no fragments both resolve to the immutable core. */
	static bool TryResolve(
		const UQuartzUIAppAsset* App,
		FQuartzUIResolvedAppContract& OutContract,
		FString& OutError);

	/** Pure merge seam used by focused tests and project tooling. */
	static bool TryMerge(
		const TArray<const UQuartzUIProjectContractAsset*>& Contracts,
		FQuartzUIResolvedAppContract& OutContract,
		FString& OutError);

	/** Pure merge seam for explicit DTO fragments plus reflected providers. */
	static bool TryMerge(
		const TArray<const UQuartzUIProjectContractAsset*>& Contracts,
		const TArray<const UClass*>& Providers,
		FQuartzUIResolvedAppContract& OutContract,
		FString& OutError);

	/** Finds one explicitly configured app by canonical ID; no asset-registry scan occurs. */
	static bool TryFindConfiguredApp(
		const UQuartzUIProjectSettings& Settings,
		FName AppId,
		UQuartzUIAppAsset*& OutApp,
		FString& OutError);
};
```

Canonical HTML: https://betterbuilt.games/docs/quartz-ui/reference-quartzuiprojectcontract
