FEIP15V5_APP(zh-CN)



  • FEIP15: APP
    Version: 5
    Language: zh-CN
    Author: C_armX
    Status: draft
    Created date: 2021-11-01
    Last modified date:2022-04-05
    PID: ""
    TXID: 
    

    FEIP15V5_APP(zh-CN)

    Contents

    Introduction

    General consensus of FEIP type protocols

    consensus specific to this protocol

    Process

    注册APP

    更新APP

    注销APP

    评价APP

    二维码

    Introduction

    Protocol type: FEIP
    Serial number: 15
    Protocol name: APP
    Version: 5
    Description :  在链上注册和管理密码应用(APP)。
    Author: C_armX
    Language: en-US
    Previous version PID:""
    

    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. 本协议用于在链上注册和管理密码应用(APP)。

    2. 密码应用(APP):是以非对称密码为身份或账户系统的应用。

    3. AID(Application Identity): 密码应用注册时的交易id为该应用唯一的应用id,即AID。

    4. 注册者可以为应用自由命名,可以用"[stdName]"+"@"+"[cid]"指代一项服务,如“sign.cash@freer_ew8H”,便于识别,也消除商标抢注问题。

    5. 注册者应保证自己注册的不同APP使用不同的stdName。

    流程

    1. 注册APP:在链上注册APP,参见注册APP

    2. 更新APP:在链上更新已注册的APP信息,参见更新APP

    3. 注销APP:在链上注销APP,宣布注销该APP,参见注销APP

    4. 评价APP:在链上对该APP进行评价,参见评价APP,评分基于币天销毁加权平均。

    注册APP

    注册者发出一笔交易,op_return内容为:

    field number field name type length content required
    1 type String 4 Fixed: "FEIP"<br>Case insensitive Y
    2 sn int 2 Serial number<br>Fixed: 15 Y
    3 ver int 1 Fixed: 5 Y
    4 name String 4 Fixed: "APP"<br>Case insensitive N
    5 pid hex 64 Sha256 value of this protocol file N
    6 data.op string 5 Operation: "register" Y
    7 data.stdName string 64 the name of the service in english Y
    8 data.localName string array 1024 service names in different languages N
    9 data.desc string 0~512 Description of this APP N
    10 data.url string 0~512 URL,the location to get the APP N
    11 data.prot string array 0~512 The protocols followed by this APP N
    12 data.serv string array 0~512 The services used by this APP N
    13 data.pubKey hex 66 The public key of the FCH identity designated by the publisher of this APP

    Example of registering an APP

    {
        "type": "FEIP",
        "sn": 15,
        "ver": 5,
        "name": "APP",
        "pid": "",
        "data":{
            "op":"register",
            "stdName": "Sign Cash",
            "localName": ["飞签","フライング宝くじ"],
            "desc": "Save the private key offline and provide offline signature,and provide other functions.",
            "url": "https://sign.cash/download/cryptosigner",
            "prot":["b1674191a88ec5cdd733e4240a81803105dc412d6c6708d53ab94fc248f4f553","37406e3e45750efccdb060ca2e748f9f026aebb7dadade8e8747340f380edaca"],
            "serv":["c86e039f466434862585e38c0fd1a11f47dcc07839647a452424503b30f81b39","403d3146bdd1edbd8d71b01ffbad75972e07617971acb767a9bae150d4154dc25"],
            "pubKey": "02966dc682850550b1df046f2a03cfe546c4e4cf83f739d1497f6c292fabdad1b4"
        }
    }
    

    注册的交易id为: c94cb657c9a0742bd8f26ad83675fae0de96ea2f5dafa9745fa88e7de7eb9c11,即该APP的aid。

    更新APP

    原注册者可更新APP信息,更新时之前注册或更新的内容将全部被覆盖。

    field number field name type length content required
    1 type String 4 Fixed: "FEIP"<br>Case insensitive Y
    2 sn int 2 Serial number<br>Fixed: 15 Y
    3 ver int 1 Fixed: 5 Y
    4 name String 4 Fixed: "APP"<br>Case insensitive N
    5 pid hex 64 Sha256 value of this protocol file N
    6 data.aid hex 64 Txid when publishing the APP Y
    7 data.op string 6 Operation: "update" Y
    8 data.stdName string 64 the name of the service in english Y
    9 data.localName string array 1024 service names in different languages N
    10 data.desc string 0~512 Description of this APP N
    11 data.url string 0~512 URL,the location to get the APP N
    12 data.prot string array 0~512 The protocols followed by this APP N
    13 data.serv string array 0~512 The services used by this APP N
    14 data.pubKey hex 66 The public key of the FCH identity designated by the publisher of this APP

    Example of updating an APP

    {
        "type": "FEIP",
        "sn": 15,
        "ver": 5,
        "name": "APP",
        "pid": "",
        "data":{
            "aid": "c94cb657c9a0742bd8f26ad83675fae0de96ea2f5dafa9745fa88e7de7eb9c11",
            "op":"update",
            "stdName": "Crypto Signer",
            "localName": ["密签","秘密のサイン"],
            "desc": "Save the private key offline and provide offline signature,and provide other functions.",
            "url": "https://sign.cash",
            "prot":["b1674191a88ec5cdd733e4240a81803105dc412d6c6708d53ab94fc248f4f553","37406e3e45750efccdb060ca2e748f9f026aebb7dadade8e8747340f380edaca"],
            "serv":["c86e039f466434862585e38c0fd1a11f47dcc07839647a452424503b30f81b39","403d3146bdd1edbd8d71b01ffbad75972e07617971acb767a9bae150d4154dc25"],
            "pubKey": "02966dc682850550b1df046f2a03cfe546c4e4cf83f739d1497f6c292fabdad1b4"
        }
    }
    

    注销APP

    原注册者可以链上声明注销该APP。

    field number field name type length content required
    1 type String 4 Fixed: "FEIP"<br>Case insensitive Y
    2 sn int 2 Serial number<br>Fixed: 15 Y
    3 ver int 1 Fixed: 5 Y
    4 name String 4 Fixed: "APP"<br>Case insensitive N
    5 pid hex 64 Sha256 value of this protocol file N
    6 data.aid hex 64 Txid when publishing the APP Y
    7 data.op string 4 Operation: "unregister" Y

    Example of unregistering an APP

    {
        "type": "FEIP",
        "sn": 15,
        "ver": 5,
        "name": "APP",
        "pid": "",
        "data":{
            "aid": "c94cb657c9a0742bd8f26ad83675fae0de96ea2f5dafa9745fa88e7de7eb9c11",
            "op":"unregister"
        }
    }
    

    评价APP

    评价者发送一笔交易。op_return内容为:

    field number field name type length content required
    1 type String 4 Fixed: "FEIP"<br>Case insensitive Y
    2 sn int 2 Serial number<br>Fixed: 15 Y
    3 ver int 1 Fixed: 5 Y
    4 name String 4 Fixed: "APP"<br>Case insensitive N
    5 pid hex 64 Sha256 value of this protocol file N
    6 data.aid hex 64 Txid when publishing the APP Y
    7 data.op string 7 operation: "rate" Y
    8 data.rate int 1 Rating of the service from 0 to 5 N

    Example of rate an APP

    {
        "type": "FEIP",
        "sn": 15,
        "ver": 5,
        "name": "APP",
        "pid": "",
        "data":{
            "aid": "c94cb657c9a0742bd8f26ad83675fae0de96ea2f5dafa9745fa88e7de7eb9c11",
            "op": "rate",
            "rate": 4
        }
    }
    

    二维码

    本协议的二维码用于扫描获取APP的AID:

    FC:
    {
        "type": "FEIP",
        "sn": 15,
        "ver": 5,
        "data":{
            "aid": "c94cb657c9a0742bd8f26ad83675fae0de96ea2f5dafa9745fa88e7de7eb9c11"
        }
    }
    

Log in to reply