elixir-omg icon indicating copy to clipboard operation
elixir-omg copied to clipboard

Watcher Info API: /exit.all

Open unnawut opened this issue 4 years ago • 2 comments

Related to #1133, having an endpoint that returns a list of exits will also be beneficial to external data consumers e.g. the block explorer.


Scope: Watcher Informational API

Endpoint: /exit.all

Request:

# /exit.all

{
  "address": "0xf876154263cF61E15e84695096cFdCb5ceEd8D86",
  "limit": 10,
  "page": 1
}

Request params:

  • address can be omitted to return an unfiltered list (all exits)
  • limit: number of exits to return, default to 10
  • page: the page to return, default to 1

Response:

# /exit.all

{
  "success": true,
  "data": [
    {
      "utxo_pos": 68290000000000001,
      "owner": "0xf876154263cF61E15e84695096cFdCb5ceEd8D86",
      "amount": 2000,
      "currency": "0x08f0f4E4049218C8BF0978e4001b4FB85bC97C3C",
      "status": "started",
      "timestamp": "1234568000"
    }
  ],
  "data_paging": {
    "page": 1,
    "limit": 10
  }
}

Possible status returns:

  • started - the default status to return when the exit process started
  • challenging - the exit is being challenged
  • challenged - the exit has been challenged successfully
  • processable - the exit is ready to be processed
  • processed - the exit has been processed successfully

unnawut avatar Nov 29 '19 05:11 unnawut

☝️ My understanding of exits is very limited at the moment so I'm expecting a lot of scrutiny on this one.

unnawut avatar Nov 29 '19 05:11 unnawut

My knowledge is also quite limited, but...

Would it back sense to also have an exit type? (standard, ife) and also info conveying piggyback info?

Just some things to think about as we learn more...not sure they all make sense or not.

jrhite avatar Dec 10 '19 11:12 jrhite