Skip to main content
POST
/
v1
/
sign
Sign a transaction or message by chain
curl --request POST \
  --url https://mpc-client.portalhq.io/v1/sign \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "share": "eyJjbG...",
  "method": "eth_sendTransaction",
  "params": {
    "value": "0x01",
    "from": "",
    "to": "0xdFd8302f44727A6348F702fF7B594f127dE3A902",
    "data": ""
  },
  "rpcUrl": "https://api.portalhq.io/rpc/v1/eip155/10143",
  "chainId": "eip155:10143"
}
'
{
  "data": "0xf7a6a07fa599db56fca50fa1202670b59054e7ed452ea57b3f5b43148b8bdb165beb3a4b0fd532162a1f0fd475de1a9ecd07c95186f7a0856ce1bffa45e3acc91b"
}

Authorizations

Authorization
string
header
required

Client API Key or Client Session Token

Headers

Idempotency-Key
string

A unique key to ensure the request is processed only once. If the same key is sent with an identical body, a 409 is returned. If the same key is sent with a different body, a 422 is returned.

Body

application/json

Request body for signing a transaction or message by chain.

method
string
required

The signer RPC method (e.g. personal_sign, eth_sendTransaction, sol_signAndSendTransaction).

params
required

The parameters for the RPC method as a JSON object or array (e.g. {"value": "0x01", "from": "", "to": "0x...", "data": ""}).

share
string
required

The MPC share for the relevant curve.

chainId
string
required

The blockchain network as a CAIP-2 chain ID (e.g. eip155:10143).

to
string
required

The recipient's address.

rpcUrl
string
required

The node provider RPC URL.

metadataStr
string

Optional metadata string for the transaction.

sponsorGas
boolean

Set to false to opt out of gas sponsorship for Account Abstraction clients. Defaults to true when omitted.

presignature
string

The data value from a presign response. Omit for standard (non-presigned) signing.

Response

Signed successfully

Response containing the signed data.

data
string
required

The signed data as a hex string.