maps

package
v0.48.86 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HashFromMap

func HashFromMap(m map[string][]byte) []byte

HashFromMap computes a merkle tree from sorted map and returns the merkle root.

func ProofsFromMap

func ProofsFromMap(m map[string][]byte) ([]byte, map[string]*tmcrypto.Proof, []string)

ProofsFromMap generates proofs from a map. The keys/values of the map will be used as the keys/values in the underlying key-value pairs. The keys are sorted before the proofs are computed.

Types

type KVPair

type KVPair kv.Pair

A local extension to KVPair that can be hashed. Key and value are length prefixed and concatenated, then hashed.

func NewKVPair

func NewKVPair(key, value []byte) KVPair

NewKVPair takes in a key and value and creates a kv.Pair wrapped in the local extension KVPair

func (KVPair) Bytes

func (kv KVPair) Bytes() []byte

Bytes returns key || value, with both the key and value length prefixed.

Jump to

Keyboard shortcuts

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