dApp
This protocol defines the conditions for the functioning of any decentralized application and is the basis for building any new protocol on the Pletyvo platform.
Hash
A hash consists of a 32-byte BLAKE3-256 value used as an identifier of a cryptographic public key or signature, which is usually represented in a URL base64 format, but omits padding characters.
Hash Generation
To correctly generate the hash, you need to pass the input arguments for the BLAKE3-256 value in the correct order, where the schema should go first and then the data.
[0: schema, 0, ..., 0: data]
Get Hash
GET
/dapp/v1/hash/{hash}
Response
{
"id": "00000000-0000-0000-0000-000000000000"
}
Schema
1
ED25519
Auth Header
Event
Event Structure
Event Body
The event body defines a data format that aims for easy cryptographic verification and a smaller input data size due to predefined positions. At the program layer, the body is represented by an array of bytes, the first element of which always contains a version that further defines the subsequent data positions. Usually, the event body is encoded in base64 url format during transfer, but omits padding characters.
Basic Event Body
The basic event body is defined by version 1, and consists of the following fields: version; input data type; event type (encoded 16-bit number in big endian format), and N number of input data.
[1: version, 1: data type, 1, 1: event type, 1, ..., 1: data]
Linked Event Body
[2: version, 1: data type, 1, 1: event type, 1, ..., 32: hash, 1, ..., 1: data]
Data Type
1
JSON
Get Events
GET
/dapp/v1/events
Response
[
{
"id": "00000000-0000-0000-0000-000000000000",
"body": "base64-url-no-padding",
"auth": {
"sch": 0,
"pub": "base64",
"sig": "base64"
}
}
]
Get Event
GET
/dapp/v1/events/{event.id}
Response
{
"id": "00000000-0000-0000-0000-000000000000",
"body": "base64-url-no-padding",
"auth": {
"sch": 0,
"pub": "base64",
"sig": "base64"
}
}
Create Event
POST
/dapp/v1/events
Headers
Content-Type
application/json
Body
body
auth
Response
{
"id": "00000000-0000-0000-0000-000000000000"
}
Last updated
Was this helpful?