From e01fd11fb2a2bdcbc06db3b86b80a22a3c2fe527 Mon Sep 17 00:00:00 2001 From: Sledro Date: Fri, 1 Nov 2024 22:31:27 +0000 Subject: [PATCH] add readme --- README.md | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 364c4aa..85596cd 100644 --- a/README.md +++ b/README.md @@ -1 +1,37 @@ -# ll-bridge-api \ No newline at end of file +# ll-bridge-api + +Indexer & API for the LightLink standard bridge. + +Indexes deposits & withdrawals and automatically monitors and updates their status. + +## API + +A HTTP API is available at `/v1/` + +### Transactions + +It returns a list of transactions that match the query. + +Query parameters: + +- `type` - filter by type (withdrawal or deposit) +- `status` - filter by status +- `from` - filter by from address +- `to` - filter by to address +- `page` - pagination +- `page_size` - pagination + +i.e. `GET /v1/transactions?type=withdrawal&status=READY_TO_PROVE&page=1&page_size=10` + +## Withdrawal Status Flow + + 1. STATE_ROOT_NOT_PUBLISHED (New Withdrawal submitted on L2) + 2. READY_TO_PROVE (After 6-12 hours, user can prove withdrawal on L1) + 3. IN_CHALLENGE_PERIOD (Withdrawal has been proven on L1. Challenge period started on L1, wait 7 days) + 4. READY_FOR_RELAY (Challenge period ended on L1, user can now relay withdrawal on L1) + 5. RELAYED (Message sent to L2) + +## Deposit Status Flow + + 1. READY_FOR_RELAY (New Deposit submitted on L1) + 2. RELAYED (Deposit complete on L2 automatically by Sequencer)