Parsec Service Contract

This is a universa smart contract that describes parsec-aware service allowing safe connection from the client side.

Technically, it is just any universa contract that contains the following section in state.data:

{
    // ...
    parsec: {
        serviceName: "Acme Free Silence",
        shortServiceName: "A-Free.Silence"
        serviceDescription: "Acme Inclusive Free Silence Platform",
        serviceKeyAddresses: [
            { address: string, isTest?: boolean }
            // ...
        ],
        // HTTP is strongly recommended for any non in-browser applications. Should
        // be a must for any B2B APIs. Only IP numbers are allowed in the host part:
        http: string[], // direct IP ones, like "http://123.22.11.10:82112"
        // HTTPS is supported only and solely because browsers limit access from the pags's JS
        // to direct http transactions, actually, opening the backdoor for CA/ICANN backed
        // attacks to used data.
        https: string[], // https urls for direct access from html pages like "https://d8rj471398y92.39ska.io:443"
        // other protocol urls to come
    }
}

Such contract, if approved, means that at the specified http and https urls there are parsec 1.2 (or 1.3) hosts, most likely 1.2+1.3, which can sign its session with one of the keys with listed address. If this secion is inclded in the registered UNS2 contract, then it is parsec.1.3 service, that could be accessible by UNS2 domain.

Note that contract could contain any additional data, but this one is enough for parsec 1.x connection.

Important notes to implementors

  • ALWAYS provide direct http interface
  • Encourage non-page application to use HTTP interface
  • Create sort of service contract or (better) UNS2 and preshare it wth API users
  • NEVER rely on domain name.

See also Why Parsec? for explanation why you should not ever rely on DNS and SSL.