lnwire: export SerializeSigToWire and DeserializeSigFromWire

This commit is contained in:
Johan T. Halseth
2017-08-26 15:53:24 +02:00
committed by Olaoluwa Osuntokun
parent 74322a99be
commit ff4ca664e3
3 changed files with 8 additions and 8 deletions

View File

@@ -6,9 +6,9 @@ import (
"github.com/roasbeef/btcd/btcec"
)
// serializeSigToWire serializes a *Signature to [64]byte in the format
// SerializeSigToWire serializes a *Signature to [64]byte in the format
// specified by the Lightning RFC.
func serializeSigToWire(b *[64]byte, e *btcec.Signature) error {
func SerializeSigToWire(b *[64]byte, e *btcec.Signature) error {
// Serialize the signature with all the checks that entails.
sig := e.Serialize()
@@ -53,9 +53,9 @@ func serializeSigToWire(b *[64]byte, e *btcec.Signature) error {
return nil
}
// deserializeSigFromWire deserializes a *Signature from [64]byte in the format
// DeserializeSigFromWire deserializes a *Signature from [64]byte in the format
// specified by the Lightning RFC.
func deserializeSigFromWire(e **btcec.Signature, b [64]byte) error {
func DeserializeSigFromWire(e **btcec.Signature, b [64]byte) error {
// Extract canonically-padded bigint representations from buffer
r := extractCanonicalPadding(b[0:32])