APIP10V1_OrganizationInfo(zh-CN)



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

    APIP10V1_OrganizationInfo(zh-CN)


    目录

    关于APIP

    本协议的基本共识

    1.组织概况接口

    2.组织成员接口

    3.组织历史接口

    4.组织搜索接口

    5.组织成员搜索接口

    6.我的组织列表接口

    7.组织评价接口


    Type:APIP
    SerialNumber:10
    ProtocolName:OrganizationInfo
    Version:1
    Description:定义组织信息查询接口。
    Author:C_armX
    Language:zh-CN
    tags:APIP, API, organization, 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. 创建组织的交易的txid为该组织的唯一身份,即oid

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

    4. 本协议接口的数据来源和相关规则遵循以下协议:

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

    6. 示例数据:

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

    1.组织概况接口

    名称

    oidInfoList

    说明

    给定一个或多个oid获取除成员列表以外的组织信息。

    请求参数

    name type description
    oidList string array
    • 示例

    查询oid为00000000000000000000000000111111111111111132222222222222和2222222200000000000000000001111111111111111333333333333333的组织最新详情。

    参数

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

    GET

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

    POST

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

    响应参数

    name type description
    oidInfoList object See below.
    height uint The latest block height when getting the data.
    • oidInfoList
    name type description key in FEIP28
    oid string
    owner string The address of the owner
    stdName string array Standard name of the organization data.stdName
    localName string array Names in different languages data.localName
    desc string Description of this organization data.desc
    activeMemberNumber uint64 The number of active members of this organization
    firstTxid string Txid of the transaction that created the organization.
    firstTime timeStamp The timeStamp of the transaction in which the organization was created.
    lastTxid string The txid of the last operation of the organization.
    lastTime timeStamp The transaction timestamp of the last operation of the organization.
    tCdd uint64 The total destroyed coindays of all transactions where the value of data.op is "rate".
    tRate float Cumulative rating score. tRate=(tCdd*tRate+cdd*rate)/(tCdd+cdd)
    • 示例
      响应id为00000000000000000000000000111111111111111132222222222222和2222222200000000000000000001111111111111111333333333333333的组织除成员列表以外的最新信息。
    {
    	"oidInfoList": [{
    			"oid": "000000001111111111111111111111122222222222222222222222222",
    			"owner": "F000000000000001",
    			"stdName": "Love the earth",
    			"localName": ["爱护地球", "地球を愛する"],
    			"desc": "欢迎来到密码公司",
    			"activeMemberNumber": 2340,
    			"firstTxid": "55553333333333333333333333338888888888888888888888888xxxx",
    			"firstTime": 1610261291834,
    			"lastTxid": "3333333333333333333333333333388888888888888888888888888889",
    			"lastTime": 1636526891228,
    			"tCdd": 230000,
    			"tRate": 4.65
    		},
    		{
    			"oid": "2222222200000000000000000001111111111111111333333333333333",
    			"owner": "F000000000000002",
    			"stdName": "Digital home",
    			"localName": ["数字家园", "地球を愛する"],
    			"desc": "数字社区欢迎你!",
    			"activeMemberNumber": 102,
    			"firstTxid": "8888333333333333333333338888888888888888888888888uuuu",
    			"firstTime": 1610002234228,
    			"lastTxid": "1111112200000000000000000001111111111111111333333333333333",
    			"lastTime": 1626522299821,
    			"tCdd": 3000,
    			"tRate": 4.35
    		}
    
    	],
    	"height": 989430
    }
    

    排序、压缩、签名后:

    
    {"height":989430,"oidInfoList":[{"activeMemberNumber":2340,"desc":"欢迎来到密码公司","firstTime":"1610261291834","firstTxid":"55553333333333333333333333338888888888888888888888888xxxx","lastTime":"1636526891228","lastTxid":"3333333333333333333333333333388888888888888888888888888889","localName":["地球を愛する","爱护地球"],"oid":"000000001111111111111111111111122222222222222222222222222","owner":"F000000000000001","stdName":"Love the earth","tCdd":230000,"tRate":4.65},{"activeMemberNumber":102,"desc":"数字社区欢迎你!","firstTime":"1610002234228","firstTxid":"8888333333333333333333338888888888888888888888888uuuu","lastTime":"1626522299821","lastTxid":"1111112200000000000000000001111111111111111333333333333333","localName":["地球を愛する","数字家园"],"oid":"2222222200000000000000000001111111111111111333333333333333","owner":"F000000000000002","stdName":"Digital home","tCdd":3000,"tRate":4.35}],"sign":"00000000000000000000011111111111111111111111"}
    
    

    返回值

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

    2. 组织成员列表接口

    名称

    memberList

    说明

    获取oid的各种状态的成员列表

    请求参数

    name type description
    oid string
    filterMemberStatus string enum Filter by the status of members, including "owner", "active", "administrators", "exiting"(declared exit but not be delisted), and "delisted" five status.
    • 示例

    查询oid为00000000000000000000000000111111111111111132222222222222的组织最新详情。

    参数

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

    GET

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

    POST

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

    响应参数

    name type description key in FEIP28
    oid string
    activeMembers string array The address list of active members.
    exitingMembers string array The address list of members who declared exit but have not been delisted.
    administrators string array The address list of administrators.
    delistedMembers string array The address list of exited members.
    height uint The latest block height when getting the data.
    • 示例
      响应oid为00000000000000000000000000111111111111111132222222222222的所有成员列表。
    {
    	"oid": "000000001111111111111111111111122222222222222222222222222",
    	"owner": "F000000000000001",
    	"activeMembers": ["F1111111111111S", "F2222222222222222Z", "F33333333333333333333h", "F4444444444444444444N"],
    	"administrators": ["F1111111111111S", "F2222222222222222Z"],
    	"exitingMembers": ["F555555555555555555x ", "F66666666666666666666666z "],
    	"delistedMembers": ["F77777777777777777e"],
    	"height": 989430
    }
    
    

    排序、压缩、签名后:

    {"activeMembers":["F1111111111111S","F2222222222222222Z","F33333333333333333333h","F4444444444444444444N"],"administrators":["F1111111111111S","F2222222222222222Z"],"delistedMembers":["F77777777777777777e"],"exitingMembers":["F555555555555555555x ","F66666666666666666666666z "],"height":989430,"oid":"000000001111111111111111111111122222222222222222222222222","owner":"F000000000000001","sign":"00000000000000000000011111111111111111111111"}
    
    

    返回值

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

    3. 组织历史接口

    名称

    oidHistory

    说明

    查询某oid组织除了rate操作以外的所有历史操作记录。

    请求参数

    name type description required
    oid string Y
    filterSigner string Filter by the signer, the address of the first input of the transaction. N
    filterOp string enum Filter by data.op, Including 10 other operations besides "rate". N
    filterTxTimestamp string Filter by txTimestamp N
    sortOp string enum Sort by data.op N
    sortTxTimestamp string Sort by txTimestamp 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项oid为000000001111111111111111111111122222222222222222222222222的组织操作记录,按txTimestamp降序。

    参数

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

    GET

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

    POST

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

    响应参数

    name type description
    oid string
    opList object See below.
    height uint The latest block height when getting the data.
    • opList
    name type description key in FEIP28
    op string The operation. data.op
    signer string The signer of the first input of the transaction.
    recipients string array Addresses of outputs
    localName string array Names in different languages. data.localName
    desc string Description of this organization. data.desc
    days int 2 Validity period of the invitation.
    txTimestamp timestamp The timestamp of this transaction
    txid string The txid of this transaction.
    cdd uint64 Coindays destroyed of this transaction
    block uint The height of the block where the transaction is written
    • 示例

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

    {
    	"oid": "000000001111111111111111111111122222222222222222222222222",
    	"opList": [{
    			"op": "join",
    			"signer": "F11111111111",
    			"recipients": ["F1111111111", "F2222222222222", "F33333333333"],
    			"txTimestamp": 1613211239,
    			"txid": "0460fc1a1ada6479037a07c05509cfcb0d2e8ead2d2b32a5a6784f558c448866",
    			"cdd": 2300,
    			"block": 989239
    		},
    
    		{
    			"op": "update",
    			"signer": "F11111111111",
    			"recipients": ["F1111111111"],
    			"localName": ["天文爱好者", "Astronomers"],
    			"desc": "开放的天文爱好者组织",
    			"txTimestamp": 1610261291,
    			"txid": "0460fc1a1ada6479037a07c05509cfcb0d2e8ead2d2b32a5a6784f558c448866",
    			"cdd": 11300,
    			"block": 989021
    		}
    	],
    	"height": 989430
    }
    

    排序、压缩、签名后:

    
    {"oid":"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
    1102 The OID does not exist. 该OID不存在。 oid
    • 示例
    {
    	"code": 1102,
    	"msg": "The OID does not exist.",
    	"data": {
    		"oid": "000000001111111111111111111111122222222222222222222222222"
    	}
    }
    

    4.组织搜索接口

    名称

    organizationSearch

    说明

    按条件查询组织。

    请求参数

    name type description required
    filterStdName string Filter by the data.stdName N
    filterLocalName string Filter by the data.localName N
    filterDesc string Filter by data.desc N
    filterActiveMemberNumber uint Filter by the number of active members. N
    filterFirstTime string Filter by the time of the creating. N
    filterLastTime string Filter by the time of the last operation. N
    filterTCdd string Filter by tCdd which is the total destroyed coindays of all transactions where the value of data.op is "rate". N
    filterTRate string Filter by tRate N
    sortActiveMemberNumber uint Sort by the number of active members N
    sortFirstTime string Sort by firstTime N
    sortLastTime string Sort by the last operation. N
    sortTCdd string Sort by tCdd N
    sortStdName string Sort by the data.stdName 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/organizationSearch?count=2&filterName=Cryto&filterTCdd=1000-&sortFirstTime=down&timestamp=1635513688254
    
    - sign =sha256(sha256(https://www.sign.cash/api/organizationSearch?count=2&filterName=Cryto&filterTCdd=1000-&sortFirstTime=down&timestamp=1635513688254&secretKey=d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09))=1111111111111110000000000000000000000
    
    - signedRequest:
    
    https://www.sign.cash/api/organizationSearch?count=2&filterName=Cryto&filterTCdd=1000-&sortFirstTime=down&timestamp=1635513688254&requester=FEk41Kqjar45fLDriztUDTUkdki7mmcjWK&sign=1111111111111111110000000000000000000000
    

    POST

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

    响应参数

    name type description
    oidInfoList object See below.
    height uint The latest block height when getting the data.
    • oidInfoList
    name type description key in FEIP28
    oid string
    owner string The address of the owner
    stdName string array Standard name of the organization data.stdName
    localName string array Names in different languages data.localName
    desc string Description of this organization data.desc
    activeMemberNumber uint64 The number of active members of this organization
    firstTxid string Txid of the transaction that created the organization.
    firstTime timeStamp The timeStamp of the transaction in which the organization was created.
    lastTxid string The txid of the last operation of the organization.
    lastTime timeStamp The transaction timestamp of the last operation of the organization.
    tCdd uint64 The total destroyed coindays of all transactions where the value of data.op is "rate".
    tRate float Cumulative rating score. tRate=(tCdd*tRate+cdd*rate)/(tCdd+cdd)
    • 示例

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

    {
    	"oidInfoList": [{
    			"oid": "000000001111111111111111111111122222222222222222222222222",
    			"owner": "F000000000000001",
    			"stdName": "Love the earth",
    			"localName": ["爱护地球", "地球を愛する"],
    			"desc": "欢迎来到密码公司",
    			"activeMemberNumber": 2340,
    			"firstTxid": "55553333333333333333333333338888888888888888888888888xxxx",
    			"firstTime": 1610261291834,
    			"lastTxid": "3333333333333333333333333333388888888888888888888888888889",
    			"lastTime": 1636526891228,
    			"tCdd": 230000,
    			"tRate": 4.65
    		},
    		{
    			"oid": "2222222200000000000000000001111111111111111333333333333333",
    			"owner": "F000000000000002",
    			"stdName": "Digital home",
    			"localName": ["数字家园", "地球を愛する"],
    			"desc": "数字社区欢迎你!",
    			"activeMemberNumber": 102,
    			"firstTxid": "8888333333333333333333338888888888888888888888888uuuu",
    			"firstTime": 1610002234228,
    			"lastTxid": "1111112200000000000000000001111111111111111333333333333333",
    			"lastTime": 1626522299821,
    			"tCdd": 3000,
    			"tRate": 4.35
    		}
    
    	],
    	"height": 989430
    }
    

    排序、压缩、签名后:

    
    {"height":989430,"oidInfoList":[{"activeMemberNumber":2340,"desc":"欢迎来到密码公司","firstTime":"1610261291834","firstTxid":"55553333333333333333333333338888888888888888888888888xxxx","lastTime":"1636526891228","lastTxid":"3333333333333333333333333333388888888888888888888888888889","localName":["地球を愛する","爱护地球"],"oid":"000000001111111111111111111111122222222222222222222222222","owner":"F000000000000001","stdName":"Love the earth","tCdd":230000,"tRate":4.65},{"activeMemberNumber":102,"desc":"数字社区欢迎你!","firstTime":"1610002234228","firstTxid":"8888333333333333333333338888888888888888888888888uuuu","lastTime":"1626522299821","lastTxid":"1111112200000000000000000001111111111111111333333333333333","localName":["地球を愛する","数字家园"],"oid":"2222222200000000000000000001111111111111111333333333333333","owner":"F000000000000002","stdName":"Digital home","tCdd":3000,"tRate":4.35}],"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/organizationSearch?count=2&filterName=Cryto&filterTCdd=1000-&sortFirstTime=down&timestamp=1635513688254&requester=FEk41Kqjar45fLDriztUDTUkdki7mmcjWK&sign=1111111111111111110000000000000000000000"
    	}
    }
    



  • 5. 组织成员搜索接口

    名称

    oidMemberSearch

    说明

    在活跃成员中模糊查询某oid组织的某个cid或地址,不区分大小写。

    请求参数

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

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

    参数

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

    GET

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

    POST

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

    响应参数

    |name|type|description|key in FEIP28|
    |:---|:---|:---|
    |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。

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

    排序、压缩、签名后:

    
    {"oid":"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. 我的组织列表接口

    名称

    myOrganizationList

    说明

    模糊查询某address当前拥有、当前参与、担任管理员、声明退出或已经退出的组织列表。

    请求参数

    name type description required
    address string Y
    filterMemberStatus string enum Filter by the status of members, including "owner", "active", "administrators", "exiting"(declared exit but not be delisted), and "delisted" five status.
    • 示例

    搜索F888888888888888888888888888x参与的所有组织。

    参数

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

    GET

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

    POST

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

    响应参数

    name type description
    oidInfoList object See below.
    height uint The latest block height when getting the data.
    • oidInfoList
    name type description key in FEIP28
    memberStatus string enum Filter by the status of members, including "owner", "active", "administrators", "exiting"(declared exit but not be delisted), and "delisted" five status.
    oid string
    desc string Description of this organization data.desc
    activeMemberNumber uint64 The number of active members of this organization
    sponsor string The signer of the first input of the transaction in which the organization was registered.
    updater string The signer of the first input of the transaction in which the organization was updated recently.
    firstTime timeStamp The timeStamp of the transaction in which the organization was registered.
    lastTxid string The txid of the last operation of the organization.
    lastTime timeStamp The transaction timestamp of the last operation of the organization.
    tCdd uint64 The total destroyed coindays of all transactions where the value of data.op is "rate".
    • 示例

    响应搜索F888888888888888888888888888x参与的所有组织。

    {
    	"oidInfoList": [{
    			"memberStatus": "active",
    			"oid": "000000001111111111111111111111122222222222222222222222222",
    			"owner": "F000000000000001",
    			"stdName": "Love the earth",
    			"localName": ["爱护地球", "地球を愛する"],
    			"desc": "欢迎来到密码公司",
    			"activeMemberNumber": 2340,
    			"firstTxid": "55553333333333333333333333338888888888888888888888888xxxx",
    			"firstTime": 1610261291834,
    			"lastTxid": "3333333333333333333333333333388888888888888888888888888889",
    			"lastTime": 1636526891228,
    			"tCdd": 230000,
    			"tRate": 4.65
    		},
    		{
    			"memberStatus": "exited",
    			"oid": "2222222200000000000000000001111111111111111333333333333333",
    			"owner": "F000000000000002",
    			"stdName": "Digital home",
    			"localName": ["数字家园", "地球を愛する"],
    			"desc": "数字社区欢迎你!",
    			"activeMemberNumber": 102,
    			"firstTxid": "8888333333333333333333338888888888888888888888888uuuu",
    			"firstTime": 1610002234228,
    			"lastTxid": "1111112200000000000000000001111111111111111333333333333333",
    			"lastTime": 1626522299821,
    			"tCdd": 3000,
    			"tRate": 4.35
    		}
    
    	],
    	"height": 989430
    }
    
    

    排序、压缩、签名后:

    {"height":989430,"oidInfoList":[{"activeMemberNumber":2340,"desc":"欢迎来到密码公司","firstTime":"1610261291834","firstTxid":"55553333333333333333333333338888888888888888888888888xxxx","lastTime":"1636526891228","lastTxid":"3333333333333333333333333333388888888888888888888888888889","localName":["地球を愛する","爱护地球"],"memberStatus":"active","oid":"000000001111111111111111111111122222222222222222222222222","owner":"F000000000000001","stdName":"Love the earth","tCdd":230000,"tRate":4.65},{"activeMemberNumber":102,"desc":"数字社区欢迎你!","firstTime":"1610002234228","firstTxid":"8888333333333333333333338888888888888888888888888uuuu","lastTime":"1626522299821","lastTxid":"1111112200000000000000000001111111111111111333333333333333","localName":["地球を愛する","数字家园"],"memberStatus":"exited","oid":"2222222200000000000000000001111111111111111333333333333333","owner":"F000000000000002","stdName":"Digital home","tCdd":3000,"tRate":4.35}],"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/myorganizationList?address=F888888888888888888888888888x&timestamp=1635513688254&requester=FEk41Kqjar45fLDriztUDTUkdki7mmcjWK&sign=1111111111111111110000000000000000000000"
    	}
    }
    

    7. 组织评价历史接口

    名称

    oidRateList

    说明

    查询对某oid组织的评价信息,即data.op值为“rate”的记录。

    请求参数

    name type description required
    oid string Y
    filterRate uint Filter by data.rate N
    filterCdd string Filter by cdd N
    filterTxTimestamp string Filter by txTimestamp N
    filterRater string Filter by the address of the first input of the rating transaction N
    sortTxTimestamp string Sort by txTimestamp N
    sortCdd string Sort by cdd N
    sortRate string Sort by data.rate N
    sortRater string Sort by the address of the first input of the rating transaction 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项oid为000000001111111111111111111111122222222222222222222222222的组织的币天销毁大于1000的评分记录,按评分降序。

    参数

    {
    	"oid": "000000001111111111111111111111122222222222222222222222222",
    	"filterCdd": "1000-",
    	"sortRate": "down",
    	"count": 20,
    	"sequence": 1,
    	"timestamp": 1635513688254
    }
    

    GET

    - unsignedRequest:
    
    https://www.sign.cash/api/oidRateList?count=20&filterCdd=1000-&oid=000000001111111111111111111111122222222222222222222222222&sequence=1&sortRate=down&timestamp=1635513688254
    
    - sign =sha256(sha256(https://www.sign.cash/api/oidRateList?count=20&filterCdd=1000-&oid=000000001111111111111111111111122222222222222222222222222&sequence=1&sortRate=down&timestamp=1635513688254&secretKey=d2c03bbc1ba1380eafc395374e8da61f92545a1aac5d30b0c19289a69bd34a09))=1111111111111111110000000000000000000000222222
    
    - signedRequest:
    
    https://www.sign.cash/api/oidRateList?count=20&filterCdd=1000-&oid=000000001111111111111111111111122222222222222222222222222&sequence=1&sortRate=down&timestamp=1635513688254&requester=FEk41Kqjar45fLDriztUDTUkdki7mmcjWK&sign=1111111111111111110000000000000000000000222222
    

    POST

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

    响应参数

    name type description
    oid string
    rateList object See below.
    height uint The latest block height when getting the data.
    • rateList
    name type description
    rater uint The address of the first input of the rating transaction
    rate uint
    cdd uint64
    txid string The txid of this transaction
    txTimestamp timestamp The timestamp of this transaction
    block uint The height of the block where the transaction is written
    • 示例
      响应oid为000000001111111111111111111111122222222222222222222222222的组织信息。
    {
    	"oid": "000000001111111111111111111111122222222222222222222222222",
    	"rateList ": [{
    			"rater": "FS2AWq1dgdhCpNTwqfBbMBBJGNNj1LSboy",
    			"rate": 5,
    			"cdd": 3100,
    			"txid": "3333333333333333333333333333388888888888888888888888888889",
    			"txTimestamp": 1618832997321,
    			"block": 989302
    		},
    		{
    			"rater": "FLx88wdsbLQyZRmbqtpeXA9u5FG9EyCash",
    			"rate": 4,
    			"cdd": 10000,
    			"txid": "4444444333333333333333333333388888888888888888888888888889",
    			"txTimestamp": 1618834297302,
    			"block": 989302
    		}
    
    	],
    	"height": 989430
    }
    
    

    排序、压缩、签名后:

    
    {"height":989430,"oid":"000000001111111111111111111111122222222222222222222222222","rateList ":[{"block":989302,"cdd":3100,"rate":5,"rater":"FS2AWq1dgdhCpNTwqfBbMBBJGNNj1LSboy","txTimestamp":"1618832997321","txid":"3333333333333333333333333333388888888888888888888888888889"},{"block":989302,"cdd":10000,"rate":4,"rater":"FLx88wdsbLQyZRmbqtpeXA9u5FG9EyCash","txTimestamp":"1618834297302","txid":"4444444333333333333333333333388888888888888888888888888889"}],"sign":"00000000000000000000011111111111111111111111"}
    
    

    返回值

    返回值 类型 必填 说明
    code uint Y 返回码
    msg string Y 返回信息
    data object N 相关数据
    • 返回信息详情
    code msg 说明 data字段
    0 OK 请求成功
    1 Unknown error. 未知错误 signedRequest
    1102 The OID does not exist. 该OID不存在。 oid
    4000 No matching record. 没有符合条件的信息。 signedRequest
    • 示例
    {
    	"code": 7002,
    	"msg": "The OID does not exist.",
    	"data": {
    		"oid": "000000001111111111111111111111122222222222222222222222222"
    	}
    }
    

Log in to reply