tx_types

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: Apache-2.0 Imports: 18 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.

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.

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.

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.

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 (
	ActionTxActionIPO uint8 = iota
	ActionTxActionDestroy
	ActionTxActionSPO
	ActionRequestDomainName
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionData

type ActionData interface {
	msg.Message
	String() string
}

type ActionMsg added in v0.0.6

type ActionMsg struct {
	Type         int         `json:"type"`
	Hash         string      `json:"hash"`
	Parents      []string    `json:"parents"`
	AccountNonce uint64      `json:"account_nonce"`
	Height       uint64      `json:"height"`
	MindNonce    uint64      `json:"mind_nonce"`
	Weight       uint64      `json:"weight"`
	ActionData   interface{} `json:"data"`
	From         string      `json:"from"`
	Action       uint8       `json:"action"`
	Sign         string      `json:"sign"`
}

type ActionTx

type ActionTx struct {
	types.TxBase
	Action     uint8
	From       *common.Address
	ActionData ActionData
	// contains filtered or unexported fields
}

func RandomActionTx

func RandomActionTx() *ActionTx

func SampleActionTx

func SampleActionTx() *ActionTx

func (*ActionTx) CheckActionIsValid

func (t *ActionTx) CheckActionIsValid() bool

func (*ActionTx) Compare

func (t *ActionTx) Compare(tx types.Txi) bool

func (*ActionTx) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ActionTx) Dump

func (t *ActionTx) Dump() string

func (*ActionTx) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ActionTx) GetBase

func (t *ActionTx) GetBase() *types.TxBase

func (*ActionTx) GetConfirm

func (t *ActionTx) GetConfirm() time.Duration

func (*ActionTx) GetDomainName

func (t *ActionTx) GetDomainName() *RequestDomain

func (*ActionTx) GetOfferValue

func (t *ActionTx) GetOfferValue() *math.BigInt

func (*ActionTx) GetPublicOffering

func (t *ActionTx) GetPublicOffering() *PublicOffering

func (*ActionTx) GetSender

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

func (*ActionTx) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ActionTx) Msgsize

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

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

func (*ActionTx) RawActionTx

func (t *ActionTx) RawActionTx() *RawActionTx

func (*ActionTx) RawTxi

func (c *ActionTx) RawTxi() types.RawTxi

func (*ActionTx) Sender

func (t *ActionTx) Sender() common.Address

func (*ActionTx) SetSender

func (c *ActionTx) SetSender(addr common.Address)

func (*ActionTx) Setconfirm

func (t *ActionTx) Setconfirm()

func (*ActionTx) SignatureTargets

func (t *ActionTx) SignatureTargets() []byte

func (*ActionTx) String

func (t *ActionTx) String() string

func (*ActionTx) ToJsonMsg added in v0.0.6

func (z *ActionTx) ToJsonMsg() ActionMsg

func (*ActionTx) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ActionTxs

type ActionTxs []*ActionTx

func (*ActionTxs) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (ActionTxs) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ActionTxs) Len

func (r *ActionTxs) Len() int

func (ActionTxs) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (ActionTxs) Msgsize

func (z ActionTxs) Msgsize() (s int)

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

func (ActionTxs) String

func (t ActionTxs) String() string

func (ActionTxs) ToRawTxs

func (t ActionTxs) ToRawTxs() RawActionTxs

func (*ActionTxs) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type Archive

type Archive struct {
	types.TxBase
	Data []byte `json:"data"`
}

func RandomArchive

func RandomArchive() *Archive

func (*Archive) CalcTxHash

func (t *Archive) CalcTxHash() (hash common.Hash)

func (*Archive) Compare

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

func (*Archive) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*Archive) Dump

func (c *Archive) Dump() string

func (*Archive) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*Archive) GetBase

func (a *Archive) GetBase() *types.TxBase

func (*Archive) GetSender

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

func (*Archive) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*Archive) Msgsize

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

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

func (*Archive) RawArchive

func (a *Archive) RawArchive() *RawArchive

func (*Archive) RawTxi

func (c *Archive) RawTxi() types.RawTxi

func (*Archive) Sender

func (a *Archive) Sender() common.Address

func (*Archive) SetSender

func (t *Archive) SetSender(address common.Address)

func (*Archive) SignatureTargets

func (a *Archive) SignatureTargets() []byte

func (*Archive) String

func (a *Archive) String() string

func (*Archive) ToJsonMsg added in v0.0.6

func (t *Archive) ToJsonMsg() ArchiveMsg

func (*Archive) ToSmallCaseJson

func (a *Archive) ToSmallCaseJson() ([]byte, error)

func (*Archive) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ArchiveJson

type ArchiveJson struct {
	types.TxBaseJson
	Data []byte `json:"data"`
}

func (*ArchiveJson) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*ArchiveJson) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*ArchiveJson) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*ArchiveJson) Msgsize

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

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

func (*ArchiveJson) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type ArchiveMsg added in v0.0.6

type ArchiveMsg struct {
	Type         int      `json:"type"`
	Hash         string   `json:"hash"`
	Parents      []string `json:"parents"`
	AccountNonce uint64   `json:"account_nonce"`
	MindNonce    uint64   `json:"mind_nonce"`
	Weight       uint64   `json:"weight"`
	Height       uint64   `json:"height"`
	Data         []byte   `json:"data"`
	Sign         string   `json:"sign"`
}

type Archives

type Archives []*Archive

func (*Archives) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (Archives) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (Archives) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (Archives) Msgsize

func (z Archives) Msgsize() (s int)

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

func (Archives) RawArchives

func (cs Archives) RawArchives() RawArchives

func (Archives) String

func (as Archives) String() string

func (*Archives) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type BlsSigSet

type BlsSigSet struct {
	PublicKey    []byte
	BlsSignature []byte
}

func (*BlsSigSet) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*BlsSigSet) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*BlsSigSet) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*BlsSigSet) Msgsize

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

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

func (*BlsSigSet) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type Campaign

type Campaign struct {
	types.TxBase
	DkgPublicKey []byte
	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() types.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 Foo

type Foo struct {
	Bar     string             `msg:"bar"`
	Baz     float64            `msg:"baz"`
	Address common.Address     `msg:"address"`
	Parents common.Hashes      `msg:"parents"`
	KV      map[string]float64 `msg:"kv"`
	Seq     Sequencer          `msg:"seq"`
	TxInner Tx                 `msg:"tx"`
}

func (*Foo) CalcHash

func (f *Foo) CalcHash() (hash common.Hash, err error)

func (*Foo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*Foo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*Foo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*Foo) Msgsize

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

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

func (*Foo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type PublicOffering

type PublicOffering struct {
	TokenId int32        `json:"token_id"` //for Secondary Public Issues
	Value   *math.BigInt `json:"value"`
	//To      Address       //when publish a token ,to equals from
	EnableSPO bool   `json:"enable_spo"` //if enableSPO is false  , no Secondary Public Issues.
	TokenName string `json:"token_name"`
}

func NewPublicOffering

func NewPublicOffering() *PublicOffering

func (*PublicOffering) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*PublicOffering) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*PublicOffering) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*PublicOffering) Msgsize

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

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

func (PublicOffering) String

func (p PublicOffering) String() string

func (*PublicOffering) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type RawActionTx

type RawActionTx struct {
	types.TxBase
	Action     uint8
	ActionData ActionData
}

func (*RawActionTx) ActionTx

func (t *RawActionTx) ActionTx() *ActionTx

func (*RawActionTx) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*RawActionTx) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*RawActionTx) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*RawActionTx) Msgsize

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

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

func (*RawActionTx) String

func (t *RawActionTx) String() string

func (*RawActionTx) Txi

func (a *RawActionTx) Txi() types.Txi

func (*RawActionTx) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type RawActionTxs

type RawActionTxs []*RawActionTx

func (*RawActionTxs) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (RawActionTxs) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (RawActionTxs) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (RawActionTxs) Msgsize

func (z RawActionTxs) Msgsize() (s int)

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

func (*RawActionTxs) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type RawArchive

type RawArchive struct {
	Archive
}

func (*RawArchive) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*RawArchive) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*RawArchive) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*RawArchive) Msgsize

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

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

func (*RawArchive) Txi

func (a *RawArchive) Txi() types.Txi

func (*RawArchive) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type RawArchives

type RawArchives []*RawArchive

func (*RawArchives) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (RawArchives) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (RawArchives) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (RawArchives) Msgsize

func (z RawArchives) Msgsize() (s int)

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

func (*RawArchives) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type RawCampaign

type RawCampaign struct {
	types.TxBase
	DkgPublicKey []byte
	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 RawSequencer

type RawSequencer struct {
	types.TxBase
	BlsJointSig    []byte
	BlsJointPubKey []byte
	StateRoot      common.Hash
	Timestamp      int64
}

func (*RawSequencer) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*RawSequencer) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*RawSequencer) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*RawSequencer) Msgsize

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

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

func (*RawSequencer) Sequencer

func (t *RawSequencer) Sequencer() *Sequencer

func (*RawSequencer) String

func (t *RawSequencer) String() string

func (*RawSequencer) Txi

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

func (*RawSequencer) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type RawSequencers

type RawSequencers []*RawSequencer

func (*RawSequencers) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (RawSequencers) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*RawSequencers) Len

func (r *RawSequencers) Len() int

func (RawSequencers) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (RawSequencers) Msgsize

func (z RawSequencers) Msgsize() (s int)

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

func (RawSequencers) Sequencers

func (r RawSequencers) Sequencers() Sequencers

func (RawSequencers) String

func (r RawSequencers) String() string

func (RawSequencers) ToHeaders

func (seqs RawSequencers) ToHeaders() SequencerHeaders

func (RawSequencers) Txis

func (r RawSequencers) Txis() types.Txis

func (*RawSequencers) UnmarshalMsg

func (z *RawSequencers) 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 RawTx

type RawTx struct {
	types.TxBase
	To      common.Address
	Value   *math.BigInt
	Data    []byte
	TokenId int32
}

compress data ,for p2p , small size

func (*RawTx) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*RawTx) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*RawTx) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*RawTx) Msgsize

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

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

func (*RawTx) String

func (t *RawTx) String() string

func (*RawTx) Tx

func (t *RawTx) Tx() *Tx

func (*RawTx) Txi

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

func (*RawTx) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type RawTxMarshaler

type RawTxMarshaler struct {
	types.RawTxi `msg:"-"`
}

TxMarshaler just for marshaller , put type to front 2 bytes, and marshal

func (*RawTxMarshaler) DecodeMsg

func (t *RawTxMarshaler) DecodeMsg(dc *msgp.Reader) (err error)

func (*RawTxMarshaler) EncodeMsg

func (t *RawTxMarshaler) EncodeMsg(en *msgp.Writer) (err error)

func (*RawTxMarshaler) MarshalMsg

func (t *RawTxMarshaler) MarshalMsg(b []byte) (o []byte, err error)

func (*RawTxMarshaler) Msgsize

func (t *RawTxMarshaler) Msgsize() (s int)

func (*RawTxMarshaler) Txi

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

func (*RawTxMarshaler) UnmarshalMsg

func (t *RawTxMarshaler) UnmarshalMsg(bts []byte) (o []byte, err error)

type RawTxs

type RawTxs []*RawTx

func (*RawTxs) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (RawTxs) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*RawTxs) Len

func (r *RawTxs) Len() int

func (RawTxs) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (RawTxs) Msgsize

func (z RawTxs) Msgsize() (s int)

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

func (RawTxs) String

func (r RawTxs) String() string

func (RawTxs) Txis

func (r RawTxs) Txis() types.Txis

func (RawTxs) Txs

func (r RawTxs) Txs() Txs

func (*RawTxs) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type RequestDomain

type RequestDomain struct {
	DomainName string
}

func (*RequestDomain) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (RequestDomain) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (RequestDomain) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (RequestDomain) Msgsize

func (z RequestDomain) Msgsize() (s int)

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

func (RequestDomain) String

func (r RequestDomain) String() string

func (*RequestDomain) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type Sequencer

type Sequencer struct {
	// TODO: need more states in sequencer to differentiate multiple chains
	types.TxBase
	Issuer         *common.Address
	BlsJointSig    hexutil.Bytes
	BlsJointPubKey hexutil.Bytes
	StateRoot      common.Hash
	Proposing      bool `msg:"-"` // is the sequencer is proposal ,did't commit yet ,use this flag to avoid bls sig verification failed
	Timestamp      int64
}

func RandomSequencer

func RandomSequencer() *Sequencer

func SampleSequencer

func SampleSequencer() *Sequencer

func (*Sequencer) Compare

func (t *Sequencer) Compare(tx types.Txi) bool

func (*Sequencer) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*Sequencer) Dump

func (t *Sequencer) Dump() string

func (*Sequencer) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*Sequencer) GetBase

func (t *Sequencer) GetBase() *types.TxBase

func (*Sequencer) GetHead

func (t *Sequencer) GetHead() *SequencerHeader

func (*Sequencer) GetSender

func (t *Sequencer) GetSender() *common.Address

func (*Sequencer) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*Sequencer) Msgsize

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

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

func (*Sequencer) Number

func (t *Sequencer) Number() uint64

func (*Sequencer) Parents

func (t *Sequencer) Parents() common.Hashes

func (*Sequencer) RawSequencer

func (s *Sequencer) RawSequencer() *RawSequencer

func (*Sequencer) RawTxi

func (c *Sequencer) RawTxi() types.RawTxi

func (*Sequencer) Sender

func (t *Sequencer) Sender() common.Address

func (*Sequencer) SetSender

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

func (*Sequencer) SignatureTargets

func (t *Sequencer) SignatureTargets() []byte

func (*Sequencer) String

func (t *Sequencer) String() string

func (*Sequencer) ToJsonMsg added in v0.0.4

func (s *Sequencer) ToJsonMsg() SequencerMsg

func (*Sequencer) ToSmallCaseJson

func (s *Sequencer) ToSmallCaseJson() ([]byte, error)

func (*Sequencer) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type SequencerHeader

type SequencerHeader struct {
	Hash   common.Hash
	Height uint64
}

func NewSequencerHead

func NewSequencerHead(hash common.Hash, height uint64) *SequencerHeader

func (*SequencerHeader) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*SequencerHeader) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*SequencerHeader) Equal

func (s *SequencerHeader) Equal(h *SequencerHeader) bool

func (*SequencerHeader) GetHash

func (s *SequencerHeader) GetHash() common.Hash

func (*SequencerHeader) GetHeight

func (s *SequencerHeader) GetHeight() uint64

func (*SequencerHeader) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*SequencerHeader) Msgsize

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

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

func (*SequencerHeader) SequencerId

func (s *SequencerHeader) SequencerId() uint64

func (*SequencerHeader) String

func (s *SequencerHeader) String() string

func (*SequencerHeader) StringFull

func (s *SequencerHeader) StringFull() string

func (*SequencerHeader) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type SequencerHeaders

type SequencerHeaders []*SequencerHeader

func (*SequencerHeaders) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (SequencerHeaders) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (SequencerHeaders) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (SequencerHeaders) Msgsize

func (z SequencerHeaders) Msgsize() (s int)

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

func (SequencerHeaders) String

func (h SequencerHeaders) String() string

func (*SequencerHeaders) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type SequencerJson

type SequencerJson struct {
	types.TxBaseJson
	Issuer         *common.Address `json:"issuer"`
	BlsJointSig    hexutil.Bytes   `json:"bls_joint_sig"`
	BlsJointPubKey hexutil.Bytes   `json:"bls_joint_pub_key"`
	Proposing      bool            `msg:"-",json:"-"`
	Timestamp      int64           `msg:"timestamp"`
}

func (*SequencerJson) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*SequencerJson) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*SequencerJson) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*SequencerJson) Msgsize

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

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

func (*SequencerJson) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type SequencerMsg added in v0.0.4

type SequencerMsg struct {
	Type           int      `json:"type"`
	Hash           string   `json:"hash"`
	Parents        []string `json:"parents"`
	Issuer         string   `json:"issuer"`
	Nonce          uint64   `json:"nonce"`
	Height         uint64   `json:"height"`
	Weight         uint64   `json:"weight"`
	BlsJointSig    string   `json:"bls_joint_sig"`
	BlsJointPubKey string   `json:"bls_joint_pub_key"`
	Timestamp      int64    `json:"timestamp"`
}

func (*SequencerMsg) DecodeMsg added in v0.0.6

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

DecodeMsg implements msgp.Decodable

func (*SequencerMsg) EncodeMsg added in v0.0.6

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

EncodeMsg implements msgp.Encodable

func (*SequencerMsg) MarshalMsg added in v0.0.6

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

MarshalMsg implements msgp.Marshaler

func (*SequencerMsg) Msgsize added in v0.0.6

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

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

func (*SequencerMsg) UnmarshalMsg added in v0.0.6

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

UnmarshalMsg implements msgp.Unmarshaler

type Sequencers

type Sequencers []*Sequencer

func (*Sequencers) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (Sequencers) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*Sequencers) Len

func (r *Sequencers) Len() int

func (Sequencers) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (Sequencers) Msgsize

func (z Sequencers) Msgsize() (s int)

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

func (Sequencers) String

func (s Sequencers) String() string

func (Sequencers) ToHeaders

func (s Sequencers) ToHeaders() SequencerHeaders

func (Sequencers) ToRawSequencers

func (seqs Sequencers) ToRawSequencers() RawSequencers

func (*Sequencers) UnmarshalMsg

func (z *Sequencers) 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() types.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

type TokenInfo

type TokenInfo struct {
	PublicOffering
	Sender       common.Address `json:"sender"`
	CurrentValue *math.BigInt   `json:"current_value"`
	Destroyed    bool           `json:"destroyed"`
}

func (*TokenInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*TokenInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*TokenInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*TokenInfo) Msgsize

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

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

func (*TokenInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type TokensInfo

type TokensInfo []*TokenInfo

func (*TokensInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (TokensInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (TokensInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (TokensInfo) Msgsize

func (z TokensInfo) Msgsize() (s int)

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

func (*TokensInfo) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type TransactionMsg added in v0.0.4

type TransactionMsg struct {
	Type         int      `json:"type"`
	Hash         string   `json:"hash"`
	Parents      []string `json:"parents"`
	From         string   `json:"from"`
	To           string   `json:"to"`
	AccountNonce uint64   `json:"account_nonce"`
	MindNonce    uint64   `json:"mind_nonce"`
	Value        string   `json:"value"`
	Weight       uint64   `json:"weight"`
	Height       uint64   `json:"height"`
	TokenId      int32    `json:"tokenId"`
	Sign         string   `json:"sign"`
}

type Tx

type Tx struct {
	types.TxBase
	From    *common.Address
	To      common.Address
	Value   *math.BigInt
	TokenId int32
	Data    []byte
	// contains filtered or unexported fields
}

func RandomTx

func RandomTx() *Tx

func SampleTx

func SampleTx() *Tx

func (*Tx) Compare

func (t *Tx) Compare(tx types.Txi) bool

func (*Tx) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*Tx) Dump

func (t *Tx) Dump() string

func (*Tx) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*Tx) GetBase

func (t *Tx) GetBase() *types.TxBase

func (*Tx) GetConfirm

func (t *Tx) GetConfirm() time.Duration

func (*Tx) GetSender

func (t *Tx) GetSender() *common.Address

func (*Tx) GetValue

func (t *Tx) GetValue() *math.BigInt

func (*Tx) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*Tx) Msgsize

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

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

func (*Tx) Parents

func (t *Tx) Parents() common.Hashes

func (*Tx) RawTx

func (t *Tx) RawTx() *RawTx

func (*Tx) RawTxi

func (c *Tx) RawTxi() types.RawTxi

func (*Tx) Sender

func (t *Tx) Sender() common.Address

func (*Tx) SetSender

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

func (*Tx) Setconfirm

func (t *Tx) Setconfirm()

func (*Tx) SignatureTargets

func (t *Tx) SignatureTargets() []byte

func (*Tx) String

func (t *Tx) String() string

func (*Tx) ToJsonMsg added in v0.0.4

func (t *Tx) ToJsonMsg() TransactionMsg

func (*Tx) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type TxisMarshaler

type TxisMarshaler []*RawTxMarshaler

func NewTxisMarshaler

func NewTxisMarshaler(t types.Txis) TxisMarshaler

func (*TxisMarshaler) Append

func (t *TxisMarshaler) Append(tx types.Txi)

func (*TxisMarshaler) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (TxisMarshaler) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (TxisMarshaler) Len

func (t TxisMarshaler) Len() int

func (TxisMarshaler) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (TxisMarshaler) Msgsize

func (z TxisMarshaler) Msgsize() (s int)

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

func (TxisMarshaler) String

func (t TxisMarshaler) String() string

func (TxisMarshaler) Txis

func (t TxisMarshaler) Txis() types.Txis

func (*TxisMarshaler) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type Txs

type Txs []*Tx

func (*Txs) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (Txs) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*Txs) Len

func (r *Txs) Len() int

func (Txs) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (Txs) Msgsize

func (z Txs) Msgsize() (s int)

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

func (Txs) String

func (t Txs) String() string

func (Txs) ToRawTxs

func (t Txs) ToRawTxs() RawTxs

func (*Txs) UnmarshalMsg

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

UnmarshalMsg implements msgp.Unmarshaler

type VrfInfo

type VrfInfo struct {
	Message   []byte
	Proof     []byte
	PublicKey []byte
	Vrf       []byte
}

func (*VrfInfo) DecodeMsg

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

DecodeMsg implements msgp.Decodable

func (*VrfInfo) EncodeMsg

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

EncodeMsg implements msgp.Encodable

func (*VrfInfo) MarshalMsg

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

MarshalMsg implements msgp.Marshaler

func (*VrfInfo) Msgsize

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

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

func (*VrfInfo) String

func (v *VrfInfo) String() string

func (*VrfInfo) UnmarshalMsg

func (z *VrfInfo) 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