# Overview

Welcome to the Patch Wallet Developer Documentation.

This documentation provides the API references and information to use all Patch APIs.

## Quick Start

One API call to find a Web3 wallet address for anyone on the internet. 🌎

### 🔍 Get wallet address for a user\_id

To return a wallet address for **\******any*****\*** Twitter user, email, phone number, or other user ID, use:

1. [ENS Resolver](https://docs.patchwallet.com/api/ens-resolver-usr.id)
   1. ```
      const address = await provider.resolveName(`elonmusk.twitter.usr.id`);
      ```
2. [Resolver API](https://docs.patchwallet.com/api/resolver-api)
   1. ```powershell
      curl --location 'https://paymagicapi.com/v1/resolver' \
      --header 'Content-Type: text/plain' \
      --data-raw '{
          "userIds": "twitter:elonmusk,email:ur@mom69.com,tel:19198675309,github:torvalds"
      }'
      ```

[View examples on Postman](https://www.postman.com/paymagic/workspace/public-patch-wallet-api)

#### User IDs

Patch wallets function around the concept of a User ID, which gets you a unique account address.

A User ID is a unique provider and username ( like `twitter:elonmusk`, `tel:19198675309`, `email:test@gmail.com`) and returns a wallet address for them on a given chain (`matic:0xabc...123`).&#x20;

![](https://1077192072-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbmEIBx4wSMWwZFUO6eE1%2Fuploads%2FEeNWhGrPGzcLRg77Ca7C%2Fimage.png?alt=media\&token=55d1c60a-b1d0-48ec-a730-33e3e0dcdc6c)

**Example userIds:**

* `twitter:elonmusk`
* `github:torvalds`
* `tel:19198675309`
* `email:your@mom.com`

### ✍️ Send a transaction or sign a message

To send a transaction or sign a message for a given Patch wallet, use the [Kernel Account API](https://docs.patchwallet.com/api/kernel-account-api).

You'll need to [authenticate](https://docs.patchwallet.com/api/app-authentication) first and then can send transactions like:

```powershell
curl --location 'https://paymagicapi.com/v1/kernel/tx' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{access_token}}' \
--data '{
    "userId": "twitter:elonmusk",
    "chain": "matic",
    "to": ["0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"],
    "value": ["0"],
    "data": ["0xa9059cbb000000000000000000000000a969E3D8b4A376a59B15C70f29Deb08fbFab07810000000000000000000000000000000000000000000000000000000000002710"],
    "auth": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJhdXRoZW50aWNhdGVkIiwiZXhwIjoxNjc5NDYwODQ2LCJzdWIiOiI4YTFlODg2YS0xNmRjLTRlM2ItODg5MS04MWFiMjk3M2U5NjIiLCJlbWFpbCI6Imdlc2FnYTM0NzlAa2F1ZGF0LmNvbSIsInBob25lIjoiIiwiYXBwX21ldGFkYXRhIjp7InByb3ZpZGVyIjoiZW1haWwiLCJwcm92aWRlcnMiOlsiZW1haWwiXX0sInVzZXJfbWV0YWRhdGEiOnt9LCJyb2xlIjoiYXV0aGVudGljYXRlZCIsImFhbCI6ImFhbDEiLCJhbXIiOlt7Im1ldGhvZCI6Im90cCIsInRpbWVzdGFtcCI6MTY3OTQ1NzI0Nn1dLCJzZXNzaW9uX2lkIjoiMGRhMmQ4YmUtY2FiYS00MGRhLWE5ZTctOTliMjNlZmE4ZWExIn0.lfjj6YbJoCRSXRgW9vPg6Un0ck0NiBH6S97_gXUGKUE"
}'
```

### API Hostname

This API is maintained by [Paymagic Labs](https://paymagic.xyz/) and used at the `paymagicapi.com` hostname.

```bash
https://paymagicapi.com
```

If you have questions, please reach out on [Discord](https://discord.gg/EAFPKSRyth).

### Resources <a href="#authentication-and-rate-limiting" id="authentication-and-rate-limiting"></a>

<table data-view="cards"><thead><tr><th data-type="content-ref"></th><th></th></tr></thead><tbody><tr><td><a href="app-authentication">app-authentication</a></td><td>Create an API access token and authenticate your API requests.</td></tr><tr><td><a href="errors">errors</a></td><td>Learn about the API's error codes and how to handle them.</td></tr></tbody></table>
