How Ntity templates describe the structure of a certificate, and the list of official templates and wallets.
When writing to a blockchain each byte has a cost, which is why the JSON of an Ntity document is minimized with short keys, while keeping the data human readable. The keys are described in the tables below.
| Key | Title | Description | Default |
|---|---|---|---|
| H | Hash | Hash of the full document, including private data | required |
| V | Version | Version of the template, or datagram version for a certificate | 00 |
| N | Name | Certificate name. It should be unique, or the same across the versions of a certificate. For sub-certificates the convention is to use a slash, eg. Sport/Tennis/License or Sport/Basket/License. | not null |
| E | Expiration | Format defined in the datagram. Older documents may use the key X. | null |
| S | Server | Server URL | ntity.io |
| M | Template | ID_Doc of the template | null |
| L | Language | ID_Lang. JSON by default, but it can be any notation or scripting language, eg. SYS_VAR_DOCUMENT_JSON. | null |
| Z | Compression | ID_Format, used for compressed data on data oriented blockchains only. When set, it is visible on the blockchain, eg. SYS_VAR_DOCUMENT_GZCOMPRESS, SYS_VAR_DOCUMENT_ZIP. Only the fields flagged with the caret sign ^ are compressed, see flags. | null |
| A | Address | Only used by a move or transfer operation. JSON object made of networkName, networkId and address, eg. {"networkName":"ETH", "networkId":"1", "address":"0x321321321…"} |
| Key | Title | Description | Default |
|---|---|---|---|
| D | Data | Header of the complete structure | object |
| C | Child | The syntax of a child follows the regular expression C(?:([0-9]*([\+\-])?)(?:\#([0-9]*)(?:\-([0-9]*))?)?)?, for example:
| C1 |
| T | Type | Structure type of the block, one of the values below | |
| e | Entity | Table | |
| a | Attribute | Table | |
| r | Relation | Table | |
| t | Transaction | Table | |
| h | Document | Table |
| Key | Title | Description |
|---|---|---|
| n | Name | Field, can also be used as the make of an object |
| f | Firstname | Field, can also be used as the model of an object |
| v | Value | Field |
| d | Description | Field |
| y | ID_Type | Related to the SYS_VAR table, can be an array, eg. [14,15,16,17] |
| s | ID_Type_Sub | Related to the SYS_VAR table |
| st | ID_Status | Related to the SYS_VAR table |
| c | Comment | Field |
| cn | Content | Field |
| eo | Opening | A birth date, or a creation date for an entity. Date format¹ |
| ec | Closing | A day of death, or a destruction date for an entity. Date format¹ |
| cb | CreatedBy | Related to the Entity table (ID_Entity). cb: Operator returns the ID of the entity (int), cb: Operator:n returns its name (string). |
| ct | Created | Date format¹ |
| p | Params | Field |
| ft | ID_Format | Linked to a document |
| tq | Quantity | Linked to a transaction |
| tu | Unit | Linked to a transaction |
| tp | Price | Linked to a transaction |
| td | Discount | Linked to a transaction |
| tx | Tax | Linked to a transaction |
| tt | Total | Linked to a transaction |
| tc | Currency | Linked to a transaction |
| po | Position | Linked to a transaction |
¹ Dates can be a timestamp or a human readable date YYYYMMDD[hhmm[ss]].
Flags are appended to a key, eg. D+, n*, c!.
| Flag | Title | Description |
|---|---|---|
| + - ^ | Published data | Set after Data (D) or a Child (C), only on data oriented blockchains:
|
| = | Constant | Data is a constant value. A constant can also be set with an array of a single value, like ["123456"] |
| * | Required | Data is required and not null |
| ! | Private | Data must be hidden from the public |
| ~ | Out of hash | Data is not used in the hash, and therefore cannot be used to verify the certificate |
[a-z0-9] and ASCII signs.This simple example uses the JSON notation to create a basketball player license. The language is optional in case of JSON.
N: Sport/License
V: 1
L: json
D+:
T: e
n: Player Name
f: Team name
eo: Birthdate
ad1: League
ad2: Season
v-: License Number{
"N": "Sport/License",
"V": 1,
"L": "json",
"D+": {
"T": "e",
"n": "Player Name",
"f": "Team name",
"eo": "Birthdate",
"ad1": "League",
"ad2": "Season",
"v-": "License Number"
}
}{"N":"Sport/License","V":1,"L":"json","D+":{"T":"e","n":"Player Name","f":"Team name","eo":"Birthdate","ad1":"League","ad2":"Season","v-":"License Number"}}{
"N": "Sport/License",
"V": 1,
"L": "json",
"D+": {
"T": "e",
"n": "Michael Jordan",
"f": "Chicago Bulls",
"eo": "1963-02-17",
"ad1": "Alumni",
"v-": "NN787685555"
}
}{
"N": "Sport/License",
"V": 1,
"L": "json",
"H": "A875876t76Ae223…",
"E": "ETERNAL",
"D+": {
"T": "e",
"n": "Michael Jordan",
"f": "Chicago Bulls",
"eo": "1963-02-17",
"ad1": "Alumni"
}
}In this example the data (D+) is published, but not the license number (v-). The published document generates a hash, eg. 429387429387942d98798798e7987, which is also its IPFS link.
The same template and certificate in different notations. In this simple example the template does not need any end date: the issue date and the expiry date of the certificate define the validity of the license.
Name: Basketball_license
Version: 1
Language: json
Data:
Type: e
Name: Name
Firstname: Firstname
Description: Team Name
Opening: BirthdateName: NBA:112233
Data:
Type: e
Name: Jordan
Firstname: Michael
Description: Chicago Bulls
Opening: 1963-02-17{
"Name": "Basketball_license",
"Version": 1,
"Language": "json",
"Data": {
"Type": "e",
"Name": "Name",
"Firstname": "Firstname",
"Description": "Team Name",
"Opening": "Birthdate"
}
}{
"Name": "NBA:112233",
"Data": {
"Type": "e",
"Name": "Jordan",
"Firstname": "Michael",
"Description": "Chicago Bulls",
"Opening": "1963-02-17"
}
}{"T":"e","n":"Name","f":"Firstname",
"d":"Team Name","eo":"Birthdate"}{"T":"e","n":"Jordan","f":"Michael",
"d":"Chicago Bulls","eo":"1963-02-17"}{
"T": "e",
"n*": "Make",
"f*": "Model",
"d": "Serial",
"C1": [{
"T": "t",
"y*": "Process",
"d*": "Step",
"cb": "Operator:n",
"ct": "End date",
"c!": "Serial / Result"
}]
}{
"T": "e",
"n": "GVCHIANI",
"f": "MasterBlock",
"d": "2009",
"C1": [
{
"T": "t",
"y": 10000,
"d": "Mounting",
"cb": 123,
"ct": "2021-04-30",
"c": "Secret 1"
},
{
"T": "t",
"y": 10001,
"d": "Control Quality",
"cb": 123,
"ct": "2021-04-30",
"c": "Secret 2"
}
]
}Flags such as * or ! are not part of the output. Each result is displayed through the filter of its template only.
{"N":"Sport/License","V":1,"L":"json","D+":{"T":"e","n":"Player Name", …The IPFS hash of this document is computed (eg. 0xhashNo1): the content in the database and the data stored on IPFS are the same.
{"N":"Sport/License","V":1,"L":"json","D":{"T":"e","n":"Player Name", …The only difference with the previous example is the missing + sign after D: by default data is not published.
Optional parameters that can be added to restrict a template:
| Key | Example | Description |
|---|---|---|
| bc | ["NTT"] | Only on the given blockchains |
| to | "0x353f8302CDD831D1a438AA56EE0a1570965251B0" | Send to a specific wallet |
| price | ["10","CHF"] | Fix the certificate price |
| name | "Force Certificate Name" | Lock the certificate name |
| logged | "true" | Only for logged in users |
| logo | "https://cdn.cryptolex.ch/img/icon/miner.svg" | Add an illustration |
| tag | ["#system","#validator","#ntity","#node"] | Add hashtags |
{
"bc": ["NTT"],
"to": "0x353f8302CDD831D1a438AA56EE0a1570965251B0",
"price": ["10", "CHF"],
"name": "Force Certificate Name",
"logged": "true",
"logo": "https://cdn.cryptolex.ch/img/icon/miner.svg",
"tag": ["#system", "#validator", "#ntity", "#node"]
}Version 0 is the previous version / testnet. The ID is the nonce, a unique transaction counter, on the official ETH template wallet.
| ID | Name | Version | Description | Transaction |
|---|---|---|---|---|
| 16 | Production MasterBlock | 2 | CreatedBy is an int and the output value is the name | 0xa7cbd07a… |
| 1 | Production MasterBlock | 1 | Field "Serial / Result" is now private | 0x192fa4d6… |
| 0 | Production MasterBlock | 0 | Original version of the MasterBlock supply chain production. It can be used as a universal basic tool linking transactions to one entity: each process is a transaction. | 0xd893d5ed… |
| 18 | VOIX | 3 | Quorum information added | 0xbe159b97… |
| 13 | VOIX | 2 | Children is a transaction, constant added, data published | 0x5e01a49a… |
| 12 | VOIX | 1 | Children is an attribute | 0x4cc15b9b… |
| 14 | VOIX-Token | 3 | Compression is now the general argument Z | 0xc9556bd3… |
| 15 | VOIX-Ballots | 1 | Plain data compressed | 0x7ead0c2b… |
| 20 | Sport:License | 2 | License expiry date | 0x9a21c153… |
| 6 | Sport:License | 1 | Original version | 0xf7a2fe03… |
| 23 | Ntity:AddPeer | 1 | Add peer | 0x35537162… |
| 22 | Ntity:Pay | 2 | Payment | 0x3b06e313… |
| 21 | Ntity:Pay | 1 | Payment datagram v1 | 0x705a993e… |
By default all ntities are published and private fields are hidden from the public. See the API documentation.
| Blockchain | Function | Network | Wallet |
|---|---|---|---|
| Ntity | Certificate / Fee | Mainnet | 0xCAF82fEB1abcb131a2FAb6584BE79c69e5929a68 |
| Ntity | Template | Mainnet | 0x6B3FD6c568e6c0de99d159372113FA1b7BA4a834 |
| Ntity | Pay OUT | Mainnet | 0x84529da6ea24d9c5980c186ffb5b220abd17152c |
| Ntity | Buy credit | Mainnet | 0xD7CAaf4FAd165a472BAEa85845f08b14147b2523 |
| Ethereum | Certificate | Mainnet | 0xCAF82fEB1abcb131a2FAb6584BE79c69e5929a68 |
| Ethereum | Template | Mainnet | 0x6B3FD6c568e6c0de99d159372113FA1b7BA4a834 |
| Bitcoin | Certificate | Mainnet | 1A3Y57pBQEPzNz2WKuGnsztEjDZXniXVS4 |
| Bitcoin | Certificate v2 | Mainnet | bc1qg2ad8xfwyg8padvjdmugm3ryqax2ya3ktaen4t |
| Blockchain | Function | Network | Wallet |
|---|---|---|---|
| Ntity | Reward OUT | Mainnet | 0x126ec1b3f2a8eab944ad3df9f30806ce77196717 |
| Ntity | Register | Mainnet | 0x353f8302CDD831D1a438AA56EE0a1570965251B0 |
| Blockchain | Function | Network | Wallet |
|---|---|---|---|
| Ntity | Validators | Mainnet | 0xda814ba0158bda71a38f6581b1fcb4c9b6c4c96b |
| Ntity | Core Teams | Mainnet | 0xaf13ba84642b0ec1936fe4ed25b7800b110ba529 |
| Ntity | Pre-Sales | Mainnet | 0xf496ee3bc416af34fc7bd5fd16de23e1c5d8d9d0 |
| Ntity | Public Sales | Mainnet | 0xf2abe536a1809b5c4ab718e85efde334fd8a752b |
| Ntity | Founders | Mainnet | 0x2b58699e8ca0abcbb317e3c18d887f64e0b8ce88 |
| Ntity | Community Incentive | Mainnet | 0x3c124f6b0dede532aae6a0ce1b0610a2752709fc |
| Ntity | Advisors | Mainnet | 0x2151bdacb938293152b3781f736ba73b3e1d28a0 |
| Ntity | Operational | Mainnet | 0x95ebb251d8b7406d5574609b161ac212fb4f1f31 |
| Blockchain | Function | Network | Wallet |
|---|---|---|---|
| Ntity | Faucet OUT | Haradev | 0xfA6c3De8F7E15a7e1DC10068da43b2fe1a4f8C47 |
| Ntity | Certificate OUT | Haradev | 0xacaf3e2d226c4f64b70ce84f002b60dda15a2cc0 |
| Ntity | Old Faucet | Haradev | 0x0dcb3043c88a2a63e4e3fbcc348f11a6bcc6c833 |
| Ethereum | Old Template | Ropsten | 0x4a07c2c95fd7aea20e125d42e6f973c3a4bcb03a |