func (t *Transaction) Sign(key ed25519.PrivateKey) error {
	if t.Create {
		return fmt.Errorf("cannot sign a create transaction")
	} else if len(key) != ed25519.PrivateKeySize {
		return fmt.Errorf("private key for address %x is the wrong length", t.Src)
	}

	data, err := t.GetSignableRepresentation()
	if err != nil {
		return err
	}
	copy(t.Sig[:], ed25519.Sign(key, data))
	return nil
}
// Sign signs a request to pay somebody
Sign signs a request to pay somebody
// Sign signs a request to pay somebody
func (t *Transaction) Sign(key ed25519.PrivateKey) error {
	if t.Create {
		return fmt.Errorf("cannot sign a create transaction")
	} else if len(key) != ed25519.PrivateKeySize {
		return fmt.Errorf("private key for address %x is the wrong length", t.Src)
	}
	data, err := t.GetSignableRepresentation()
	if err != nil {
		return err
	}
	copy(t.Sig[:], ed25519.Sign(key, data))
	return nil
}
func ( t * Transaction ) Sign ( key ed25519 . PrivateKey ) error { if t . Create { return fmt . Errorf ( " " ) } else if len ( key ) != ed25519 . PrivateKeySize { return fmt . Errorf ( " " , t . Src ) } data , err := t . GetSignableRepresentation ( ) if err != nil { return err } copy ( t . Sig [ : ] , ed25519 . Sign ( key , data ) ) return nil }
Sign signs a request to pay somebody
Sign signs a request to pay somebody