# Demo using UI

## 1. Overview

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://501642358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbKnJV8vV7zUxRwKIsJKg%2Fuploads%2Fgit-blob-bd2d1a8b3e773669dc3fd8531c90e6214c317d86%2Fimage.png?alt=media" 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://501642358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbKnJV8vV7zUxRwKIsJKg%2Fuploads%2Fgit-blob-8b14e993308841cdacbd74262674936456d0049d%2Fimage%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://501642358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbKnJV8vV7zUxRwKIsJKg%2Fuploads%2Fgit-blob-aaac397d9e73c9921ba7aa043dad517890ac2667%2Fimage.png?alt=media" 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://501642358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbKnJV8vV7zUxRwKIsJKg%2Fuploads%2Fgit-blob-73f751bb98a0821c34afd0081fb9b6586e4ea24c%2Fimage.png?alt=media" 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

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://501642358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbKnJV8vV7zUxRwKIsJKg%2Fuploads%2Fgit-blob-6eae8dda76104602510f8c4c202e56074c0d8e56%2Fimage.png?alt=media" 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

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

<figure><img src="https://501642358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbKnJV8vV7zUxRwKIsJKg%2Fuploads%2Fgit-blob-b2e919e90e9d987569b8a5386dfc02a9a4745c0b%2Fimage.png?alt=media" 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://501642358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbKnJV8vV7zUxRwKIsJKg%2Fuploads%2Fgit-blob-051a6ffab987ec588887d691a7bf7708261ceb93%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://501642358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbKnJV8vV7zUxRwKIsJKg%2Fuploads%2Fgit-blob-aed5c863c8008e6a9ab7f10a785b063b79c853c7%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://501642358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbKnJV8vV7zUxRwKIsJKg%2Fuploads%2Fgit-blob-bbd1eadfd61af1b73e62e41e17d302e640de5290%2Fimage%20(8).png?alt=media" 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

### 2.1 Document to account associations

Document view shows which Relayer Account is associated with it.

<figure><img src="https://501642358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbKnJV8vV7zUxRwKIsJKg%2Fuploads%2Fgit-blob-c25f677c3a31d4181986b8a7c9ab247c67d8e7bb%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

### 2.2 Standard Registry (SR) functionality

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

<figure><img src="https://501642358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbKnJV8vV7zUxRwKIsJKg%2Fuploads%2Fgit-blob-91b5ccda9b2085329c3b61d9b0999bafb202549a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## 3. Tokens

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://501642358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbKnJV8vV7zUxRwKIsJKg%2Fuploads%2Fgit-blob-4d98720e69b9d5fbba3ecba6bb254003bdf8a64a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://501642358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbKnJV8vV7zUxRwKIsJKg%2Fuploads%2Fgit-blob-2659c73c82ff8a4629ad381ff1fc762dfaba03b8%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
