Skip to main content

sign

Signing Process

  • 1-5 - Proceed with member login.
  • 5-8 - If the member's MPC wallet does not exist, create a new wallet for the member.
  • 9-11 - If the wallet exists but the client does not have the MPC key shard or the password used for MPC key generation, recover it.
  • 12-13 - Create an object containing the transaction information and request a signature. The response will include the signed raw transaction.
  • 14 - Request WaaS to broadcast the signed transaction to the blockchain. Use the raw transaction received in the signature request.
  • 15 - If the transaction is successfully broadcasted, you will receive a receipt, which can be used to query the transaction information.

To sign a transaction, you need to encrypt the pvencstr, encryptDevicePassword, and wid values received in the Key generate response using a Secure-Channel. The process of signing a transaction and having it reflected in the blockchain network as a block is as follows:

  1. Transaction Creation
    The user creates the desired transaction and signs it. The signature verifies that the transaction is from the legitimate sender. Refer to Sign SDK API or Sign REST API for the required items for transaction creation.

  2. Transaction Signing
    WaaS supports the following Sign Types:

    • Personal Sign
    • Legacy Sign
    • EIP-1559 Sign
    • SignTypedDataV3
    • SignTypedDataV4
warning

For ease of development, WaaS service supports setting default values for Nonce and Gas required for transaction signing. However, this may cause conflicts at the time of actual blockchain reflection, so it is recommended to directly specify Gas and Nonce by querying them.

Sending Transaction

Reflecting the signed transaction on the blockchain

  1. JSON-RPC Call
    Use a JSON-RPC call to send the signed transaction to the web3 chain network. This submits the transaction to the node for inclusion in a block.
    WaaS provides an interface for JSON-RPC calls, which can be found in the API Reference.

  2. Transaction Verification and Block Inclusion
    The transaction requested via JSON-RPC is verified and included in the block, recording it on the blockchain.

  3. Transaction Result Confirmation
    The result and status of the transaction reflected in the block can be confirmed through JSON-RPC, allowing the user to check the success of the transaction.