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 theusePresignatures 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 optionalsignatureApprovalMemo so the user sees a short description during the approval flow. It is supported in:
portal.request()— addsignatureApprovalMemoto any signing method (eth_sendTransaction,personal_sign,sol_signAndSendTransaction, etc.).portal.sendAsset(chain, params)— includesignatureApprovalMemoin theparamsobject. See Send tokens.portal.rawSign(curve, param, options)— pass an optional third argument with the memo.
Raw Requests with the Provider
Estimating Gas
By default, Portal will estimate and populate thegas 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.