FEIP28V2_Organization(zh-CN)



  • FEIP28: Organization
    Version: 2
    Language: zh-CN
    Author: C_armX
    Status: testing
    Created date: 2021-12-06
    Last modified date:2022-10-06
    PID: ""
    TXID: 
    

    FEIP28V2_Organization(zh-CN)

    Contents

    About FEIP

    About this protocol

    Create an organization

    Disband an organization

    Update organization information

    Accept the new consensus

    Invite members

    Join an organization

    Quit an organization

    Delist members

    Authorize administrator

    Deauthorize administrator

    Rate

    QR code

    Protocol type: FEIP
    Serial number: 28
    Protocol name: Organization
    Version: 2
    Description :  创建、管理和评价一个组织。
    Author: C_armX, Deisler-JJ_Sboy
    Language: en-US
    Previous version PID:""
    

    About FEIP

    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.

    About this protocol

    1. 本协议用于在Freecash主链上创建、管理或评价一个组织。

    2. 任何FCH地址,可以声明创建一个组织,并发布组织的共识,该交易的txid即为组织身份,即:oid,创建这为该组织的所有者owner

    3. 组织的管理规则在共识中约定,共识文件做两次sha256哈希得到data.consHash的值。

    4. 只有owner可以解散组织更新共识或描述,共识更新后需要所有成员链上接受新共识

    5. owner可以转让组织给其他人,转让后被转让者成为该组织的owner

    6. owner可以依据《FEIP6_Master》声明自己的主控身份,该主控身份可以转让组织,以防止owner私钥泄露或丢失。

    7. owner或其授权的管理员可以向他人发出有时效的链上正式邀请,即邀请成员

    8. 被邀请者在邀请有效期内接受共识,同意加入组织,正式成为会员,未被邀请不能加入组织。

    9. 任何成员可以声明退出组织,owner管理员决定是否除名,相关权责变化由组织在共识中约定。

    10. owner可以授权特定成员为管理员,也可以解除授权

    11. 管理员必须为当前成员。管理员退出或被除名则自动失去管理员授权,需重新加入组织,并重新获得新的授权,才能恢复管理员身份。

    12. owner管理员可以除名组织成员

    13. 管理员可以除名自己。

    14. 为防范垃圾信息攻击,创建或更新组织至少应当销毁1000cd邀请、加入、授权至少应销毁10cd

    Create an organization

    发送一笔交易创建组织,并成为owner,销毁币天不小于1000。

    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: 28 Y
    3 ver int 1 Fixed: 2 Y
    4 name String 4 Fixed: "Organization"<br>Case insensitive N
    5 pid hex 32 Sha256 value of this protocol file N
    6 data.op string 6 operation: "create" Y
    7 data.stdlName string 256 Name in english. N
    8 data.localName string array 1024 Names in different languages N
    9 data.consHash string 32 sha256 value of the organization consensus Y
    10 data.desc string 1-2048 Description of this organization Y
    • Example of creating an organization
    {
        "type": "FEIP",
        "sn": 28,
        "ver": 2,
        "name": "Organization",
        "pid": "",
        "data":{
            "op": "create",
            "stdName": "Love the earth"
            "localName": ["爱护地球","地球を愛する"]
            "consHash": "1111111111122222222223333333333333334444444445555555555666666",
            "desc": "This is a test Organization"
        }
    }
    

    Disband an organization

    由oid的Owner发送一笔交易。
    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: 28 Y
    3 ver int 1 Fixed: 2 Y
    4 name String 4 Fixed: "Organization"<br>Case insensitive N
    5 pid hex 32 Sha256 value of this protocol file N
    6 data.op string 7 operation: "disband" Y
    7 data.oid string 64 Organization ID Y
    • Example of disbanding an organization
    {
        "type": "FEIP",
        "sn": 28,
        "ver": 2,
        "name": "Organization",
        "pid": "",
        "data":{
            "op": "disband",
            "oid": "000000000000011111111111111"
        }
    }
    

    Update organization consensus or description

    由oid的owner发送一笔交易,销毁币天不小于1000。
    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: 28 Y
    3 ver int 1 Fixed: 2 Y
    4 name String 4 Fixed: "Organization"<br>Case insensitive N
    5 pid hex 32 Sha256 value of this protocol file N
    6 data.op string 6 operation: "update" Y
    7 data.oid string 64 Organization ID Y
    8 data.stdlName string 256 Name in english. N
    9 data.localName string array 1024 Names in different languages N
    10 data.consHash string 32 sha256 value of the organization consensus Y
    11 data.desc string 1-2048 Description of this organization Y
    • Example of updating an organization
    {
        "type": "FEIP",
        "sn": 28,
        "ver": 2,
        "name": "Organization",
        "pid": "",
        "data":{
            "op": "update",
            "oid": "000000000000011111111111111",
            "localName": ["爱护地球","地球を愛する"]
            "consHash": "1111111111122222222223333333333333334444444445555555555666666",
            "desc": "New description for the test Organization"
        }
    }
    

    Accept the new consensus

    共识修改后,需要现有组织成员签名接受新共识。由组织成员发送一笔交易,第一个输入为成员地址。
    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: 28 Y
    3 ver int 1 Fixed: 2 Y
    4 name String 4 Fixed: "Organization"<br>Case insensitive N
    5 pid hex 32 Sha256 value of this protocol file N
    6 data.op string 6 operation: "accept" Y
    7 data.oid string 64 Organization ID Y
    8 data.consHash string 32 the sha256 value of the new organization consensus Y
    • Example of accepting new consensus
    {
        "type": "FEIP",
        "sn": 28,
        "ver": 2,
        "name": "Organization",
        "pid": "",
        "data":{
            "op": "accept",
            "oid": "000000000000011111111111111",
            "consHash": "1111111111122222222223333333333333334444444445555555555666666",
        }
    }
    

    Invite members

    owner或管理员可向他人发出加入邀请。销毁币天不小于10cd。
    owner或被授权者发送一笔交易。
    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: 28 Y
    3 ver int 1 Fixed: 2 Y
    4 name String 4 Fixed: "Organization"<br>Case insensitive N
    5 pid hex 32 Sha256 value of this protocol file N
    6 data.op string 3 operation: "invite" Y
    7 data.oid string 64 Organization ID Y
    8 data.list string array 1024 Addresses of the applicants. Y
    9 data.days int 2 Validity period of the invitation. Y
    • Example of adding members
    {
        "type": "FEIP",
        "sn": 28,
        "ver": 2,
        "name": "Organization",
        "pid": "",
        "data":{
            "op": "invite",
            "oid": "000000000000011111111111111",
            "list": [
    			"FCfcQA9VaCGNDoz3QqneMcFC8jTj3Cuuxc",
    			"FCG7ohMm8xZmhPEpE8Eni2ghiZT5ha9iJw",
    			"FFcY22BH2nyamDLdFWaDGwtKej9KdCKb51"
    		],
            "days": 10
        }
    }
    

    Join an organization

    某地址收到invite后,理解共识,并同意后发起交易,正式加入组织。
    接到邀请且同意加入,才正式成为组织成员,未接到invite的join操作无效。
    首输入为加入者地址。销毁币天不小于10。

    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: 28 Y
    3 ver int 1 Fixed: 2 Y
    4 name String 4 Fixed: "Organization"<br>Case insensitive N
    5 pid hex 32 Sha256 value of this protocol file N
    6 data.op string 6 operation: "join" Y
    7 data.oid string 64 Organization ID Y
    8 data.consHash string 32 the sha256 value of the new organization consensus Y
    • Example of accepting new consensus
    {
        "type": "FEIP",
        "sn": 28,
        "ver": 2,
        "name": "Organization",
        "pid": "",
        "data":{
            "op": "join",
            "oid": "000000000000011111111111111",
            "consHash": "1111111111122222222223333333333333334444444445555555555666666"
        }
    }
    

    Quit an organization

    由退出者发送一笔交易。

    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: 28 Y
    3 ver int 1 Fixed: 2 Y
    4 name String 4 Fixed: "Organization"<br>Case insensitive N
    5 pid hex 32 Sha256 value of this protocol file N
    6 data.op string 4 operation: "quit" Y
    7 data.oid string 64 Organization ID Y
    • Example of appling to join in an organization
    {
        "type": "FEIP",
        "sn": 28,
        "ver": 2,
        "name": "Organization",
        "pid": "",
        "data":{
            "op": "quit",
            "oid": "000000000000011111111111111"
        }
    }
    

    Delist members

    owner或管理员发送交易,给出除名名单,予以除名。
    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: 28 Y
    3 ver int 1 Fixed: 2 Y
    4 name String 4 Fixed: "Organization"<br>Case insensitive N
    5 pid hex 32 Sha256 value of this protocol file N
    6 data.op string 6 operation: "delist" Y
    7 data.oid string 64 Organization ID Y
    8 data.list string array 3096 Addresses to be delisted Y
    • Example of delist members
    {
        "type": "FEIP",
        "sn": 28,
        "ver": 2,
        "name": "Organization",
        "pid": "",
        "data":{
            "op": "delist",
            "oid": "000000000000011111111111111",
            "list": [
    			"FCfcQA9VaCGNDoz3QqneMcFC8jTj3Cuuxc",
    			"FCG7ohMm8xZmhPEpE8Eni2ghiZT5ha9iJw",
    			"FFcY22BH2nyamDLdFWaDGwtKej9KdCKb51"
    		]
        }
    }
    

    Authorize administrator

    owner发送交易,授权若干成员成为管理员。销毁币天不小于10。

    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: 28 Y
    3 ver int 1 Fixed: 2 Y
    4 name String 4 Fixed: "Organization"<br>Case insensitive N
    5 pid hex 32 Sha256 value of this protocol file N
    6 data.op string 10 operation: "authorize" Y
    7 data.oid string 64 Organization ID Y
    8 data.list string array 2048 the list of addresses being authorized Y
    • Example of Authorize
    {
        "type": "FEIP",
        "sn": 28,
        "ver": 2,
        "name": "Organization",
        "pid": "",
        "data":{
            "op": "authorize",
            "oid": "000000000000011111111111111",
            "list": [
    			"FCfcQA9VaCGNDoz3QqneMcFC8jTj3Cuuxc",
    			"FCG7ohMm8xZmhPEpE8Eni2ghiZT5ha9iJw",
    			"FFcY22BH2nyamDLdFWaDGwtKej9KdCKb51"
    		]
        }
    }
    

    Deauthorize administrator

    owner发送交易声明取消列表成员的管理员资格。

    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: 28 Y
    3 ver int 1 Fixed: 2 Y
    4 name String 4 Fixed: "Organization"<br>Case insensitive N
    5 pid hex 32 Sha256 value of this protocol file N
    6 data.op string 12 operation: "deauthorize" Y
    7 data.oid string 64 Organization ID Y
    8 data.list string array 2048 the list of addresses being deauthorized Y
    • Example of Deauthorize
    {
        "type": "FEIP",
        "sn": 28,
        "ver": 2,
        "name": "Organization",
        "pid": "",
        "data":{
            "op": "deauthorize",
            "oid": "000000000000011111111111111",
            "list": [
    			"FCfcQA9VaCGNDoz3QqneMcFC8jTj3Cuuxc",
    			"FCG7ohMm8xZmhPEpE8Eni2ghiZT5ha9iJw",
    			"FFcY22BH2nyamDLdFWaDGwtKej9KdCKb51"
    		]
        }
    }
    

    Rate

    评价者发送一笔交易评价某个组织。

    组织获得的所有评价按照币天销毁加权平均,得到该组织的综合评分。

    组织获得的所有评价的币天销毁总量可以用来衡量该组织的被关注度。

    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: 28 Y
    3 ver int 1 Fixed: 2 Y
    4 name String 4 Fixed: "CAPP"<br>Case insensitive N
    5 pid hex 64 Sha256 value of this protocol file N
    6 data.oid hex 64 Txid when publishing the organization 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": 28,
        "ver": 2,
        "name": "Organization",
        "pid": "",
        "data":{
            "oid": "000000000000011111111111111",
            "op": "rate",
            "rate": 4
        }
    }
    

    QR code

    本协议的二维码用于传递组织名称与oid,包含以下内容:

    {
    
        "meta":"FC",
        "type": "FEIP",
        "sn": 28,
        "ver": 2,
        "data":{
            "stdName": "test",
            "oid": "000000000000011111111111111"
        }
    }
    

Log in to reply