Skip to content

API ReferenceTransactions, wallets, and signaturesType Alias

WorkflowExecutionResult

type WorkflowExecutionResult =
| {
operations: WalletOperation<AnvilWalletOperationType>[];
status: 'executed';
}
| {
issues: ValidationIssue[];
status: 'invalid';
}
| {
error: BaseError;
status: 'failed';
}
| {
status: 'cancelled';
};

What one call to WalletOperationWorkflow.execute resolved with. Switch on status; exactly one of these four shapes applies.

Union Members

Type Literal

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

operations

operations: WalletOperation < AnvilWalletOperationType > [];

Every step as the run left it, including any Indeterminate step.

status

status: 'executed';

The run reached the wallet stage. Read each step’s status for the outcome: this also covers a run that stopped at an Indeterminate step, or that every caller canceled after its first wallet prompt.


Type Literal

{
issues: ValidationIssue[];
status: "invalid";
}

issues

issues: ValidationIssue[];

The issues found. No step ran or changed status.

status

status: 'invalid';

Validation against current state rejected the workflow’s inputs, so no wallet prompt was shown.


Type Literal

{
error: BaseError;
status: 'failed';
}

error

error: BaseError;

The SDK error that stopped validation. Some, such as a timeout, are worth retrying.

status

status: 'failed';

Validation could not finish, for example because a read timed out, so there is no verdict on the inputs. No step ran or changed status.


Type Literal

{
status: 'cancelled';
}

status

status: 'cancelled';

Every caller of this run canceled through isCancelled before any new wallet prompt. No step ran or changed status.