lnd.xprv/lnwire
2016-01-14 23:56:10 -08:00
..
close_complete_test.go Cooperative Close 2016-01-14 23:56:09 -08:00
close_complete.go Cooperative Close 2016-01-14 23:56:09 -08:00
close_request_test.go Cooperative Close 2016-01-14 23:56:09 -08:00
close_request.go Cooperative Close 2016-01-14 23:56:09 -08:00
commit_revocation_test.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
commit_revocation.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
commit_signature_test.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
commit_signature.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
error_generic_test.go Added Error message type to wire protocol 2016-01-14 23:56:10 -08:00
error_generic.go Added Error message type to wire protocol 2016-01-14 23:56:10 -08:00
ESCROWED_HTLC_NOTES Messages for funding flow. 2015-12-30 05:38:57 -08:00
funding_request_test.go Added ReservationID for funding_requeset 2016-01-14 23:56:09 -08:00
funding_request.go Added ReservationID for funding_requeset 2016-01-14 23:56:09 -08:00
funding_response_test.go FundReq/FundResp update / Refactor tests 2016-01-14 23:56:08 -08:00
funding_response.go Cleanup 2016-01-14 23:56:09 -08:00
funding_signaccept_test.go Changed type in Accept/Complete & lnwire refactor 2016-01-14 23:56:09 -08:00
funding_signaccept.go Notes on payment amount 2016-01-14 23:56:09 -08:00
funding_signcomplete_test.go Changed type in Accept/Complete & lnwire refactor 2016-01-14 23:56:09 -08:00
funding_signcomplete.go Notes on payment amount 2016-01-14 23:56:09 -08:00
htlc_addaccept_test.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
htlc_addaccept.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
htlc_addreject_test.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
htlc_addreject.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
htlc_addrequest_test.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
htlc_addrequest.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
htlc_settleaccept_test.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
htlc_settleaccept.go Added Error message type to wire protocol 2016-01-14 23:56:10 -08:00
htlc_settlerequest_test.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
htlc_settlerequest.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
htlc_timeoutaccept_test.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
htlc_timeoutaccept.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
htlc_timeoutrequest_test.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
htlc_timeoutrequest.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
lnwire_test.go Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00
lnwire.go Added Error message type to wire protocol 2016-01-14 23:56:10 -08:00
message.go Added Error message type to wire protocol 2016-01-14 23:56:10 -08:00
README.md Structs for Wire Protocol HTLCs and Commitments 2016-01-14 23:56:10 -08:00

Funding (segwit+CSV)

This is two-party funder for a single Funding Transaction (more efficient and makes the channel creation atomic, but doesn't work for CSV-no-malleability-fix).

Funding Request

Someone wants to open a channel. The requester provides any inputs and relevant information on how much they want to fund and the parameters, these paramters are a proposal.

Funding Response

If the responder accepts the request, they also provide any inputs, and returns with parameters as well. These parameters are now considered "Committed" and the negotation has finished. If the requester doesn't agree with the new conditions, they stop. The response also contains the first Commitment pubkey provided by the responder, which refunds the initial balance back to both parties.

Funding SignAccept

The requester now has sufficient information to get a refund if the transaction is ever broadcast. The requester signs the Funding Transaction and this message gives the signature to the responder. The requester also provides the signature for the initial Commitment Transaction.

Funding SignComplete

The responder has sufficient information to broadcast the Funding Transaction (with the ability to receive a refund), the responder broadcasts on the blockchain and returns the txid to the requester, with the signature of the Funding Transaction. This is provided as a courtesy, it cannot be relied upon with non-cooperative channel counterparties and the Funding Transaction can be braodcast without this message being received by the requester. After the necessary number of confirmations, Lightning Network transactions can proceed.

Cooperative Channel Close

This is when either party want to close out a channel with the current balance. Requires the cooperation of both parites for this type. In the event of non-cooperation, either party may broadcast the most recent Commitment Transaction.

Close Request

One party unilaterally sends their sig and fee amount to the other party. No further channel updates are possible. In the future, we might include HTLCs in the outputs, but for now, we're assuming all HTLCs are cleared out.

Close Complete

Returns the Txid and sig as a courtesy. The counterparty might not send this if they're being non-cooperative.