sign
Signs a transaction or message using the MPC enclave.
This function sends a request to the MPC enclave to sign a transaction or message based on the provided parameters. It requires a valid client API key, DKG data, method, parameters, RPC URL, chain ID, and metadata.
Return
The signature string contained in a JSON object returned by the MPC enclave.
Parameters
The API key for authenticating with the MPC service. Must not be null.
(Optional) The host address of the MPC service. Currently not used in the function's logic.
The key shares. Must not be null.
The method to be called (e.g., "eth_sendTransaction"). Must not be null.
The parameters for the specified method, typically in JSON format. Must not be null.
The URL of the RPC endpoint to interact with the blockchain. Must not be null.
The ID of the blockchain network (e.g., "1" for Ethereum Mainnet). Must not be null.
Additional metadata associated with the signing request. Must not be null.
Throws
if any of the following are null: clientApiKey, dkgData, method, params, rpcUrl, chainId, metadata.
if there is an error during the HTTP request to the enclave.