Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contract ¶
type Contract struct { Version uint16 SenderPubKey *ecdsa.PublicKey SigLen uint8 Signature []byte RecipPubKeyHash []byte Value uint64 StateNonce uint64 }
func ContractMessageFromInput ¶
Convert value to uint64; if unsuccessful output an error If value is zero, output error GetBalance(), if value is > than wallet balance, output an error GetStateNonce(), GetPrivateKey() Convert recipient to []byte; if unsuccessful output an error MakeContract(...) (use version global), SignContract(...) Output a contract message, with the following structure: producer.SecretBytes + uint8(1) + serializedContract NOTE: The uint8(1) here will let the producer know that this is a contract message
func MakeContract ¶
func (*Contract) SignContract ¶
func (c *Contract) SignContract(sender *ecdsa.PrivateKey) error
Click to show internal directories.
Click to hide internal directories.