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.

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.

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:

The message, publicKey, signature fields in the request are mandatory. If the value in one of the fields is invalid, the method returns an error indicating this field, for example:

{'error': 108, 'message': 'invalid public key: I82TisHAE2vuEQuNQkGSdLau'}