Skip to main content
POST
/
v0
/
auth
/
authenticate
Authenticate user with signed data
curl --request POST \
  --url https://1click.chaindefuser.com/v0/auth/authenticate \
  --header 'Content-Type: application/json' \
  --data '
{
  "signedData": {
    "payload": {
      "message": "<string>",
      "nonce": "<string>",
      "recipient": "<string>",
      "callbackUrl": "<string>"
    },
    "public_key": "<string>",
    "signature": "<string>",
    "standard": "nep413"
  }
}
'
{
  "accessToken": "<string>",
  "refreshToken": "<string>",
  "expiresIn": 123,
  "refreshExpiresIn": 123
}

Body

application/json
signedData
object
required

Assuming wallets want to interact with Intents protocol, besides preparing the data in a certain form, they have to have the capability to sign raw messages (off-chain signatures) using an algorithm we understand. This enum solves that problem.

For example, because we support ERC-191 and know how to verify messages with that standard, we can allow wallets, like Metamask, sign messages to perform intents without having to support new cryptographic primitives and signing standards.

Response

accessToken
string
required

JWT access token for API calls

refreshToken
string
required

JWT refresh token for getting new access tokens

expiresIn
number
required

Access token expiration time in seconds

refreshExpiresIn
number
required

Refresh token expiration time in seconds