func NewTransaction(src ed25519.PublicKey, dest ed25519.PublicKey, curr Currency, amount DecimalAmount, create bool) (Transaction, error) {
	if !create && (src == nil || len(src) != ed25519.PublicKeySize) {
		return Transaction{}, fmt.Errorf("invalid source address provided")
	}

	if dest == nil || len(dest) != ed25519.PublicKeySize {
		return Transaction{}, fmt.Errorf("invalid destination address provided")
	}

	return Transaction{src, dest, [64]byte{}, curr, amount, create}, nil
}
// NewTransaction is the constructor for the transaction struct
NewTransaction is the constructor for the transaction struct
// NewTransaction is the constructor for the transaction struct
func NewTransaction(src ed25519.PublicKey, dest ed25519.PublicKey, curr Currency, amount DecimalAmount, create bool) (Transaction, error) {
	if !create && (src == nil || len(src) != ed25519.PublicKeySize) {
		return Transaction{}, fmt.Errorf("invalid source address provided")
	}
	if dest == nil || len(dest) != ed25519.PublicKeySize {
		return Transaction{}, fmt.Errorf("invalid destination address provided")
	}
	return Transaction{src, dest, [64]byte{}, curr, amount, create}, nil
}
func NewTransaction ( src ed25519 . PublicKey , dest ed25519 . PublicKey , curr Currency , amount DecimalAmount , create bool ) ( Transaction , error ) { if ! create && ( src == nil || len ( src ) != ed25519 . PublicKeySize ) { return Transaction { } , fmt . Errorf ( " " ) } if dest == nil || len ( dest ) != ed25519 . PublicKeySize { return Transaction { } , fmt . Errorf ( " " ) } return Transaction { src , dest , [ 64 ] byte { } , curr , amount , create } , nil }
NewTransaction is the constructor for the transaction struct
NewTransaction is the constructor for the transaction struct