Zondax / namadexer

Namada indexer
39 stars 57 forks source link

feat: get transactions per addresses #161

Closed rllola closed 8 months ago

rllola commented 8 months ago

This PR add an endpoint to collect all of the transactions related to an address.

rllola commented 8 months ago

Example of an answer:

[
  {
    "hash": "b16185b6dd095fdff9bb8a1de265fdef23a7966553f7a0c0780b5e0f3df210ea",
    "block_id": "ae2fbad5b8835535bdae07e38c86b21d90ec2e3dd69ac31820db8398ba32963e",
    "tx_type": "Decrypted",
    "wrapper_id": "0bc67bdf5c35870709556eba7b3630255dcfb26835a61109574bcd95ece3c79f",
    "fee_amount_per_gas_unit": null,
    "fee_token": null,
    "gas_limit_multiplier": null,
    "code": "0960374d23acbac1feb27b3888095859217936c900cef54e559d215cec3206ef",
    "data": {
      "amount": "1.000000",
      "key": null,
      "shielded": null,
      "source": "tnam1qqx0p2jus8hjvnxf7clqnn58gcredde02szr9d2r",
      "target": "tnam1qqra8ys3cjmxawj6zsapvyhl5npc58fs8ceceugh",
      "token": "tnam1qxvg64psvhwumv3mwrrjfcz0h3t3274hwggyzcee"
    },
    "return_code": 0
  },
  {
    "hash": "f935ef0395725e00c15f00da5f26f304ebc10a9e82527a34d30e9a5297811c04",
    "block_id": "ae2fbad5b8835535bdae07e38c86b21d90ec2e3dd69ac31820db8398ba32963e",
    "tx_type": "Decrypted",
    "wrapper_id": "744a6147c2fae2c65a30759eba8a24745a67d8e3d9f32fbbd552645ac3c67aa7",
    "fee_amount_per_gas_unit": null,
    "fee_token": null,
    "gas_limit_multiplier": null,
    "code": "0960374d23acbac1feb27b3888095859217936c900cef54e559d215cec3206ef",
    "data": {
      "amount": "1.000000",
      "key": null,
      "shielded": null,
      "source": "tnam1qqx0p2jus8hjvnxf7clqnn58gcredde02szr9d2r",
      "target": "tnam1qqra8ys3cjmxawj6zsapvyhl5npc58fs8ceceugh",
      "token": "tnam1qxvg64psvhwumv3mwrrjfcz0h3t3274hwggyzcee"
    },
    "return_code": 0
  },
...