flip

package
v0.21.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: LGPL-3.0 Imports: 26 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

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

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

func (fp *Flipper) GetFlip(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) GetRawFlip

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

func (*Flipper) Has

func (fp *Flipper) Has(c []byte) bool

func (*Flipper) HasFlips

func (fp *Flipper) HasFlips() bool

func (*Flipper) Initialize

func (fp *Flipper) Initialize()

func (*Flipper) IsFlipReady

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

func (*Flipper) Load

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

func (*Flipper) PrepareFlip

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

func (*Flipper) ReadFlip

func (fp *Flipper) ReadFlip(cid []byte) (*types.Flip, error)

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)

type IpfsFlipOld

type IpfsFlipOld struct {
	Data   []byte
	PubKey []byte
}

Jump to

Keyboard shortcuts

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