APIP9V1_GroupInfo(zh-CN)



  • APIP9V1_GroupInfo(zh-CN)
    Version:1
    Language:zh-CN
    Author:C_armX
    Status:draft
    Createddate:2021-12-03
    Update:2021-12-03
    Filehash:""
    TXid:
    

    APIP9V1_GroupInfo(zh-CN)


    目录

    关于APIP

    本协议的基本共识

    1.gid列表接口

    2.群详情接口

    3.群搜索接口

    4.群历史接口

    5.群成员搜索接口

    6.我的群列表接口


    Type:APIP
    SerialNumber:9
    ProtocolName:GroupInfo
    Version:1
    Description:定义群信息查询接口。
    Author:C_armX
    Language:zh-CN
    tags:APIP, API, Group, op_return
    preVersionHash:""
    

    关于APIP

    1. APIP(Application Programming Interface Protocols)是自由共识生态协议的一种类型,用于创建开放的API文档,并且按照《FEIP1_FreeProtocol》协议发布在Freecash主链上。

    2. API的URL路径由服务方按照《FEIP29_Service》协议发布在Freecash主链上。

    3. APIP类型协议的一般共识在《APIP1_OpenAPI》中描述,包括接口标识、连接方式、请求方式、数据验证、常用参数、筛选与排序方式等。

    4. 按照《APIP1_OpenAPI》,API请求方向API服务方请求连接请求数据的流程概括如下:

      • 建立连接:请求方通过connect接口提交私钥签名,请求连接API服务,成功后获得对称密钥secretKey用于数据请求和验证。

      • 准备参数:请求数据时,在请求参数中加入timestamp,采用POST方法时,还需加入API的url

      • 参数排序:所有请求参数按字母升序排列,不区分大小写。

      • 数据签名:将secretKey追加至参数末尾,然后经两次sha256哈希获得签名sign

      • 发送请求:删除secretKey字段,将requestersign追加至末尾,发送给服务方。

      • 验证请求:API服务方验证requester授权、signtimestamp、POST方法url等均有效或正确后予以响应。

      • 响应数据:响应数据尾部加入secretKey后做两次sha256哈希获得sign,再用sign替换secretKey后将数据返回请求方。

      • 验证数据:请求方获得数据后,用secretKey替换sign后哈希签名,值与sign值一致则接受数据。

    本协议的基本共识

    1. 本协议接口提供链上注册的各种群的相关信息。

    2. 币天销毁门槛

      • 由于群为全开放组织方式,防范垃圾信息攻击,API服务方构建群信息库时,应设置建群和进群的币天销毁门槛值。
      • createCdThreshold(建群币天销毁门槛):建群的交易必须销毁的最小币天,低于此门槛值的新建群不进入群数据库。
      • joinCdThreshold(进群币天销毁门槛):进群的交易必须销毁的最小币天,低于此门槛值的进群申请者,不进入群成员数据库。
      • 门槛值由API服务方自主动态调整,随着群数据的增长逐渐调高。
    3. 本协议接口的数据来源遵循以下协议:

      • 《FEIP19_Group》
    4. 本协议接口数据采用JSON格式。

    5. 示例数据:

    requester的地址:FEk41Kqjar45fLDriztUDTUkdki7mmcjWK
    
    requester的公钥:030be1d7e633feb2338a74a860e76d893bac525f35a5813cb7b21e27ba1bc8312a
    
    requester的私钥:L2bHRej6Fxxipvb4TiR5bu1rkT3tRp8yWEsUy4R1Zb8VMm2x7sd8
    
    requester的secretKey:d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09
    
    apiURL:https://www.sign.cash/api/
    

    1.gid列表接口

    名称

    gidInfoList

    说明

    给定一个或多个gid获取除成员列表以外的群信息。

    请求参数

    name type description
    gidList string array
    • 示例

    查询gid为00000000000000000000000000111111111111111132222222222222和2222222200000000000000000001111111111111111333333333333333的群最新详情。

    参数

    {
    	"gidList": ["00000000000000000000000000111111111111111132222222222222","2222222200000000000000000001111111111111111333333333333333"],
    	"timestamp": 1635513688254
    }
    

    GET

    - unsignedRequest:
    
    https://www.sign.cash/api/gidInfoList?gid=00000000000000000000000000111111111111111132222222222222&gid=2222222200000000000000000001111111111111111333333333333333&timestamp=1635513688254
    
    - sign =sha256(sha256(https://www.sign.cash/api/gidInfoList?gid=00000000000000000000000000111111111111111132222222222222&gid=2222222200000000000000000001111111111111111333333333333333&timestamp=1635513688254&secretKey=d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09))=33333333333335555555555522222222211111111111111111111111111111
    
    - signedRequest:
    
    https://www.sign.cash/api/gidInfoList?gid=00000000000000000000000000111111111111111132222222222222&gid=2222222200000000000000000001111111111111111333333333333333&timestamp=1635513688254&requester=FEk41Kqjar45fLDriztUDTUkdki7mmcjWK&sign=33333333333335555555555522222222211111111111111111111111111111
    

    POST

    - URL:https://www.sign.cash/api/gidInfoList
    
    - unsignedRequest:
    
    {"gidList": ["00000000000000000000000000111111111111111132222222222222","2222222200000000000000000001111111111111111333333333333333"],"timestamp":1635513688254,"url":"https://www.sign.cash/api/gidInfoList"}
    
    - sign =sha256(sha256({"gidList":["00000000000000000000000000111111111111111132222222222222","2222222200000000000000000001111111111111111333333333333333"],"timestamp":1635513688254,"url":"https://www.sign.cash/api/gidInfoList","secretKey":"d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09"}))=555555555555555555555555522222222211111111111111111111111111111
    
    - signedRequest:
    
    {"gidList":["00000000000000000000000000111111111111111132222222222222","2222222200000000000000000001111111111111111333333333333333"],"timestamp":1635513688254,"url":"https://www.sign.cash/api/gidInfoList","requester":"FEk41Kqjar45fLDriztUDTUkdki7mmcjWK","sign":"555555555555555555555555522222222211111111111111111111111111111"}
    

    响应参数

    name type description
    gidInfoList object See below.
    height uint The latest block height when getting the data.
    • gidInfoList
    name type description key in FEIP19
    gid string The ID of the group,that is,the txid of the transaction in which the group was registered.
    name string The name of the group in english data.name
    desc string Description of this group data.desc
    memberNumber uint64 The number of active members of this group
    sponsor string The signer of the first input of the transaction in which the group was registered.
    updater string The signer of the first input of the transaction in which the group was updated recently.
    firstTime timeStamp The timeStamp of the transaction in which the group was registered.
    lastTxid string The txid of the last update of the group.
    lastTime timeStamp The transaction timestamp of the last update of the group.
    tCdd uint64 All destroyed coindays accumulated by all transactions where the value of data.op is "create", "update", or "join".
    • 示例
      响应id为00000000000000000000000000111111111111111132222222222222和2222222200000000000000000001111111111111111333333333333333的群除成员列表以外的最新信息。
    {
    	"gidInfoList": [{
    			"gid": "000000001111111111111111111111122222222222222222222222222",
    			"name": "crypto socity",
    			"desc": "欢迎来到密码社区",
    			"memberNumber": 2340,
    			"sponsor": "FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv",
    			"updater": "FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv",
    			"firstTime": 1610261291834,
    			"lastTxid": "3333333333333333333333333333388888888888888888888888888889",
    			"lastTime": 1636526891228,
    			"tCdd": 12300000
    		},
    		{
    			"gid": "2222222200000000000000000001111111111111111333333333333333",
    			"name": "digital socity",
    			"desc": "数字社区欢迎你!",
    			"memberNumber": 102,
    			"sponsor": "FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv",
    			"updater": "FEk41Kqjar45fLDriztUDTUkdki7mmcjWK",
    			"firstTime": 1610002234228,
    			"lastTxid": "1111112200000000000000000001111111111111111333333333333333",
    			"lastTime": 1626522299821,
    			"tCdd": 2300000
    		}
    
    	],
    	"height": 989430
    }
    

    排序、压缩、签名后:

    
    {"gidInfoList":[{"desc":"欢迎来到密码社区","firstTime":"1610261291834","gid":"000000001111111111111111111111122222222222222222222222222","lastTime":"1636526891228","lastTxid":"3333333333333333333333333333388888888888888888888888888889","memberNumber":2340,"name":"crypto socity","sponsor":"FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv","tCdd":12300000,"updater":"FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv"},{"desc":"数字社区欢迎你!","firstTime":"1610002234228","gid":"2222222200000000000000000001111111111111111333333333333333","lastTime":"1626522299821","lastTxid":"1111112200000000000000000001111111111111111333333333333333","memberNumber":102,"name":"digital socity","sponsor":"FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv","tCdd":2300000,"updater":"FEk41Kqjar45fLDriztUDTUkdki7mmcjWK"}],"height":989430,"sign":"00000000000000000000011111111111111111111111"}
    
    

    返回值

    返回值 类型 必填 说明
    code uint Y 返回码
    msg string Y 返回信息
    data object N 相关数据
    • 返回信息详情
    code msg 说明 data字段
    0 OK 请求成功
    1 Unknown error. 未知错误 signedRequest
    9000 These GIDs do not exist. 这些GID不存在。 missedGidList
    9001 Too many GIDs are requested. 请求的GID数量太多。 maxGidCount
    • 示例
    {
    	"code": 8000,
    	"msg": "These GIDs do not exist.",
    	"data": {
    		"missedGidList": ["2222222200000000000000000001111111111111111333333333333333"]
    	}
    }
    

    2. 群详情接口

    名称

    gidDetails

    说明

    给定一个gid获取其包括群成员在内的全部信息。

    请求参数

    name type description
    gid string
    • 示例

    查询gid为00000000000000000000000000111111111111111132222222222222的群最新详情。

    参数

    {
    	"gid": "00000000000000000000000000111111111111111132222222222222",
    	"timestamp": 1635513688254
    }
    

    GET

    - unsignedRequest:
    
    https://www.sign.cash/api/gidDetails?gid=00000000000000000000000000111111111111111132222222222222&timestamp=1635513688254
    
    - sign =sha256(sha256(https://www.sign.cash/api/gidDetails?gid=00000000000000000000000000111111111111111132222222222222&timestamp=1635513688254&secretKey=d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09))=33333333333335555555555522222222211111111111111111111111111111
    
    - signedRequest:
    
    https://www.sign.cash/api/gidDetails?gid=00000000000000000000000000111111111111111132222222222222&timestamp=1635513688254&requester=FEk41Kqjar45fLDriztUDTUkdki7mmcjWK&sign=33333333333335555555555522222222211111111111111111111111111111
    

    POST

    - URL:https://www.sign.cash/api/gidDetails
    
    - unsignedRequest:
    
    {"gid":"00000000000000000000000000111111111111111132222222222222","timestamp":"1635513688254","url":"https://www.sign.cash/api/gidDetails"}
    
    - sign =sha256(sha256({"gid":"00000000000000000000000000111111111111111132222222222222","timestamp":"1635513688254","url":"https://www.sign.cash/api/gidDetails","secretKey":"d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09"}))=555555555555555555555555522222222211111111111111111111111111111
    
    - signedRequest:
    
    {"gid":"00000000000000000000000000111111111111111132222222222222","timestamp":"1635513688254","url":"https://www.sign.cash/api/gidDetails","requester":"FEk41Kqjar45fLDriztUDTUkdki7mmcjWK","sign":"555555555555555555555555522222222211111111111111111111111111111"}
    

    响应参数

    name type description key in FEIP19
    gid string The ID of the group,that is,the txid of the transaction in which the group was registered.
    name string The name of the group in english data.name
    desc string Description of this group data.desc
    memberNumber uint64 The number of active members of this group.
    activeMembers string array The address list of active members.
    exitedMembers string array The address list of exited members.
    sponsor string The signer of the first input of the transaction in which the group was registered.
    updater string The signer of the first input of the transaction in which the group was updated recently.
    firstTime timeStamp The timeStamp of the transaction in which the group was registered.
    lastTxid string The txid of the last update of the group.
    lastTime timeStamp The transaction timestamp of the last update of the group.
    tCdd uint64 All destroyed coindays accumulated by all transactions where the value of data.op is "create", "update", or "join".
    height uint The latest block height when getting the data.
    • 示例
      响应id为00000000000000000000000000111111111111111132222222222222和2222222200000000000000000001111111111111111333333333333333的群最新详情。
    {
    	"gid": "000000001111111111111111111111122222222222222222222222222",
    	"name": "crypto socity",
    	"desc": "欢迎来到密码社区",
    	"memberNumber": 4,
    	"activeMembers": ["F1111111111111S", "F2222222222222222Z", "F33333333333333333333h", "F4444444444444444444NC7N"],
    	"exitedMembers": ["F555555555555555S", "F666666666666666666666Z"],
    	"sponsor": "FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv",
    	"updater": "FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv",
    	"firstTime": 1610261291834,
    	"lastTxid": "3333333333333333333333333333388888888888888888888888888889",
    	"lastTime": 1636526891228,
    	"tCdd": 12300000,
    	"height": 989430
    }
    

    排序、压缩、签名后:

    
    {"activeMembers":["F1111111111111S","F2222222222222222Z","F33333333333333333333h","F4444444444444444444NC7N"],"desc":"欢迎来到密码社区","exitedMembers":["F555555555555555S","F666666666666666666666Z"],"firstTime":"1610261291834","gid":"000000001111111111111111111111122222222222222222222222222","height":989430,"lastTime":"1636526891228","lastTxid":"3333333333333333333333333333388888888888888888888888888889","memberNumber":4,"name":"crypto socity","sponsor":"FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv","tCdd":12300000,"updater":"FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv","sign":"00000000000000000000011111111111111111111111"}
    
    

    返回值

    返回值 类型 必填 说明
    code uint Y 返回码
    msg string Y 返回信息
    data object N 相关数据
    • 返回信息详情
    code msg 说明 data字段
    0 OK 请求成功
    1 Unknown error. 未知错误 signedRequest
    9002 The GID does not exist. 该GID不存在。 gid
    • 示例
    {
    	"code": 9002,
    	"msg": "The GID does not exist.",
    	"data": {
    		"gid": "000000001111111111111111111111122222222222222222222222222"
    	}
    }
    

    3.群搜索接口

    名称

    groupSearch

    说明

    按条件查询群。

    请求参数

    name type description required
    filterName string Filter by the data.name N
    filterDesc string Filter by data.desc N
    FilterSponsor string Filter by the sponsor.
    FilterUpdater string Filter by the last updater.
    filterMemberNumber uint64 Filter by the number of active members. N
    filterFirstTime string Filter by firstTime N
    filterLastTime string Filter by lastTime N
    filterTCdd string Filter by tCdd which is all destroyed coindays accumulated by all transactions where the value of data.op is "create", "update", or "join". N
    sortMemberNumber uint64 Sort by the number of active members. N
    sortFirstTime string Sort by firstTime N
    sortLastTime string Sort by lastTime N
    sortTCdd string Sort by tCdd N
    sortName string Sort by the data.ame N
    count uint How many entries are wanted in a single request. N
    sequence uint Sequence in continuous request.Start from 0. N
    • 示例

    查询2项名称中包含为“Crypto”,累计销毁币天tCdd大于1000的群,结果按创建时间倒序排列。

    参数

    {
    	"filterName": "Cryto",
    	"filterTCdd": "1000-",
    	"sortFirstTime": "down",
    	"count": 2,
    	"timestamp": 1635513688254
    }
    

    GET

    - unsignedRequest:
    
    https://www.sign.cash/api/groupSearch?count=2&filterName=Cryto&filterTCdd=1000-&sortFirstTime=down&timestamp=1635513688254
    
    - sign =sha256(sha256(https://www.sign.cash/api/groupSearch?count=2&filterName=Cryto&filterTCdd=1000-&sortFirstTime=down&timestamp=1635513688254&secretKey=d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09))=1111111111111110000000000000000000000
    
    - signedRequest:
    
    https://www.sign.cash/api/groupSearch?count=2&filterName=Cryto&filterTCdd=1000-&sortFirstTime=down&timestamp=1635513688254&requester=FEk41Kqjar45fLDriztUDTUkdki7mmcjWK&sign=1111111111111111110000000000000000000000
    

    POST

    - URL:https://www.sign.cash/api/groupSearch
    
    - unsignedRequest:
    
    {"count":2,"filterName":"Cryto","filterTCdd":"1000-","sortFirstTime":"down","timestamp":"1635513688254","url":"https://www.sign.cash/api/groupSearch"}
    
    - sign =sha256(sha256({"count":2,"filterName":"Cryto","filterTCdd":"1000-","sortFirstTime":"down","timestamp":"1635513688254","url":"https://www.sign.cash/api/groupSearch","secretKey":"d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09"}))=1111111111111111110000000000000000000000
    
    - signedRequest:
    
    {"count":2,"filterName":"Cryto","filterTCdd":"1000-","sortFirstTime":"down","timestamp":"1635513688254","url":"https://www.sign.cash/api/groupSearch","requester":"FEk41Kqjar45fLDriztUDTUkdki7mmcjWK","sign":"1111111111111111110000000000000000000000"}
    

    响应参数

    name type description
    gidInfoList object See below.
    height uint The latest block height when getting the data.
    • gidInfoList
    name type description key in FEIP19
    gid string The ID of the group,that is,the txid of the transaction in which the group was registered.
    name string The name of the group in english data.name
    desc string Description of this group data.desc
    memberNumber uint64 The number of active members of this group
    sponsor string The signer of the first input of the transaction in which the group was registered.
    updater string The signer of the first input of the transaction in which the group was updated recently.
    firstTime timeStamp The timeStamp of the transaction in which the group was registered.
    lastTxid string The txid of the last update of the group.
    lastTime timeStamp The transaction timestamp of the last update of the group.
    tCdd uint64 All destroyed coindays accumulated by all transactions where the value of data.op is "create", "update", or "join".
    • 示例
      响应2项名称中包含为“Crypto”,累计销毁币天tCdd大于1000的群,结果按创建时间倒序排列。
    {
    	"gidInfoList": [{
    			"gid": "000000001111111111111111111111122222222222222222222222222",
    			"name": "crypto socity",
    			"desc": "欢迎来到密码社区",
    			"memberNumber": 2340,
    			"sponsor": "FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv",
    			"updater": "FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv",
    			"firstTime": 1610261291834,
    			"lastTxid": "3333333333333333333333333333388888888888888888888888888889",
    			"lastTime": 1636526891228,
    			"tCdd": 300000
    		},
    		{
    			"gid": "2222222200000000000000000001111111111111111333333333333333",
    			"name": "crypto school",
    			"desc": "密码学校欢迎你!",
    			"memberNumber": 102,
    			"sponsor": "FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv",
    			"updater": "FEk41Kqjar45fLDriztUDTUkdki7mmcjWK",
    			"firstTime": 1610002234228,
    			"lastTxid": "1111112200000000000000000001111111111111111333333333333333",
    			"lastTime": 1626522299821,
    			"tCdd": 2300
    		}
    
    	],
    	"height": 989430
    }
    

    排序、压缩、签名后:

    
    {"gidInfoList":[{"desc":"欢迎来到密码社区","firstTime":"1610261291834","gid":"000000001111111111111111111111122222222222222222222222222","lastTime":"1636526891228","lastTxid":"3333333333333333333333333333388888888888888888888888888889","memberNumber":2340,"name":"crypto socity","sponsor":"FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv","tCdd":300000,"updater":"FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv"},{"desc":"密码学校欢迎你!","firstTime":"1610002234228","gid":"2222222200000000000000000001111111111111111333333333333333","lastTime":"1626522299821","lastTxid":"1111112200000000000000000001111111111111111333333333333333","memberNumber":102,"name":"crypto school","sponsor":"FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv","tCdd":2300,"updater":"FEk41Kqjar45fLDriztUDTUkdki7mmcjWK"}],"height":989430,"sign":"00000000000000000000011111111111111111111111"}
    
    

    返回值

    返回值 类型 必填 说明
    code uint Y 返回码
    msg string Y 返回信息
    data object N 相关数据
    • 返回信息详情
    code msg 说明 data字段
    0 OK 请求成功
    1 Unknown error. 未知错误 signedRequest
    4000 No matching record. 没有符合条件的信息。 signedRequest
    • 示例
    {
    	"code": 4000,
    	"msg": "No matching record.",
    	"data": {
    		"signedRequest": "https://www.sign.cash/api/groupSearch?count=2&filterName=Cryto&filterTCdd=1000-&sortFirstTime=down&timestamp=1635513688254&requester=FEk41Kqjar45fLDriztUDTUkdki7mmcjWK&sign=1111111111111111110000000000000000000000"
    	}
    }
    

    4. 群历史接口

    名称

    gidHistory

    说明

    查询某gid群的所有历史操作记录。

    请求参数

    name type description required
    gid string Y
    filterSigner string Filter by the signer, the address of the first input of the transaction. N
    filterOp string Filter by data.op N
    filterTxTimestamp string Filter by txTimestamp N
    filterCdd string Filter by cdd N
    sortOp string Sort by data.op N
    sortTxTimestamp string Sort by txTimestamp N
    sortCdd string Sort by Cdd N
    count uint How many entries are wanted in a single request. N
    sequence uint Sequence in continuous request.Start from 0. N
    • 示例

    第2批查询20项gid为000000001111111111111111111111122222222222222222222222222的群操作记录,按txTimestamp降序。

    参数

    {
    	"gid": "000000001111111111111111111111122222222222222222222222222",
        "sortTxTimestamp": "down",
    	"count": 20,
    	"sequence": 1,
    	"timestamp": 1635513688254
    }
    

    GET

    - unsignedRequest:
    
    https://www.sign.cash/api/gidHistory?count=20&gid=000000001111111111111111111111122222222222222222222222222&sequence=1&sortTxTimestamp=down&timestamp=1635513688254
    
    - sign =sha256(sha256(https://www.sign.cash/api/gidHistory?count=20&gid=000000001111111111111111111111122222222222222222222222222&sequence=1&sortTxTimestamp=down&timestamp=1635513688254&secretKey=d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09))=1111111111111110000000000000000000000
    
    - signedRequest:
    
    https://www.sign.cash/api/gidHistory?count=20&filteOp=rate&filterCdd=1000-&gid=000000001111111111111111111111122222222222222222222222222&sequence=1&sortRate=down&timestamp=1635513688254&requester=FEk41Kqjar45fLDriztUDTUkdki7mmcjWK&sign=1111111111111111110000000000000000000000
    

    POST

    - URL:https://www.sign.cash/api/gidHistory
    
    - unsignedRequest:
    
    {"count":20,"gid":"000000001111111111111111111111122222222222222222222222222","sequence":1,"sortTxTimestamp":"down","timestamp":"1635513688254","url":"https://www.sign.cash/api/gidHistory"}
    
    - sign =sha256(sha256({"count":20,"filteOp":"rate","filterCdd":"1000-","gid":"000000001111111111111111111111122222222222222222222222222","sequence":1,"sortRate":"down","timestamp":"1635513688254","url":"https://www.sign.cash/api/gidHistory","secretKey":"d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09"}))=1111111111111111110000000000000000000000
    
    - signedRequest:
    
    {"count":20,"filteOp":"rate","filterCdd":"1000-","gid":"000000001111111111111111111111122222222222222222222222222","sequence":1,"sortRate":"down","timestamp":"1635513688254","url":"https://www.sign.cash/api/gidHistory","requester":"FEk41Kqjar45fLDriztUDTUkdki7mmcjWK","sign":"1111111111111111110000000000000000000000"}
    

    响应参数

    |name|type|description|key in FEIP19|
    |:---|:---|:---|
    |gid|string||
    |name|string|The current name of the group|data.name|
    |opList|object|See below.|
    |height|uint|The latest block height when getting the data.|

    • opList
    name type description
    op string The operation.
    signer string The signer of the first input of the transaction
    name string The name of the group
    desc string Description of this group
    txid string The txid of this transaction
    txTimestamp timestamp The timestamp of this transaction
    cdd uint64 Coindays destroyed of this transaction
    block uint The height of the block where the transaction is written
    • 示例

    响应第2批查询20项gid为000000001111111111111111111111122222222222222222222222222的群操作记录,按txTimestamp降序。

    {
    	"gid": "000000001111111111111111111111122222222222222222222222222",
    	"name": "crypto circle",
    	"opList": [{
    			"op": "join",
    			"signer": "FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv",
    			"txTimestamp": 1613211239,
    			"txid": "0460fc1a1ada6479037a07c05509cfcb0d2e8ead2d2b32a5a6784f558c448866",
    			"cdd": 2300,
    			"block": 989239
    		},
    
    		{
    			"op": "update",
    			"name": "crypto school",
    			"desc": "密码学院讨论群",
    			"txTimestamp": 1610261291,
    			"txid": "0460fc1a1ada6479037a07c05509cfcb0d2e8ead2d2b32a5a6784f558c448866",
    			"cdd": 11300,
    			"block": 989021
    		}
    	],
    	"height": 989430
    }
    

    排序、压缩、签名后:

    
    {"gid":"000000001111111111111111111111122222222222222222222222222","opList":[{"block":989239,"cdd":2300,"op":"join","signer":"FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv","txTimestamp":1613211239,"txid":"0460fc1a1ada6479037a07c05509cfcb0d2e8ead2d2b32a5a6784f558c448866"},{"block":989021,"cdd":11300,"desc":"密码学院讨论群","name":"crypto school","op":"update","txTimestamp":1610261291,"txid":"0460fc1a1ada6479037a07c05509cfcb0d2e8ead2d2b32a5a6784f558c448866"}],"height":989430,"name":"crypto circle","sign":"00000000000000000000011111111111111111111111"}
    
    

    返回值

    返回值 类型 必填 说明
    code uint Y 返回码
    msg string Y 返回信息
    data object N 相关数据
    • 返回信息详情
    code msg 说明 data字段
    0 OK 请求成功
    1 Unknown error. 未知错误 signedRequest
    9002 The GID does not exist. 该GID不存在。 gid
    • 示例
    {
    	"code": 9002,
    	"msg": "The GID does not exist.",
    	"data": {
    		"gid": "000000001111111111111111111111122222222222222222222222222"
    	}
    }
    

    5. 群成员搜索接口

    名称

    gidMemberSearch

    说明

    模糊查询某gid群的某个cid或地址,不区分大小写。

    请求参数

    name type description required
    gid string Y
    searchMember string Text searched in the field of cid and Address of the group members Y
    • 示例

    搜索包含“arm”的cid或address。

    参数

    {
    	"gid": "000000001111111111111111111111122222222222222222222222222",
        "searchMember": "arm",
    	"timestamp": 1635513688254
    }
    

    GET

    - unsignedRequest:
    
    https://www.sign.cash/api/gidMemberSearch?gid=000000001111111111111111111111122222222222222222222222222&searchMember=arm&timestamp=1635513688254
    
    - sign =sha256(sha256(https://www.sign.cash/api/gidMemberSearch?gid=000000001111111111111111111111122222222222222222222222222&searchMember=arm&timestamp=1635513688254&secretKey=d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09))=1111111111111110000000000000000000000
    
    - signedRequest:
    
    https://www.sign.cash/api/gidMemberSearch?gid=000000001111111111111111111111122222222222222222222222222&searchMember=arm&timestamp=1635513688254&requester=FEk41Kqjar45fLDriztUDTUkdki7mmcjWK&sign=1111111111111111110000000000000000000000
    

    POST

    - URL:https://www.sign.cash/api/gidMemberSearch
    
    - unsignedRequest:
    
    {"gid":"000000001111111111111111111111122222222222222222222222222","searchMember":"arm","timestamp":"1635513688254","url":"https://www.sign.cash/api/gidMemberSearch"}
    
    - sign =sha256(sha256({"gid":"000000001111111111111111111111122222222222222222222222222","searchMember":"arm","timestamp":"1635513688254","url":"https://www.sign.cash/api/gidMemberSearch"},"secretKey":"d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09"}))=1111111111111111110000000000000000000000
    
    - signedRequest:
    
    {"gid":"000000001111111111111111111111122222222222222222222222222","searchMember":"arm","timestamp":"1635513688254","url":"https://www.sign.cash/api/gidMemberSearch","requester":"FEk41Kqjar45fLDriztUDTUkdki7mmcjWK","sign":"1111111111111111110000000000000000000000"}
    
    

    响应参数

    |name|type|description|key in FEIP19|
    |:---|:---|:---|
    |memberList|string array|List of CID and Address including value of the searchMember|
    |height|uint|The latest block height when getting the data.|

    • 示例

    响应搜索包含“arm”的cid或address。

    {
    	"gid": "000000001111111111111111111111122222222222222222222222222",
    	"memberList": ["C_armX", "Duck_karm", "FEk41Kqjar45fLDriztUDTUkdki7mmcARM"],
    	"height": 989430
    }
    

    排序、压缩、签名后:

    
    {"gid":"000000001111111111111111111111122222222222222222222222222","height":989430,"memberList":["C_armX","Duck_karm","FEk41Kqjar45fLDriztUDTUkdki7mmcARM"],"sign":"00000000000000000000011111111111111111111111"}
    
    

    返回值

    返回值 类型 必填 说明
    code uint Y 返回码
    msg string Y 返回信息
    data object N 相关数据
    • 返回信息详情
    code msg 说明 data字段
    0 OK 请求成功
    1 Unknown error. 未知错误 signedRequest
    4000 No matching record. 没有符合条件的信息。 signedRequest
    • 示例
    {
    	"code": 4000,
    	"msg": "No matching record.",
    	"data": {
    		"signedRequest": "https://www.sign.cash/api/cappSearch?count=2&filterTCdd=1000-&filterType=API&filterUrl=sign.cash&sortTRate=down&timestamp=1635513688254&requester=FEk41Kqjar45fLDriztUDTUkdki7mmcjWK&sign=1111111111111111110000000000000000000000"
    	}
    }
    

    6. 我的群列表接口

    名称

    myGroupList

    说明

    模糊查询某address当前参与和已经退出的群列表。

    请求参数

    name type description required
    address string Y
    filterMemberStatus string enum Filter by the status of members, including "active" and "exited" two status.
    • 示例

    搜索F888888888888888888888888888x参与的所有群。

    参数

    {
    	"address": "F888888888888888888888888888x",
    	"timestamp": 1635513688254
    }
    

    GET

    - unsignedRequest:
    
    https://www.sign.cash/api/myGroupList?address=F888888888888888888888888888x&timestamp=1635513688254
    
    - sign =sha256(sha256(https://www.sign.cash/api/myGroupList?address=F888888888888888888888888888x&timestamp=1635513688254&secretKey=d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09))=1111111111111110000000000000000000000
    
    - signedRequest:
    
    https://www.sign.cash/api/myGroupList?address=F888888888888888888888888888x&timestamp=1635513688254&requester=FEk41Kqjar45fLDriztUDTUkdki7mmcjWK&sign=1111111111111111110000000000000000000000
    

    POST

    - URL:https://www.sign.cash/api/myGroupList
    
    - unsignedRequest:
    
    {"address":"F888888888888888888888888888x","timestamp":1635513688254,"url":"https://www.sign.cash/api/myGroupList"}
    
    - sign
    =sha256(sha256({"address":"F888888888888888888888888888x","timestamp":1635513688254,"url":"https://www.sign.cash/api/myGroupList","secretKey":"d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09"}))=1111111111111111110000000000000000000000
    
    - signedRequest:
    
    {"address":"F888888888888888888888888888x","timestamp":1635513688254,"url":"https://www.sign.cash/api/myGroupList","requester":"FEk41Kqjar45fLDriztUDTUkdki7mmcjWK","sign":"1111111111111111110000000000000000000000"}
    
    

    响应参数

    name type description
    gidInfoList object See below.
    height uint The latest block height when getting the data.
    • gidInfoList
    name type description key in FEIP19
    memberStatus string enum Filter by the status of members, including "active" and "exited" two status.
    gid string The ID of the group,that is,the txid of the transaction in which the group was registered.
    name string The name of the group in english data.name
    desc string Description of this group data.desc
    memberNumber uint64 The number of active members of this group
    sponsor string The signer of the first input of the transaction in which the group was registered.
    updater string The signer of the first input of the transaction in which the group was updated recently.
    firstTime timeStamp The timeStamp of the transaction in which the group was registered.
    lastTxid string The txid of the last operation of the group.
    lastTime timeStamp The transaction timestamp of the last operation of the group.
    tCdd uint64 All destroyed coindays accumulated by all transactions where the value of data.op is "create", "update", or "join".
    • 示例

    响应搜索F888888888888888888888888888x参与的所有群。

    {
    	"gidInfoList": [{
    			"memberStatus": "active",
    			"gid": "000000001111111111111111111111122222222222222222222222222",
    			"name": "crypto socity",
    			"desc": "欢迎来到密码社区",
    			"memberNumber": 2340,
    			"sponsor": "FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv",
    			"updater": "FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv",
    			"firstTime": 1610261291834,
    			"lastTxid": "3333333333333333333333333333388888888888888888888888888889",
    			"lastTime": 1636526891228,
    			"tCdd": 300000
    		},
    		{
    			"gid": "2222222200000000000000000001111111111111111333333333333333",
    			"memberStatus": "exited",
    			"name": "crypto school",
    			"desc": "密码学校欢迎你!",
    			"memberNumber": 102,
    			"sponsor": "FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv",
    			"updater": "FEk41Kqjar45fLDriztUDTUkdki7mmcjWK",
    			"firstTime": 1610002234228,
    			"lastTxid": "1111112200000000000000000001111111111111111333333333333333",
    			"lastTime": 1626522299821,
    			"tCdd": 2300
    		}
    
    	],
    	"height": 989430
    }
    

    排序、压缩、签名后:

    {"gidInfoList":[{"desc":"欢迎来到密码社区","exited":0,"firstTime":"1610261291834","gid":"000000001111111111111111111111122222222222222222222222222","lastTime":"1636526891228","lastTxid":"3333333333333333333333333333388888888888888888888888888889","memberNumber":2340,"name":"crypto socity","sponsor":"FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv","tCdd":300000,"updater":"FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv"},{"desc":"密码学校欢迎你!","exited":1,"firstTime":"1610002234228","gid":"2222222200000000000000000001111111111111111333333333333333","lastTime":"1626522299821","lastTxid":"1111112200000000000000000001111111111111111333333333333333","memberNumber":102,"name":"crypto school","sponsor":"FPL44YJRwPdd2ipziFvqq6y2tw4VnVvpAv","tCdd":2300,"updater":"FEk41Kqjar45fLDriztUDTUkdki7mmcjWK"}],"height":989430,"sign":"00000000000000000000011111111111111111111111"}
    
    

    返回值

    返回值 类型 必填 说明
    code uint Y 返回码
    msg string Y 返回信息
    data object N 相关数据
    • 返回信息详情
    code msg 说明 data字段
    0 OK 请求成功
    1 Unknown error. 未知错误 signedRequest
    4000 No matching record. 没有符合条件的信息。 signedRequest
    • 示例
    {
    	"code": 4000,
    	"msg": "No matching record.",
    	"data": {
    		"signedRequest": "https://www.sign.cash/api/myGroupList?address=F888888888888888888888888888x&timestamp=1635513688254&requester=FEk41Kqjar45fLDriztUDTUkdki7mmcjWK&sign=1111111111111111110000000000000000000000"
    	}
    }
    

Log in to reply