Patch Wallet API
Search
⌃K
▶

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. 1.
    ​ENS Resolver​
    1. 1.
      const address = await provider.resolveName(`elonmusk.twitter.usr.id`);
  2. 2.
    ​Resolver API​
    1. 1.
      curl --location 'https://paymagicapi.com/v1/resolver' \
      --header 'Content-Type: text/plain' \
      --data-raw '{
      "userIds": "twitter:elonmusk,email:[email protected],tel:19198675309,github:torvalds"
      }'

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:[email protected]) and returns a wallet address for them on a given chain (matic:0xabc...123).
​
​
Example userIds:

✍️ 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.
You'll need to authenticate first and then can send transactions like:
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 and used at the paymagicapi.com hostname.
https://paymagicapi.com
If you have questions, please reach out on Discord.

Resources

Create an API access token and authenticate your API requests.
Learn about the API's error codes and how to handle them.