From 6f363fb6cca52eb8a4023de4678fc3f7135b3c4f Mon Sep 17 00:00:00 2001 From: Severin Buhler Date: Mon, 16 Jan 2023 08:45:15 +0200 Subject: [PATCH 1/4] added order states --- channel-request.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/channel-request.md b/channel-request.md index a97e693..8f0ea77 100644 --- a/channel-request.md +++ b/channel-request.md @@ -80,4 +80,20 @@ Get information about a channel order | node_connection_info | The node_connection_info for the node to open the channel to | string | | channel_open_tx | The txid of the channel funding tx once it is broadcast | string | | state | The state of the order | string | -| onchain_payments | A list of payments received to btc_address on-chain | object[] | \ No newline at end of file +| onchain_payments | A list of payments received to btc_address on-chain | object[] | + + +###### Order state enum + +| State | Description | +|---------------- |--------------------------------------------------------------------------------------- | +| CREATED | The order has been created but the user hasn't paid yet. | +| PENDING | Order is paid but the channel has not been opened yet. | +| OPEN_INITIATED | Channel broadcast transaction is in the mempool. 0conf might skip directly to OPENED. | +| OPENED | Channel is open and has the necessary block confirmations. | +| CLOSE_INITIADED | The closing transaction has been broadcasted. | +| CLOSED | Channel is closed and has the necessary block confirmations. | +| FAILED | Any error. For example, the LSP couldn't connect to the target node. | +| REFUNDED | Payment has been refunded. | +| OFFER_EXPIRED | Order has not been paid and offer has therefore expired. | + From 85c0e0c0cefcf130835bd39c33449868370001ca Mon Sep 17 00:00:00 2001 From: Severin Buhler Date: Mon, 16 Jan 2023 08:47:43 +0200 Subject: [PATCH 2/4] updated state descriptions --- channel-request.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channel-request.md b/channel-request.md index 8f0ea77..af9a4ab 100644 --- a/channel-request.md +++ b/channel-request.md @@ -87,9 +87,9 @@ Get information about a channel order | State | Description | |---------------- |--------------------------------------------------------------------------------------- | -| CREATED | The order has been created but the user hasn't paid yet. | +| CREATED | The order has been created but the user hasn't paid yet. | | PENDING | Order is paid but the channel has not been opened yet. | -| OPEN_INITIATED | Channel broadcast transaction is in the mempool. 0conf might skip directly to OPENED. | +| OPEN_INITIATED | The opening transaction has been broadcasted. 0conf might skip directly to OPENED. | | OPENED | Channel is open and has the necessary block confirmations. | | CLOSE_INITIADED | The closing transaction has been broadcasted. | | CLOSED | Channel is closed and has the necessary block confirmations. | From f2afa050f9dc9482f03df5acd680b7b62db73ab1 Mon Sep 17 00:00:00 2001 From: Severin Buhler Date: Wed, 18 Jan 2023 13:30:15 +0200 Subject: [PATCH 3/4] renamed initiated open close --- channel-request.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/channel-request.md b/channel-request.md index af9a4ab..07f654c 100644 --- a/channel-request.md +++ b/channel-request.md @@ -89,9 +89,9 @@ Get information about a channel order |---------------- |--------------------------------------------------------------------------------------- | | CREATED | The order has been created but the user hasn't paid yet. | | PENDING | Order is paid but the channel has not been opened yet. | -| OPEN_INITIATED | The opening transaction has been broadcasted. 0conf might skip directly to OPENED. | +| OPENING | The opening transaction has been broadcasted. 0conf might skip directly to OPENED. | | OPENED | Channel is open and has the necessary block confirmations. | -| CLOSE_INITIADED | The closing transaction has been broadcasted. | +| CLOSING | The closing transaction has been broadcasted. | | CLOSED | Channel is closed and has the necessary block confirmations. | | FAILED | Any error. For example, the LSP couldn't connect to the target node. | | REFUNDED | Payment has been refunded. | From e9f878752eb12a6623b2665c33e41ed36864fe0f Mon Sep 17 00:00:00 2001 From: Severin Buhler Date: Wed, 18 Jan 2023 14:58:22 +0200 Subject: [PATCH 4/4] added under_funded --- channel-request.md | 1 + 1 file changed, 1 insertion(+) diff --git a/channel-request.md b/channel-request.md index 07f654c..812d6ac 100644 --- a/channel-request.md +++ b/channel-request.md @@ -88,6 +88,7 @@ Get information about a channel order | State | Description | |---------------- |--------------------------------------------------------------------------------------- | | CREATED | The order has been created but the user hasn't paid yet. | +| UNDER_FUNDED | Funding received but under paid. | | PENDING | Order is paid but the channel has not been opened yet. | | OPENING | The opening transaction has been broadcasted. 0conf might skip directly to OPENED. | | OPENED | Channel is open and has the necessary block confirmations. |