attachments

package
v0.26.4 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: LGPL-3.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBurnAttachment

func CreateBurnAttachment(key string) []byte

func CreateChangeProfileAttachment

func CreateChangeProfileAttachment(hash []byte) []byte

func CreateDeleteFlipAttachment

func CreateDeleteFlipAttachment(cid []byte) []byte

func CreateFlipSubmitAttachment

func CreateFlipSubmitAttachment(cid []byte, pair uint8) []byte

func CreateLongAnswerAttachment added in v0.21.0

func CreateLongAnswerAttachment(answers []byte, proof []byte, salt []byte, key *ecies.PrivateKey) []byte

func CreateOnlineStatusAttachment

func CreateOnlineStatusAttachment(online bool) []byte

func CreateShortAnswerAttachment

func CreateShortAnswerAttachment(answers []byte, rnd uint64) []byte

func CreateStoreToIpfsAttachment added in v0.25.3

func CreateStoreToIpfsAttachment(cid []byte, size uint32) []byte

Types

type BurnAttachment

type BurnAttachment struct {
	Key string
}

func ParseBurnAttachment

func ParseBurnAttachment(tx *types.Transaction) *BurnAttachment

func (*BurnAttachment) FromBytes added in v0.21.0

func (s *BurnAttachment) FromBytes(data []byte) error

func (*BurnAttachment) ToBytes added in v0.21.0

func (s *BurnAttachment) ToBytes() ([]byte, error)

type CallContractAttachment added in v0.22.0

type CallContractAttachment struct {
	Method string
	Args   [][]byte
}

func CreateCallContractAttachment added in v0.22.0

func CreateCallContractAttachment(method string, args ...[]byte) *CallContractAttachment

func ParseCallContractAttachment added in v0.22.0

func ParseCallContractAttachment(tx *types.Transaction) *CallContractAttachment

func (*CallContractAttachment) FromBytes added in v0.22.0

func (c *CallContractAttachment) FromBytes(data []byte) error

func (*CallContractAttachment) ToBytes added in v0.22.0

func (c *CallContractAttachment) ToBytes() ([]byte, error)

type ChangeProfileAttachment

type ChangeProfileAttachment struct {
	Hash []byte
}

func ParseChangeProfileAttachment

func ParseChangeProfileAttachment(tx *types.Transaction) *ChangeProfileAttachment

func (*ChangeProfileAttachment) FromBytes added in v0.21.0

func (s *ChangeProfileAttachment) FromBytes(data []byte) error

func (*ChangeProfileAttachment) ToBytes added in v0.21.0

func (s *ChangeProfileAttachment) ToBytes() ([]byte, error)

type DeleteFlipAttachment

type DeleteFlipAttachment struct {
	Cid []byte
}

func ParseDeleteFlipAttachment

func ParseDeleteFlipAttachment(tx *types.Transaction) *DeleteFlipAttachment

func (*DeleteFlipAttachment) FromBytes added in v0.21.0

func (s *DeleteFlipAttachment) FromBytes(data []byte) error

func (*DeleteFlipAttachment) ToBytes added in v0.21.0

func (s *DeleteFlipAttachment) ToBytes() ([]byte, error)

type DeployContractAttachment added in v0.22.0

type DeployContractAttachment struct {
	CodeHash common.Hash
	Args     [][]byte
}

func CreateDeployContractAttachment added in v0.22.0

func CreateDeployContractAttachment(codeHash common.Hash, args ...[]byte) *DeployContractAttachment

func ParseDeployContractAttachment added in v0.22.0

func ParseDeployContractAttachment(tx *types.Transaction) *DeployContractAttachment

func (*DeployContractAttachment) FromBytes added in v0.22.0

func (d *DeployContractAttachment) FromBytes(data []byte) error

func (*DeployContractAttachment) ToBytes added in v0.22.0

func (d *DeployContractAttachment) ToBytes() ([]byte, error)

type FlipSubmitAttachment

type FlipSubmitAttachment struct {
	Cid  []byte
	Pair uint8
}

func ParseFlipSubmitAttachment

func ParseFlipSubmitAttachment(tx *types.Transaction) *FlipSubmitAttachment

func (*FlipSubmitAttachment) FromBytes added in v0.21.0

func (s *FlipSubmitAttachment) FromBytes(data []byte) error

func (*FlipSubmitAttachment) ToBytes added in v0.21.0

func (s *FlipSubmitAttachment) ToBytes() ([]byte, error)

type LongAnswerAttachment added in v0.21.0

type LongAnswerAttachment struct {
	Answers []byte
	Proof   []byte
	Key     []byte
	Salt    []byte
}

func ParseLongAnswerAttachment added in v0.21.0

func ParseLongAnswerAttachment(tx *types.Transaction) *LongAnswerAttachment

func ParseLongAnswerBytesAttachment added in v0.21.0

func ParseLongAnswerBytesAttachment(payload []byte) *LongAnswerAttachment

func (*LongAnswerAttachment) FromBytes added in v0.21.0

func (s *LongAnswerAttachment) FromBytes(data []byte) error

func (*LongAnswerAttachment) ToBytes added in v0.21.0

func (s *LongAnswerAttachment) ToBytes() ([]byte, error)

type OnlineStatusAttachment

type OnlineStatusAttachment struct {
	Online bool
}

func ParseOnlineStatusAttachment

func ParseOnlineStatusAttachment(tx *types.Transaction) *OnlineStatusAttachment

func (*OnlineStatusAttachment) FromBytes added in v0.21.0

func (s *OnlineStatusAttachment) FromBytes(data []byte) error

func (*OnlineStatusAttachment) ToBytes added in v0.21.0

func (s *OnlineStatusAttachment) ToBytes() ([]byte, error)

type ShortAnswerAttachment

type ShortAnswerAttachment struct {
	Answers []byte
	Rnd     uint64
}

func ParseShortAnswerAttachment

func ParseShortAnswerAttachment(tx *types.Transaction) *ShortAnswerAttachment

func ParseShortAnswerBytesAttachment

func ParseShortAnswerBytesAttachment(payload []byte) *ShortAnswerAttachment

func (*ShortAnswerAttachment) FromBytes added in v0.21.0

func (s *ShortAnswerAttachment) FromBytes(data []byte) error

func (*ShortAnswerAttachment) ToBytes added in v0.21.0

func (s *ShortAnswerAttachment) ToBytes() ([]byte, error)

type StoreToIpfsAttachment added in v0.25.3

type StoreToIpfsAttachment struct {
	Cid  []byte
	Size uint32
}

func ParseStoreToIpfsAttachment added in v0.25.3

func ParseStoreToIpfsAttachment(tx *types.Transaction) *StoreToIpfsAttachment

func (*StoreToIpfsAttachment) FromBytes added in v0.25.3

func (t *StoreToIpfsAttachment) FromBytes(data []byte) error

func (*StoreToIpfsAttachment) ToBytes added in v0.25.3

func (t *StoreToIpfsAttachment) ToBytes() ([]byte, error)

type TerminateContractAttachment added in v0.22.0

type TerminateContractAttachment struct {
	Args [][]byte
}

func CreateTerminateContractAttachment added in v0.22.0

func CreateTerminateContractAttachment(args ...[]byte) *TerminateContractAttachment

func ParseTerminateContractAttachment added in v0.22.0

func ParseTerminateContractAttachment(tx *types.Transaction) *TerminateContractAttachment

func (*TerminateContractAttachment) FromBytes added in v0.22.0

func (t *TerminateContractAttachment) FromBytes(data []byte) error

func (*TerminateContractAttachment) ToBytes added in v0.22.0

func (t *TerminateContractAttachment) ToBytes() ([]byte, error)

Jump to

Keyboard shortcuts

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