> For the complete documentation index, see [llms.txt](https://docs.safle.com/safleid/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.safle.com/safleid/safleid/safleids-technology/data-flow-and-interactions.md).

# Data Flow and Interactions

SafleID contracts are designed to facilitate various functionalities through a series of well-defined methods. Below is an explanation of the key functionalities provided by the SafleID system:<br>

### **Registration Functionalities (RegistrarMain Contract)**

1. **Register SafleID**: This method registers a SafleID corresponding to a provided wallet address.

   <pre class="language-solidity" data-overflow="wrap" data-full-width="false"><code class="lang-solidity"><strong>function registerSafleId(address _userAddress, string memory _safleId) public
   </strong>
   </code></pre>

   * **Parameters**: `_userAddress` - The address of the user. `_safleId` - The desired SafleID.
   * **Purpose**: Enables users to create a new SafleID linked to their wallet address.\ <br>
2. **Update SafleID**: This method updates an existing SafleID mapped to a wallet address.

   <pre class="language-solidity" data-overflow="wrap" data-full-width="true"><code class="lang-solidity">function updateSafleId(address _userAddress, string memory _newSafleId) public

   </code></pre>

   * **Parameters**: `_userAddress` - The address of the user. `_newSafleId` - The new SafleID to be updated.
   * **Purpose**: Allows users to change their existing SafleID to a new one.\ <br>
3. **Map Other Coins**: This method enables the linking of wallet addresses from other blockchains to the SafleID.

   <pre class="language-solidity" data-overflow="wrap" data-full-width="true"><code class="lang-solidity">function mapCoins(uint256 _indexnumber, string calldata _blockchainName, string calldata _aliasName) external returns (bool)

   </code></pre>

   * **Parameters**: `_indexnumber` - The index number for mapping. `_blockchainName` - The name of the blockchain. `_aliasName` - The alias for the coin.
   * **Purpose**: Facilitates multi-chain support by allowing users to map other blockchain addresses to their SafleID.\ <br>
4. **Register Coin Address**: This method links a wallet address on another blockchain to the SafleID.

   <pre class="language-solidity" data-overflow="wrap" data-full-width="true"><code class="lang-solidity">function registerCoinAddress(address _userAddress,uint256 _index, string calldata _address) external returns (bool)

   </code></pre>

   * **Parameters**: `_userAddress` - The address of the user. `_index` - The index for the coin. `_address` - The wallet address on the other blockchain.
   * **Purpose**: Allows users to link addresses from other blockchains to their SafleID.\ <br>
5. **Update Coin Address**: This method updates the address mapped to a SafleID on a specific blockchain.

   <pre class="language-solidity" data-overflow="wrap" data-full-width="true"><code class="lang-solidity">function updateCoinAddress(address _userAddress,uint256 _index, string calldata _address) external returns (bool)

   </code></pre>

   * **Parameters**: `_userAddress` - The address of the user. `_index` - The index for the coin. `_address` - The new wallet address.
   * **Purpose**: Enables users to update their linked addresses on other blockchains.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.safle.com/safleid/safleid/safleids-technology/data-flow-and-interactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
