The close api endpoint allows payer to ask the payee to close a payment channel before. In this scenario the merchant (aka the payee) will broadcast to a dogecoin node the most recent commitment received.
Specifications
The request would look like :
{
"redeemscript" : "<redeemscript-hex>"
}
Using the redeem script we can determine the p2sh address to look for it in the databse. The following scenarios might happened:
No open channel found - Return an error (like 4xx something)
Channel found but no commitment - TBD (we need the payer to sign a transaction)
Channel found and we have at least one commitment - Sign the latest commitment and broadcast it to the dogeocin node. Mark the payment channel as closed.
Abstract
The
close
api endpoint allows payer to ask the payee to close a payment channel before. In this scenario the merchant (aka the payee) will broadcast to a dogecoin node the most recent commitment received.Specifications
The request would look like :
Using the redeem script we can determine the p2sh address to look for it in the databse. The following scenarios might happened: