code: func (key *Key) Serialize() ([]byte, error) {
  	// Private keys should be prepended with a single null byte
  	keyBytes := key.Key
  	if key.IsPrivate {
  		keyBytes = append([]byte{0x0}, keyBytes...)
  	}
  
  	// Write fields to buffer in order
  	buffer := new(bytes.Buffer)
  	buffer.Write(key.Version)
  	buffer.WriteByte(key.Depth)
  	buffer.Write(key.FingerPrint)
  	buffer.Write(key.ChildNumber)
  	buffer.Write(key.ChainCode)
  	buffer.Write(keyBytes)
  
  	// Append the standard doublesha256 checksum
  	serializedKey, err := addChecksumToBytes(buffer.Bytes())
  	if err != nil {
  		return nil, err
  	}
  
  	return serializedKey, nil
  }
docs: // Serialize a Key to a 78 byte byte slice