# Kraken Payment Plugin 1. Send more sat in a channel that you are directly connected to. 2. Simulate a small network ``` AWS from / to \ / \ / \ /to from \ LOCAL_DOCKER LOCAL_CLN (generate invoice) (pay invoice) ``` Invoice X msat -> split X msat in different payment. With direct connection, we can fail with the following reasons: 1. small payment; 2. bigger payment; 3. out ot channel amount payment; 4. pay a non connected node. (unreachable) ### Suggested approach Draft the Kraken plugin! `>> lightning-cli kraken_pay <invoice> <direct = false>` `>> lightning-cli kraken_doctor <invoice>` kraken pay ``` rpc.call("pay", {invoice: invocie}); if fails -> return doctor result ``` kraken doctor ``` json[channels] =rpc.call("listfunds")[channel] json[pay] = rpc.call("listpays", {incoice, payments}) ``` ### Desing krakey_pay/krakenpay `>> kraken <command pay|doctor> [params]` ``` >> kraken pay <invocie> >> kraken doctor <invoice> ``` ``` >> kraken_help { version: "" commands: "" } ``` lightning-cli kraken_help lightning-cli --help