Skip to main content
This example screen displays how the Portal Provider interacts with the MPC wallet and the blockchain. The Provider has an input box to set a toAddress for the transaction of sending 0.001 ETH from our MPC wallet. The Provider then receives a signed transaction from our mobile MPC library and submits that to chain using the configured RPC url.
Ensure you have set the gateway URL correctly with Infura or Alchemy when you initialize the Portal class.

Improving signing performance

You can reduce signing latency for EVM transactions by enabling presignatures. The SDK will then pre-compute part of the MPC signing flow in the background and use that data when the user signs, without any change to your code. Enable it via the usePresignatures feature flag when creating your Portal instance. See Feature flags for details.

Signing a User Operation

If your client uses Account Abstraction, you can sign an ERC-4337 User Operation using the eth_signUserOperation method. This signs the User Operation without submitting it on-chain, returning the signature directly.
User Operation Parameters: You can also pass a signature approval memo and control gas sponsorship:

Signing a Solana Transaction

You can use our provider just like you do with Ethereum with Solana. Simply specify the method and the chainId for Solana. This example uses solana/web3.js to construct a transaction object to sign and pass to the multi-chain provider.

Solana Provider Methods

  • sol_signMessage
  • sol_signTransaction
  • sol_signAndSendTransaction
  • sol_signAndConfirmTransaction

Raw sign

You can now utilize our SDK to generate raw signatures that are generated using the underlying key share without adding any chain specific formatting to the signature. This effectively unlocks your ability to use the Portal SDK with any chain that uses SECP256K1 or ED25519.

Estimating Gas

By default, Portal will estimate and populate the gas property in a transaction object if the property is undefined. To estimate the gas value manually use the eth_estimateGas RPC call and pass in your transaction as the parameter.
And now you are signing transactions with Portal! 🚀 Next, we’ll explore how to simulate a transaction so that you can create smoother experiences for your users.