proofsignature

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IavlProofAPI

type IavlProofAPI struct {
	Namespace string
	Version   string
	Service   *IavlProofService
	Public    bool
}

func NewIavlAPI

func NewIavlAPI(dagStore sdk.Storage, dagExchange graphsync.GraphExchange, db dbm.DB, cacheSize, version int64) (*IavlProofAPI, error)

type IavlProofService

type IavlProofService struct {
	// contains filtered or unexported fields
}

func (*IavlProofService) DeleteVersion added in v0.1.9

func (s *IavlProofService) DeleteVersion(version int64) (json.RawMessage, error)

DeleteVersion deletes an IAVL tree version from the DB. The version can then no longer be accessed. It returns a result containing the version and root hash of the versioned tree that was deleted.

func (*IavlProofService) Get

func (s *IavlProofService) Get(key []byte) (json.RawMessage, error)

Get returns a result containing the index and value for a given key based on the current state (version) of the tree. If the key does not exist, Get returns the index of the next value.

func (*IavlProofService) GetByIndex

func (s *IavlProofService) GetByIndex(index int64) (json.RawMessage, error)

GetByIndex returns a result containing the key and value for a given index based on the current state (version) of the tree.

func (*IavlProofService) GetCommitmentProof added in v0.1.3

func (s *IavlProofService) GetCommitmentProof(key []byte, version int64) (json.RawMessage, error)

GetCommitmentProof returns a result containing the IAVL tree version and value for a given key based on the current state (version) of the tree including a verifiable existing or not existing Commitment proof.

func (*IavlProofService) GetCurrentVersion added in v0.2.4

func (s *IavlProofService) GetCurrentVersion() ([]byte, int8)

func (*IavlProofService) GetVersioned

func (s *IavlProofService) GetVersioned(version int64, key []byte) (json.RawMessage, error)

GetVersioned returns a result containing the IAVL tree version and value for a given key at a specific tree version.

func (*IavlProofService) GetWithProof

func (s *IavlProofService) GetWithProof(key []byte) (json.RawMessage, error)

GetWithProof returns a result containing the IAVL tree version and value for a given key based on the current state (version) of the tree including a verifiable Merkle proof.

func (*IavlProofService) Has

func (s *IavlProofService) Has(key []byte) (bool, error)

Has returns a result containing a boolean on whether or not the IAVL tree has a given key in the current version

func (*IavlProofService) HasVersioned

func (s *IavlProofService) HasVersioned(version int64) (bool, error)

HasVersioned returns a result containing a boolean on whether or not the IAVL tree has a given key at a specific tree version.

func (*IavlProofService) Hash

Hash returns the IAVL tree root hash based on the current state.

func (*IavlProofService) SaveVersion added in v0.1.3

func (s *IavlProofService) SaveVersion(_ *empty.Empty) ([]byte, error)

SaveVersion saves a new IAVL tree version to the DB based on the current state (version) of the tree. It returns a result containing the hash and new version number.

func (*IavlProofService) Set

func (s *IavlProofService) Set(key []byte, value []byte) (json.RawMessage, error)

Set returns a result after inserting a key/value pair into the IAVL tree based on the current state (version) of the tree.

Jump to

Keyboard shortcuts

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