Ride-The-Lightning / c-lightning-REST

REST APIs for Core Lightning written with node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

REST API endpoints for Peerswap

ShahanaFarooqui opened this issue · comments

Write below endpoints for CLN peerswap:

reloadpolicy (/v1/peerswap/reloadPolicy) - GET: Reload the policy file
getswap (/v1/peerswap/swap/:swapId) - GET: Returns swap by swapid
listswaps (/v1/peerswap/listSwaps) - GET: List swaps
listactiveswaps (/v1/peerswap/listActiveSwaps) - GET: Returns active swaps
listswaprequests (/v1/peerswap/listSwapRequests) - GET: Returns unhandled swaps requested by peer nodes
listpeers (/v1/peerswap/listPeers) - GET: Lists peers supporting the peerswap plugin
allowswaprequests (/v1/peerswap/allowSwapRequests/:isAllowed) - GET: Sets peerswap to allow incoming swap requests
addpeer (/v1/peerswap/addPeer/:pubkey) - GET: Add peer to allowlist
removepeer (/v1/peerswap/removePeer/:pubkey) - GET: Remove peer from allowlist
resendmessage (/v1/peerswap/resendMessage/:swapId) - GET: Resends last swap message
swapin (/v1/peerswap/swapIn) - POST: Swap in
swapout (/v1/peerswap/swapOut) - POST: Swap out

Closing with PR #135 & #136.