Skip to main content
POST
/
clients
/
me
/
chains
/
{chain}
/
wallet
/
build-authorization-transaction
Build an EIP-7702 authorization transaction
curl --request POST \
  --url https://api.portalhq.io/api/v3/clients/me/chains/{chain}/wallet/build-authorization-transaction \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "signature": "<string>",
  "subsidize": true,
  "contractAddress": "<string>",
  "nonce": 123,
  "txNonce": 123,
  "to": "<string>",
  "value": "<string>",
  "data": "<string>",
  "gas": "<string>",
  "gasLimit": "<string>",
  "maxFeePerGas": "<string>",
  "maxPriorityFeePerGas": "<string>"
}
'
{
  "data": {
    "transaction": {
      "type": "<string>",
      "from": "<string>",
      "to": "<string>",
      "value": "<string>",
      "data": "<string>",
      "nonce": "<string>",
      "chainId": "<string>",
      "gas": "<string>",
      "gasLimit": "<string>",
      "maxFeePerGas": "<string>",
      "maxPriorityFeePerGas": "<string>",
      "authorizationList": [
        {}
      ]
    },
    "transactionHash": "<string>"
  },
  "metadata": {
    "authorization": {},
    "chainId": "<string>",
    "subsidized": true
  }
}

Authorizations

Authorization
string
header
required

Client API Key or Client Session Token (CST). Pass as a Bearer token in the Authorization header.

Path Parameters

chain
string
required

The blockchain chain identifier. Use either a friendly name or CAIP-2 format. When using CAIP-2 format in URLs, ensure the colon (:) is URI-encoded as %3A.

Supported chains:

  • ethereum (eip155:1)
  • sepolia (eip155:11155111)
  • base (eip155:8453)
  • base-sepolia (eip155:84532)
  • polygon (eip155:137)
  • polygon-mumbai (eip155:80001)
  • celo (eip155:42220)
  • celo-alfajores (eip155:44787)
  • monad-testnet (eip155:10143)
  • solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp)
  • solana-devnet (solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1)
  • tron (tron:mainnet)
  • tron-nile (tron:nile)
  • tron-shasta (tron:shasta)
  • stellar (stellar:pubnet)
  • stellar-testnet (stellar:testnet)
  • bitcoin-segwit (bip122:000000000019d6689c085ae165831e93-p2wpkh)
  • bitcoin-segwit-testnet (bip122:000000000933ea01ad0ee984209779ba-p2wpkh)
  • bitcoin-p2wpkh (bip122:000000000019d6689c085ae165831e93-p2wpkh)
  • bitcoin-p2wpkh-testnet (bip122:000000000933ea01ad0ee984209779ba-p2wpkh)

Body

application/json
signature
string
required

Hex-encoded signature of the authorization hash.

subsidize
boolean

Whether Portal should subsidize gas.

contractAddress
string
nonce
txNonce

Transaction nonce.

to
string
value
string
data
string
gas
string
gasLimit
string
maxFeePerGas
string
maxPriorityFeePerGas
string

Response

Transaction built successfully

data
object
metadata
object