Documentation ¶
Index ¶
Constants ¶
const TreeHeight = 16
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ITreap ¶
type Proof ¶
type Proof struct { // Siblings is a list of non-empty sibling hashes. Siblings [][]byte `json:"siblings"` }
Proof is a standard Merkle proof. If len(Siblings) == 0, this is proof of non-existence.
type TreapTree ¶
type TreapTree struct {
// contains filtered or unexported fields
}
func BuildFromCosmos ¶
BuildFromCosmos builds a new dynamic Merkle tree with treap data structure by getting elements directly from the Cosmos. It requires GRPC Cosmos address with secure flag.
func BuildFromRaw ¶
BuildFromRaw builds a new dynamic Merkle tree with treap data structure tree from raw data, directly hashing the leaves. It is assumed to use 256|384|512 byte public keys as input.
func BuildTreeFromCollection ¶
BuildTreeFromCollection builds a new dynamic Merkle tree with treap data structure from raw pem certificates, that looks like: -----BEGIN CERTIFICATE----- ... QLIlpAZJZAlpPxwCIFlPFYmq4UcD6I5HJzTUvTRR1oMlYqwBC7SjwtwyspKc ... -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- ... MIIDKzCCAtCgAwIBAgIII+3Lgsfb3yUwCgYIKoZIzj0EAwIweTEUMBIGA1UEAwwL
func BuildTreeFromMarshalled ¶
BuildTreeFromMarshalled builds a new dynamic Merkle tree with treap data structure from raw pem certificates array marshalled in JSON,
func (*TreapTree) GenerateInclusionProof ¶
GenerateInclusionProof generates inclusion proof for the given pem certificate, returns marshalled inclusion proof type with a byte array of siblings