Interface FlashListenerAPI

This is the API that each Flash listener must implement, for example wallets or other front-ends to Agora.

interface FlashListenerAPI ;

Methods

NameDescription
getEstimatedTxFee ()
getFeeUTXOs (pk, amount) Try to get a set of UTXOs enough to cover amount
onChannelNotify (pk, chan_id, state, error, height) Called when the state of a channel changes, for example when the channel is accepted / rejected by the counter-party.
onPaymentFailure (pk, invoice, error) Called when the payment for the given invoice has failed. The payment can be retried again with the payInvoice() Flash API.
onPaymentSuccess (pk, invoice) Called when the payment for the given invoice has been successful.
onRequestedChannelOpen (pk, chan_conf) Called when a counter-party has requested opening a channel with this node. The wallet should return an empty string if it accepts opening this channel, or an error message if the channel should be rejected.