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 )
Click to show internal directories.
Click to hide internal directories.