Skip to main content

Signing

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. The Portal instance includes a number of helper functions to allow you to execute Provider requests without having to worry about encoding, request format, or what method to pass in your request. These helper functions allows you to easily sign and submit transactions, sign messages, and even sign typed data.

Signature approval memo

Clients can pass an optional signatureApprovalMemo so the user sees a short description during the approval flow. It is supported in:
  • portal.request() — add signatureApprovalMemo to any signing method (eth_sendTransaction, personal_sign, sol_signAndSendTransaction, etc.).
  • portal.sendAsset(chain, params) — include signatureApprovalMemo in the params object. See Send tokens.
  • portal.rawSign(curve, param, options) — pass an optional third argument with the memo.
Example: request with memo
Example: rawSign with memo

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:

Raw Requests with the Provider

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.