FEIP1V7_FreeProtocol(en-US)



  • FEIP1: FreeProtocol
    Version: 7
    Language: en-US
    Author: C_armX, Deisler-JJ_Sboy
    Status: draft
    Created date: 2022-02-01
    Update date:2022-05-31
    PID: ""
    Txid: 
    

    FEIP1V7_FreeProtocol(en-US)

    Contents

    General consensuses of FEIP

    Main consensuses of this protocol

    Register

    Update

    Unregister

    Rate

    Protocol type: FEIP
    Serial number: 1
    Protocol name: FreeProtocol
    Version number: 7
    Description : Formulate the consensuses of freely publishing and managing protocols on the blockchain of freecash.
    Author: C_armX, Deisler-JJ_Sboy
    Language: en-US
    Previous version PID:"bd0429aaf6d7784958a36473f2f925d8d2ca76125cc610adf2afb1956a1d56b2"
    

    General consensuses of FEIP

    1. FEIP (Freecash Extensional Improvement Protocol) is a type of freecash protocol which writes important infomation with OP_RETURN on the blockchain of freecash.

    2. The SIGHASH flag of all transaction inputs is ‘ALL’ (value 0x01).

    3. The max size of OP_RETURN : 4096 bytes.

    4. The format of the data in op_return: JSON.

    5. Encoding : utf-8.

    Main consensuses of this protocol

    1. This protocol formulates the consensuses of freely publishing and managing protocols on the blockchain of freecash.

    2. PID (Protocol Identity) is the unique identity of a protocol, which is the double sha256 value of the protocol file.

    3. Anyone can send a transaction to register a protocol by writing data in the format given by Register .

    4. The title of protocol published on chain taks following format:

    type + serial number + 'V' + version number +'_' + protocol name + '(' + language + ')'

    e.g: FEIP3V4_CID(en-US)

    1. Anyone can only update his/her own protocols by writing data in the format given by Update.

    2. Anyone can only unregister his/her own protocols by writing data in the format given by Unregister.

    3. Anyone can evaluate any protocol by writing data in the format given by Rate.

    4. The registered protocol can be updated, but cannot be registered again unless it has been unregistered.

    Register

    Register a protocol by send a transaction, the OP_RETURN of which contains the data as follows:

    field number field name type length content required
    1 type String 4 Fixed: "FEIP". Case insensitive Y
    2 sn int 1 Fixed: 1 Y
    3 ver int 1 Fixed: 7 Y
    4 name String 12 Fixed:"FreeProtocol". Case insensitive N
    5 pid string 64 Double sha256 of this file N
    6 data.type String 8 Type of the protocol being registered. N
    7 data.sn String 8 Serial number of the protocol being registered, counting from 1. N
    8 data.ver String 4 Version number of the protocol being registered. counting from 1. N
    9 data.name String 128 Name of the protocol being registered. N
    10 data.desc String 512 Short description of the protocol being registered. N
    11 data.authors String array 256 FCH addresses of the authors of the protocol being registered. N
    12 data.pid string 64 The double sha256 value of the protocol file being registered.<br> Y
    13 data.lang String 5 The language of the protocol being registered, formatted with i18n(internationalization),such as "en-US". N
    14 data.op String 8 Fixed: "register"<br>Case insensitive Y
    15 data.prePid string 64 Double sha256 value of the previous version protocol file. N
    16 data.fileUrl String array 1024 Locations to find the protocol file. N

    Register Example:

    {
        "type": "FEIP",
        "sn": 1,
        "ver": 7,
        "name": "FreeProtocol",
        "pid": "",
        "data": {
            "type": "FEIP",
            "sn": 3,
            "ver": 4,
            "name": "CID",
            "desc": "Register or unregister a human friendly identity for an address.",
            "authors": ["FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv","FS2AWq1dgdhCpNTwqfBbMBBJGNNj1LSboy","FLx88wdsbLQyZRmbqtpeXA9u5FG9EyCash"],
            "pid": "1403e5b7100d8e24724f12cd1ea0b722086c02250a7c66b711947f14546cfcfd",
            "lang": "zh-CN",
            "op": "register",
            "prePid":"bd0429aaf6d7784958a36473f2f925d8d2ca76125cc610adf2afb1956a1d56b2",
            "fileUrl": ["https://github.com/freecashorg/FEIP/FEIP3_CID/"]
        }
    }
    

    Update

    Update a protocol by send a transaction. The data.op is changed from "register" to "update", other data formats are the same as the register data format. All field contents will be updated.

    field number field name type length content required
    1 type String 4 Fixed: "FEIP". Case insensitive Y
    2 sn int 1 Fixed: 1 Y
    3 ver int 1 Fixed: 7 Y
    4 name String 18 Fixed:"FreeProtocol". Case insensitive N
    5 pid string 64 Double sha256 of this file N
    6 data.type String 8 Type of the protocol being registered. N
    7 data.sn String 8 Serial number of the protocol being registered, counting from 1. N
    8 data.ver String 4 Version number of the protocol being registered. counting from 1. N
    9 data.name String 128 Name of the protocol being registered. N
    10 data.desc String 512 Short description of the protocol being registered. N
    11 data.authors String array 256 FCH addresses of the authors of the protocol being registered. N
    12 data.pid string 64 The double sha256 value of the protocol file being updated.<br> Y
    13 data.lang String 5 The language of the protocol being registered, formatted with i18n(internationalization),such as "en-US". N
    14 data.op String 6 Fixed: "update"<br>Case insensitive Y
    15 data.prePid string 64 Double sha256 value of the previous version protocol file. N
    16 data.fileUrl String array 1024 Locations to find the protocol file. N

    Update Example:

    {
        "type": "FEIP",
        "sn": 1,
        "ver": 7,
        "name": "FreeProtocol",
        "pid": "",
        "data": {
            "type": "FEIP",
            "sn": 3,
            "ver": 4,
            "name": "CID",
            "desc": "Register, update or unregister a human friendly identity for an address.",
            "authors": ["FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv","FS2AWq1dgdhCpNTwqfBbMBBJGNNj1LSboy","FLx88wdsbLQyZRmbqtpeXA9u5FG9EyCash"],
            "pid": "1403e5b7100d8e24724f12cd1ea0b722086c02250a7c66b711947f14546cfcfd",
            "lang": "zh-CN",
            "op": "update",
            "prePid":"bd0429aaf6d7784958a36473f2f925d8d2ca76125cc610adf2afb1956a1d56b2",
            "fileUrl": ["https://github.com/freecashorg/FEIP/FEIP3_CID/"]
        }
    }
    

    Unregister

    Unregister a protocol by send a transaction, the OP_RETURN of which contains the data as follows:

    field number field name type length content required
    1 type String 4 Fixed: "FEIP". Case insensitive Y
    2 sn int 1 Fixed: 1 Y
    3 ver int 1 Fixed: 7 Y
    4 name String 18 Fixed:"FreeProtocol". Case insensitive N
    5 pid string 64 Double sha256 of this file N
    6 data.pid string 64 The double sha256 value of the protocol file being unregistered.<br> Y
    7 data.op String 10 Fixed: "unregister"<br>Case insensitive Y

    Unregister Example:

    {
        "type": "FEIP",
        "sn": 1,
        "ver": 7,
        "name": "FreeProtocol",
        "pid": "",
        "data": {
            "pid": "bd0429aaf6d7784958a36473f2f925d8d2ca76125cc610adf2afb1956a1d56b2",
            "op": "unregister"
        }
    }
    
    

    Rate

    Evaluate a protocol by send a transaction, the OP_RETURN of which contains the data as follows:

    field number field name type length content required
    1 type String 4 Fixed: "FEIP". Case insensitive Y
    2 sn int 1 Fixed: 1 Y
    3 ver int 1 Fixed: 7 Y
    4 name String 18 Fixed:"FreeProtocol". Case insensitive N
    5 pid string 64 Double sha256 of this file N
    6 data.pid string 64 The double sha256 value of the protocol file being rated.<br> Y
    7 data.op String 4 Fixed: "rate"<br>Case insensitive Y
    8 data.rate int 1 Rating of the service from 0 to 5 Y

    Rate Example:

    {
        "type": "FEIP",
        "sn": 1,
        "ver": 7,
        "name": "FreeProtocol",
        "pid": "",
        "data": {
            "pid": "1403e5b7100d8e24724f12cd1ea0b722086c02250a7c66b711947f14546cfcfd",
            "op": "rate",
            "rate": 4
        }
    }
    

Log in to reply