Skip to main content
Portal’s Enclave MPC API supports token delegation operations across EVM and Solana chains. This guide covers building delegation transactions via the Client API and signing them with the Enclave MPC API.

Overview

The delegation endpoints allow you to:
  • Approve other addresses to spend tokens on behalf of your wallet
  • Revoke existing delegations to remove spending permissions
  • Check status of active delegations and balances
  • Transfer tokens as a delegate from another address

Prerequisites

Before using delegation operations, ensure you have:

Approving Delegations

Approving a delegation is a two-step process: build the unsigned transaction with the Client API, then sign and submit it with the Enclave MPC API.

Step 1: Build the Approval Transaction

Use POST /api/v3/clients/me/chains/:chain/assets/:token/approvals to build an unsigned approval transaction. For complete API documentation, see the Client API reference.
curl --request POST \
  --url 'https://api.portalhq.io/api/v3/clients/me/chains/eip155:11155111/assets/USDC/approvals' \
  --header 'Authorization: Bearer [clientApiKey|clientSessionToken]' \
  --header 'Content-Type: application/json' \
  --data '{
  "delegateAddress": "0xc74c4f7e330a62e0023f50b2b7b0491878fb4aa4",
  "amount": "0.01"
}'
The response includes a transactions array with unsigned transaction objects:
{
	"transactions": [
		{
			"from": "0xa3e533c3df3c7cd9189c4578747c4448a295d22b",
			"to": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
			"data": "0x095ea7b3000000000000000000000000c74c4f7e330a62e0023f50b2b7b0491878fb4aa40000000000000000000000000000000000000000000000000000000000002710"
		}
	],
	"metadata": {
		"chainId": "eip155:11155111",
		"ownerAddress": "0xa3e533c3df3c7cd9189c4578747c4448a295d22b",
		"delegateAmount": "0.01",
		"delegateAddress": "0xc74c4f7e330a62e0023f50b2b7b0491878fb4aa4",
		"tokenSymbol": "USDC"
	}
}

Step 2: Sign and Submit the Transaction

Use the Enclave MPC API to sign and submit the transaction returned in Step 1. For complete API documentation, see the Enclave MPC API reference.
curl --request POST \
  --url https://mpc-client.portalhq.io/v1/sign \
  --header 'Authorization: Bearer [clientApiKey|clientSessionToken]' \
  --header 'Content-Type: application/json' \
  --data '{
  "share": "SECP256K1.share",
  "method": "eth_sendTransaction",
  "params": {
    "from": "0xc74c4f7e330a62e0023f50b2b7b0491878fb4aa4",
    "to": "0xc74c4f7e330a62e0023f50b2b7b0491878fb4aa4",
    "data": "0x23b872dd000000000000000000000000a3e533c3df3c7cd9189c4578747c4448a295d22b000000000000000000000000c74c4f7e330a62e0023f50b2b7b0491878fb4aa40000000000000000000000000000000000000000000000000000000000002710",
    "value": "0x0"
  },
  "rpcUrl": "https://api.portalhq.io/rpc/v1/eip155/11155111",
  "chainId": "eip155:11155111"
}'

Checking Delegation Status

Use GET /api/v3/clients/me/chains/:chain/assets/:token/delegations to check active delegations and token balances. This is a read-only call that does not require signing. For complete API documentation, see the Client API reference.
curl --request GET \
  --url 'https://api.portalhq.io/api/v3/clients/me/chains/eip155:11155111/assets/USDC/delegations?delegateAddress=0xc74c4f7e330a62e0023f50b2b7b0491878fb4aa4' \
  --header 'Authorization: Bearer [clientApiKey|clientSessionToken]'
The response includes the token balance and a list of active delegations:
{
	"balance": "0.0",
	"balanceRaw": "0",
	"chainId": "eip155:11155111",
	"delegations": [
		{
			"address": "0xc74c4f7e330a62e0023f50b2b7b0491878fb4aa4",
			"delegateAmount": "0.01",
			"delegateAmountRaw": "10000"
		}
	],
	"token": "USDC",
	"tokenAddress": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238"
}

Revoking Delegations

Revoking follows the same two-step pattern: build the revocation transaction, then sign and submit it.

Step 1: Build the Revocation Transaction

Use POST /api/v3/clients/me/chains/:chain/assets/:token/revocations to build an unsigned revocation transaction. For complete API documentation, see the Client API reference.
curl --request POST \
  --url 'https://api.portalhq.io/api/v3/clients/me/chains/eip155:11155111/assets/USDC/revocations' \
  --header 'Authorization: Bearer [clientApiKey|clientSessionToken]' \
  --header 'Content-Type: application/json' \
  --data '{
  "delegateAddress": "0xc74c4f7e330a62e0023f50b2b7b0491878fb4aa4"
}'
The response structure matches the approval response, returning transactions (EVM) or encodedTransactions (Solana).

Step 2: Sign and Submit the Transaction

Sign and submit the revocation transaction using the same Enclave MPC signing flow shown in the approval step. For complete API documentation, see the Enclave MPC API reference.
Always revoke unused delegations after completing operations to minimize security risks.

Transferring as a Delegate

Once an owner has approved your address as a delegate, you can transfer tokens from their wallet to a destination address.

Step 1: Build the Transfer Transaction

Use POST /api/v3/clients/me/chains/:chain/assets/:token/delegations/transfers to build an unsigned transfer-as-delegate transaction. For complete API documentation, see the Client API reference.
curl --request POST \
  --url 'https://api.portalhq.io/api/v3/clients/me/chains/eip155:11155111/assets/USDC/delegations/transfers' \
  --header 'Authorization: Bearer [clientApiKey|clientSessionToken]' \
  --header 'Content-Type: application/json' \
  --data '{
  "fromAddress": "0xa3e533c3df3c7cd9189c4578747c4448a295d22b",
  "toAddress": "0xc74c4f7e330a62e0023f50b2b7b0491878fb4aa4",
  "amount": "0.01"
}'
The response includes the unsigned transaction(s) along with metadata about the transfer:
{
	"transactions": [
		{
			"from": "0xc74c4f7e330a62e0023f50b2b7b0491878fb4aa4",
			"to": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
			"data": "0x23b872dd000000000000000000000000a3e533c3df3c7cd9189c4578747c4448a295d22b000000000000000000000000c74c4f7e330a62e0023f50b2b7b0491878fb4aa40000000000000000000000000000000000000000000000000000000000002710"
		}
	],
	"metadata": {
		"amount": "0.01",
		"amountRaw": "10000",
		"chainId": "eip155:11155111",
		"delegateAddress": "0xc74c4f7e330a62e0023f50b2b7b0491878fb4aa4",
		"ownerAddress": "0xa3e533c3df3c7cd9189c4578747c4448a295d22b",
		"recipientAddress": "0xc74c4f7e330a62e0023f50b2b7b0491878fb4aa4",
		"tokenAddress": "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238",
		"tokenSymbol": "USDC",
		"tokenDecimals": 6
	}
}

Step 2: Sign and Submit the Transaction

Sign and submit the transfer transaction using the same Enclave MPC signing flow shown in the approval step. For complete API documentation, see the Enclave MPC API reference.
Delegation Roles: fromAddress is the token owner who approved the delegation. Your wallet (the delegate) signs the transaction to transfer tokens from the owner to the toAddress recipient.

Supported Networks

Delegations work on all Portal-supported EVM and Solana chains:
  • EVM: Ethereum, Polygon, Base, Arbitrum, Optimism, and all other EVM-compatible chains
  • Solana: Solana Mainnet and Devnet
For a complete list, see Blockchain Support.

Next Steps