Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidSig represents error on given v, r, s values ErrInvalidSig = errors.New("invalid transaction v, r, s values") )
Functions ¶
This section is empty.
Types ¶
type Check ¶
type Check struct { Nonce []byte ChainID types.ChainID DueBlock uint64 Coin types.CoinID Value *big.Int GasCoin types.CoinID Lock *big.Int V *big.Int R *big.Int S *big.Int }
Check is like an ordinary bank check. Each user of network can issue check with any amount of coins and pass it to another person. Receiver will be able to cash a check from arbitrary account.
Nonce - unique "id" of the check. Coin Symbol - symbol of coin. Value - amount of coins. GasCoin - symbol of a coin to pay fee. DueBlock - defines last block height in which the check can be used. Lock - secret to prevent hijacking. V, R, S - signature of issuer.
func DecodeFromBytes ¶
DecodeFromBytes decodes check from bytes
func (*Check) HashWithoutLock ¶ added in v0.5.0
HashWithoutLock returns a types.Hash to be used in process of signing and checking Lock
func (*Check) LockPubKey ¶
LockPubKey returns bytes of public key, which is used for proving check's recipient rights