Installation and usage of the platform

REST API: validation of addresses and aliases of network participants

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

The following methods of the addresses group are provided for validating addresses and aliases on the network:

GET /addresses/validate/{addressOrAlias}

Validation of a given recipient or its alias {addressOrAlias} on the blockchain network of a working node.

Response example:

GET /addresses/validate/{addressOrAlias}:
{
  addressOrAlias: "3HSVTtjim3FmV21HWQ1LurMhFzjut7Aa1Ac",
  valid: true
}

POST /addresses/validateMany

Validation of multiple addresses or aliases passed to the addressesOrAliases field as an array. The information in the response for each address is identical to the GET /addresses/validate/{addressOrAlias} method response.

Examples of query and response for one address, one existing and one non-existing alias:

POST /addresses/validateMany:

Query:

{
  addressesOrAliases: [
    "3HSVTtjim3FmV21HWQ1LurMhFzjut7Aa1Ac",
    "alias:T:asdfghjk",
    "alias:T:1nvAliDAl1ass99911%^&$$$ "
  ]
}

Response:

{
  validations: [
    {
      addressOrAlias: "3HSVTtjim3FmV21HWQ1LurMhFzjut7Aa1Ac",
      valid: true
    },
    {
      addressOrAlias: "alias:T:asdfghjk",
      valid: true
    },
    {
      addressOrAlias: "alias:T:1nvAliDAl1ass99911%^&$$$ ",
      valid: false,
      reason: "GenericError(Alias should contain only following characters: -.0123456789@_abcdefghijklmnopqrstuvwxyz)"
    }
  ]
}
See also