diff --git a/API.md b/API.md index 3324a4f..cc32836 100644 --- a/API.md +++ b/API.md @@ -267,7 +267,7 @@ batch get .bit DOBs * host: `indexer-v1.did.id` * path: `/v1/did/list` * param: - * did_type: + * did_type: 0-all DOBs, 1-normal DOBs, 2-recyclable DOBs ```json { "type": "blockchain", @@ -293,9 +293,7 @@ batch get .bit DOBs "outpoint": "", "account_id": "", "account": "", - "args": "", - "expired_at": 0, - "did_cell_status": 1 + "expired_at": 0 } ] } @@ -308,6 +306,12 @@ batch get .bit DOBs curl -X POST https://indexer-v1.did.id/v1/did/list -d '{"type": "blockchain","key_info": {"coin_type": "", "key": ""},"page": 1,"size": 10,"did_type": 1}' ``` +or json rpc style: + +```shell +curl -X POST https://indexer-v1.did.id -d '{"jsonrpc": "2.0","id": 1,"method": "das_didCellList","params": [{"type": "blockchain","key_info": {"coin_type": "", "key": ""},"page": 1,"size": 10,"did_type": 1}]}' +``` + ### Get Record List batch get account register info, currently can only check whether the account can be registered diff --git a/http_server/handle/did_list.go b/http_server/handle/did_list.go index c9e5674..b8d59db 100644 --- a/http_server/handle/did_list.go +++ b/http_server/handle/did_list.go @@ -25,12 +25,10 @@ type RespDidList struct { } type DidData struct { - Outpoint string `json:"outpoint"` - AccountId string `json:"account_id"` - Account string `json:"account"` - Args string `json:"args"` - ExpiredAt uint64 `json:"expired_at"` - DidCellStatus tables.DidCellStatus `json:"did_cell_status"` + Outpoint string `json:"outpoint"` + AccountId string `json:"account_id"` + Account string `json:"account"` + ExpiredAt uint64 `json:"expired_at"` } func (h *HttpHandle) JsonRpcDidList(ctx *gin.Context, p json.RawMessage, apiResp *http_api.ApiResp) { @@ -97,12 +95,10 @@ func (h *HttpHandle) doDidList(ctx context.Context, req *ReqDidList, apiResp *ht } for _, v := range res { temp := DidData{ - Outpoint: v.Outpoint, - Account: v.Account, - AccountId: v.AccountId, - Args: v.Args, - ExpiredAt: v.ExpiredAt, - DidCellStatus: req.DidType, + Outpoint: v.Outpoint, + Account: v.Account, + AccountId: v.AccountId, + ExpiredAt: v.ExpiredAt, } data = append(data, temp) }