FEIP6V5_Authorization(en-US)



  • FEIP6: Authorization
    Version: 5
    Language: en-US
    Author: C_armX, Deisler-JJ_Sboy
    Status: draft
    Created date: 2021-04-28
    File hash: "HEX Hash"
    TXid: 
    

    FEIP6V5_Authorization(en-US)

    Contents

    Introduction

    General rules of FEIP type protocols

    Rules specific to this protocol

    OP RETURN

    Example of irrevocable permanent full authorition

    Example of revocable full authorition in a period

    Example of deauthorize a full authorition

    Introduction

    Type: FEIP
    SerialNumber: 6
    ProtocolName: Authorization
    Version: 5
    Description : An address authorize another address on blockchain with a freecash transaction.
    Author: C_armX, Deisler-JJ_Sboy
    Language: en-US
    tags: FEIP, Authorization, Relationship
    preVersionHash:"bcba4e28eb4c591a1fd1bce2108c2a220fc3a6d762eaca68bb15ca2cace22f5b"
    

    General rules 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 : Json

    4. Encoding : utf-8

    Rules specific to this protocol

    1. Authorization means that the address of first input authorize to the address of first output. Other inputs and outputs have nothing to do with authorization.

    2. An address can't authorize itself.

    3. Irrevocable authorition can't be deauthorized.

    4. The deauthorition takes effect immediately and is not affected by the startTime and endTime.

    OP_RETURN

    The OP_RETURN of which contains the data as follows:

    field number field name type length content required
    1 type String 4 Fixed: "FEIP"<br>Case insensitive Y
    2 sn int 1 Fixed: 6 Y
    3 ver int 1 Fixed: 5 Y
    4 name int 13 Fixed: "Authorization"<br>Case insensitive N
    5 Hash hex 32 Sha256 value of this file N
    6 data.op string 13 "authorition" or "deauthorition" Y
    7 data.type string 32 "revocable" or "irrevocable" N
    8 data.content string array 256 "all" for full authorition.<br>Other contents has not been defined. N
    9 data.startTime int 4 UNIX timestamp N
    10 data.endTime int 4 UNIX timestamp N

    Example of irrevocable permanent full authorition

    
    {
        "type": "FEIP",
        "sn": 6,
        "ver": 5,
        "name": "Authorization",
        "hash": "",
    	"data":{
    		"op":"authorition",
    		"type":"irrevocable",
    		"content":["all"]
    	}
    }
    

    Example of revocable full authorition in a period

    
    {
        "type": "FEIP",
        "sn": 6,
        "ver": 5,
        "name": "Authorization",
        "hash": "",
    	"data":{
    		"op":"authorition",
    		"type":"revocable",
    		"content":["all"],
    		"startTime":1612108800,
    		"endTime":1643558400
    	}
    }
    
    

    Example of deauthorize a full authorition

    {
        "type": "FEIP",
        "sn": 6,
        "ver": 5,
        "name": "Authorization",
        "hash": "",
    	"data":{
    		"op":"deauthorition",
    		"content":["all"]
    	}
    }
    
    

Log in to reply