Skip to main content
POST
/
v0
/
submit-intent
Submit a signed intent
curl --request POST \
  --url https://1click.chaindefuser.com/v0/submit-intent \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "type": "swap_transfer",
  "signedData": {
    "payload": {
      "message": "<string>",
      "nonce": "<string>",
      "recipient": "<string>",
      "callbackUrl": "<string>"
    },
    "public_key": "<string>",
    "signature": "<string>",
    "standard": "nep413"
  }
}
'
{
  "intentHash": "44XpLRAuZKoVGs9T4qbSNv33MDKMePPAibA52geVLWFw",
  "correlationId": "550e8400-e29b-41d4-a716-446655440000"
}

Authorizations

X-API-Key
string
header
required

API key for partner authentication (recommended)

Body

application/json
type
enum<string>
required

The type of intent action

Available options:
swap_transfer
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

Successfully submitted intent

intentHash
string
required

The hash of the submitted intent

Example:

"44XpLRAuZKoVGs9T4qbSNv33MDKMePPAibA52geVLWFw"

correlationId
string
required

Unique identifier for tracing this request

Example:

"550e8400-e29b-41d4-a716-446655440000"