Comparing documents

Learn how to compare a local file of your contract, signature or template to the one in the blockchain.

Before signing a contract, or even when you receive a contract, you might want to verify the authenticity of the contract. With the power of blockchain, you can compare if the contract you are about to sign is the one that was given to you. You can also compare the authenticity of a template, or even the signatures of a signed contract. The comparison is done by comparing their fingerprints.

Here's a list of comparisons you can do:

  • Compare a contract to a contract on the blockchain
  • Compare a signature to all the signatures of a contract on the blockchain
  • Compare a signature to a signature on the blockchain
  • Compare a template to a template on the blockchain

🚧

Requirements

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


Comparing documents

Compare a contract to a contract on the blockchain

Compare a local contract file to a contract that is stored on the blockchain, 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.

🚧

Permissions

Requires Sealer Admin Role if you want to compare to any contract on the blockchain.
Requires Sealer User Role if you only want to compare your own contracts.

Let's try it out!

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

Replace the following parameters:

{{PRODUCT_ID}}: Your Product id
{{CONTRACT_ID}}: The ID of the contract which you want to compare
{{API_KEY}}: Your own API key
{{CONTRACT_FILE}}: The contract file you want to use for the comparison

πŸ‘

Congratulations!

You've compared a contract to a contract on the blockchain in Sealer!

Compare a signature to all the signatures of a contract on the blockchain

A contract might have multiple signatures. You can compare a signature file to all the signatures linked to 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.

🚧

Permissions

Requires Sealer Admin Role.

Let's try it out!

curl -X POST \
  'http://api.mantleblockchain.com/sealer/{{PRODUCT_ID}}/contracts/{{CONTRACT_ID}}/compare/signature' \
  -H 'Accept: text/plain, application/json, text/json' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: multipart/form-data' \
  -H 'x-api-key: {{API_KEY}}' \
  -F 'file={{SIGNATURE_FILE}}'

Replace the following parameters:

{{PRODUCT_ID}}: Your Product id
{{CONTRACT_ID}}: The ID of the contract on which you want to compare the signatures
{{API_KEY}}: Your own API key
{{SIGNATURE_FILE}}: The signature file you want to use for the comparison

πŸ‘

Congratulations!

You've compared a signature to the signatures of a contract on the blockchain in Sealer!

Compare a signature to a signature on the blockchain

Compare a signature to a signature stored on the blockchain 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.

🚧

Permissions

Requires Sealer Admin Role or Sealer User Role.

Let's try it out!

curl -X POST \
  'http://api.mantleblockchain.com/sealer/{{PRODUCT_ID}}/signatures/compare/{{SIGNATURE_ID}}' \
  -H 'Accept: text/plain, application/json, text/json' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: multipart/form-data' \
  -H 'x-api-key: {{API_KEY}}' \
  -F 'file={{SIGNATURE_FILE}}'

Replace the following parameters:

{{PRODUCT_ID}}: Your Product id
{{SIGNATURE_ID}}: The ID of the signature which you want to compare
{{API_KEY}}: Your own API key
{{SIGNATURE_FILE}}: The signature file you want to use for the comparison

πŸ‘

Congratulations!

You've compared a signature to signature on the blockchain in Sealer!

Compare a template to a template on the blockchain

Compare a template to a template stored on the blockchain 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.

🚧

Permissions

Requires Sealer Admin Role.

Let's try it out!

curl -X POST \
  'http://api.mantleblockchain.com/sealer/{{PRODUCT_ID}}/templates/compare/{{TEMPLATE_ID}}' \
  -H 'Accept: text/plain, application/json, text/json' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: multipart/form-data' \
  -H 'x-api-key: {{API_KEY}}' \
  -F 'file={{TEMPLATE_FILE}}'

Replace the following parameters:

{{PRODUCT_ID}}: Your Product id
{{TEMPLATE_ID}}: The ID of the template which you want to compare
{{API_KEY}}: Your own API key
{{TEMPLATE_FILE}}: The template file you want to use for the comparison

πŸ‘

Congratulations!

You've compared a template to template on the blockchain in Sealer!