Patch Wallet API
  • 👋Welcome to the Patch Docs
  • API
    • ▶️Overview
    • Go to Postman Collection
    • App Authentication
    • User Authentication
    • Resolver API
    • Kernel Account API
    • ENS Resolver (usr.id)
    • Networks Supported
    • Errors
  • Other
    • Admin
      • 🚧 🚧 🚧 Patch Maintenance 🚧 🚧 🚧
    • Other
      • 🏗️Request for Projects
      • Base Account API [DEPRECATED]
      • DustSweeper API [WIP]
      • Safe Account API
        • Accounts
        • Send Transactions
        • View Transaction Status
  • Protocol
Powered by GitBook
On this page
  • Quick Start
  • 🔍 Get wallet address for a user_id
  • ✍️ Send a transaction or sign a message
  • API Hostname
  • Resources
  1. API

Overview

PreviousWelcome to the Patch DocsNextApp Authentication

Last updated 1 year ago

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. const address = await provider.resolveName(`elonmusk.twitter.usr.id`);
    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:

  • twitter:elonmusk

  • github:torvalds

  • tel:19198675309

  • email:[email protected]

✍️ Send a transaction or sign a message

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

https://paymagicapi.com

Resources

To send a transaction or sign a message for a given Patch wallet, use the .

You'll need to first and then can send transactions like:

This API is maintained by and used at the paymagicapi.com hostname.

If you have questions, please reach out on .

▶️
ENS Resolver
Resolver API
View examples on Postman
Kernel Account API
authenticate
Paymagic Labs
Discord

Create an API access token and authenticate your API requests.

Learn about the API's error codes and how to handle them.

App Authentication
Errors