UASS Minting process

Minting proces is best desribed ny its state field which lifecycle is shown on the following diagram:

graph TD draft --> submitted submitted -.-> |user cancel|cancelled draft --> cancelled submitted -.-> |not approved|draft submitted --> |approved|executing executing --> |system minted|success

The process is started by creating a draft, API supports exactly one draft for a token type per user. Draft is submitted to auditor, who either return it with suggested changes and a message, or approves it, after what the real token minting starts.

It is possible to cancel a draft but not after it gets approved.

UI principles

Home screen

Check there is current minting instance, if it is, show the screen corresponing to uts state (below). If there is no minting in progress, show list of completed operations (executed and cancelled, in order of creation) and a button to mint new.

Mint new

Create a new minting in draft state. The API will set current minting instance in a draft state, so it should display automatically (see logic above)

Draft screen: Minting.State.Draft

Get the request draft. System will provide clenan draft or reuse last existing if any automatically.

Display editable fields for request data, editable list of file attachments, the field for a message to the auditor, and readonly possible empty list of messages from the auditor.

Editing data

Edit all data fields, add/remove/download attached files and edit their informational fields, e.g. file text comment.

Sign and submit

May request user password as usual. After the API call current minting state changes that should redraw UI automatically.

Minting.State.Executing

This state means the request is audited and approved, and system is queued it for actual minting. Show status message and short information about the request (data fields, no messages).

No user actions in this mode.

Minting.State.Submitted

Readonly display data submitted to the audit, all data fields, all files (with download links/buttons) and messages history.

Cancel minting request

Require approval dialogue. The request is submitted to the system and performed immediately. The cancelled request goes to the state of draft, so user can change or delete it.

states Minting.State.Success and Minting.State.Cancelled

Show readonly screen with state and details, also list of messages. Should have a link to ciew a contract, when the contract viewer will be ready.

Showing message lists

Lists should be properly sorted and better be shown in a scrollable div intiallly scrolled to show the latest message.