FEIP15V4_CAPP(zh-CN)



  • FEIP15: CAPP
    Version: 4
    Language: zh-CN
    Author: C_armX
    Status: draft
    Created date: 2021-07-12
    Last modified date:2021-07-12
    File hash: ""
    TXid: 
    

    https://shimo.im/docs/ioW4mXI2kTUJo48d/read

    FEIP15V4_CAPP(zh-CN)

    Contents

    Introduction

    General consensus of FEIP type protocols

    consensus specific to this protocol

    Process

    注册CAPP

    更新CAPP

    注销CAPP

    评价CAPP

    二维码

    Introduction

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

    General consensus of FEIP type protocols

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

    2. The max size of OP_RETURN : 4096 bytes

    3. Format : compacted json

    4. Encoding : utf-8

    Consensus specific to this protocol

    1. 本协议用于在链上注册和管理密码应用(CAPP)。

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

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

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

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

    流程

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

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

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

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

    注册CAPP

    注册者发出一笔交易,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: 4 Y
    4 name String 4 Fixed: "CAPP"<br>Case insensitive N
    5 hash hex 32 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 CAPP N
    10 data.url string 0~512 URL,the location to get the CAPP N
    11 data.prot string array 0~512 The protocols followed by this CAPP N
    12 data.serv string array 0~512 The services used by this CAPP N

    Example of registering a CAPP

    {
        "type": "FEIP",
        "sn": 15,
        "ver": 4,
        "name": "CAPP",
        "hash": "",
        "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"]
        }
    }
    

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

    更新CAPP

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

    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: 4 Y
    4 name String 4 Fixed: "CAPP"<br>Case insensitive N
    5 hash hex 32 Sha256 value of this protocol file N
    6 data.aid string 32 Txid when publishing the CAPP 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 CAPP N
    11 data.url string 0~512 URL,the location to get the CAPP N
    12 data.prot string array 0~512 The protocols followed by this CAPP N
    13 data.serv string array 0~512 The services used by this CAPP N

    Example of updating a CAPP

    {
        "type": "FEIP",
        "sn": 15,
        "ver": 4,
        "name": "CAPP",
        "hash": "",
        "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"]
        }
    }
    

    注销CAPP

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

    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: 4 Y
    4 name String 4 Fixed: "CAPP"<br>Case insensitive N
    5 hash hex 32 Sha256 value of this protocol file N
    6 data.aid string 32 Txid when publishing the CAPP Y
    7 data.op string 4 Operation: "unregister" Y

    Example of unregistering a CAPP

    {
        "type": "FEIP",
        "sn": 15,
        "ver": 4,
        "name": "CAPP",
        "hash": "",
        "data":{
            "aid": "c94cb657c9a0742bd8f26ad83675fae0de96ea2f5dafa9745fa88e7de7eb9c11",
            "op":"unregister"
        }
    }
    

    评价CAPP

    评价者发送一笔交易。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: 4 Y
    4 name String 4 Fixed: "CAPP"<br>Case insensitive N
    5 hash hex 32 Sha256 value of this protocol file N
    6 data.aid string 32 Txid when publishing the CAPP 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 a CAPP

    {
        "type": "FEIP",
        "sn": 15,
        "ver": 4,
        "name": "CAPP",
        "hash": "",
        "data":{
            "aid": "c94cb657c9a0742bd8f26ad83675fae0de96ea2f5dafa9745fa88e7de7eb9c11",
            "op": "rate",
            "rate": 4
        }
    }
    

    二维码

    本协议的二维码用于扫描获取CAPP名称与获取方式,包含以下内容:

    {
        "type": "FEIP",
        "sn": 15,
        "ver": 4,
        "data":{
            "name":  "Crypto Signer", // stdName
            "by": "FEk41Kqjar45fLDriztUDTUkdki7mmcjWK", // provider of this CAPP
            "url": "https://sign.cash"
        }
    }
    

Log in to reply