xanimo / dogecoin-payment-server-archive

MIT License
1 stars 3 forks source link

Adding /close api endpoint #21

Closed rllola closed 2 years ago

rllola commented 2 years ago

Abstract

Adding /close api endpoint to allow closing a payment channel.

Description

The endpoint accept POST method. The json message should have a field redeemScript with the matching redeem script of the payment channel we wish to close.

While the script is only known by the 2 people who creating the payment channel it can be recreated by knowing the public keys. Public keys being public it is likely possible. A better way of authentication should be proposed.

The payment channel can be in different states :

TODO