campaign

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Copyright © 2019 Annchain Authors <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright © 2019 Annchain Authors <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

View Source
const (
	MessageTypeCampaign msg.BinaryMessageType = iota + 300
	MessageTypeTermChange
	MessageTypeTermChangeRequest
	MessageTypeTermChangeResponse
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Campaign

type Campaign struct {
	types.TxBase
	DkgPublicKey []byte
	Vrf          vrf.VrfInfo
	Issuer       *common.Address
	// contains filtered or unexported fields
}

func (*Campaign) Compare

func (c *Campaign) Compare(tx types.Txi) bool

func (*Campaign) DecodeMsg

func (z *Campaign) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*Campaign) Dump

func (c *Campaign) Dump() string

func (*Campaign) EncodeMsg

func (z *Campaign) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Campaign) GetBase

func (c *Campaign) GetBase() *types.TxBase

func (*Campaign) GetDkgPublicKey

func (c *Campaign) GetDkgPublicKey() kyber.Point

func (*Campaign) GetSender

func (tc *Campaign) GetSender() *common.Address

func (*Campaign) MarshalDkgKey

func (c *Campaign) MarshalDkgKey() error

func (*Campaign) MarshalMsg

func (z *Campaign) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Campaign) Msgsize

func (z *Campaign) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Campaign) RawCampaign

func (c *Campaign) RawCampaign() *RawCampaign

func (*Campaign) RawTxi

func (c *Campaign) RawTxi() archive.RawTxi

func (*Campaign) Sender

func (c *Campaign) Sender() common.Address

func (*Campaign) SetSender

func (t *Campaign) SetSender(addr common.Address)

func (*Campaign) SignatureTargets

func (c *Campaign) SignatureTargets() []byte

func (*Campaign) String

func (c *Campaign) String() string

func (*Campaign) UnmarshalDkgKey

func (c *Campaign) UnmarshalDkgKey(unmarshalFunc func(b []byte) (kyber.Point, error)) error

func (*Campaign) UnmarshalMsg

func (z *Campaign) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Campaigns

type Campaigns []*Campaign

func (*Campaigns) DecodeMsg

func (z *Campaigns) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (Campaigns) EncodeMsg

func (z Campaigns) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*Campaigns) Len

func (r *Campaigns) Len() int

func (Campaigns) MarshalMsg

func (z Campaigns) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (Campaigns) Msgsize

func (z Campaigns) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (Campaigns) RawCampaigns

func (cs Campaigns) RawCampaigns() RawCampaigns

func (Campaigns) String

func (c Campaigns) String() string

func (*Campaigns) UnmarshalMsg

func (z *Campaigns) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type MessageCampaign

type MessageCampaign struct {
	RawCampaign *RawCampaign
}

func (*MessageCampaign) DecodeMsg

func (z *MessageCampaign) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*MessageCampaign) EncodeMsg

func (z *MessageCampaign) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*MessageCampaign) FromBinary

func (m *MessageCampaign) FromBinary(bs []byte) error

func (*MessageCampaign) GetData

func (m *MessageCampaign) GetData() []byte

func (*MessageCampaign) GetType

func (m *MessageCampaign) GetType() msg.BinaryMessageType

func (*MessageCampaign) MarshalMsg

func (z *MessageCampaign) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*MessageCampaign) Msgsize

func (z *MessageCampaign) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*MessageCampaign) String

func (m *MessageCampaign) String() string

func (*MessageCampaign) ToBinary

func (m *MessageCampaign) ToBinary() msg.BinaryMessage

func (*MessageCampaign) UnmarshalMsg

func (z *MessageCampaign) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type MessageTermChange

type MessageTermChange struct {
	RawTermChange *RawTermChange
}

func (*MessageTermChange) DecodeMsg

func (z *MessageTermChange) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*MessageTermChange) EncodeMsg

func (z *MessageTermChange) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*MessageTermChange) FromBinary

func (m *MessageTermChange) FromBinary(bs []byte) error

func (*MessageTermChange) GetData

func (m *MessageTermChange) GetData() []byte

func (*MessageTermChange) GetType

func (*MessageTermChange) MarshalMsg

func (z *MessageTermChange) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*MessageTermChange) Msgsize

func (z *MessageTermChange) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*MessageTermChange) String

func (m *MessageTermChange) String() string

func (*MessageTermChange) ToBinary

func (m *MessageTermChange) ToBinary() msg.BinaryMessage

func (*MessageTermChange) UnmarshalMsg

func (z *MessageTermChange) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type MessageTermChangeRequest

type MessageTermChangeRequest struct {
	Id uint32
}

func (*MessageTermChangeRequest) DecodeMsg

func (z *MessageTermChangeRequest) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (MessageTermChangeRequest) EncodeMsg

func (z MessageTermChangeRequest) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*MessageTermChangeRequest) FromBinary

func (m *MessageTermChangeRequest) FromBinary(bs []byte) error

func (*MessageTermChangeRequest) GetData

func (m *MessageTermChangeRequest) GetData() []byte

func (*MessageTermChangeRequest) GetType

func (MessageTermChangeRequest) MarshalMsg

func (z MessageTermChangeRequest) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (MessageTermChangeRequest) Msgsize

func (z MessageTermChangeRequest) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*MessageTermChangeRequest) String

func (m *MessageTermChangeRequest) String() string

func (*MessageTermChangeRequest) ToBinary

func (*MessageTermChangeRequest) UnmarshalMsg

func (z *MessageTermChangeRequest) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type MessageTermChangeResponse

type MessageTermChangeResponse struct {
	TermChange *TermChange
	Id         uint32
}

func (*MessageTermChangeResponse) DecodeMsg

func (z *MessageTermChangeResponse) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*MessageTermChangeResponse) EncodeMsg

func (z *MessageTermChangeResponse) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*MessageTermChangeResponse) FromBinary

func (m *MessageTermChangeResponse) FromBinary(bs []byte) error

func (*MessageTermChangeResponse) GetData

func (m *MessageTermChangeResponse) GetData() []byte

func (*MessageTermChangeResponse) GetType

func (*MessageTermChangeResponse) MarshalMsg

func (z *MessageTermChangeResponse) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*MessageTermChangeResponse) Msgsize

func (z *MessageTermChangeResponse) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*MessageTermChangeResponse) String

func (m *MessageTermChangeResponse) String() string

func (*MessageTermChangeResponse) ToBinary

func (*MessageTermChangeResponse) UnmarshalMsg

func (z *MessageTermChangeResponse) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type RawCampaign

type RawCampaign struct {
	types.TxBase
	DkgPublicKey []byte
	Vrf          vrf.VrfInfo
}

func (*RawCampaign) Campaign

func (rc *RawCampaign) Campaign() *Campaign

func (*RawCampaign) DecodeMsg

func (z *RawCampaign) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*RawCampaign) EncodeMsg

func (z *RawCampaign) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*RawCampaign) MarshalMsg

func (z *RawCampaign) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*RawCampaign) Msgsize

func (z *RawCampaign) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*RawCampaign) String

func (t *RawCampaign) String() string

func (*RawCampaign) Txi

func (t *RawCampaign) Txi() types.Txi

func (*RawCampaign) UnmarshalMsg

func (z *RawCampaign) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type RawCampaigns

type RawCampaigns []*RawCampaign

func (RawCampaigns) Campaigns

func (r RawCampaigns) Campaigns() Campaigns

func (*RawCampaigns) DecodeMsg

func (z *RawCampaigns) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (RawCampaigns) EncodeMsg

func (z RawCampaigns) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*RawCampaigns) Len

func (r *RawCampaigns) Len() int

func (RawCampaigns) MarshalMsg

func (z RawCampaigns) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (RawCampaigns) Msgsize

func (z RawCampaigns) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (RawCampaigns) String

func (r RawCampaigns) String() string

func (RawCampaigns) Txis

func (r RawCampaigns) Txis() types.Txis

func (*RawCampaigns) UnmarshalMsg

func (z *RawCampaigns) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type RawTermChange

type RawTermChange struct {
	types.TxBase
	TermId uint64
	PkBls  []byte
	SigSet []*SigSet
}

func (*RawTermChange) DecodeMsg

func (z *RawTermChange) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*RawTermChange) EncodeMsg

func (z *RawTermChange) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*RawTermChange) MarshalMsg

func (z *RawTermChange) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*RawTermChange) Msgsize

func (z *RawTermChange) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*RawTermChange) String

func (t *RawTermChange) String() string

func (*RawTermChange) TermChange

func (r *RawTermChange) TermChange() *TermChange

func (*RawTermChange) Txi

func (t *RawTermChange) Txi() types.Txi

func (*RawTermChange) UnmarshalMsg

func (z *RawTermChange) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type RawTermChanges

type RawTermChanges []*RawTermChange

func (*RawTermChanges) DecodeMsg

func (z *RawTermChanges) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (RawTermChanges) EncodeMsg

func (z RawTermChanges) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*RawTermChanges) Len

func (r *RawTermChanges) Len() int

func (RawTermChanges) MarshalMsg

func (z RawTermChanges) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (RawTermChanges) Msgsize

func (z RawTermChanges) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (RawTermChanges) String

func (r RawTermChanges) String() string

func (RawTermChanges) TermChanges

func (r RawTermChanges) TermChanges() TermChanges

func (RawTermChanges) Txis

func (r RawTermChanges) Txis() types.Txis

func (*RawTermChanges) UnmarshalMsg

func (z *RawTermChanges) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SigSet

type SigSet struct {
	PublicKey hexutil.Bytes
	Signature hexutil.Bytes
}

func (*SigSet) DecodeMsg

func (z *SigSet) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*SigSet) EncodeMsg

func (z *SigSet) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*SigSet) MarshalMsg

func (z *SigSet) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*SigSet) Msgsize

func (z *SigSet) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*SigSet) UnmarshalMsg

func (z *SigSet) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type TermChange

type TermChange struct {
	types.TxBase
	TermID uint64
	PkBls  hexutil.Bytes
	SigSet []*SigSet
	Issuer *common.Address
}

func (*TermChange) Compare

func (tc *TermChange) Compare(tx types.Txi) bool

func (*TermChange) DecodeMsg

func (z *TermChange) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*TermChange) Dump

func (tc *TermChange) Dump() string

func (*TermChange) EncodeMsg

func (z *TermChange) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*TermChange) GetBase

func (tc *TermChange) GetBase() *types.TxBase

func (*TermChange) GetSender

func (tc *TermChange) GetSender() *common.Address

func (*TermChange) IsSameTermInfo

func (tc *TermChange) IsSameTermInfo(ctc *TermChange) bool

func (*TermChange) MarshalMsg

func (z *TermChange) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*TermChange) Msgsize

func (z *TermChange) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*TermChange) RawTermChange

func (c *TermChange) RawTermChange() *RawTermChange

func (*TermChange) RawTxi

func (c *TermChange) RawTxi() archive.RawTxi

func (*TermChange) Sender

func (tc *TermChange) Sender() common.Address

func (*TermChange) SetSender

func (t *TermChange) SetSender(addr common.Address)

func (*TermChange) SignatureTargets

func (tc *TermChange) SignatureTargets() []byte

func (*TermChange) String

func (tc *TermChange) String() string

func (*TermChange) UnmarshalMsg

func (z *TermChange) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type TermChanges

type TermChanges []*TermChange

func (*TermChanges) DecodeMsg

func (z *TermChanges) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (TermChanges) EncodeMsg

func (z TermChanges) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*TermChanges) Len

func (r *TermChanges) Len() int

func (TermChanges) MarshalMsg

func (z TermChanges) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (TermChanges) Msgsize

func (z TermChanges) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (TermChanges) RawTermChanges

func (cs TermChanges) RawTermChanges() RawTermChanges

func (TermChanges) String

func (c TermChanges) String() string

func (*TermChanges) UnmarshalMsg

func (z *TermChanges) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL