> For the complete documentation index, see [llms.txt](https://docs.blockpi.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blockpi.io/build/api-reference/kaia/klay_encodeaccountkey.md).

# kaia\_encodeAccountKey

Encodes an account key using the Recursive Length Prefix (RLP) encoding scheme.

#### **Parameters**

| Name    | Type      | Description                                                                                                                                                              |
| ------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| keytype | QUANTITY  | Integer value indicating account key type. For the value of each account key type, see [Klaytn Docs](https://docs.klaytn.foundation/klaytn/design/accounts#account-key). |
| key     | JSON DATA | Account key object                                                                                                                                                       |

#### **Return Value**

| Type | Description             |
| ---- | ----------------------- |
| DATA | RLP encoded account key |

#### Example

{% code overflow="wrap" %}

```json
// Request to encode AccountKeyNil
curl -H "Content-Type: application/json" --data '{"jsonrpc": "2.0", "method": "kaia_encodeAccountKey", "params": [{"keyType": 0, "key": {}}], "id": 66}' http://kaia.blockpi.network/v1/rpc/your-api-key

// Result
{
    "id": 66,
    "jsonrpc": "2.0",
    "result": "0x80"
}
```

{% endcode %}
