请问 CITA RPC 有获取一个地址最新几个交易的接口吗

getTransactionCount

 /**
 * @method getTransactionCount
 * @desc get transaction account of specified account
 * @param {string} - account address
 * @return {Promise<number>} Promise returns transaction count of account address
 */
citaSDK.base.getTransactionCount('0xb3f940e3b5F0AA26dB9f86F0824B3581fE18E9D7')

我只在 https://github.com/citahub/cita-sdk-js/blob/develop/docs/zh-CN/cita-sdk.md#gettransactioncount 看到怎么获取一个地址的交易数。我想获取一个地址最近发生的几笔交易的hash vec。不知道有没有好的方法。

链本身没有提供现成的这个功能。
看看rebirth有没有吧。
@rain

re-birth 有交易查询接口的:


支持的查询参数:

{
  "account":  "the addr transactions related to (from or to)", # hash string
  "from":  "the addr transactions from", # hash string
  "to":  "the addr transactions to", # hash string
  "value_format": "decimal", # set value to decimal number, default hex number
  "page": "1", # integer, default 1
  "per_page": "10", # integer, default 10
  # offset and limit has lower priority than page and perPage
  "offset":  "1", # integer, default to 0
  "limit":  "10", # integer, default to 10
}

1赞

谢了