flip

package
v1.1.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: LGPL-3.0 Imports: 24 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DuplicateFlipError = errors.New("duplicate flip")
	FlipIsMissingError = errors.New("flip is missing")
)

Functions

This section is empty.

Types

type Flipper

type Flipper struct {
	// contains filtered or unexported fields
}

func NewFlipper

func NewFlipper(db dbm.DB, ipfsProxy ipfs.Proxy, keyspool *mempool.KeysPool, txpool *mempool.TxPool, secStore *secstore.SecStore, appState *appstate.AppState, bus eventbus.Bus) *Flipper

func (*Flipper) AddNewFlip

func (fp *Flipper) AddNewFlip(flip *types.Flip, local bool) error

func (*Flipper) Clear

func (fp *Flipper) Clear()

func (*Flipper) GetFlipFromMemory added in v0.23.1

func (fp *Flipper) GetFlipFromMemory(key []byte) (publicPart []byte, privatePart []byte, err error)

func (*Flipper) GetFlipPrivateEncryptionKey

func (fp *Flipper) GetFlipPrivateEncryptionKey() *ecies.PrivateKey

func (*Flipper) GetFlipPublicEncryptionKey

func (fp *Flipper) GetFlipPublicEncryptionKey() *ecies.PrivateKey

func (*Flipper) GetFlipReadiness added in v0.23.1

func (fp *Flipper) GetFlipReadiness(hash common.Hash) bool

func (*Flipper) GetRawFlip

func (fp *Flipper) GetRawFlip(flipCid []byte) (*IpfsFlip, error)

func (*Flipper) HasFlipInMemory added in v0.23.1

func (fp *Flipper) HasFlipInMemory(hash common.Hash) bool

func (*Flipper) Initialize

func (fp *Flipper) Initialize()

func (*Flipper) IsFlipAvailable added in v0.21.4

func (fp *Flipper) IsFlipAvailable(key []byte) bool

func (*Flipper) LoadInMemory added in v0.23.1

func (fp *Flipper) LoadInMemory(cids [][]byte)

func (*Flipper) PrepareFlip

func (fp *Flipper) PrepareFlip(flipPublicPart []byte, flipPrivatePart []byte) (cid.Cid, []byte, []byte, error)

func (*Flipper) SetFlipReadiness added in v0.23.1

func (fp *Flipper) SetFlipReadiness(hash common.Hash)

func (*Flipper) UnpinFlip

func (fp *Flipper) UnpinFlip(flipCid []byte)

type IpfsFlip

type IpfsFlip struct {
	PubKey      []byte
	PublicPart  []byte
	PrivatePart []byte
}

func (*IpfsFlip) FromBytes added in v0.21.0

func (f *IpfsFlip) FromBytes(data []byte) error

func (*IpfsFlip) ToBytes added in v0.21.0

func (f *IpfsFlip) ToBytes() ([]byte, error)

Jump to

Keyboard shortcuts

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