Interface FlashAPI
This is the API that each Flash node must implement.
interface FlashAPI
;
Methods
Name | Description |
---|---|
closeChannel
(sender_pk, recv_pk, chan_id, seq_id, peer_nonce, fee)
|
Requests collaboratively closing an existing channel with this peer. |
confirmChannelUpdate
(sender_pk, recv_pk, chan_id, seq_id)
|
Called by the peer when it has finished collecting the settlement & update transactions. It signals to the called node that the peer is ready for any new payments / updates. |
gossipChannelsOpen
(opens)
|
Gossips open channels to this node. |
gossipChannelUpdates
(chan_updates)
|
Gossips channels attribute updates to this node. |
openChannel
(chan_conf, peer_nonce, funder_address)
|
Requests opening a channel with the provided peer, if it's managed by this Flash node. |
proposePayment
(sender_pk, recv_pk, chan_id, seq_id, payment_hash, amount, lock_height, packet, peer_nonce, height)
|
Proposes a payment through this channel. This may be a direct payment, or an indirect routed payment. Both types of payments use this API. |
proposeUpdate
(sender_pk, recv_pk, chan_id, seq_id, secrets, rev_htlcs, peer_nonce, height)
|
Proposes updating the channel by resolving all pending HTLCs with the secrets the counter-party offers. |
reportPaymentError
(recv_pk, chan_id, err)
|
Report a failed payment |
requestCloseSig
(sender_pk, recv_pk, chan_id, seq_id)
|
Requests a closing signature for an established channel and a
previously agreed-upon closeChannel request with the given
sequence ID.
|
requestSettleSig
(sender_pk, recv_pk, chan_id, seq_id)
|
Requests a settlement signature for an established channel and a
previously agreed-upon balance update's sequence ID as set through
the proposePayment / proposeUpdate call.
|
requestUpdateSig
(sender_pk, recv_pk, chan_id, seq_id)
|
Requests an update signature for an established channel and a
previously agreed-upon balance update's sequence ID as set through
the proposePayment / proposeUpdate call.
|