blindtree

package
v5.5.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2020 License: BSD-3-Clause, BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentBlindTreeConfig

func GetCurrentBlindTreeConfig() (cfg merkletree2.Config)

func GetCurrentBlindTreeConfigUnsafe

func GetCurrentBlindTreeConfigUnsafe() (cfg merkletree2.Config)

This config uses the non thread safe encoder.

Types

type BlindMerkleValue

type BlindMerkleValue struct {
	ValueType  BlindMerkleValueType
	InnerValue interface{}
}

BlindMerkleValue simulates a union type to store values of different types in the Blind Merkle Tree. To add a new type, grab a new BlindMerkleValueType constant and update the CodecEncodeSelf and CodecDecodeSelf functions as appropriate.

func BlindMerkleValueEmpty

func BlindMerkleValueEmpty() BlindMerkleValue

func BlindMerkleValueStringForTesting

func BlindMerkleValueStringForTesting(s string) BlindMerkleValue

func BlindMerkleValueTeamV1

func BlindMerkleValueTeamV1(v TeamV1Value) BlindMerkleValue

func (*BlindMerkleValue) CodecDecodeSelf

func (t *BlindMerkleValue) CodecDecodeSelf(d *codec.Decoder)

func (*BlindMerkleValue) CodecEncodeSelf

func (t *BlindMerkleValue) CodecEncodeSelf(e *codec.Encoder)

type BlindMerkleValueType

type BlindMerkleValueType uint8

Note: values up to 127 are preferred as they are encoded in a single byte

const (
	ValueTypeEmpty  BlindMerkleValueType = 0
	ValueTypeTeamV1 BlindMerkleValueType = 1

	ValueTypeStringForTesting BlindMerkleValueType = 127
)

type TeamV1Value

type TeamV1Value struct {
	Tails map[keybase1.SeqType]sig3.Tail
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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