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-04-30 PID: "" TXID:
FEIP28V2_Organization(zh-CN)
Contents
Update organization information
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
-
Write important data in OP_RETURN for public witness under FEIP type protocols.
-
The SIGHASH flag of all transaction inputs is ‘ALL’ (value 0x01).
-
The max size of OP_RETURN : 4096 bytes.
-
The format of the data in op_return: JSON.
-
Encoding : utf-8.
About this protocol
-
本协议用于在Freecash主链上创建、管理或评价一个组织。
-
任何FCH地址,可以声明创建一个组织,并发布组织的共识,该交易的
txid
即为组织身份,即:oid
,创建这为该组织的所有者owner
。 -
组织的管理规则在共识中约定,共识文件做两次sha256哈希得到
data.consHash
的值。 -
owner
可以转让组织给其他人,转让后被转让者成为该组织的owner
。 -
owner
可以依据《FEIP6_Master》
声明自己的主控身份,该主控身份可以转让组织,以防止owner私钥泄露或丢失。 -
owner
或其授权的管理员
可以向他人发出有时效的链上正式邀请,即邀请成员。 -
被邀请者在邀请有效期内接受共识,同意加入组织,正式成为会员,未被邀请不能加入组织。
-
owner
或管理员
可以除名组织成员。 -
管理员可以除名自己。
-
为防范垃圾信息攻击,
创建或更新
组织至少应当销毁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发送一笔交易,输出地址为本oid地址。
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发送一笔交易,输入与输出均为本oid地址,销毁币天不小于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
共识修改后,需要现有组织成员签名接受新共识。由组织成员给oid发送一笔交易,第一个输入为成员地址,第一个输出为所在oid地址。
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
oid或管理员可向他人发出加入邀请。销毁币天不小于10cd。
oid或被授权者发送一笔交易给被邀请者的地址。
输出地址与addList一致,找零地址为第一个输入地址,输出金额不小于相应地址按《FEIP_NoticeFee》声明的noticeFee数额。
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: "add" Y 7 data.oid string 64 Organization ID Y 8 data.inviteList 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": "add", "oid": "000000000000011111111111111", "inviteList": [ "FCfcQA9VaCGNDoz3QqneMcFC8jTj3Cuuxc", "FCG7ohMm8xZmhPEpE8Eni2ghiZT5ha9iJw", "FFcY22BH2nyamDLdFWaDGwtKej9KdCKb51" ], "days": 10 } }
Join an organization
主体收到邀请后,理解共识,并同意后发起交易,正式加入组织。销毁币天不小于10。
接到邀请且同意加入,才正式成为组织成员,未接到邀请的加入操作无效。
首输入为加入者地址,首输出为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: "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
由退出者发送一笔交易,第一个输入为退出者地址,第一个输出为想要退出的oid地址。
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
oid或被授权者给被除名的所有地址发送交易。输出地址与deliList一致,找零地址为第一个输入地址。
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.deliList 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", "deliList": [ "FCfcQA9VaCGNDoz3QqneMcFC8jTj3Cuuxc", "FCG7ohMm8xZmhPEpE8Eni2ghiZT5ha9iJw", "FFcY22BH2nyamDLdFWaDGwtKej9KdCKb51" ] } }
Authorize administrator
owner向若干成员发送交易,授权其代理执行指定操作。输出地址与AuthList一致,找零地址为第一个输入地址。销毁币天不小于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.authList 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", "authList": [ "FCfcQA9VaCGNDoz3QqneMcFC8jTj3Cuuxc", "FCG7ohMm8xZmhPEpE8Eni2ghiZT5ha9iJw", "FFcY22BH2nyamDLdFWaDGwtKej9KdCKb51" ] } }
Deauthorize administrator
owner向若干成员发送交易,取消对其所做的所有授权。输出地址与DeauList一致,找零地址为第一个输入地址。
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.deauList 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", "deauList": [ "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,包含以下内容:
{ "metaverse":"FC", "type": "FEIP", "sn": 28, "ver": 2, "data":{ "stdName": "test", "oid": "000000000000011111111111111" } }
-