# Demo using UI

## 1. Overview <a href="#id-1.-overview" id="id-1.-overview"></a>

Relayer accounts are Hedera accounts designated to execute on-chain transactions associated with specific policy subflows during runtime.

They are typically used to isolate and organize on-chain activities across multiple projects. This separation allows different Hedera accounts to be assigned for financing and executing blockchain operations - such as posting messages, minting tokens, or performing other policy-driven actions - within the context of distinct projects.

### 1.1 Creation

Users can add Relayer Accounts using the corresponding button on their profile page.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FSOd2W56cxOBD6sBgzLUp%2Fimage.png?alt=media&#x26;token=62e322d0-6aea-4ae1-9f0e-fc18e5de7c06" alt=""><figcaption></figcaption></figure>

To add an existing account, the account name, the Hedera account ID, and its private key must be provided.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FKCr0QctiwJfictzpQbr6%2Fimage.png?alt=media&#x26;token=0d8dfd09-ee3e-4d62-94a7-cc05c74e3587" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2F67aJENRka6DNETMcMmF2%2Fimage.png?alt=media&#x26;token=93a4cde9-05ca-46e3-8f4f-27c8e031307d" alt=""><figcaption></figcaption></figure>

It is also possible to create a new Hedera account and set it up as one of the relayer account for the user.

{% hint style="info" %}
Note 1: hbar balance of the new account would be 0 and would need to be toped-up (externally to Guardian) for the account to become useable.
{% endhint %}

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2Fap3zoySrzjfCQehuoLDL%2Fimage.png?alt=media&#x26;token=cb205393-8f90-46e0-8771-a7ca50401d1d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Note 2: make sure that the private key of the generated account is securely saved somewhere. Guardian does not have facilities to recover the lost key.
{% endhint %}

### 1.2 Configuration <a href="#id-1.2-configuration" id="id-1.2-configuration"></a>

To enable Guardian users to use Relayer Accounts when executing policy workflow, the policy must have ‘Custom Relayer Account’ option switched on in the corresponding *requestVcDocumentBlock*, for example that which is responsible for project document. 

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2F3rivCNqqoPhYPjV3OBe6%2Fimage.png?alt=media&#x26;token=8091ed97-aa64-445d-a91b-8622b2881284" alt=""><figcaption></figcaption></figure>

All linked documents will inherit parent’s Relayer Account, there is no need to configure this setting for each of them specifically. I.e. it is only required to be set for the main (i.e. project) document.

### 1.3 Usage <a href="#id-1.3-usage" id="id-1.3-usage"></a>

For policies with enabled ‘Relayer Accounts’ option users will be presented with the options to select account options

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FJfHgQ3wmECBAlyKjtJaT%2Fimage.png?alt=media&#x26;token=efb904c9-4fbb-4809-bd12-0060b4299a12" alt=""><figcaption></figcaption></figure>

1. User account – default behaviour backward compatible with previous Guardian versions. In this configuration individual user accounts will be used for each operation on Hedera corresponding to the user performing them.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2Fg9N3xvnKuvs2xW2VA1Hd%2Fimage.png?alt=media&#x26;token=32b415dd-7f00-45f4-98ea-ec318a2c42ac" alt=""><figcaption></figcaption></figure>

2. Existing relayer account – users can add one of previously added Relayer Accounts.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FZNEZ48sFEOpA4QwV1ioL%2Fimage.png?alt=media&#x26;token=bd511886-276f-4a8c-a463-cfd3b55af049" alt=""><figcaption></figcaption></figure>

3. New relayer account – the account can be added directly from this form.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FfQ7onLdN5CFlmpoHNRc9%2Fimage.png?alt=media&#x26;token=0839ab70-37ef-475c-93e5-7a082fce4f92" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
*Note*: Make sure the selected account is funded, the account has hbar balance sufficient to finance on-chain operations required by the policy workflows.
{% endhint %}

## 2. Viewing <a href="#id-2.-viewing" id="id-2.-viewing"></a>

### 2.1 Document to account associations <a href="#id-2.1-document-to-account-associations" id="id-2.1-document-to-account-associations"></a>

Document view shows which Relayer Account is associated with it.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FiZ0sT4X07rIKa50AQOLy%2Fimage.png?alt=media&#x26;token=875c30d5-8dce-4d67-9ccc-caf32cbbcd49" alt=""><figcaption></figcaption></figure>

### 2.2 Standard Registry (SR) functionality <a href="#id-2.2-standard-registry-sr-functionality" id="id-2.2-standard-registry-sr-functionality"></a>

Standard Registry can view all Relayer Accounts and balances for all users operating in its domain.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2Fe6A46SP9GSFpgCixygAC%2Fimage.png?alt=media&#x26;token=2683de56-7398-4b7d-85f6-b933b8d1a644" alt=""><figcaption></figcaption></figure>

## 3. Tokens <a href="#id-3.-tokens" id="id-3.-tokens"></a>

Unless the policy is configured to send minted tokens to a specific account, tokens minted under Relayer Account configuration will be sent to the Relayer Account associated with the VC document on the basis of which the mint operation has been triggered.

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FOaCtPmSRTZrsq0zPtpnS%2Fimage.png?alt=media&#x26;token=a7eea43c-cce3-445b-a975-e75c782951ed" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3006114282-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXVOaWpJKxLZf1Tee9eCO%2Fuploads%2FFEvOiGt49tizxzDdcAeY%2Fimage.png?alt=media&#x26;token=f180f1c4-a816-4496-8f27-ba817368b519" alt=""><figcaption></figcaption></figure>
