Skip to content

API ReferenceReact provider and hooksType Alias

WorkflowSettlement

type WorkflowSettlement =
| {
operations: WalletOperation<AnvilWalletOperationType>[];
status: 'succeeded';
}
| {
issues: ValidationIssue[];
operations: WalletOperation<AnvilWalletOperationType>[];
status: 'preflight-invalid';
}
| {
error: BaseError;
operations: WalletOperation<AnvilWalletOperationType>[];
status: 'preflight-failed';
}
| {
operations: WalletOperation<AnvilWalletOperationType>[];
status: 'wallet-failed';
}
| {
operations: WalletOperation<AnvilWalletOperationType>[];
status: 'wallet-indeterminate';
};

Beta

How one execution attempt ended, in a single vocabulary that does not depend on which phase the attempt reached.

Every variant carries the operation snapshot as it stood at settlement, so a consumer never has to correlate a status array against a separate outcome to learn what happened. The phase shows up in the status instead: preflight-* settled before any wallet prompt (every operation is still queued, and the operations therefore say nothing about the failure), while wallet-failed and wallet-indeterminate settled after one, with the detail on the operation concerned.

A cancelled execution is deliberately absent. Cancellation resolves before any wallet prompt because the mount that started the run is going away (unmount, account change, React StrictMode’s double-invoke cleanup) or a newer execution superseded it — there is no outcome to report and nothing for the user to act on, so a cancelled run settles nothing at all.

Union Members

Type Literal

{
operations: WalletOperation < AnvilWalletOperationType > [];
status: 'succeeded';
}

Type Literal

{
issues: ValidationIssue[];
operations: WalletOperation<AnvilWalletOperationType>[];
status: "preflight-invalid";
}

issues

issues: ValidationIssue[];

operations

operations: WalletOperation < AnvilWalletOperationType > [];

status

status: 'preflight-invalid';

Current domain state rejected the preserved intent. Pre-wallet.


Type Literal

{
error: BaseError;
operations: WalletOperation < AnvilWalletOperationType > [];
status: 'preflight-failed';
}

error

error: BaseError;

operations

operations: WalletOperation < AnvilWalletOperationType > [];

status

status: 'preflight-failed';

Execution could not reach a per-operation verdict: execute-time preflight failed outright, or the execution threw. Pre-wallet.


Type Literal

{
operations: WalletOperation < AnvilWalletOperationType > [];
status: 'wallet-failed';
}

operations

operations: WalletOperation < AnvilWalletOperationType > [];

status

status: 'wallet-failed';

A specific operation carries Failed and the failure detail.


Type Literal

{
operations: WalletOperation < AnvilWalletOperationType > [];
status: 'wallet-indeterminate';
}

operations

operations: WalletOperation < AnvilWalletOperationType > [];

status

status: 'wallet-indeterminate';

An operation is Indeterminate with no transaction hash: the connection failed while it was being sent, so it may or may not have landed and re-execution cannot resolve it. The user should check wallet activity before building a new workflow.

Remarks

Part of the SDK’s experimental React component surface — may change or be removed without notice and is not part of the compatibility contract.