Sha256: 21fde0c1a2cae5ee9be7d9f57492bfaf7c3fea3c185424c23d758100432e547b
Contents?: true
Size: 804 Bytes
Versions: 5
Compression:
Stored size: 804 Bytes
Contents
module Lightning module Invoice class RoutingInfo attr_accessor :pubkey, :short_channel_id, :fee_base_msat, :fee_proportional_millionths, :cltv_expiry_delta def initialize(pubkey, short_channel_id, fee_base_msat, fee_proportional_millionths, cltv_expiry_delta) @pubkey = pubkey @short_channel_id = short_channel_id @fee_base_msat = fee_base_msat @fee_proportional_millionths = fee_proportional_millionths @cltv_expiry_delta = cltv_expiry_delta end def to_array pubkey.htb.unpack("C*") + short_channel_id.htb.unpack("C*") + Invoice.int_to_array(fee_base_msat, 5, 4) + Invoice.int_to_array(fee_proportional_millionths, 5, 4) + Invoice.int_to_array(cltv_expiry_delta) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems