API Quick Start
This quick start guide will get you up and running with the Portal MPC API.
Overview
The Enclave MPC API lives at mpc-client.portalhq.io
. This API allows you create, backup, and recover Portal MPC Wallets. It also allows you to sign messages and transactions for EVM and Solana chains.
The Enclave MPC API at mpc-client.portalhq.io
lets you create, backup, and recover Portal MPC wallets, and sign transactions for EVM and Solana chains. This guide gets you started quickly — see the Enclave MPC API Guide for details.
Authentication
Initialize the API with a Client API Key or Client Session Token via the Authorization: Bearer
header. You can get a test Client API Key from the Portal Admin Dashboard in the Settings
-> Test Client API Keys
section. Simply click the New +
button.

A modal will then be presented, allowing you to copy your test Client API Key. You can repeat this process as many times as you want to.
Create a wallet
Generate a wallet with the /v1/generate
endpoint:
You’ll receive wallet shares for SECP256K1
(EVM) and ED25519
(Solana) curves. Example response:
Confirm the shares are stored successfully
Next, store the generate response and confirm with Portal that you did so successfully with a PATCH
request. Pass in the id
values for each of the SECP256K1
and ED25519
objects.
Great work! Your Portal client's wallet is now all set up to both receive and send tokens.
Retrieve your wallet's addresses
To view the addresses of your Portal client (along with many other details), simply make a request to the Get Client Details endpoint.
Check out the Get Client Details API reference to learn about the other values that are returned, but for this guide we'll focus on the metadata.namespaces
property, as allows you to easily access your wallet's addresses on various blockchains.
Example Response
Receive testnet tokens
Next, we'll fund your wallet with testnet tokens. We will use the Client API Fund Wallet endpoint for this to get some ETH
on Ethereum Sepolia. If you need testnet tokens on other blockchains, we recommend checking out our Testnet Faucets doc.
Send tokens
Portal provides several ways to sign and submit transactions, but the simplest is to use the /v1/assets/send
endpoint.
EVM
There are a few request body parameters you will need to provide for this request:
share
The
/v1/generate
's response'sshare
property for theSECP256K1
object.
chain
The pretty chain (ie.
sepolia
) or the CAIP-2 chain identifier.
token
The token shorthand (ie.
ETH
orNATIVE
) or the token address of the token you want to send.
to
The destination address.
amount
The amount of the token you want to send with decimals applied.
rpcUrl
The RPC URL is the endpoint Portal uses to submit the transaction. Use Portal’s RPC URL to avoid signing up with a third-party provider.
The response of this request will include the transaction hash. You can search the transactionHash
on sepolia.etherscan.io to view the transaction details.
If your Portal client is using Account Abstraction, then transactionHash
is actually a User Operation hash. You can manually look up the user operation hash here.
Solana
Next, let's send tokens using Solana. The request will be very similar to the EVM request we just made, except that we need to use the ED25519
share from the generate response and solana-devnet
as our chain.
The response of this request will include the transaction hash. You can search the transactionHash
on solscan.io?cluster=devnet to view the transaction details.
You just created a Portal client, created their wallet, accessed their addresses, received testnet tokens, and sent tokens on both Ethereum Sepolia and Solana Devnet! 🎉
Next we recommend going through the complete Enclave MPC API guide where we go into much more detail.
Last updated
Was this helpful?