# Onboard

The [**Account Onboard**](https://github.com/coti-io/coti-contracts/blob/main/contracts/onboard/AccountOnboard.sol) contract is responsible for onboarding user accounts to the system, leveraging RSA public keys and AES encryption. During onboarding, the user's AES encryption key is emitted in an event in encrypted form. This contract interacts with the MPC Core library to retrieve the user key.

## Functions

```solidity
function onboardAccount(bytes calldata publicKey, bytes calldata signedEK)
```

## Events

```solidity
event AccountOnboarded(address indexed _from, bytes userKey1, bytes userKey2)
```


---

# Agent Instructions: 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.coti.io/coti-documentation/build-on-coti/tools/contracts-library/onboard.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.
