Token Approval

POST /approve

This endpoint generates an unsigned transaction for approving token spending. The approval transaction lets a smart contract (or a specified sender address) spend a given amount of tokens on behalf of the recipient. If a sender is provided, the approval will be generated using that address (and only the ENSC asset type is allowed in that case). Otherwise, the recipient’s address is used.

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer <api_key>

Body

Name
Type
Description

recipient

string

The wallet address that will receive the approval.

assetType

string

The asset type, provided as an enum value (e.g., ENSC, USDC, USDT, etc.).

amount

number

The amount to approve.

sender

string

Optional. If provided, the approval will be generated using this address instead of the recipient. When provided, only ENSC is allowed as the asset type.

Example 1: Approval for Redeeming Assets (No Sender Provided)

Request

{
  "recipient": "0xRecipientAddressABC123",
  "assetType": "USDC",
  "amount": 50
}

Example 2: Approval for Transfers (Sender Provided)

Response

{
  "recipient": "0xRecipientAddressABC123",
  "sender": "0xSenderAddress987654",
  "assetType": "ENSC",
  "amount": 10
}

Last updated