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
  • How it Works
  • Resolve userIds
  • Takes userIds and returns a list of account addresses
  1. API

Resolver API

PreviousUser AuthenticationNextKernel Account API

Last updated 1 year ago

The Resolver API returns a wallet address for Twitter users, emails, phone numbers, and other user IDs.

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

How it Works

Input a Twitter user, email, phone number, or any other user_id and get a Patch Wallet address in return. It's that simple. The wallet is just like any other smart contract account and can store any tokens/NFTs.

The Resolver API does not require authentication.

userId

A userId 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]

Resolve userIds

Takes userIds and returns a list of account addresses

POST https://paymagicapi.com/v1/resolver

Takes userIds in the body seperated by "," and returns a list of account addresses.

E.g. twitter:elonmusk,github:torvalds,email:[email protected]

Headers

Name
Type
Description

Authorization*

String

Bearer Token

Request Body

Name
Type
Description

userIds*

String

a list of all the users separated by "," with no space

{
    "updatedAt":"2023-05-01T19:17:43.079Z",
    "users":
        [
            {
                "userId":"twitter:elonmusk",
                "accountAddress":"0x3A782C4B50CF4d82Ce489623E9204B8e4c6a133F"
            },
            {    
                "userId":"email:[email protected]",
                "accountAddress":"0x65b49E21e717f115AadD4cA820f75EA65B69581f"
            },
            {
                "userId":"tel:19198675309",
                "accountAddress":"0xf1F4500871b4F7334De2577D0661Ac57FC94523A"
            },
            {
                "userId":"github:torvalds",
                "accountAddress":"0xDb17D7D1E13cbA8277B8F5FF55FE2d4606251C36"
            }
        ]
}

To use,

check out our Postman collection here.

Web2 Providers

  • twitter

  • email

  • tel

  • github

App Providers

  • Get a wallet to embedded directly in your app. You control authentication.

  • Reach out on Discord