Safeheron API: MPC Signs Custom Data, Agile & Swift
Safeheron V1.1.4 has gone live on Jan 20, 2022. We have opened our underlying MPC signing feature to all Safeheron users.
Now, our users can freely apply it as per your needs. Time to get into more interactions safely.
Safeheron users can flexibly set up their own need-to-sign data hash. Through Safeheron API, users can apply MPC Sign transaction, that is, to sign the data hash via MPC.
Therefore, Safeheron users can transfer assets on blockchains which haven't been supported by Safeheron platform and can also interact with DeFi protocols.
How to create a transaction & sign it? (Take ETH as an example)
(1) Prepare needed transaction data: from, to, nonce, gasLimit, gasPrice, value, data(input)
(2) Serialize the above data to get the raw transaction data: rawTransaction = RLP（from, to, nonce, gasLimit, gasPrice, value, data）
(3) Compute raw transaction hash: needSignHash = sha3（rawTransaction）
(4) MPC Sign the hash: Call Safeheron API to execute MPC Sign，sign the transaction and get the sig
(5) Get the signed raw transaction: signedRawTransaction = RLP（from, to, nonce, gasLimit, gasPrice, value, data, sig）
(6) Compute the transaction hash locally: txHash = sha3（signedRawTransaction）
(7) Submit the transaction to node: rpc.submitTransaction（signedRawTransaction）
Upgrade to Safeheron V1.1.4, experience MPC Sign right away.