FEIP1V7_FreeProtocol(en-US)



  • FEIP1: FreeProtocol
    Version: 7
    Language: en-US
    Author: C_armX, Deisler-JJ_Sboy
    Status: draft
    Created date: 2022-02-01
    Last modified date:2022-02-12
    PID: ""
    TXid: 
    

    FEIP1V7_FreeProtocol(en-US)

    Contents

    Introduction

    General consensus of FEIP type protocols

    consensus specific to this protocol

    Register

    Update

    Unregister

    Rate

    Introduction

    Protocol type: FEIP
    Serial number: 1
    Protocol name: FreeProtocol
    Version number: 7
    Description : Register, unregister or evaluate protocols freely by writing data in OP_RETURN.
    Author: C_armX, Deisler-JJ_Sboy
    Language: en-US
    Previous version PID:"bd0429aaf6d7784958a36473f2f925d8d2ca76125cc610adf2afb1956a1d56b2"
    
    

    General consensus of FEIP type protocols

    1. Write important data in OP_RETURN for public witness under FEIP type protocols.

    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.

    Consensus of this protocol

    1. Pid is the unique identity of a protocol, which is the double sha256 value of the protocol file.

    2. Title in protocol text: type + serial number + "V" + version number +'_' + protocol name + '(' + language + ')', e.g.: FEIP3V4_CID(en-US)

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

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

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

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

    7. The registered protocol can be updated or cancelled, 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"<br>Case insensitive Y
    2 sn int 1 Serial number<br>Fixed: 1 Y
    3 ver int 1 Fixed: 7 Y
    4 name String 18 Fixed:"FreeProtocol"<br>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 when updating.

    field number field name type length content required
    1 type String 4 Fixed: "FEIP"<br>Case insensitive Y
    2 sn int 1 Serial number<br>Fixed: 1 Y
    3 ver int 1 Fixed: 7 Y
    4 name String 18 Fixed:"FreeProtocol"<br>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 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"<br>Case insensitive Y
    2 sn int 1 Serial number<br>Fixed: 1 Y
    3 ver int 1 Fixed: 7 Y
    4 name String 18 Fixed:"FreeProtocol"<br>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 registered.<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"<br>Case insensitive Y
    2 sn int 1 Serial number<br>Fixed: 1 Y
    3 ver int 1 Fixed: 7 Y
    4 name String 18 Fixed:"FreeProtocol"<br>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 registered.<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