attachments

package
v0.21.4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2020 License: LGPL-3.0 Imports: 5 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

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 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 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)

Jump to

Keyboard shortcuts

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