Skip to content

API ReferenceReact componentsFunction

CreateLOCFlow()

function CreateLOCFlow(props): Element;

Beta

A complete Creator UI: list the connected account’s LOCs, open one to manage it, create a new one, and sign each workflow. When a run fails, the flow returns to the list or the create form, wherever the run started, restores the user’s values, shows field problems on the form, and reports any other failure in a banner.

Reads beneficiary, expiration, and staticLOCTokenAddressAllowlist from the SDK’s LOCConfig and pre-fills / restricts the create form accordingly.

When the wallet cannot confirm whether a transaction was sent, the signing step shows UnconfirmedTransaction in place of the transaction list. The flow holds there until the user retries or leaves, and an account change dismisses it with the rest of the run.

Parameters

ParameterTypeDescription
propsCreateLOCFlowPropsThe flow’s headings, creation settings, cancellation authorization, and starting form values.
props.cancelAuthorization?CancelLOCAuthorizationSourceBeta The Beneficiary’s authorization for canceling a LOC from its details: a signature, a function that returns one for the selected LOC, or null to turn it off in this flow. Omit it to use LOCConfig’s cancelAuthorization. Before a LOC expires, the Creator needs this authorization to cancel it.
props.className?stringExtra class names for the flow’s outer element.
props.config?CreateLOCComponentConfigBeta Creation settings for this flow’s form: staticOnly limits it to Static LOCs, and tag sets how the LOC’s tag is built. Each field you set replaces the same field of LOCConfig’s createLOC, and each field you omit inherits it. A null tag turns off the provider’s tag.
props.createOnly?booleanShow only the create form, without the list of the Creator’s LOCs or their details. Defaults to false.
props.description?stringThe subtitle shown under title. Defaults to Create and manage your current LOCs here over the list, and to none over the form.
props.formValues?CreateLOCFormValuesBeta Values the create form starts from, such as the amount your product asks for. The customer can change them. A failed run’s own values take their place when the form comes back. Every field is optional: kind, beneficiary, expiration, tokenAddress, tokenAmount, collateralTokenAddress, collateralTokenAmount, creditedTokenAddress, creditedTokenAmount, tag, and tagValues.
props.title?stringThe heading over the LOC list, or over the create form when createOnly is set. Defaults to Letters of credit over the list and Create New LOC over the form.

Returns

Element

The Creator LOC flow.

Remarks

Beta: it may change or be removed without notice and is not part of the compatibility contract. The provider and hooks are the supported React surface.