[Mastering the Lightning Network] 9 - 채널 운영과 결제 전달(Channel Operation and Payment Forwarding)
[channel_id:channel_id]
[u64:id]
[u64:amount_msat]
[sha256:payment_hash]
[u32:cltv_expiry]
[1366*byte:onion_routing_packet]
# Revocation (1)
OP_DUP OP_HASH160 <RIPEMD160(SHA256(revocationpubkey))> OP_EQUAL
OP_IF
OP_CHECKSIG
OP_ELSE
<remote_HTLCpubkey> OP_SWAP OP_SIZE 32 OP_EQUAL
OP_IF
# Redemption (2)
OP_HASH160 <RIPEMD160(payment_hash)> OP_EQUALVERIFY
2 OP_SWAP <local_HTLCpubkey> 2 OP_CHECKMULTISIG
OP_ELSE
# Refund (3)
OP_DROP <cltv_expiry> OP_CHECKLOCKTIMEVERIFY OP_DROP
OP_CHECKSIG
OP_ENDIF
OP_ENDIF
[channel_id:channel_id]
[signature:signature]
[u16:num_htlcs]
[num_htlcs*signature:htlc_signature]
[channel_id:channel_id]
[32*byte:per_commitment_secret]
[point:next_per_commitment_point]
[channel_id:channel_id]
[u64:id]
[32*byte:payment_preimage]
[channel_id:channel_id]
[u64:id]
[u16:len]
[len*byte:reason]
[Mastering the Lightning Network] 10 - Onion Routing (0) | 2022.04.21 |
---|---|
[Mastering the Lightning Network] 8 - 라우팅 (Routing on a Network of Payment Channels) (0) | 2022.04.11 |
[Mastering the Lightning Network] 7 - 결제 채널 (Payment Channels) (0) | 2021.12.28 |
[Mastering the Lightning Network] 6 - 라이트닝 네트워크 아키텍쳐 (0) | 2021.12.28 |
[Mastering the Lightning Network] 5 - 라이트닝 네트워크 노드 운영하기 (1) | 2021.12.24 |