func (a *AuctionOrder) Serialize() (buf []byte) {
	// serializable fields:
	// public key (compressed) [33 bytes]
	// trading pair [2 bytes]
	// amounthave [8 bytes]
	// amountwant [8 bytes]
	// len side [8 bytes]
	// side [len side]
	// auctionID [32 bytes]
	// nonce [2 bytes]
	// len sig [8 bytes]
	// sig [len sig bytes]
	buf = append(buf, a.Pubkey[:]...)
	buf = append(buf, a.TradingPair.Serialize()...)

	amountHaveBytes := make([]byte, 8)
	binary.LittleEndian.PutUint64(amountHaveBytes, a.AmountHave)
	buf = append(buf, amountHaveBytes[:]...)

	amountWantBytes := make([]byte, 8)
	binary.LittleEndian.PutUint64(amountWantBytes, a.AmountWant)
	buf = append(buf, amountWantBytes[:]...)

	lenSideBytes := make([]byte, 8)
	binary.LittleEndian.PutUint64(lenSideBytes, uint64(len(a.Side)))
	buf = append(buf, lenSideBytes[:]...)

	buf = append(buf, []byte(a.Side)...)
	buf = append(buf, a.AuctionID[:]...)
	buf = append(buf, a.Nonce[:]...)

	lenSigBytes := make([]byte, 8)
	binary.LittleEndian.PutUint64(lenSigBytes, uint64(len(a.Signature)))
	buf = append(buf, lenSigBytes[:]...)

	buf = append(buf, a.Signature[:]...)
	return
}
// Serialize serializes an order, possible replay attacks here since this is what you're signing?
// but anyways this is the order: [33 byte pubkey] pair amountHave amountWant <length side> side [32 byte auctionid]
Serialize serializes an order, possible replay attacks here since this is what you're signing.
but anyways this is the order: [33 byte pubkey] pair amountHave amountWant  side [32 byte auctionid]
// Serialize serializes an order possible replay attacks here since this is what you ' re signing? // but anyways this is the order : [ 33 byte pubkey ] pair amountHave amountWant <length side > side [ 32 byte auctionid ]
func (a *AuctionOrder) Serialize() (buf []byte) {
	buf = append(buf, a.Pubkey[:]...)
	buf = append(buf, a.TradingPair.Serialize()...)
	amountHaveBytes := make([]byte, 8)
	binary.LittleEndian.PutUint64(amountHaveBytes, a.AmountHave)
	buf = append(buf, amountHaveBytes[:]...)
	amountWantBytes := make([]byte, 8)
	binary.LittleEndian.PutUint64(amountWantBytes, a.AmountWant)
	buf = append(buf, amountWantBytes[:]...)
	lenSideBytes := make([]byte, 8)
	binary.LittleEndian.PutUint64(lenSideBytes, uint64(len(a.Side)))
	buf = append(buf, lenSideBytes[:]...)
	buf = append(buf, []byte(a.Side)...)
	buf = append(buf, a.AuctionID[:]...)
	buf = append(buf, a.Nonce[:]...)
	lenSigBytes := make([]byte, 8)
	binary.LittleEndian.PutUint64(lenSigBytes, uint64(len(a.Signature)))
	buf = append(buf, lenSigBytes[:]...)
	buf = append(buf, a.Signature[:]...)
	return
}
func ( a * AuctionOrder ) Serialize ( ) ( buf [ ] byte ) { buf = append ( buf , a . Pubkey [ : ] ... ) buf = append ( buf , a . TradingPair . Serialize ( ) ... ) amountHaveBytes := make ( [ ] byte , 8 ) binary . LittleEndian . PutUint64 ( amountHaveBytes , a . AmountHave ) buf = append ( buf , amountHaveBytes [ : ] ... ) amountWantBytes := make ( [ ] byte , 8 ) binary . LittleEndian . PutUint64 ( amountWantBytes , a . AmountWant ) buf = append ( buf , amountWantBytes [ : ] ... ) lenSideBytes := make ( [ ] byte , 8 ) binary . LittleEndian . PutUint64 ( lenSideBytes , uint64 ( len ( a . Side ) ) ) buf = append ( buf , lenSideBytes [ : ] ... ) buf = append ( buf , [ ] byte ( a . Side ) ... ) buf = append ( buf , a . AuctionID [ : ] ... ) buf = append ( buf , a . Nonce [ : ] ... ) lenSigBytes := make ( [ ] byte , 8 ) binary . LittleEndian . PutUint64 ( lenSigBytes , uint64 ( len ( a . Signature ) ) ) buf = append ( buf , lenSigBytes [ : ] ... ) buf = append ( buf , a . Signature [ : ] ... ) return }
Serialize serializes an order, possible replay attacks here since this is what you're signing.
Serialize serializes an order possible replay attacks here since this is what you ' re signing .
// serializable fields: // public key (compressed) [33 bytes] // trading pair [2 bytes] // amounthave [8 bytes] // amountwant [8 bytes] // len side [8 bytes] // side [len side] // auctionID [32 bytes] // nonce [2 bytes] // len sig [8 bytes] // sig [len sig bytes]