FEIP29V1_Service(en-US)
-
FEIP29: Service Version: 1 Language: en-US Author: C_armX, Deisler-JJ_Sboy Status: draft Created date: 2021-05-12 Last modified date:2021-05-12 File hash: "" TXid:
FEIP29V1_Service(en-US)
Contents
General rules of FEIP type protocols
Rules specific to this protocol
Introduction
Protocol type: FEIP Serial number: 29 Protocol name: Service Version: 1 Description : 声明提供、终止、更新或评价某种服务。 Author: C_armX, Deisler-JJ_Sboy Language: en-US Tags: FEIP, Service Previous version hash:""
General rules of FEIP type protocols
-
Write important data in OP_RETURN for public witness under FEIP type protocols
-
The max size of OP_RETURN : 4096 bytes
-
Format : compacted json
-
Encoding : utf-8
Rules specific to this protocol
-
任何cid可以通过本协议发布自己愿意提供的服务。
-
发送交易的txid为该服务的全网唯一id,称为"sid"。
-
服务名称(stdName)由发布者自定义。
-
可以用"[stdName]"+@+"[cid]"指代一项服务,如freedrive@freer_ew8H,便于识别。
-
发布者应保证自己发布的不同服务使用不同的stdName。
Start a service
本服务发布者发送一笔交易。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: 29 Y 3 ver int 1 Fixed: 1 Y 4 name String 7 Fixed: "Service"<br>Case insensitive N 5 hash hex 32 Sha256 value of this protocol file N 6 data.op string 6 operation: "start" 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.type string array 128 The types of the service N 10 data.url string 512 URL describing the service N Example of starting a service
{ "type": "FEIP", "sn": 29, "ver": 1, "name": "Service", "hash": "", "data":{ "op": "start", "stdName": "freedrive", "localName": ["飞盘","フリスビー"], "type": ["cloud storage","infrastructure"], "url": "https://freedrive.com" } }
stop a service
本服务发布者发送一笔交易。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: 1 Y 4 name String 4 Fixed: "Service"<br>Case insensitive N 5 hash hex 32 Sha256 value of this protocol file N 6 data.sid string 32 Txid when starting the service Y 7 data.op string 7 operation: "stop" Y Example of stopping a service
{ "type": "FEIP", "sn": 29, "ver": 1, "name": "Service", "hash": "", "data":{ "sid": "1111111111222222222233333333344444444444", "op": "stop" } }
restart a service
本服务发布者发送一笔交易。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: 1 Y 4 name String 4 Fixed: "Service"<br>Case insensitive N 5 hash hex 32 Sha256 value of this protocol file N 6 data.sid string 32 Txid when starting the service Y 7 data.op string 7 operation: "restart" Y Example of restarting a Service
{ "type": "FEIP", "sn": 29, "ver": 1, "name": "Service", "hash": "", "data":{ "sid": "1111111111222222222233333333344444444444", "op": "restart" } }
Update a service
本服务发布者发送一笔交易。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: 29 Y 3 ver int 1 Fixed: 1 Y 4 name String 7 Fixed: "Service"<br>Case insensitive N 5 hash hex 32 Sha256 value of this protocol file N 6 data.sid string 32 Txid when starting the service Y 7 data.op string 6 operation: "update" Y 8 data.stdName string 64 the name of the service in english N 9 data.localName string array 1024 service names in different languages N 10 data.type string array 128 The types of the service N 11 data.url string 512 URL describing the service N Example of updating a Service
{ "type": "FEIP", "sn": 29, "ver": 1, "name": "Service", "hash": "", "data":{ "sid": "1111111111222222222233333333344444444444", "op": "update", "stdName": "freedrive#1", "localName": ["飞盘#1","フリスビー#1"], "type": ["cloud storage","infrastructure"], "url": "https://freedrive.com" } }
rate a service
本服务发布者发送一笔交易。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: 1 Y 4 name String 4 Fixed: "Service"<br>Case insensitive N 5 hash hex 32 Sha256 value of this protocol file N 6 data.sid string 32 Txid when starting the service Y 7 data.op string 7 operation: "rate" Y 8 data.rate int 1 Rating of the service from 1 to 5 N Example of restarting a Service
{ "type": "FEIP", "sn": 29, "ver": 1, "name": "Service", "hash": "", "data":{ "sid": "1111111111222222222233333333344444444444", "op": "rate", "rate": "4" } }
-