Template


Ntity template

Template

Template data structure table

When writing into blockchain, each byte has a cost, that's the reason we have to minimise json request for Ntity. Minimizing keep data human readable. Depicted into following table:

Title Code Comment Default
HashHHash of the full doc including private data[requierd]
VersionVVersion for Template or Datagram version for certificate00
NameNCertificate name
The certificate name should be unique, or the same if there are several versions.
In case of sub-certificates the convention is to use a slash,
e.g. Sport/Tennis/License or Sport/Basket/License
not null
ExpirationXFormat defined in datagramnull
ServerSServer urlntity.io
TemplateMID_Docnull
LanguageLID_Lang, language by default is JSON, it can be any notation or scripting language. SYS_VAR_DOCUMENT_JSONnull
CompressionZ ID_Format, null by default. Can be used for compressed data. Only used into data oriented Blockchain. If this parameter is set, it will be visible on Blockchain
Example of usage:
SYS_VAR_DOCUMENT_GZCOMPRESS, SYS_VAR_DOCUMENT_ZIP Only field appended by caret sign ^ sign will be compressed, see above.
null
AddressAThe usage of an address is only in case of a Move or Transfert operation, Address is a json array composed of networkName, networkId, address For example : {'networkName':'ETH', 'networkId':'1', 'address':'0x321321321...'}
DataDHeader of the complet structureobject
ChildCSytaxe of a child follow this regular expression : C(?:([0-9]*([\+\-])?)(?:\#([0-9]*)(?:\-([0-9]*))?)?)?

For example:
 - C1 = First child has 0 to 99 occurence
 - C2#1-3 = Second Child has minimum 1 occurence
   and maximum 3 occurences
 - C3+#5 = Third child is published and have exactly 5 occurences 
C1
TypeTStructure, can be e,a,r,t or h
EntityeTable
AttributeaTable
RelationrTable
TransactiontTable
DocumenthTable
NamenField, can be also used as Make for object
FirstnamefField, can be also used as Model for object
ValuevField
DescriptiondField
ID_TypeyRelated to SYS_Var Table, can be an array [14,15,16,17]
ID_Type_SubsRelated to SYS_Var Table
ID_StatusstRelated to SYS_Var Table
CommentcField
ContentcnField
OpeningeoCan be a birth date, or a creation date for an entity.
Date format2
ClosingecCan be a day of death, or a destruction date for an entity.
Date format2
CreatedBycbRelated to Entity Table (ID_Entity)
cb: Operator will return an (int) the ID of the Entity
cb: Operator:n will return a (string) the Name of the Entity.
CreatedctDate format2
ParamspField
ID_FormatftLinked to a document
QuantitytqLinked to a transaction
UnittuLinked to a transaction
PricetpLinked to a transaction
DiscounttdLinked to a transaction
TaxtxLinked to a transaction
TotalttLinked to a transaction
CurrencytcLinked to a transaction
PositionpoLinked to a transaction
Published data[+|-|^] By default datas are published and readable on Blockchain.
+ Value can be published using plus sign
- or unpublished using minus sign after Data (D) or Child (C).
^ or published and compressed, using the caret sign. The compression algorithm is set into Z parameter, see above.
All children will inherit the status of their parents. Only available for data oriented Blockchains.
-
Constant=Data is a constant value. Another method to add a constant is to put an array with only one value, like {["123456"]}
Required*Data is required and not null
Private!Data must be hidden to the public
Out of hash~Data is not used into the hash, and therefore cannot be used to verify certificate
1Out of hash, all this information are not hashed
2 In our case dates can be a timestamp or a human readable date YYYYMMDD[hhmm[ss]]

Precautions and advice.
  • Use of character table [a-z0-9] and ASCII signs
  • Use of capital letters and characters with accents is not recommended.
  • No spaces before or after a string (trim)
  • No use of tabs or double spaces. All spaces must be converted to a single space.
  • No line breaks

Template Simple example

This simple example use JSON notation to create the document. Example below is to create Basketball players License. Language is optional in case of JSON.

Sport License Template
Sport License json full
Sport License json compact
Sport License Full json
Sport License Published
In this example, the Data [D] are plublished, but not the License number. The Published document generate a Hash 429387429387942d98798798e7987 wich is also the IPFS link You can also notice


Original template in YAML notation
Original certificate in YAML notation
In this simple example, we don't need to put any ending date into template. The certificate Issue date & certificate expiry date will define the license validity.

Template in JSON raw notation
Certificate in JSON raw notation

Template in JSON compact notation
Certificate in JSON compact notation

Advanced Example watch making
Certificate in JSON raw notation
Information
Note that the sign such as (*, !, ...) are not included into the output result. Each result will be display trought the filter of it's template ONLY!

Simple example, with published data
Let's create the ipfs Hash of this document : 0xhashNo1
The content into DB and the data stored into IPFS are the same

Simple example, with hidden data
The only difference with the previous example is that there not a "+" sign after D. As by default data are not published

Template Store Options

Here are the optional parameters you can add to restrict a template.

Template list

Name Version Description Link ID*
- 0 Previous version / Testnet
Production MasterBlock 2 CreatedBy is an int and output value is the Name ETHtx 16
Production MasterBlock 1 Field "Serial / Result" is now private ETHtx 1
Production MasterBlock 0 Original version of MasterBlock supply chain production. It can be used as universal basic tools that links transactions to one entity. Each process is a transaction. ETHtx 0
VOIX 3 Quorum information added ETHtx 18
VOIX 2 Children is a transaction, Constant added, Data published ETHtx 13
VOIX 1 Children is an attribute ETHtx 12
VOIX-Token 3 Compression is now general argument Z ETHtx 14
VOIX-Ballots 1 Plain data compressed ETHtx 15
Sport:License 2 License expire date ETHtx 20
Sport:License 1 Original version ETHtx 6
Ntity:AddPeer 1 Add Peer ETHtx 23
Ntity:Pay 2 Payment ETHtx 22
Ntity:Pay 1 Payment datagram v1 ETHtx 21
* The ID corresponds to the Nonce which is a unique counter for transactions on the official ETH template wallet.

Api & Rights managment

By default all the Ntities are published and private fields are hidden to public.

Ntity offical wallets

Blockchain Function Network Link Wallet
Ntity Certificate / Fee Mainnet NTT 0xCAF82fEB1abcb131a2FAb6584BE79c69e5929a68
Ntity Template Mainnet NTT 0x6B3FD6c568e6c0de99d159372113FA1b7BA4a834
Ntity Pay OUT Mainnet NTT 0x84529da6ea24d9c5980c186ffb5b220abd17152c
Ntity Buy credit Mainnet NTT 0xD7CAaf4FAd165a472BAEa85845f08b14147b2523
Ethereum Certificate Mainnet ETH 0xCAF82fEB1abcb131a2FAb6584BE79c69e5929a68
Ethereum Template Mainnet ETH 0x6B3FD6c568e6c0de99d159372113FA1b7BA4a834
Bitcoin Certificate Mainnet BTC 1A3Y57pBQEPzNz2WKuGnsztEjDZXniXVS4
Bitcoin Certificate v2 Mainnet BTC bc1qg2ad8xfwyg8padvjdmugm3ryqax2ya3ktaen4t
Blockchain Miners Network Link Wallet
Ntity Reward OUT Mainnet NTT 0x126ec1b3f2a8eab944ad3df9f30806ce77196717
Ntity Register Mainnet NTT 0x353f8302CDD831D1a438AA56EE0a1570965251B0
Blockchain Core Wallets Network Link Wallet
Ntity Miners Mainnet NTT 0xda814ba0158bda71a38f6581b1fcb4c9b6c4c96b
Ntity Core Teams Mainnet NTT 0xaf13ba84642b0ec1936fe4ed25b7800b110ba529
Ntity Pre-Sales Mainnet NTT 0xf496ee3bc416af34fc7bd5fd16de23e1c5d8d9d0
Ntity Public Sales Mainnet NTT 0xf2abe536a1809b5c4ab718e85efde334fd8a752b
Ntity Founders Mainnet NTT 0x2b58699e8ca0abcbb317e3c18d887f64e0b8ce88
Ntity Community Incentive Mainnet NTT 0x3c124f6b0dede532aae6a0ce1b0610a2752709fc
Ntity Advisors Mainnet NTT 0x2151bdacb938293152b3781f736ba73b3e1d28a0
Ntity Operational Mainnet NTT 0x95ebb251d8b7406d5574609b161ac212fb4f1f31
Testnet Function Network Link Wallet
Ntity Faucet OUT Haradev NTTH 0xfA6c3De8F7E15a7e1DC10068da43b2fe1a4f8C47
Ntity Certificate OUT Haradev NTTH 0xacaf3e2d226c4f64b70ce84f002b60dda15a2cc0
Ntity Old Faucet Haradev NTTH 0x0dcb3043c88a2a63e4e3fbcc348f11a6bcc6c833
Ethereum Old Template Ropsten ETH:ROPSTEN 0x4a07c2c95fd7aea20e125d42e6f973c3a4bcb03a