> For the complete documentation index, see [llms.txt](https://docs.xrpl-commons.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xrpl-commons.org/cyphered-chat-on-xrpl/set-up-keys.md).

# Set up Keys

First, we need to get the public key of the person we want to chat with.\
\
To do so, we can go on the block explorer and look at the transactions the address has sent. From there, by looking at the raw transaction data, we can find their public key.\
\
Once we have their public key, we can use it to encrypt messages that only they can decrypt.

<figure><img src="/files/jZLgDHWdCwnczSujgatm" alt=""><figcaption></figcaption></figure>

Then we need to set up our wallet to cypher the message and send the tx

```typescript
import {Wallet} from "xrpl"

const receiverPubKey = "the public key from the explorer here"
const myWallet = Wallet.fromSeed("your seed here")
```
