Add option for lightweight tx details (txslight) to address API #381

pull/383/head
Martin Boehm 2020-03-04 10:45:10 +01:00
parent 53cc6237a7
commit e47fd242cf
3 changed files with 5 additions and 0 deletions

View File

@ -302,6 +302,7 @@ The optional query parameters:
- *tokens*: *basic* + tokens belonging to the address (applicable only to some coins)
- *tokenBalances*: *basic* + tokens with balances + belonging to the address (applicable only to some coins)
- *txids*: *tokenBalances* + list of txids, subject to *from*, *to* filter and paging
- *txslight*: *tokenBalances* + list of transaction with limited details (only data from index), subject to *from*, *to* filter and paging
- *txs*: *tokenBalances* + list of transaction with details, subject to *from*, *to* filter and paging
- *contract*: return only transactions which affect specified contract (applicable only to coins which support contracts)

View File

@ -625,6 +625,8 @@ func (s *PublicServer) getAddressQueryParams(r *http.Request, accountDetails api
accountDetails = api.AccountDetailsTokenBalances
case "txids":
accountDetails = api.AccountDetailsTxidHistory
case "txslight":
accountDetails = api.AccountDetailsTxHistoryLight
case "txs":
accountDetails = api.AccountDetailsTxHistory
}

View File

@ -461,6 +461,8 @@ func (s *WebsocketServer) getAccountInfo(req *accountInfoReq) (res *api.Address,
opt = api.AccountDetailsTokenBalances
case "txids":
opt = api.AccountDetailsTxidHistory
case "txslight":
opt = api.AccountDetailsTxHistoryLight
case "txs":
opt = api.AccountDetailsTxHistory
default: