Installation and usage of the platform

REST API: signing and validating messages in the blockchain

https://img.shields.io/badge/auth-required-orange.svg

The following methods of the addresses group are provided for signing and validating messages:

POST /addresses/sign/{address}

The method signs the string passed in the message field with the addressee {address} private key and then serializes it in base58 format.

Important

The addresses/sign method is not available when PKI is used, that is, when the node configuration file parameter node.crypto.pki.mode is set to ON. The method can be used in PKI test mode (node.crypto.pki.mode = TEST) or with PKI disabled (node.crypto.pki.mode = OFF).

The method returns the serialized string, the addressee’s public key and signature in the response.

Examples of a query and a response:

POST /addresses/verify/{address}

The method checks the signature of the message made by the {address}.

Examples of a query and a response:

POST /addresses/signText/{address}

The method signs the string passed in the message field with the private key of an {address}. Unlike the POST /`addresses/sign/{address} method, the string is passed in the original format.

Important

The addresses/signText method is not available when PKI is used, that is, when the node configuration file parameter node.crypto.pki.mode is set to ON. The method can be used in PKI test mode (node.crypto.pki.mode = TEST) or with PKI disabled (node.crypto.pki.mode = OFF).

Examples of a query and a response:

POST /addresses/verifyText/{address}

Checks the signature of the message made by the {address} via the POST method /addresses/signText/{address}.

Examples of a query and a response: