Signing Contracts

Learn how to sign a contract.

A signer can sign one of his contracts. You can sign a contract even if you don't have an account on the Mantle Platform. There are different ways to sign a contract:

  • Add a new signature to sign a contract
  • Reuse my last signature to sign a contract

🚧

Requirements

You need your API key to perform the actions on this page.

Sign a contract by performing a standard POST call with your API key in the header. Your API key must be valid for this to work. If you don't have an API key, follow this short tutorial to get one. Depending on the parameters you have in your POST call, you can sign a contract with the API key in two ways:


Add a new signature to sign a contract

Performing a sign POST call with the signature parameter will sign the contract with the signature in the parameter.

Let's try it out!

curl -X POST \
  'http://api.mantleblockchain.com/sealer/{{PRODUCT_ID}}/contracts/{{CONTRACT_ID}}/sign' \
  -H 'Accept: text/plain, application/json, text/json' \
  -H 'Content-Type: multipart/form-data' \
  -H 'x-api-key: {{API_KEY}}' \
  -F 'contract={{CONTRACT_FILE}}' \
  -F 'signature={{SIGNATURE_FILE}}' \
  -F 'reuseLastSignature=false'

Replace the following parameters:

{{PRODUCT_ID}}: Your Product id
{{CONTRACT_ID}}: The ID of the contract you are about to sign
{{API_KEY}}: The API key of the person signing the contract
{{CONTRACT_FILE}}: The contract file of the contract you are about to sign
{{SIGNATURE_FILE}}: The signature file you want to use to sign the contract

👍

Congratulations!

You've signed a contract in Sealer!

Reuse my last signature to sign a contract

Performing a sign POST call with the reuseLastSignature parameter set to true will sign the contract with the last signature used by that user. If this is the first contract that you are about to sign, it will return you an error.

Let's try it out!

curl -X POST \
  'http://api.mantleblockchain.com/sealer/{{PRODUCT_ID}}/contracts/sign/{{CONTRACT_ID}}' \
  -H 'Accept: text/plain, application/json, text/json' \
  -H 'Content-Type: multipart/form-data' \
  -H 'x-api-key: {{API_KEY}}' \
  -F 'contract={{CONTRACT_FILE}}' \
  -F 'reuseLastSignature=true'

Replace the following parameters:

{{PRODUCT_ID}}: Your Product id
{{CONTRACT_ID}}: The ID of the contract you are about to sign
{{API_KEY}}: The API key of the person signing the contract
{{CONTRACT_FILE}}: The contract file of the contract you are about to sign

👍

Congratulations!

You've signed a contract in Sealer!