4 "github.com/vapor/crypto/ed25519/chainkd"
5 chainjson "github.com/vapor/encoding/json"
6 "github.com/vapor/protocol/vm"
9 // serflag variables for input types.
11 DelegateInfoType uint8 = iota
17 type TypedData interface {
26 // DELEGATE_IDS PUBKEY SIG(block.time)
27 type DelegateInfoList struct {
28 Delegate DelegateInfo `json:"delegate"`
29 Xpub chainkd.XPub `json:"xpub"`
30 SigTime chainjson.HexBytes `json:"sig_time"`
33 func (d *DelegateInfoList) DataType() uint8 { return DelegateInfoType }
35 type RegisterForgerData struct {
36 Name string `json:"name"`
39 func (d *RegisterForgerData) DataType() uint8 { return RegisterType }
41 type VoteForgerData struct {
42 Forgers []string `json:"forgers"`
45 func (d *VoteForgerData) DataType() uint8 { return VoteType }
47 type CancelVoteForgerData struct {
48 Forgers []string `json:"forgers"`
51 func (d *CancelVoteForgerData) DataType() uint8 { return CancelVoteType }