Skip to main content
POST
/
v0
/
generate-intent
Generate an intent for signing
curl --request POST \
  --url https://1click.chaindefuser.com/v0/generate-intent \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "type": "swap_transfer",
  "standard": "nep413",
  "signerId": "user.near",
  "depositAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0"
}
'
{
  "intent": {
    "standard": "nep413",
    "payload": {
      "message": "<string>",
      "nonce": "<string>",
      "recipient": "<string>",
      "callbackUrl": "<string>"
    }
  },
  "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
standard
enum<string>
required

The standard used for signing the intent

Available options:
nep413,
erc191,
raw_ed25519,
webauthn,
ton_connect,
sep53,
tip191
Example:

"nep413"

signerId
string
required

The account ID of the signer

Example:

"user.near"

depositAddress
string
required

The deposit address from the quote response

Example:

"0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0"

Response

Successfully generated intent payload

intent
object
required

Narrowed MultiPayload union with only 'standard' and 'payload' properties exposed

correlationId
string
required

Unique identifier for tracing this request

Example:

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