Clients
Create the client’s wallet
POST https://mpc-client.portalhq.io/v1/generate
This endpoint generates MPC shares for both SECP256K1 (EVM, etc) and ED25519 (Solana, XRP, etc) curves (a Portal wallet).
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
You can leave the request body empty.Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 200: OK Success
- 400: Bad Request
Send the client’s assets
POST https://mpc-client.portalhq.io/v1/assets/send
This endpoint allows you to easily send a token the client holds to another address.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
share* | String | The MPC share generated from “Create Wallets” for a specific curve. |
chain* | String CAIP-2 Chain ID or one of:
| The blockchain network. |
to* | String | The recipient’s address. |
token* | String | The token contract address (for ERC20 tokens on EVM chains) or the mint
address (for Solana SPL tokens). You can also use “USDC” or “USDT” for
the respective tokens. For native token transfers, use
"NATIVE". |
amount* | String | The amount of tokens to send (“0.1” is 0.1 USDC) |
rpcUrl* | String | The RPC node provider URL that the transaction will be submitted through. Not required for Solana or Solana Devnet. |
nonce | String | The hex string of the nonce to set on the transaction (“0x01” sets the nonce of the transaction to 1). Note that the hex string needs to include the “0x” and for single digits to include a leading zero like “0x0”. |
metadataStr | String | Optional metadata string for the transaction. |
When submitting multiple transactions for a single client in quick succession (or in parallel), each transaction may initially have the same nonce if the blockchain hasn’t processed the earlier ones yet. This can cause errors, as the RPC gateway interprets identical nonces as attempts to overwrite transactions in the mempool.To prevent this, track the nonce in your application and increment it manually for each transaction sent to the
Send Assets endpoint, ensuring unique nonces for concurrent requests.Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 200: OK Success
- 400: Bad Request
Sign a transaction or message by chain
POST https://mpc-client.portalhq.io/v1/sign
This endpoint allows you to sign a transaction or message by chain.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
method* | String | The signer RPC method (e.g. “personal_sign”, “eth_sendTransaction”, “sol_signAndSendTransaction”, etc). |
params* | String | A JSON stringified array of the parameters for the RPC method (e.g. ”[\“test\”]”). |
share* | String | The MPC share generated from “Create Wallets” for a specific curve. |
chainId* | String | The blockchain network (a CAIP-2 chain ID like “eip155:10143” for Monad Testnet). |
to* | String | The recipient’s address. |
rpcUrl* | String | The node provider RPC URL. |
metadataStr | String | Optional metadata string for the transaction. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 200: OK Success
- 400: Bad Request
Sign a transaction or message by curve
POST https://mpc-client.portalhq.io/v1/raw/sign/:curve
This endpoint allows you to sign a raw message by curve.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Path Parameters
| Name | Type | Description |
|---|---|---|
curve* | String | The curve you want to use (e.g. SECP256K1 for EVM chains and ED25519 for Solana). |
Body Parameters
| Name | Type | Description |
|---|---|---|
params* | String | A hex string of the digest to sign without the leading 0x (e.g. "params": "7369676e2074686973"). |
share* | String | The MPC share generated from “Create Wallets” for a specific curve. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 200: OK Success
- 400: Bad Request
Back up the client’s wallet
POST https://mpc-client.portalhq.io/v1/backup
This endpoint allows you to create backup shares for your wallet.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
generateResponse* | JSON | The response body from “Create Wallets”. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 200: OK Success
- 400: Bad Request
Recover the client’s wallet
POST https://mpc-client.portalhq.io/v1/recover
This endpoint allows you to recover shares for your wallet using your backup shares.
Headers
| Name | Type | Description |
|---|---|---|
| Authorization* | String | Bearer <Client API Key> |
| Content-Type* | String | application/json |
Body Parameters
| Name | Type | Description |
|---|---|---|
backupResponse* | JSON | The response body from “Back Up Wallets”. |
Example Request
Be sure to replace the[token] with either a Client API Key or a Client Session Token.
Example Response
- 200: OK Success
- 400: Bad Request